Boost logo

Boost :

Subject: Re: [boost] [container] 1.56.0 flat_map static assert typo ?
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2014-08-09 05:47:56


El 09/08/2014 9:53, feverzsj escribió:
> hi, list
> in <boost/container/flat_map.hpp>, the ctors seems to contain a wrong
> static assert:
>
> flat_map()
> : m_flat_tree()
> {
> //Allocator type must be std::pair<CONST Key, T>
> BOOST_STATIC_ASSERT((container_detail::is_same<std::pair&lt;Key, T>,
> typename Allocator::value_type>::value));
> }
>
> missing "const" ?

No. flat_map is different from map, the key is not const. See the
default allocator argument, it's std::allocator< std::pair<Key, T> >

Best,

Ion


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk