Boost logo

Boost :

From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2007-06-14 06:11:05


Daveus, Fredrik skrev:
> Daveus, Fredrik a ?crit :
>
>> I want to pass the result of a map_list_of call as an argument to a
>> class ctor, but the only way I've managed to do this is by using some
>> stuff from the assign_detail namespace.
>>
>> Is there any other (more elegant) way of achieving this?
>
> template<typename T>
> A(const T& t) : m_map(t)
> {
> }
>
> maybe?

Or

template<typename T>
A(const T& t) : m_map(t.begin(),t.end())
{
}

-Thorsten


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