brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1006 B · 975b6e1 Raw
41 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++1710// UNSUPPORTED: no-localization11// UNSUPPORTED: libcpp-has-no-experimental-syncstream12 13// <syncstream>14 15// template <class charT, class traits, class Allocator>16// class basic_osyncstream;17 18// syncbuf_type* rdbuf() const noexcept19 20#include <syncstream>21#include <sstream>22#include <cassert>23 24#include "test_macros.h"25 26template <class CharT>27void test() {28  const std::basic_osyncstream<CharT> out{nullptr};29  assert(out.rdbuf() != nullptr);30  ASSERT_NOEXCEPT(out.rdbuf());31}32 33int main(int, char**) {34  test<char>();35#ifndef TEST_HAS_NO_WIDE_CHARACTERS36  test<wchar_t>();37#endif38 39  return 0;40}41