Boost logo

Boost :

Subject: Re: [boost] boost::variant and "Current Approach: TemporaryHeapBackup" vs "An Initial Solution: Double Storage"
From: Peter Foelsche (peter_foelsche_at_[hidden])
Date: 2009-09-30 17:47:39


also it would be nice if one could somehow deduce the integer value returned
from which():

typedef boost::variant<std::string, int, double> CVariant;

CVariant("test").which() == CVariant::ID<std::string>::value
CVariant(1.0).which() == CVariant::ID<double>::value


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk