prog.cpp:22:10: error: template-id ‘getPortFlag<4u>’ for ‘unsigned int getPortFlag()’ does not match any template declaration
unsigned getPortFlag< PORTA >()
^~~~~~~~~~~~~~~~~~~~
prog.cpp:14:10: note: candidate is: template<GPIO_typedef* T> unsigned int getPortFlag()
unsigned getPortFlag()
^~~~~~~~~~~
prog.cpp: In function ‘int main()’:
prog.cpp:32:44: error: no matching function for call to ‘getPortFlag()’
cout<<"Port A flag: "<<getPortFlag<PORTA>()<<"\n";
^
prog.cpp:14:10: note: candidate: template<GPIO_typedef* T> unsigned int getPortFlag()
unsigned getPortFlag()
^~~~~~~~~~~
prog.cpp:14:10: note: template argument deduction/substitution failed:
prog.cpp:32:44: error: ‘4u’ is not a valid template argument for ‘GPIO_typedef*’ because it is not the address of a variable
cout<<"Port A flag: "<<getPortFlag<PORTA>()<<"\n";
^
prog.cpp:33:44: error: no matching function for call to ‘getPortFlag()’
cout<<"Port B flag: "<<getPortFlag<PORTB>()<<"\n";
^
prog.cpp:14:10: note: candidate: template<GPIO_typedef* T> unsigned int getPortFlag()
unsigned getPortFlag()
^~~~~~~~~~~
prog.cpp:14:10: note: template argument deduction/substitution failed:
prog.cpp:33:44: error: ‘8u’ is not a valid template argument for ‘GPIO_typedef*’ because it is not the address of a variable
cout<<"Port B flag: "<<getPortFlag<PORTB>()<<"\n";
^