
1 Jun
2010
1 Jun
'10
1:31 p.m.
struct get_min_visitor : public boost::static_visitor<> { template <typename T> T operator()(T & i) const { return std::numeric_limits<T>::min(); } };
You have to pass the result type as an argument to static_visitor template. Maybe you meant something like this: //... AttributeValue(int i) : Value(i) {} AttributeValue(double d) : Value(d) {} // etc... struct get_min_visitor : public boost::static_visitor<AttributeValue> { template <typename T> AttributeValue operator()(const T &) const { return std::numeric_limits<T>::min(); } };