Boost logo

Boost :

From: shunsuke (pstade.mb_at_[hidden])
Date: 2007-06-13 19:27:27


Daveus, Fredrik wrote:

> template<typename T>
> A(const T& t) : m_map(t)
> {
> }

> template<typename It>
> A(It first, It last) : m_map(first, last)
> { }

I guess neither is guaranteed to work.
It seems required to force copy-initialization:

     template< class InitList >
     explicit A(InitList const& l)
         : m_map(static_cast<map_type const&>(l))
     { }

Regards,

-- 
Shunsuke Sogame

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