Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can there be anything between keyword 'class' and class name in c++?

Tags:

c++

class

I encountered a code in c++ where class has been defined like :

class MACRO class_name
{
     public :

     private :

}
like image 942
Arpit Jaiswal Avatar asked Dec 14 '22 12:12

Arpit Jaiswal


1 Answers

In standard C++11 and later, there can be attributes between class and the class name. It is also possible (even more likely, perhaps) that the macro expands to non-standard attribute syntax supported by the particular compiler that is being used to compile the code.

like image 154
Brian Bi Avatar answered Jun 05 '23 01:06

Brian Bi