[libcxx-commits] [libcxx] [libc++] Implements Runtime format strings II. (PR #72543)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Tue Nov 21 10:48:21 PST 2023


================
@@ -0,0 +1,61 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+
+// <format>
+
+// template<class charT> struct runtime-format-string {  // exposition-only
+// private:
+//   basic_string_view<charT> str;  // exposition-only
+//
+// public:
+//   runtime-format-string(basic_string_view<charT> s) noexcept : str(s) {}
+//
+//   runtime-format-string(const runtime-format-string&) = delete;
+//   runtime-format-string& operator=(const runtime-format-string&) = delete;
+// };
+// runtime-format-string<char> runtime_format(string_view fmt) noexcept;
+// runtime-format-string<wchar_t> runtime_format(wstring_view fmt) noexcept;
----------------
ldionne wrote:

These functions should be tested in `libcxx/test/std/utilities/format/format.functions/format.runtime_format.pass.cpp` & friends IIUC.

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


More information about the libcxx-commits mailing list