Monday, April 28, 2014

Can template arguments have nested template classes?

Newsgroup: comp.lang.c++

Subject: Can template arguments have nested template classes?

From: Alex <alexhagenzanker@...>

Date: Mon, 28 Apr 2014 05:00:07 -0700 (PDT)



Is there something wrong with requiring that a template argument has a nested class template? Why can I not do the following?



template<typename A, typename T> struct B

{

typedef typename A::AA<T> my_type;

};



VS2013 gives a compile error, even if B is not used at all.



What could I do instead?



Thanks, Alex







p.s. what I really want to do is the following:



template<typename A>

struct B

{

template<typename T>

struct BB : A::AA<T>

{};

};







via Usenet Forums - Usenet Search,Free Usenet - comp.lang.c++ http://ift.tt/1iy7owW

View all the progranning help forums at:

http://ift.tt/1dP9txN

No comments:

Post a Comment