[libcxx-commits] [PATCH] D144994: [Draft][libc++][modules] Adds std module.

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Mar 21 10:02:00 PDT 2023


Mordante marked 2 inline comments as done.
Mordante added inline comments.


================
Comment at: libcxx/modules/std.compat/cassert.cppm:11-17
+module;
+#include <cassert>
+
+export module std.compat:cassert;
+export {
+  // This module exports nothing.
+} // export
----------------
ChuanqiXu wrote:
> Mordante wrote:
> > ChuanqiXu wrote:
> > > What's the meaning for the file? It looks useless.
> > It kind of is, but it's easier to have tooling that makes sure every header is a module. This way there need to be no exceptions. Some of the "empty" modules may get symbols in the future.
> Got your point. I remember the paper said clearly that `assert` and `errno` is not exported in the std modules. But it doesn't matter really.
I can't find that in the paper nor in the WP. There is http://eel.is/c++draft/std.modules#note-2 which states
```
[Note 2: Like all named modules, the C++ library modules do not make macros visible ([module.import]), such as assert ([cassert.syn]), errno ([cerrno.syn]), offsetof ([cstddef.syn]), and va_arg ([cstdarg.syn]).
— end note]
```



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144994/new/

https://reviews.llvm.org/D144994



More information about the libcxx-commits mailing list