Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions include/boost/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
// DO NOT MODIFY THIS FILE!
//

// Make the header safe to include from libraries supporting modules
#if defined(BOOST_IN_MODULE_PURVIEW) && !defined(BOOST_CONFIG_HPP)
# error "Please #include <boost/config.hpp> in your module global fragment"
#endif

#ifndef BOOST_CONFIG_HPP
#define BOOST_CONFIG_HPP

Expand Down
12 changes: 10 additions & 2 deletions include/boost/config/compiler/gcc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,17 @@
// See https://svn.boost.org/trac/boost/ticket/11852
//
#ifdef __cplusplus
#include <cstddef>
# ifdef __has_include
# if __has_include(<version>)
# include <version>
# else
# include <cstddef>
# endif
# else
# include <cstddef>
# endif
#else
#include <stddef.h>
# include <stddef.h>
#endif
#if defined(_GLIBCXX_USE_FLOAT128) && !defined(__STRICT_ANSI__) && !defined(BOOST_NVCC_CXX03)
# define BOOST_HAS_FLOAT128
Expand Down
15 changes: 15 additions & 0 deletions include/boost/config/disable_module_warnings.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Copyright 2026 Ruben Perez
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt

#ifdef BOOST_USE_MODULES
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winclude-angled-in-module-purview"
#endif

#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable : 5244)
#endif
#endif
2 changes: 1 addition & 1 deletion include/boost/config/no_tr1/memory.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# define BOOST_CONFIG_NO_MEMORY_RECURSION
# endif

# include <memory>
# include <boost/config/std/memory.hpp>

# ifdef BOOST_CONFIG_NO_MEMORY_RECURSION
# undef BOOST_TR1_NO_RECURSION
Expand Down
12 changes: 10 additions & 2 deletions include/boost/config/platform/linux.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,17 @@

// make sure we have __GLIBC_PREREQ if available at all
#ifdef __cplusplus
#include <cstdlib>
# ifdef __has_include
# if __has_include(<version>)
# include <version> // lightweight and friendly to modules
# else
# include <cstdlib>
# endif
# else
# include <cstdlib>
# endif
#else
#include <stdlib.h>
# include <stdlib.h>
#endif

