1 //===----------------------------------------------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
12 // template <class charT, class traits = char_traits<charT> >
13 // class basic_ofstream
15 // explicit basic_ofstream(const string& s, ios_base::openmode mode = ios_base::out);
19 #include "platform_support.h"
23 std::string temp = get_temp_file_name();
25 std::ofstream fs(temp);
29 std::ifstream fs(temp);
35 std::ifstream fs(temp, std::ios_base::out);
40 std::remove(temp.c_str());
42 std::wofstream fs(temp);
46 std::wifstream fs(temp);
52 std::wifstream fs(temp, std::ios_base::out);
57 std::remove(temp.c_str());