From: Richard Jennings (richard.jennings_at_[hidden])
Date: 2005-12-22 05:18:07
I'm getting a complaint of an ambiguity when I use BOOST_ENUM_VALUES with
std::size_t as the type.
The error is:
E2015 Ambiguity between 'boost::optional<unsigned int>::optional(int
boost::detail::none_helper::* const &)' and 'boost::optional<unsigned
int>::optional(const unsigned int &)'
Which is in the static method 'values' for the case where the index is
zero. The line is:
This does not happen if I use 'int', but does also happen with 'unsigned
int'. A guess is that the compiler thinks that the zero might be null
A possible solution is to do a cast:
This only happens for the zero value, other values are fine.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk