diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-01-06 20:13:54 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-01-06 20:13:54 +0000 |
| commit | 4a2db4d30e1653093d4d8b06e8221e2f8b723507 (patch) | |
| tree | 941a9d805eb2afbba58f445381819ba0e1dc355f /docs/DesignDocs | |
| parent | cb08bb04c85c6dcd3d951725505317c31eeff323 (diff) | |
Notes
Diffstat (limited to 'docs/DesignDocs')
| -rw-r--r-- | docs/DesignDocs/VisibilityMacros.rst | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/docs/DesignDocs/VisibilityMacros.rst b/docs/DesignDocs/VisibilityMacros.rst index 2ee07142d85c..37539ec88884 100644 --- a/docs/DesignDocs/VisibilityMacros.rst +++ b/docs/DesignDocs/VisibilityMacros.rst @@ -49,13 +49,13 @@ Visibility Macros attribute. With GCC the `visibility(...)` attribute is used and member functions are affected. -**_LIBCPP_TYPE_VIS_ONLY** - The same as `_LIBCPP_TYPE_VIS` except that it may be applied to templates. +**_LIBCPP_TEMPLATE_ONLY** + The same as `_LIBCPP_TYPE_VIS` except that it may be applied to class + templates. **Windows Behavior**: DLLs do not support dllimport/export on class templates. The macro has an empty definition on this platform. - Note: This macro should be renamed `_LIBCPP_TEMPLATE_TYPE_VIS`. **_LIBCPP_ENUM_VIS** Mark the typeinfo of an enum as having default visibility. This attribute @@ -74,14 +74,15 @@ Visibility Macros a `_LIBCPP_EXTERN_TEMPLATE` declaration as being exported by the libc++ library. This attribute must be specified on all extern class template declarations. - This macro is used to override the `_LIBCPP_TYPE_VIS_ONLY` attribute + This macro is used to override the `_LIBCPP_TEMPLATE_VIS` attribute specified on the primary template and to export the member functions produced by the explicit instantiation in the dylib. **GCC Behavior**: GCC ignores visibility attributes applied the type in extern template declarations and applying an attribute results in a warning. - However since `_LIBCPP_TYPE_VIS_ONLY` is the same as `_LIBCPP_TYPE_VIS` the - visibility is already correct. The macro has an empty definition with GCC. + However since `_LIBCPP_TEMPLATE_VIS` is the same as + `__attribute__((visibility("default"))` the visibility is already correct. + The macro has an empty definition with GCC. **Windows Behavior**: `extern template` and `dllexport` are fundamentally incompatible *on a template class* on Windows; the former suppresses |
