[libcxx-commits] [libcxx] 6551e59 - [libc++][modules] Update the .cppm files.
Mark de Wever via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Jun 15 09:13:23 PDT 2023
Author: Mark de Wever
Date: 2023-06-15T18:12:06+02:00
New Revision: 6551e59802942d508d32762ab4577567fc2e87bb
URL: https://github.com/llvm/llvm-project/commit/6551e59802942d508d32762ab4577567fc2e87bb
DIFF: https://github.com/llvm/llvm-project/commit/6551e59802942d508d32762ab4577567fc2e87bb.diff
LOG: [libc++][modules] Update the .cppm files.
There are some minor fixes in the definiton and it is synced with
upstream changes.
This has been reviewed as part of D151814.
Added:
Modified:
libcxx/modules/std/complex.cppm
libcxx/modules/std/format.cppm
libcxx/modules/std/functional.cppm
libcxx/modules/std/iosfwd.cppm
libcxx/modules/std/memory.cppm
libcxx/modules/std/memory_resource.cppm
libcxx/modules/std/queue.cppm
libcxx/modules/std/scoped_allocator.cppm
libcxx/modules/std/set.cppm
libcxx/modules/std/stack.cppm
libcxx/modules/std/stop_token.cppm
libcxx/modules/std/unordered_map.cppm
libcxx/modules/std/unordered_set.cppm
libcxx/modules/std/vector.cppm
Removed:
################################################################################
diff --git a/libcxx/modules/std/complex.cppm b/libcxx/modules/std/complex.cppm
index fa2b44c68389a..b3207db2c17c9 100644
--- a/libcxx/modules/std/complex.cppm
+++ b/libcxx/modules/std/complex.cppm
@@ -23,9 +23,6 @@ export namespace std {
using std::operator/;
using std::operator==;
-#if 1 // P1614
- using std::operator!=;
-#endif
using std::operator>>;
using std::operator<<;
diff --git a/libcxx/modules/std/format.cppm b/libcxx/modules/std/format.cppm
index cc7e02d7f973a..cb8b46151fdd4 100644
--- a/libcxx/modules/std/format.cppm
+++ b/libcxx/modules/std/format.cppm
@@ -11,28 +11,27 @@ module;
#include <format>
export module std:format;
-#if !defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT)
export namespace std {
// [format.context], class template basic_format_context
using std::basic_format_context;
using std::format_context;
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
using std::wformat_context;
-# endif
+#endif
// [format.args], class template basic_format_args
using std::basic_format_args;
using std::format_args;
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
using std::wformat_args;
-# endif
+#endif
// [format.fmt.string], class template basic_format_string
using std::basic_format_string;
using std::format_string;
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
using std::wformat_string;
-# endif
+#endif
// [format.functions], formatting functions
using std::format;
@@ -53,9 +52,9 @@ export namespace std {
// [format.parse.ctx], class template basic_format_parse_context
using std::basic_format_parse_context;
using std::format_parse_context;
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
using std::wformat_parse_context;
-# endif
+#endif
// [format.range], formatting of ranges
// [format.range.fmtkind], variable template format_kind
@@ -71,11 +70,10 @@ export namespace std {
// [format.arg.store], class template format-arg-store
using std::make_format_args;
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
using std::make_wformat_args;
-# endif
+#endif
// [format.error], class format_error
using std::format_error;
} // namespace std
-#endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT)
diff --git a/libcxx/modules/std/functional.cppm b/libcxx/modules/std/functional.cppm
index f114f08fa14cf..9760933989576 100644
--- a/libcxx/modules/std/functional.cppm
+++ b/libcxx/modules/std/functional.cppm
@@ -94,9 +94,6 @@ export namespace std {
using std::swap;
using std::operator==;
-#if 1 // P1614
- using std::operator!=;
-#endif
// [func.wrap.move], move only wrapper
// using std::move_only_function;
diff --git a/libcxx/modules/std/iosfwd.cppm b/libcxx/modules/std/iosfwd.cppm
index d43b91888955b..3ba00d5e9ca09 100644
--- a/libcxx/modules/std/iosfwd.cppm
+++ b/libcxx/modules/std/iosfwd.cppm
@@ -12,5 +12,16 @@ module;
export module std:iosfwd;
export namespace std {
- // All symbols are exported by other modules.
+ using std::streampos;
+#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+ using std::wstreampos;
+#endif
+ using std::u16streampos;
+ using std::u32streampos;
+ using std::u8streampos;
+
+ using std::istreambuf_iterator;
+ using std::ostreambuf_iterator;
+
+ using std::fpos;
} // namespace std
diff --git a/libcxx/modules/std/memory.cppm b/libcxx/modules/std/memory.cppm
index 8c47063ed602c..eb59cd4155dac 100644
--- a/libcxx/modules/std/memory.cppm
+++ b/libcxx/modules/std/memory.cppm
@@ -131,7 +131,6 @@ export namespace std {
using std::swap;
- using std::operator!=;
using std::operator<;
using std::operator>;
using std::operator<=;
diff --git a/libcxx/modules/std/memory_resource.cppm b/libcxx/modules/std/memory_resource.cppm
index 99bf89d319164..3c0be56d1eae7 100644
--- a/libcxx/modules/std/memory_resource.cppm
+++ b/libcxx/modules/std/memory_resource.cppm
@@ -16,9 +16,6 @@ export namespace std::pmr {
using std::pmr::memory_resource;
using std::pmr::operator==;
-#if 1 // P1614
- using std::operator!=;
-#endif
// [mem.poly.allocator.class], class template polymorphic_allocator
using std::pmr::polymorphic_allocator;
diff --git a/libcxx/modules/std/queue.cppm b/libcxx/modules/std/queue.cppm
index 420dcc1224b50..8632ee2e42a9f 100644
--- a/libcxx/modules/std/queue.cppm
+++ b/libcxx/modules/std/queue.cppm
@@ -16,15 +16,12 @@ export namespace std {
using std::queue;
using std::operator==;
-#if 0 // P1614
- using std::operator<=>;
-#else
using std::operator!=;
using std::operator<;
using std::operator>;
using std::operator<=;
using std::operator>=;
-#endif
+ using std::operator<=>;
using std::swap;
using std::uses_allocator;
diff --git a/libcxx/modules/std/scoped_allocator.cppm b/libcxx/modules/std/scoped_allocator.cppm
index 595ef0f236aa7..f198db90d1020 100644
--- a/libcxx/modules/std/scoped_allocator.cppm
+++ b/libcxx/modules/std/scoped_allocator.cppm
@@ -17,8 +17,5 @@ export namespace std {
// [scoped.adaptor.operators], scoped allocator operators
using std::operator==;
-#if 1 // P1614
- using std::operator!=;
-#endif
} // namespace std
diff --git a/libcxx/modules/std/set.cppm b/libcxx/modules/std/set.cppm
index 621131c2b8e92..19a2734604d15 100644
--- a/libcxx/modules/std/set.cppm
+++ b/libcxx/modules/std/set.cppm
@@ -16,15 +16,7 @@ export namespace std {
using std::set;
using std::operator==;
-#if 0 // P1614
using std::operator<=>;
-#else
- using std::operator!=;
- using std::operator<;
- using std::operator>;
- using std::operator<=;
- using std::operator>=;
-#endif
using std::swap;
diff --git a/libcxx/modules/std/stack.cppm b/libcxx/modules/std/stack.cppm
index 79241276ead08..74b04d1137dff 100644
--- a/libcxx/modules/std/stack.cppm
+++ b/libcxx/modules/std/stack.cppm
@@ -15,15 +15,14 @@ export namespace std {
// [stack], class template stack
using std::stack;
+ using std::operator==;
using std::operator==;
using std::operator!=;
using std::operator<;
using std::operator>;
using std::operator<=;
using std::operator>=;
-#if 0 // P1614
using std::operator<=>;
-#endif
using std::swap;
using std::uses_allocator;
diff --git a/libcxx/modules/std/stop_token.cppm b/libcxx/modules/std/stop_token.cppm
index cc13db0164453..80a575580fec9 100644
--- a/libcxx/modules/std/stop_token.cppm
+++ b/libcxx/modules/std/stop_token.cppm
@@ -8,14 +8,10 @@
//===----------------------------------------------------------------------===//
module;
-#if __has_include(<stop_token>) // D145183 contains a patch for this header
-# error "include this header unconditionally and uncomment the exported symbols"
-# include <stop_token>
-#endif
+#include <stop_token>
export module std:stop_token;
export namespace std {
-#if 0
// [stoptoken], class stop_token
using std::stop_token;
@@ -28,5 +24,4 @@ export namespace std {
// [stopcallback], class template stop_callback
using std::stop_callback;
-#endif
} // namespace std
diff --git a/libcxx/modules/std/unordered_map.cppm b/libcxx/modules/std/unordered_map.cppm
index f32a33de82989..4469e0dc63019 100644
--- a/libcxx/modules/std/unordered_map.cppm
+++ b/libcxx/modules/std/unordered_map.cppm
@@ -19,9 +19,6 @@ export namespace std {
using std::unordered_multimap;
using std::operator==;
-#if 1 // P1614
- using std::operator!=;
-#endif
using std::swap;
diff --git a/libcxx/modules/std/unordered_set.cppm b/libcxx/modules/std/unordered_set.cppm
index 03797184769b7..f3329fc57837b 100644
--- a/libcxx/modules/std/unordered_set.cppm
+++ b/libcxx/modules/std/unordered_set.cppm
@@ -19,9 +19,6 @@ export namespace std {
using std::unordered_multiset;
using std::operator==;
-#if 1 // P1614
- using std::operator!=;
-#endif
using std::swap;
diff --git a/libcxx/modules/std/vector.cppm b/libcxx/modules/std/vector.cppm
index 125c62bb295e2..9ebe2d4ed8437 100644
--- a/libcxx/modules/std/vector.cppm
+++ b/libcxx/modules/std/vector.cppm
@@ -17,16 +17,7 @@ export namespace std {
using std::vector;
using std::operator==;
-#if 0 // P1614
using std::operator<=>;
-#else
- /* These should be removed after https://reviews.llvm.org/D132268 lands. */
- using std::operator!=;
- using std::operator<;
- using std::operator>;
- using std::operator<=;
- using std::operator>=;
-#endif
using std::swap;
More information about the libcxx-commits
mailing list