Is there a g++ equivalent to Visual Studio's __declspec(novtable)?

前端 未结 1 543
Happy的楠姐
Happy的楠姐 2020-12-17 16:41

Is there a g++ equivalent to Visual Studio\'s __declspec(novtable) argument?

Basically, in a pure virtual base class the __declspec(novtable)

1条回答
  •  青春惊慌失措
    2020-12-17 17:01

    I don't think there is one -- if there was, it would be listed under the type attributes page of the GCC manual. GCC uses type attributes to add extra annotations to types (such as alignment and padding), but there is no type attribute equivalent to __declspc(novtable) listed there.

    I also don't see any compiler flag in the command line options relating to this optimization.

    0 讨论(0)
提交回复
热议问题