
On Tue, Jun 1, 2010 at 3:31 PM, Igor R
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(); } };
Thanks, I could even get it working with: template <typename T> AttributeValue(T t) : Value(t) {} Thanks -- Mathieu