9.28 __declspec(notshared)

The __declspec(notshared) attribute prevents a specific class from having its virtual functions table and RTTI exported.

This holds true regardless of other options you apply. For example, the use of --export_all_vtbl does not override __declspec(notshared).

Examples

struct __declspec(notshared) X
{
    virtual int f();
};                             // do not export this
int X::f()
{
    return 1;
}
struct Y : X
{
    virtual int g();
};                             // do export this
int Y::g()
{
    return 1;
}
Non-ConfidentialPDF file icon PDF versionARM DUI0375E
Copyright © 2007, 2008, 2011, 2012, 2014 ARM. All rights reserved.