The boost extensions use the function-detector-macro to detect whether reserver() is present in the passed list type to gain performance. This is bad: If someone implements his own list he can use reserve() for something else, but now it would be called.
Need to implement another template parameter where you can pass the reserve function that can be invoked to gain this performance. Then create specialized overloads for the STL types that automatically pass the right function to the complete generic template function.
The boost extensions use the function-detector-macro to detect whether
reserver()
is present in the passed list type to gain performance. This is bad: If someone implements his own list he can usereserve()
for something else, but now it would be called. Need to implement another template parameter where you can pass the reserve function that can be invoked to gain this performance. Then create specialized overloads for the STL types that automatically pass the right function to the complete generic template function.