Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // using: clpru (PRU C/C++ Compiler) v2.3.3
- //==== fails to compile:
- template< int n >
- struct Foo {
- };
- void foo( Foo<0> *p ) {
- *p = (Foo<0>){}; // error: a compound literal of type "Foo<0>" is not allowed
- }
- //==== compiles ok:
- template< int n >
- struct Foo {
- };
- Foo<0> unused_foo;
- void foo( Foo<0> *p ) {
- *p = (Foo<0>){};
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement