It feels like I'm losing my mind. The following code will not compile in the Arduino 1.0.1 IDE. I get the error message 'U' does not name a type
. What's wrong? I know this code "does nothing." This minimal test case illustrates a problem I'm having with a larger program.
template<typename T>
void foo() {}
template<typename U>
U bar(U v) { return v; }
void setup(){}
void loop(){}