33 lines · cpp
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-exception6//7//===----------------------------------------------------------------------===//8 9// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20, c++2310 11// REQUIRES: has-unix-headers12// REQUIRES: libcpp-hardening-mode={{extensive|debug}}13// XFAIL: availability-verbose_abort-missing14 15// <fstream>16 17// class basic_ofstream;18 19// native_handle_type native_handle() const noexcept;20 21#include <fstream>22 23#include "../native_handle_assert_test_helpers.h"24 25int main(int, char**) {26 test_native_handle_assertion<std::basic_ofstream<char>>();27#ifndef TEST_HAS_NO_WIDE_CHARACTERS28 test_native_handle_assertion<std::basic_ofstream<wchar_t>>();29#endif30 31 return 0;32}33