diff options
-rw-r--r-- | include/iosfwd | 5 | ||||
-rw-r--r-- | include/iterator | 2 | ||||
-rw-r--r-- | include/vector | 3 |
3 files changed, 8 insertions, 2 deletions
diff --git a/include/iosfwd b/include/iosfwd index eccfd349a..e4149ef22 100644 --- a/include/iosfwd +++ b/include/iosfwd @@ -194,6 +194,11 @@ template <class _CharT, // for <stdexcept> typedef basic_string<char, char_traits<char>, allocator<char> > string; typedef basic_string<wchar_t, char_traits<wchar_t>, allocator<wchar_t> > wstring; + +// Include other forward declarations here +template <class _Tp, class _Alloc = allocator<_Tp> > +class _LIBCPP_TYPE_VIS_ONLY vector; + _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_IOSFWD diff --git a/include/iterator b/include/iterator index 8d9b31101..e5bb49318 100644 --- a/include/iterator +++ b/include/iterator @@ -340,10 +340,10 @@ template <class E> constexpr const E* data(initializer_list<E> il) noexcept; */ #include <__config> +#include <iosfwd> // for forward declarations of vector and string. #include <__functional_base> #include <type_traits> #include <cstddef> -#include <iosfwd> #include <initializer_list> #ifdef __APPLE__ #include <Availability.h> diff --git a/include/vector b/include/vector index dbc0dd321..0e413350d 100644 --- a/include/vector +++ b/include/vector @@ -262,6 +262,7 @@ void swap(vector<T,Allocator>& x, vector<T,Allocator>& y) */ #include <__config> +#include <iosfwd> // for forward declaration of vector #include <__bit_reference> #include <type_traits> #include <climits> @@ -453,7 +454,7 @@ __vector_base<_Tp, _Allocator>::~__vector_base() } } -template <class _Tp, class _Allocator = allocator<_Tp> > +template <class _Tp, class _Allocator /* = allocator<_Tp> */> class _LIBCPP_TYPE_VIS_ONLY vector : private __vector_base<_Tp, _Allocator> { |