[libcxx-commits] [libcxx] [libc++][sstream] P2495R3: Interfacing `stringstream`s with `string_view` (PR #80552)

Mark de Wever via libcxx-commits libcxx-commits at lists.llvm.org
Sun Feb 18 03:38:52 PST 2024


================
@@ -0,0 +1,151 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20, c++23
+
+// <sstream>
+
+// template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT>>
+// class basic_stringstream
+
+// template<class T>
+//   basic_istringstream(const T& t, ios_base::openmode which, const Allocator& a);
+
+#include <cassert>
+#include <concepts>
+#include <sstream>
+#include <string>
+#include <string_view>
+
+#include "constexpr_char_traits.h"
+#include "make_string.h"
+#include "nasty_string.h"
+#include "test_allocator.h"
+#include "test_convertible.h"
+#include "test_macros.h"
+
+
+template <typename CharT>
+void test_sfinae() {
+  using NSSTREAM = std::basic_istringstream<nasty_char, nasty_char_traits, test_allocator<nasty_char>>;
----------------
mordante wrote:

I'd rather not use CAPS for non-macros.

https://github.com/llvm/llvm-project/pull/80552


More information about the libcxx-commits mailing list