Boost logo

Boost Users :

Subject: Re: [Boost-users] Typedef rejected when disambiguating a call to boost::assign
From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2012-10-30 06:05:26


On 30-10-2012 09:38, mark pashley wrote:
> I am trying to initialise a std::map of std::set using boost::assign, as
> follows:
>
> typedef std::set< uint32_t > the_set_t;
> typedef std::map< uint32_t, the_set_t > the_map_t;
>
> the_map_t data = boost::assign::map_list_of< uint32_t, the_set_t > > //
> bad line
> ( 1, boost::assign::list_of(10)(20)(30) )
>
> Unfortunately this is rejected by GCC 4.4.6, and results in a large amount
> of errors, (attached below).
>
> The problem is caused by the use of the typedef the_set_t. If the typedef is
> replaced with std::set<uint32_t> the code compiles and works correctly.

I don't see how a typedef can change the code. Very wierd. Does it
happen with other compilers?

-Thorsten


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