Description
In the implementation of Hashtable<> there is a helper function named literal_size, which returns the "size" of the argument. It is used in the calculation of certain statistics about tables. Currently there is a set of overloads for specific "uninteresting" types, all of which return 0. This set needs to be modified as such uninteresting types are added or removed from the set of supported Hashtable value types.
It would be much simpler to have a single "default" template for uninteresting types, and explicit overloads only for the interesting types.
There is a comment suggesting such an approach was tried but ran into problems getting the desired specialization to be used. There seems to be no such problem now; there may have been a problem with some old compiler that is no longer used.
It would be much simpler to have a single "default" template for uninteresting types, and explicit overloads only for the interesting types.
There is a comment suggesting such an approach was tried but ran into problems getting the desired specialization to be used. There seems to be no such problem now; there may have been a problem with some old compiler that is no longer used.