Although I\'m doubtful, I\'m curious as to whether it\'s possible to extract primitive-type template parameters from an existing type, perhaps using RTTI.
For exampl
In the case of std::bitset, you can just use the size() member function:
std::bitset
size()
size_t sz = oh_my_word.size(); // sz is now 16
In the general case, you can define a member function which returns the size in a similar manner:
template class Foo { public: int size() const { return N; } };