[PATCH] D131062: [docs] Add "C++20 Modules"

Chuanqi Xu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 8 01:43:19 PDT 2022


ChuanqiXu marked 8 inline comments as done.
ChuanqiXu added inline comments.


================
Comment at: clang/docs/CPlusPlus20Modules.rst:316-317
+
+Currently Clang would accept the above example. But it may produce surprising results if the
+debugging code depends on consistent use of ``NDEBUG`` also in other translation units.
+
----------------
h-vetinari wrote:
> I realized afterwards that it's the inverse - debugging code might depend on the _absence_  of `NDEBUG` which switches of debug stuff.
>From my experience, `NDEBUG` is used more frequently in practice. We generally write:

```C++
#ifndef NDEBUG
...
#endif
```

I guess this might not be a big deal.


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

https://reviews.llvm.org/D131062



More information about the cfe-commits mailing list