
Jeffrey Bosboom skrev:
Thorsten Ottosen wrote:
The "GrowPolicy" template parameter should be named "GrowthPolicy." Really?
"Grow" is a verb; "Growth" is a noun. "GrowthPolicy" just sounds better.
"optimized_const_reference" would be better named "by_value_type" or something. For small types, optimized_const_reference isn't a reference at all, so the name is misleading. Better to name it for the usage rather than the type. But then for large types, "by_value_type" is not a value type, but a reference. What about parameter_type or param_type?
boost::call_traits uses param_type. I haven't looked at the code, so I'm not sure what you're using it for or if you'd just be able to use call_traits.
--Jeffrey Bosboom
I could use boost::call_traits, albeit it seems that 1. it defines small types to be too small, eg. sizeof(T) <= sizeof(void*). 2. it doesn't seem to take into account PODs or types with a trivial assignment operator. -Thorsten