|
Boost : |
From: Daniel Schlyder (daniel_at_[hidden])
Date: 2005-03-30 00:33:56
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'
:
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();
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?
Thanks,
-- Daniel Schlyder http://bitblaze.com/
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk