Lets change a rather clumsy C++ notation to a more type-theoretic(ish)one, so that we could try to clearly define what you want.
template<typename A> class SomeB { ... };
Actually means that you have a thingy named SomeB
that takes in a simple type and returns another simple type:
SomeB : typename -> typename
And, for example, if you have the "template template parameter" thing like that:
template<template<typename> class A> class SomeB { ... };
Then that would translate into this:
SomeB : (typename -> typename) -> typename
Now here is how I understood what you want. You say "I have this two guys here"
SomeA : typename -> typename
SomeB : typename -> typename
"If I wanted to apply like SomeA<SomeB>
that'd be illegal since SomeB
is not a typename
-- it is typename->typename
. If only could I apply that SomeB
to something to get a simple type...
Oh! How about I apply it like SomeB<SomeA>
? No, that'd be illegal since SomeB
is not a typename
-- it is typename->typename
. If only could I apply that SomeA
to something to get a simple type...
Oh! How about I apply it like SomeA<SomeB>
? No, that'd be illegal since SomeA
is not a typename
-- it is typename->typename
. If only could I apply that SomeB
to something to get a simple type...
Oh! How about I apply it like SomeB<SomeA>
? No, that'd be illegal since SomeA
is not a typename
-- it is typename->typename
. If only could I apply that SomeB
to something to get a simple type..."
And so on -- You got the idea. And that is very similar to all classical logical paradoxes like the liar paradox. More formally, what you want to do is called an impredicative definition.
And guess what? Type theory was invented by Bertrand Russel exactly to destroy impredicativity.
So your intention is not just conflicts with ones ability to express himself using C++, it is in a conflict with the basic ideas of the type theory. And, to my taste, doesn't make any sense at all. Like the liar paradox.