What happens if you call:
sss()
: v(boost::assign::list_of(1)(2).to_adapter())
{}
list_of implements 2 members:
implicit conversion opertor to the container type and the to_adapter member. You can cast list_of instance to your vector<int> if that with adapter does not work. Other solution can be:
If you need efficiency, you still can use the vector ctor which reserves the number of items in a vector and than copies
the elements from the list.
sss() : v(2)
{
v = list_of...;
}
Regards,
Ovanes