fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. struct A
  5. {
  6. struct B{};
  7.  
  8. template <typename T>
  9. struct EverythingIsFine
  10. {
  11. using Outer = T;
  12. using Inner = typename T::B::B::B::B::B::B;
  13. };
  14.  
  15. using ItWillBeOkay = EverythingIsFine<B>; // Ok
  16. using InnerProblem = ItWillBeOkay::Inner; // Not ok
  17. using OuterProblem = decltype(B().ItWillBeOkay::Outer::B::B::B
  18. ::B::B::B::~B()); // Not even CLOSE to okay
  19. };
  20.  
  21.  
  22. int main() {
  23. // your code goes here
  24. return 0;
  25. }
Success #stdin #stdout 0s 3456KB
stdin
Standard input is empty
stdout
Standard output is empty