Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- template<int num>
- struct Foo
- {
- static constexpr int blarg = num;
- };
- template<Foo<int> foo> // Error: Template argument for non-type template parameter must be an expression
- struct Bar
- {
- static constexpr Foo<int> bar = foo; // Error: Template argument for non-type template parameter must be an expression
- };
- struct MyStruct
- {
- static constexpr Foo<5> myFoo();
- static constexpr Bar<myFoo> myBar(); // Error: Value of type 'Foo<5> ()' is not implicitly convertible to 'int'
- };
Add Comment
Please, Sign In to add comment