Dereferencing pointer stored in boost::variant

This is a discussion on Dereferencing pointer stored in boost::variant within the C++ Programming forums, part of the General Programming Boards category; How do you deference a pointer stored in a boost::variant variable? Code: typedef boost::variant< bool*, int*, unsigned int*, float*> parameterList; ...

  1. #1
    Registered User
    Join Date
    Oct 2006
    Location
    UK/Norway
    Posts
    485

    Dereferencing pointer stored in boost::variant

    How do you deference a pointer stored in a boost::variant variable?

    Code:
    typedef boost::variant< bool*, int*, unsigned int*, float*> parameterList;
    Thanks,

  2. #2
    The larch
    Join Date
    May 2006
    Posts
    3,573
    I suppose you access the stored value as usual with boost::variant.
    I might be wrong.

    Thank you, anon. You sure know how to recognize different types of trees from quite a long way away.
    Quoted more than 1000 times (I hope).

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. 'unlegitimate' dereferencing void* pointer warning
    By Meeshkah in forum C Programming
    Replies: 6
    Last Post: 08-20-2010, 12:08 PM
  2. Following CTools
    By EstateMatt in forum C Programming
    Replies: 5
    Last Post: 06-26-2008, 11:10 AM
  3. Could somebody please help me with this C program
    By brett73 in forum C Programming
    Replies: 6
    Last Post: 11-25-2004, 02:19 AM
  4. towers of hanoi problem
    By aik_21 in forum C Programming
    Replies: 1
    Last Post: 10-02-2004, 02:34 PM
  5. Quick question about SIGSEGV
    By Cikotic in forum C Programming
    Replies: 30
    Last Post: 07-01-2004, 08:48 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21