Basic template question

If I have some class based on templates ie

template<typename T, int something>
Class {

};

is there a way I can get the 'something' value out of it? For example if I want to compare 2 class elements and their 'something' values.
Last edited on
Do you mean something like?

1
2
3
4
5
6
template<typename T, int something>
class myclass 
{
    public:
       int GetSomething(){ return my_something; }
};
You could create a function that returns the something value or make a public static constant member of the class having the value of something.
Last edited on
Topic archived. No new replies allowed.