//
Expand Down
7 changes: 7 additions & 0 deletions include/boost/config/std/algorithm.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifdef BOOST_USE_MODULES
#ifndef BOOST_IN_MODULE_PURVIEW
import std;
#endif
#else
#include <algorithm>
#endif
7 changes: 7 additions & 0 deletions include/boost/config/std/any.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifdef BOOST_USE_MODULES
#ifndef BOOST_IN_MODULE_PURVIEW
import std;
#endif
#else
#include <any>
#endif
7 changes: 7 additions & 0 deletions include/boost/config/std/array.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifdef BOOST_USE_MODULES
#ifndef BOOST_IN_MODULE_PURVIEW
import std;
#endif
#else
#include <array>
#endif
7 changes: 7 additions & 0 deletions include/boost/config/std/atomic.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifdef BOOST_USE_MODULES
#ifndef BOOST_IN_MODULE_PURVIEW
import std;
#endif
#else
#include <atomic>
#endif
7 changes: 7 additions & 0 deletions include/boost/config/std/barrier.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifdef BOOST_USE_MODULES
#ifndef BOOST_IN_MODULE_PURVIEW
import std;
#endif
#else
#include <barrier>
#endif
7 changes: 7 additions & 0 deletions include/boost/config/std/bit.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifdef BOOST_USE_MODULES
#ifndef BOOST_IN_MODULE_PURVIEW
import std;
#endif
#else
#include <bit>
#endif
7 changes: 7 additions & 0 deletions include/boost/config/std/bitset.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifdef BOOST_USE_MODULES
#ifndef BOOST_IN_MODULE_PURVIEW
import std;
#endif
#else
#include <bitset>
#endif
7 changes: 7 additions & 0 deletions include/boost/config/std/cassert.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifdef BOOST_USE_MODULES
#ifndef BOOST_IN_MODULE_PURVIEW
import std;
#endif
#else
#include <cassert>
#endif
7 changes: 7 additions & 0 deletions include/boost/config/std/cctype.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifdef BOOST_USE_MODULES
#ifndef BOOST_IN_MODULE_PURVIEW
import std;
#endif
#else
#include <cctype>
#endif
7 changes: 7 additions & 0 deletions include/boost/config/std/cerrno.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifdef BOOST_USE_MODULES
#ifndef BOOST_IN_MODULE_PURVIEW
import std;
#endif
#else
#include <cerrno>
#endif
7 changes: 7 additions & 0 deletions include/boost/config/std/cfenv.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifdef BOOST_USE_MODULES
#ifndef BOOST_IN_MODULE_PURVIEW
import std;
#endif
#else
#include <cfenv>
#endif
7 changes: 7 additions & 0 deletions include/boost/config/std/cfloat.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifdef BOOST_USE_MODULES
#ifndef BOOST_IN_MODULE_PURVIEW
import std;
#endif
#else
#include <cfloat>
#endif
7 changes: 7 additions & 0 deletions include/boost/config/std/charconv.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifdef BOOST_USE_MODULES
#ifndef BOOST_IN_MODULE_PURVIEW
import std;
#endif
#else
#include <charconv>
#endif
7 changes: 7 additions & 0 deletions include/boost/config/std/chrono.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifdef BOOST_USE_MODULES
#ifndef BOOST_IN_MODULE_PURVIEW
import std;
#endif
#else
#include <chrono>
#endif
7 changes: 7 additions & 0 deletions include/boost/config/std/cinttypes.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifdef BOOST_USE_MODULES
#ifndef BOOST_IN_MODULE_PURVIEW
import std;
#endif
#else
#include <cinttypes>
#endif
7 changes: 7 additions & 0 deletions include/boost/config/std/climits.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifdef BOOST_USE_MODULES
#ifndef BOOST_IN_MODULE_PURVIEW
import std;
#endif
#else
#include <climits>
#endif
7 changes: 7 additions & 0 deletions include/boost/config/std/clocale.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifdef BOOST_USE_MODULES
#ifndef BOOST_IN_MODULE_PURVIEW
import std;
#endif
#else
#include <clocale>
#endif
7 changes: 7 additions & 0 deletions include/boost/config/std/cmath.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifdef BOOST_USE_MODULES
#ifndef BOOST_IN_MODULE_PURVIEW
import std;
#endif
#else
#include <cmath>
#endif
7 changes: 7 additions & 0 deletions include/boost/config/std/codecvt.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifdef BOOST_USE_MODULES
#ifndef BOOST_IN_MODULE_PURVIEW
import std;
#endif
#else
#include <codecvt>
#endif
7 changes: 7 additions & 0 deletions include/boost/config/std/compare.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifdef BOOST_USE_MODULES
#ifndef BOOST_IN_MODULE_PURVIEW
import std;
#endif
#else
#include <compare>
#endif
7 changes: 7 additions & 0 deletions include/boost/config/std/complex.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifdef BOOST_USE_MODULES
#ifndef BOOST_IN_MODULE_PURVIEW
import std;
#endif
#else
#include <complex>
#endif
7 changes: 7 additions & 0 deletions include/boost/config/std/concepts.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifdef BOOST_USE_MODULES
#ifndef BOOST_IN_MODULE_PURVIEW
import std;
#endif
#else
#include <concepts>
#endif
7 changes: 7 additions & 0 deletions include/boost/config/std/condition_variable.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifdef BOOST_USE_MODULES
#ifndef BOOST_IN_MODULE_PURVIEW
import std;
#endif
#else
#include <condition_variable>
#endif
7 changes: 7 additions & 0 deletions include/boost/config/std/coroutine.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifdef BOOST_USE_MODULES
#ifndef BOOST_IN_MODULE_PURVIEW
import std;
#endif
#else
#include <coroutine>
#endif
8 changes: 8 additions & 0 deletions include/boost/config/std/csetjmp.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#ifdef BOOST_USE_MODULES
#ifndef BOOST_IN_MODULE_PURVIEW
import std;
import std.compat;
#endif
#else
#include <csetjmp>
#endif
8 changes: 8 additions & 0 deletions include/boost/config/std/csignal.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#ifdef BOOST_USE_MODULES
#ifndef BOOST_IN_MODULE_PURVIEW
import std;
import std.compat;
#endif
#else
#include <csignal>
#endif
8 changes: 8 additions & 0 deletions include/boost/config/std/cstdarg.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#ifdef BOOST_USE_MODULES
#ifndef BOOST_IN_MODULE_PURVIEW
import std;
import std.compat;
#endif
#else
#include <cstdarg>
#endif
8 changes: 8 additions & 0 deletions include/boost/config/std/cstddef.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#ifdef BOOST_USE_MODULES
#ifndef BOOST_IN_MODULE_PURVIEW
import std;
import std.compat;
#endif
#else
#include <cstddef>
#endif
8 changes: 8 additions & 0 deletions include/boost/config/std/cstdint.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#ifdef BOOST_USE_MODULES
#ifndef BOOST_IN_MODULE_PURVIEW
import std;
import std.compat;
#endif
#else
#include <cstdint>
#endif
8 changes: 8 additions & 0 deletions include/boost/config/std/cstdio.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#ifdef BOOST_USE_MODULES
#ifndef BOOST_IN_MODULE_PURVIEW
import std;
import std.compat;
#endif
#else
#include <cstdio>
#endif
8 changes: 8 additions & 0 deletions include/boost/config/std/cstdlib.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#ifdef BOOST_USE_MODULES
#ifndef BOOST_IN_MODULE_PURVIEW
import std;
import std.compat;
#endif
#else
#include <cstdlib>
#endif
8 changes: 8 additions & 0 deletions include/boost/config/std/cstring.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#ifdef BOOST_USE_MODULES
#ifndef BOOST_IN_MODULE_PURVIEW
import std;
import std.compat;
#endif
#else
#include <cstring>
#endif
8 changes: 8 additions & 0 deletions include/boost/config/std/ctime.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#ifdef BOOST_USE_MODULES
#ifndef BOOST_IN_MODULE_PURVIEW
import std;
import std.compat;
#endif
#else
#include <ctime>
#endif
8 changes: 8 additions & 0 deletions include/boost/config/std/cuchar.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#ifdef BOOST_USE_MODULES
#ifndef BOOST_IN_MODULE_PURVIEW
import std;
import std.compat;
#endif
#else
#include <cuchar>
#endif
8 changes: 8 additions & 0 deletions include/boost/config/std/cwchar.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#ifdef BOOST_USE_MODULES
#ifndef BOOST_IN_MODULE_PURVIEW
import std;
import std.compat;
#endif
#else
#include <cwchar>
#endif
8 changes: 8 additions & 0 deletions include/boost/config/std/cwctype.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#ifdef BOOST_USE_MODULES
#ifndef BOOST_IN_MODULE_PURVIEW
import std;
import std.compat;
#endif
#else
#include <cwctype>
#endif
7 changes: 7 additions & 0 deletions include/boost/config/std/debugging.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifdef BOOST_USE_MODULES
#ifndef BOOST_IN_MODULE_PURVIEW
import std;
#endif
#else
#include <debugging>
#endif
7 changes: 7 additions & 0 deletions include/boost/config/std/deque.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifdef BOOST_USE_MODULES
#ifndef BOOST_IN_MODULE_PURVIEW
import std;
#endif
#else
#include <deque>
#endif
Loading