class Blackboard
{
template <class T>
T& GetEntry(const std::string &key);
};
// I use it something like:
Blackboard bb;
int &someInt = bb.GetEntry<int>("some_int");
float &someFloat = bb.GetEntry<float>("some_float");
int someOtherInt = 10;
bb.SetEntry("some_other_int", someOtherInt );
I would like to make use of the subscript operator like so instead:
class Blackboard
{
template <class T>
T& operator[](const std::string &key);
};How do I actually use the second option though? So far I can only do it like:
bb.operator[]<int>("some_int") = 5;
I don't like that, if thats what I have to do then I will stick with my Get/SetEntry method. So is that how you use a templated []operator or is there a slightly nicer way?
Thanks.

Find content
Not Telling