diff --git a/docs/DesignDocs/VisibilityMacros.rst b/docs/DesignDocs/VisibilityMacros.rst index 20665cd80..d02d2dfee 100644 --- a/docs/DesignDocs/VisibilityMacros.rst +++ b/docs/DesignDocs/VisibilityMacros.rst @@ -98,7 +98,8 @@ Visibility Macros explicit instantiations themselves are marked as exported. Note that this applies *only* to extern *class* templates. Extern *function* templates obey regular import/export semantics, and applying `dllexport` directly to the - extern template declaration is the correct thing to do for them. + extern template declaration (i.e. using `_LIBCPP_FUNC_VIS`) is the correct + thing to do for them. **_LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS** Mark the member functions, typeinfo, and vtable of an explicit instantiation diff --git a/include/string b/include/string index 010a4c781..97fb4a1e2 100644 --- a/include/string +++ b/include/string @@ -4006,7 +4006,7 @@ basic_string<_CharT, _Traits, _Allocator>::__subscriptable(const const_iterator* _LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_string) _LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_string) -_LIBCPP_EXTERN_TEMPLATE(string operator+, allocator >(char const*, string const&)) +_LIBCPP_EXTERN_TEMPLATE(_LIBCPP_FUNC_VIS string operator+, allocator >(char const*, string const&)) #if _LIBCPP_STD_VER > 11 // Literal suffixes for basic_string [basic.string.literals]