fork download
  1.  
  2. enum DeviceState{ ON , OFF , BUSY , WAITING };
  3.  
  4. template<typename T>
  5. struct Foo
  6. {
  7. typedef DeviceState State;
  8.  
  9. template<State S>
  10. void func();
  11. };
  12.  
  13. template<typename T>
  14. template<typename Foo<T>::State>
  15. void Foo<T>::func()
  16. {
  17. }
  18.  
  19. struct Bar{};
  20.  
  21. int main()
  22. {
  23. Foo<Bar> f;
  24. f.func<ON>();
  25. }
  26.  
Success #stdin #stdout 0s 2892KB
stdin
Standard input is empty
stdout
Standard output is empty