The code is compilable on msvc but is not on gcc-4.3:
#include <boost/assign/list_of.hpp>
#include <vector>
int main()
{
//OK
std::vector<int> v = boost::assign::list_of(1)(2);
// error
std::vector<int> v(boost::assign::list_of(1)(2));
return 0;
}
I can initialise std::vector in a first way.
But the problem occurs when i try to initialise std::vector in a class initialization list:class sss
{
std::vector<int> v;
sss()
: v(boost::assign::list_of(1)(2))
{}
};