$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: Johan Torp (johan.torp_at_[hidden])
Date: 2007-01-04 07:11:41
What is the best practice for creating a map from a type to a value?
Currently I do it like this:
=====================================
struct SomeMap
{
template<typename T> static const std::string& LookUp();
};
template <> const std::string& SomeMap::LookUp<int>()
{
static const std::string s("int");
return s;
}
=====================================
...but this seems far from optimal.
-- System Developer TouchTable AB Tel: +46 (0)31 773 68 12 johan.torp_at_[hidden]