Boost logo

Boost Users :

From: John Maddock (john_at_[hidden])
Date: 2008-05-28 10:38:43


Becher, Jochen wrote:
>
> The following type expression evaluates to the false_ type:
>
> boost::is_const<std::map<std::string,std::string>::const_iterator::refer
> ence>::type
>
>
>
> It should evaluate to the true type because ...::reference is
>
>
>
> const std::pair<const std::string,std::string>

Nope, wouldn't that be:

const std::pair<const std::string,std::string>&

which is a reference type and can be neither const nor volatile qualified
(the const qualifier in the above refers to the thing being referenced not
the reference itself). If you feed it through remove_reference before
passing to is_const then you should get true as the result.

HTH, John.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net