From 36cdf027d21e4ca2ee2c4af33f530d7c49082168 Mon Sep 17 00:00:00 2001 From: Howard Hinnant Date: Fri, 10 Sep 2010 16:42:26 +0000 Subject: [PATCH] I am experimenting with putting visibility-default attributes on all struct/classes in libc++. This checkin decorates only basic_string and vector as an experiment, and for review by those in this audience that might know more about visibilty than I do. If I get no negative feedback on this procedure I will begin to decorate the entire library in this way. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@113590 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/iosfwd | 6 +++--- include/memory | 2 +- include/string | 6 +++--- include/vector | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/iosfwd b/include/iosfwd index a4d3f38b..f9ca1a6a 100644 --- a/include/iosfwd +++ b/include/iosfwd @@ -92,8 +92,8 @@ typedef fpos::state_type> wstreampos; _LIBCPP_BEGIN_NAMESPACE_STD -template struct char_traits; -template class allocator; +template struct _LIBCPP_VISIBLE char_traits; +template class _LIBCPP_VISIBLE allocator; template > class basic_ios; @@ -164,7 +164,7 @@ typedef long long streamoff; // for char_traits in template class _Traits = char_traits<_CharT>, - class _Allocator = allocator<_CharT> > class basic_string; + class _Allocator = allocator<_CharT> > class _LIBCPP_VISIBLE basic_string; typedef basic_string, allocator > string; typedef basic_string, allocator > wstring; diff --git a/include/memory b/include/memory index 5b2b41dc..b4875ce7 100644 --- a/include/memory +++ b/include/memory @@ -1471,7 +1471,7 @@ struct __uses_alloc_ctor // allocator template -class allocator +class _LIBCPP_VISIBLE allocator { public: typedef size_t size_type; diff --git a/include/string b/include/string index fc15bc8a..4e6d7cd5 100644 --- a/include/string +++ b/include/string @@ -479,7 +479,7 @@ bool operator!=(const fpos<_StateT>& __x, const fpos<_StateT>& __y) // char_traits template -struct char_traits +struct _LIBCPP_VISIBLE char_traits { typedef _CharT char_type; typedef int int_type; @@ -591,7 +591,7 @@ char_traits<_CharT>::assign(char_type* __s, size_t __n, char_type __a) // char_traits template <> -struct char_traits +struct _LIBCPP_VISIBLE char_traits { typedef char char_type; typedef int int_type; @@ -933,7 +933,7 @@ __basic_string_common<__b>::__throw_out_of_range() const extern template class __basic_string_common; template -class basic_string +class _LIBCPP_VISIBLE basic_string : private __basic_string_common { public: diff --git a/include/vector b/include/vector index 7441cd01..f985a0e2 100644 --- a/include/vector +++ b/include/vector @@ -419,7 +419,7 @@ __vector_base<_Tp, _Allocator>::~__vector_base() } template > -class vector +class _LIBCPP_VISIBLE vector : private __vector_base<_Tp, _Allocator> { private: @@ -1682,7 +1682,7 @@ template class vector; template struct hash >; template -class vector +class _LIBCPP_VISIBLE vector : private __vector_base_common { public: