# Advice on C++20 modules (Boost)

**URL:** https://discourse.cmake.org/t/advice-on-c-20-modules-boost/10641
**Category:** Usage
**Created:** [April 11, 2024, 2:58pm UTC](https://discourse.cmake.org/t/advice-on-c-20-modules-boost/10641 "2024-04-11T14:58:25Z")
**Posts on this page:** 1
**Showing post:** 13

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [April 17, 2024, 8:37pm UTC](https://discourse.cmake.org/t/advice-on-c-20-modules-boost/10641/13 "2024-04-17T20:37:11Z")

</div>

As long as any possible ABI symbol is present in the library the `boost_asio` library provides (including module initializers), things should be fine. If everything is inline, then the library just needs to provide module initializers for every possible module.

> [@anarthal](#):
>
> In a module world, the user would need to have a way to specify which of these macros need to be defined when building their Asio module.

I’m not sure how this will look in CMake, but I suspect that something needs to be done as the only place is `-D` on the command line. Maybe something like:

```cpp
#if __has_include(<boost/asio/user/config.hpp>)
#include <boost/asio/user/config.hpp>
#endif
// Polyfills anything not specified with defaults.
#include <boost/asio/default/config.hpp>

```

?

---

_[View the full topic](https://discourse.cmake.org/t/advice-on-c-20-modules-boost/10641)._
