
4 Mar
2009
4 Mar
'09
12:54 p.m.
Hello, I have a question about tag dispatching (for e.g. the std::advance() function in the std lib, as described for instance in http://www.boost.org/community/generic_programming.html#tag_dispatching) 1. The call to detail::advance_dispatch(i, n, category); I don't understand. category is a type not an object, it should be category(), right? 2. If I am correct, the tags are empty structs which I assume allows modern compilers (g++4, msvc8/9, intel) to optimize away the creation of that category object ? 3. If i am still correct, I have a tag which has no members except 1 static function that returns void. Would that optimization still apply? regards,