Makman2 / CE3D

A terminal 3D engine
GNU General Public License v3.0
4 stars 0 forks source link

Remove function detector macro, instead pass callback #180

Open Makman2 opened 9 years ago

Makman2 commented 9 years ago

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.