This is easy to believe, because I know for sure that direct-initialization of vector from list_of is ambiguous under the rules of current C++ standard.
#include <boost/assign/list_of.hpp>
int main () {
std::vector<int> v1(boost::assign::list_of(0)); // Ambiguous.
std::vector<int> v1 = boost::assign::list_of(0); // OK.
}
In case of direct-initialization, there are 3 constructors of std::vector that can be used:
vector(const vector&);
explicit vector(size_t);
explicit vector(const Allocator&);
In case of copy-initialization, only the first constructor can be used, because the other two are explicit.
AFAIK, there is no easy way to change Boost.Assign to work around this problem, because there is no way to use enable_if with conversion operator. So solution is to use copy-initialization instead of direct-initialization.
Roman Perepelitsa.