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_FSTREAM_H
10#define _LIBCPP___FWD_FSTREAM_H
11
12#include <__config>
13#include <__fwd/string.h>
14
15#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
16# pragma GCC system_header
17#endif
18
19_LIBCPP_BEGIN_NAMESPACE_STD
20
21template <class _CharT, class _Traits = char_traits<_CharT> >
22class _LIBCPP_TEMPLATE_VIS basic_filebuf;
23template <class _CharT, class _Traits = char_traits<_CharT> >
24class _LIBCPP_TEMPLATE_VIS basic_ifstream;
25template <class _CharT, class _Traits = char_traits<_CharT> >
26class _LIBCPP_TEMPLATE_VIS basic_ofstream;
27template <class _CharT, class _Traits = char_traits<_CharT> >
28class _LIBCPP_TEMPLATE_VIS basic_fstream;
29
30using filebuf = basic_filebuf<char>;
31using ifstream = basic_ifstream<char>;
32using ofstream = basic_ofstream<char>;
33using fstream = basic_fstream<char>;
34
35#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
36using wfilebuf = basic_filebuf<wchar_t>;
37using wifstream = basic_ifstream<wchar_t>;
38using wofstream = basic_ofstream<wchar_t>;
39using wfstream = basic_fstream<wchar_t>;
40#endif
41
42template <class _CharT, class _Traits>
43class _LIBCPP_PREFERRED_NAME(filebuf) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wfilebuf)) basic_filebuf;
44template <class _CharT, class _Traits>
45class _LIBCPP_PREFERRED_NAME(ifstream) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wifstream)) basic_ifstream;
46template <class _CharT, class _Traits>
47class _LIBCPP_PREFERRED_NAME(ofstream) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wofstream)) basic_ofstream;
48template <class _CharT, class _Traits>
49class _LIBCPP_PREFERRED_NAME(fstream) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wfstream)) basic_fstream;
50
51_LIBCPP_END_NAMESPACE_STD
52
53#endif // _LIBCPP___FWD_FSTREAM_H
54