CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: ma740988

Search: Search took 0.01 seconds.

  1. Replies
    10
    Views
    4,174

    Re: Dependent type - boost::apply_visitor

    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...
  2. Replies
    10
    Views
    4,174

    Re: Dependent type - boost::apply_visitor

    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...
  3. Replies
    10
    Views
    4,174

    Re: Dependent type - boost::apply_visitor

    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>...
  4. Replies
    10
    Views
    4,174

    Re: Dependent type - boost::apply_visitor

    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...
  5. Replies
    10
    Views
    4,174

    Re: Dependent type - boost::apply_visitor

    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) :...
  6. Replies
    10
    Views
    4,174

    Dependent type - boost::apply_visitor

    Consider,





    # include <iostream>
    # include <map>
    # include <boost/variant.hpp>
    # include <boost/mpl/vector.hpp>
Results 1 to 6 of 6





Click Here to Expand Forum to Full Width

Featured