templates

саша савельев sany2k13@mail.ru
Sat Jun 14 12:31:23 GMT 2025


To whom it may concern
 
Why we can’t use <const char*> in this context?
 
#include < iostream >  
template < auto N >
void f () {
    std::cout  << N  << std::endl ;
}  
int main () {
    f < 1 >();
    f < '!' >();
    f < "!!" >(); // error  
     return 0 ;
}
 

Alexander and his classmates


More information about the Gcc mailing list