1//===----------------------------------------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef _LIBCPP___FWD_SSTREAM_H
10#define _LIBCPP___FWD_SSTREAM_H
11
12#include <__config>
13#include <__fwd/memory.h>
14#include <__fwd/string.h>
15
16#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
17# pragma GCC system_header
18#endif
19
20_LIBCPP_BEGIN_NAMESPACE_STD
21
22template <class _CharT, class _Traits = char_traits<_CharT>, class _Allocator = allocator<_CharT> >
23class _LIBCPP_TEMPLATE_VIS basic_stringbuf;
24
25template <class _CharT, class _Traits = char_traits<_CharT>, class _Allocator = allocator<_CharT> >
26class _LIBCPP_TEMPLATE_VIS basic_istringstream;
27template <class _CharT, class _Traits = char_traits<_CharT>, class _Allocator = allocator<_CharT> >
28class _LIBCPP_TEMPLATE_VIS basic_ostringstream;
29template <class _CharT, class _Traits = char_traits<_CharT>, class _Allocator = allocator<_CharT> >
30class _LIBCPP_TEMPLATE_VIS basic_stringstream;
31
32using stringbuf = basic_stringbuf<char>;
33using istringstream = basic_istringstream<char>;
34using ostringstream = basic_ostringstream<char>;
35using stringstream = basic_stringstream<char>;
36
37#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
38using wstringbuf = basic_stringbuf<wchar_t>;
39using wistringstream = basic_istringstream<wchar_t>;
40using wostringstream = basic_ostringstream<wchar_t>;
41using wstringstream = basic_stringstream<wchar_t>;
42#endif
43
44template <class _CharT, class _Traits, class _Allocator>
45class _LIBCPP_PREFERRED_NAME(stringbuf) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wstringbuf)) basic_stringbuf;
46template <class _CharT, class _Traits, class _Allocator>
47class _LIBCPP_PREFERRED_NAME(istringstream)
48 _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wistringstream)) basic_istringstream;
49template <class _CharT, class _Traits, class _Allocator>
50class _LIBCPP_PREFERRED_NAME(ostringstream)
51 _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wostringstream)) basic_ostringstream;
52template <class _CharT, class _Traits, class _Allocator>
53class _LIBCPP_PREFERRED_NAME(stringstream)
54 _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wstringstream)) basic_stringstream;
55
56_LIBCPP_END_NAMESPACE_STD
57
58#endif // _LIBCPP___FWD_SSTREAM_H
59