10.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-Confidential PDF file icon PDF version ARM DUI0472J
Copyright © 2010-2013 ARM. All rights reserved.