Core problem: I want to be able to take an instance of a templated class, say:
template<class a, class b, class c> class foo;
foo<int, float, double>;
and then do something like:
foo<int, float, double>::value; //Evaluates to a unique number
foo<long, float, double>::value; //Evaluates to a different unique number
foo<int, float, double>::value; //Evaulates to the same unique number
Except, really, it's:
template<class a, class b, class c>
int getUniqueIdentifier()
{
return foo<a, b, c>::value;
}
Current Solution Attempt:
I'm thinking I want to use Boost::MPL's "Extensible Associative Sequence", since each element gets it's own unique identifier, but I think I need to be able to alter the sequence in place, which "insert" doesn't do.
I may be barking up the wrong tree. (On the plus side, dayum, but MPL!)
Purpose:
Reinventing the wheel on a Signals & Sockets system. Components make and register channels with a "switchboard", which would use the unique identifiers to put the channels in a map, allowing run-time versatility. I've tried looking up the Qt library as an example, but I can't parse their abbreviations, and I think I'm missing some formal know-how.
Thanks!