fork(1) download
  1. template<typename T, typename U>
  2. struct TemplateClass {
  3.  
  4. template<typename D = U>
  5. class DefaultU {
  6. D foo;
  7. /* ... */
  8. };
  9.  
  10.  
  11. T& baz;
  12. U bar;
  13. /* ... */
  14. };
  15.  
  16.  
  17. int main()
  18. {
  19.  
  20. int a = 0;
  21. TemplateClass<int, int>::DefaultU<int> b;
  22. TemplateClass<int, decltype(b)> foo = {a, b};
  23. }
Success #stdin #stdout 0s 3464KB
stdin
Standard input is empty
stdout
Standard output is empty