Boost logo

Boost Users :

Subject: [Boost-users] Tag dispatching
From: Hicham Mouline (hicham_at_[hidden])
Date: 2009-03-04 07:54:50


I have a question about tag dispatching (for e.g. the std::advance() function in the std lib, as described for instance in

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?


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at