February 19th, 2013, 12:34 PM
I think I'm back to my original (sort of) question then. Consider:
class Foo {
// Generic visitor that does magical dispatching of
// types and delegates passes down to your visitor...
February 19th, 2013, 10:30 AM
Greetings Paul, I upgraded to boost 1.53 and the end result is the same. i.e.
main.cpp(108): error C2780: 'boost::apply_visitor_delayed_t<Visitor> boost::apply_visitor(Visitor &)' : expects 1...
February 18th, 2013, 12:44 PM
Here's the code with your suggestion. Note I commented out "T visitor" in Foo and I've changed the first argument in doWork to "boost::apply_visitor ( T(), intField ) ;
# include <iostream>...
February 18th, 2013, 12:42 PM
I've _already_ posted the _full_ code. Here's doWork with Foo<T>::visitor as the first argument.
# include <iostream>
# include <map>
# include <boost/variant.hpp>
# include...
February 18th, 2013, 08:45 AM
Produce the error
Foo<T>::visitor': not a valid using-declaration at non-class scope
1> with
1> [
1> T=FooValueType
1> ]
1> main.cpp(103) :...
February 17th, 2013, 03:51 PM
Consider,
# include <iostream>
# include <map>
# include <boost/variant.hpp>
# include <boost/mpl/vector.hpp>