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// <fstream>
10
11// template <class charT, class traits = char_traits<charT> >
12// class basic_ofstream
13
14// basic_ofstream();
15
16// XFAIL: FROZEN-CXX03-HEADERS-FIXME
17
18#include <fstream>
19
20#include "test_macros.h"
21#include "operator_hijacker.h"
22
23int main(int, char**)
24{
25 {
26 std::ofstream fs;
27 }
28 {
29 std::basic_ofstream<char, operator_hijacker_char_traits<char> > fs;
30 }
31#ifndef TEST_HAS_NO_WIDE_CHARACTERS
32 {
33 std::wofstream fs;
34 }
35 {
36 std::basic_fstream<wchar_t, operator_hijacker_char_traits<wchar_t> > fs;
37 }
38#endif
39
40 return 0;
41}
42

source code of libcxx/test/std/input.output/file.streams/fstreams/ofstream.cons/default.pass.cpp