Home

Glennmac@gmail.com schrieb:
> Basically I need to have a map of functions, classes whatever that
> test <, > and == of a known value and actual value. They can be
> strings, int, and doubles. Is this possible?

Take a look at boost.variant and boost.function:

http://www.boost.org/doc/html/variant.html
http://www.boost.org/doc/html/function.html

With boost.variant you can define visitors that compare two variant
instances. A variant can store a set of types like:

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

--
Thomas
http://www.netmeister.org/news/learn2quote.html
The pedants here will shout "int main(void)" but I'll just whisper it.
--Bob Wightman in comp.lang.c

previous
next

Re: Better program design? (was originally Re: Bug in my C++ program seems really strange. (Update o
Re: Checking if elements are empty
Re: a pointer to a derived class problem
Re: Processing drag & drop on the desktop
Closing pexpect connections using threads
Podaruj Zycie
Fundacja Iskierka
Fundacja Sloneczko
Kidprotect
Mam Marzenie