Home Is there a way to resolve this template circular dependency
Reply: 0

Is there a way to resolve this template circular dependency

user473
1#
user473 Published in April 25, 2018, 6:05 pm

Is there a general approach to solve this type of circular dependencies in template or is it impossible to make work?

#include <tuple>

template<class... T>
struct A {
    std::tuple<T...> t;
};

template<class type_of_A>
struct D1 {
    type_of_A* p;
};
template<class type_of_A>
struct D2 {
    type_of_A* p;
};

using A_type = A<D1<???>, D2<???>>;  // <------

int main() { }
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.314116 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO