
"Daniel Schlyder" <daniel@bitblaze.com> wrote in message news:288373781.20050330073356@bitblaze.com... | The following used to compile: | | std::set<std::string> const virtual_control::s_unbindables_permanent | = boost::assign::list_of("Escape")("PrintScreen"); | | I'm not sure why, as Boost.Assign's docs seem to say I should have had to | use the to_adapter function. Anyway, I recently started getting the | following error: | | E:/libs/boost/boost/assign/list_of.hpp: In member function | `boost::assign_detail::generic_list<char[7]>::operator set<string>() const' hm..is this from a cvs snapshot? If so, please update. | E:\code\cpp\dasc\wc2\lib\alex\src\virtual_control.cpp:413: instantiated from | here | E:/libs/boost/boost/assign/list_of.hpp:334: error: call of overloaded | `set( | const boost::assign_detail::converter< | boost::assign_detail::generic_list<const char *> | > & | )' is ambiguous | | After changing my code to | | std::set<std::string> const virtual_control::s_unbindables_permanent | = boost::assign::list_of("Escape")("PrintScreen").to_adapter(); what is the virtual_control::s__xxxxxxxxxx ? Why don't you write const std::set<std::string> foo = ...: | I now get the different error | | E:/libs/boost/boost/assign/list_of.hpp: In member function | `set< | string | > boost::assign_detail::converter< | boost::assign_detail::generic_list<const char *> | >::convert_to_adapter(const set<string> *) const': | E:/libs/boost/boost/assign/list_of.hpp:200: instantiated from | `boost::assign_detail::converter< | boost::assign_detail::generic_list<const char *> | >::adapter_converter::operator set<string>() const' | E:\code\cpp\dasc\wc2\lib\alex\src\virtual_control.cpp:413: instantiated from | here | E:/libs/boost/boost/assign/list_of.hpp:179: error: 'class set<string>' has no | member named 'push' | | To me, this looks like an error in Boost.Assign. Am I doing something wrong? hm...don't call to adapter unless you are dealing with an adapter (queue, priority_queue, stack). Read about to_container() instead. -Thorsten