Thread: Dereferencing pointer stored in boost::variant

  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, 11:08 AM
  2. Following CTools
    By EstateMatt in forum C Programming
    Replies: 5
    Last Post: 06-26-2008, 10: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, 01:34 PM
  5. Quick question about SIGSEGV
    By Cikotic in forum C Programming
    Replies: 30
    Last Post: 07-01-2004, 07:48 PM