Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


#Actualroadysix_

Posted 21 June 2013 - 04:39 PM

Hi, I seem to having a little trouble with something that is seemingly simple.

I would like to get a typedef from my own traits class where the template is instantiated based on a member T::member.

It would be easier to just show an example of what I'm talking about

template <typename T> class someclass
{
public:
	// doesnt work
	typedef ns::some_traits<decltype(T::member)>::type type;
};

// works
typedef ns::some_traits<decltype(otherclass::member)>::type type;

To me this looks like I'm missing a typename somewhere in there but I've tried that in a number of variations.

Could it be a compiler bug (which I doubt)? I'm using the Visual C++ November 2012 CTP compiler.  If not what is the problem here?

 

Thanks in advance.


#1roadysix_

Posted 21 June 2013 - 04:38 PM

Hi, I seem to having a little trouble with something that is seemingly simple.

I would like to get a typedef from my own traits class where the template is instantiated based on a member T::member.

It would be easier to just show an example of what I'm talking about

template <typename T> class someclass
{
public:
	// doesnt work
	typedef ns::some_traits<decltype(T::member)>::type type;
};

// works
typedef ns::some_traits<decltype(otherclass::member)>::type type;

To me this looks like I'm missing a typename somewhere in there but I've tried that in a number of variations.

Could it be a compiler bug (which I doubt)? I'm using the Visual C++ November 2012 CTP compiler.  If not what is the problem here?

 

Thanks in advance.


PARTNERS