From 736f0de18dc7735a6b5173614de27cc4c9b1e68b Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Thu, 18 Apr 2024 20:02:16 +0100 Subject: [PATCH] Try again with implementation unit includes. --- module/regex.cxx | 2 +- module/regex_create_char.cpp | 8 +++++++- module/regex_create_wchar_t.cpp | 8 +++++++- module/regex_nc_sfind.cpp | 8 +++++++- module/regex_nc_smatch.cpp | 8 +++++++- module/regex_nc_wsfind.cpp | 8 +++++++- module/regex_nc_wsmatch.cpp | 8 +++++++- module/regex_sfind.cpp | 8 +++++++- module/regex_smatch.cpp | 8 +++++++- module/regex_wsfind.cpp | 8 +++++++- module/regex_wsmatch.cpp | 8 +++++++- test/module/credit_card_example.cpp | 2 +- test/module/partial_regex_grep.cpp | 2 +- test/module/partial_regex_iterate.cpp | 2 +- test/module/partial_regex_match.cpp | 2 +- test/module/regex_grep_example_1.cpp | 2 +- test/module/regex_grep_example_2.cpp | 2 +- test/module/regex_grep_example_3.cpp | 2 +- test/module/regex_iterator_example.cpp | 2 +- test/module/regex_match_example.cpp | 2 +- test/module/regex_merge_example.cpp | 2 +- test/module/regex_replace_example.cpp | 2 +- test/module/regex_search_example.cpp | 2 +- test/module/regex_split_example_1.cpp | 2 +- test/module/regex_split_example_2.cpp | 2 +- test/module/regex_token_iterator_eg_1.cpp | 2 +- test/module/regex_token_iterator_eg_2.cpp | 2 +- 27 files changed, 87 insertions(+), 27 deletions(-) diff --git a/module/regex.cxx b/module/regex.cxx index 29d3bff8..01669294 100644 --- a/module/regex.cxx +++ b/module/regex.cxx @@ -1,7 +1,7 @@ module; -#if defined(__cpp_lib_modules) || (defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 193933523)) +#if defined(__cpp_lib_modules) || (defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 193933524)) #define BOOST_REGEX_USE_STD_MODULE #endif diff --git a/module/regex_create_char.cpp b/module/regex_create_char.cpp index 5ca475dd..81caf1c4 100644 --- a/module/regex_create_char.cpp +++ b/module/regex_create_char.cpp @@ -1,5 +1,7 @@ -#if defined(__cpp_lib_modules) || (defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 193933523)) +module; + +#if defined(__cpp_lib_modules) || (defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 193933524)) #define BOOST_REGEX_USE_STD_MODULE #endif @@ -7,6 +9,10 @@ #define BOOST_REGEX_DETAIL_NS re_detail_600 #endif +#ifndef BOOST_REGEX_USE_STD_MODULE +#include +#endif + module boost.regex; namespace boost::detail { diff --git a/module/regex_create_wchar_t.cpp b/module/regex_create_wchar_t.cpp index eb65c740..21abe6e4 100644 --- a/module/regex_create_wchar_t.cpp +++ b/module/regex_create_wchar_t.cpp @@ -1,5 +1,7 @@ -#if defined(__cpp_lib_modules) || (defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 193933523)) +module; + +#if defined(__cpp_lib_modules) || (defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 193933524)) #define BOOST_REGEX_USE_STD_MODULE #endif @@ -7,6 +9,10 @@ #define BOOST_REGEX_DETAIL_NS re_detail_600 #endif +#ifndef BOOST_REGEX_USE_STD_MODULE +#include +#endif + module boost.regex; namespace boost::detail { diff --git a/module/regex_nc_sfind.cpp b/module/regex_nc_sfind.cpp index 0028d9ff..8ae3aabf 100644 --- a/module/regex_nc_sfind.cpp +++ b/module/regex_nc_sfind.cpp @@ -1,8 +1,14 @@ -#if defined(__cpp_lib_modules) || (defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 193933523)) +module; + +#if defined(__cpp_lib_modules) || (defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 193933524)) #define BOOST_REGEX_USE_STD_MODULE #endif +#ifndef BOOST_REGEX_USE_STD_MODULE +#include +#endif + module boost.regex; namespace boost::re_detail_600 { diff --git a/module/regex_nc_smatch.cpp b/module/regex_nc_smatch.cpp index 3be778d6..b905c1fb 100644 --- a/module/regex_nc_smatch.cpp +++ b/module/regex_nc_smatch.cpp @@ -1,8 +1,14 @@ -#if defined(__cpp_lib_modules) || (defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 193933523)) +module; + +#if defined(__cpp_lib_modules) || (defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 193933524)) #define BOOST_REGEX_USE_STD_MODULE #endif +#ifndef BOOST_REGEX_USE_STD_MODULE +#include +#endif + module boost.regex; namespace boost::re_detail_600 { diff --git a/module/regex_nc_wsfind.cpp b/module/regex_nc_wsfind.cpp index 3fc31106..2a9b734d 100644 --- a/module/regex_nc_wsfind.cpp +++ b/module/regex_nc_wsfind.cpp @@ -1,8 +1,14 @@ -#if defined(__cpp_lib_modules) || (defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 193933523)) +module; + +#if defined(__cpp_lib_modules) || (defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 193933524)) #define BOOST_REGEX_USE_STD_MODULE #endif +#ifndef BOOST_REGEX_USE_STD_MODULE +#include +#endif + module boost.regex; namespace boost::re_detail_600 { diff --git a/module/regex_nc_wsmatch.cpp b/module/regex_nc_wsmatch.cpp index a07feb5d..d2eeaecb 100644 --- a/module/regex_nc_wsmatch.cpp +++ b/module/regex_nc_wsmatch.cpp @@ -1,8 +1,14 @@ -#if defined(__cpp_lib_modules) || (defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 193933523)) +module; + +#if defined(__cpp_lib_modules) || (defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 193933524)) #define BOOST_REGEX_USE_STD_MODULE #endif +#ifndef BOOST_REGEX_USE_STD_MODULE +#include +#endif + module boost.regex; namespace boost::re_detail_600 { diff --git a/module/regex_sfind.cpp b/module/regex_sfind.cpp index c2736874..86ee14ea 100644 --- a/module/regex_sfind.cpp +++ b/module/regex_sfind.cpp @@ -1,8 +1,14 @@ -#if defined(__cpp_lib_modules) || (defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 193933523)) +module; + +#if defined(__cpp_lib_modules) || (defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 193933524)) #define BOOST_REGEX_USE_STD_MODULE #endif +#ifndef BOOST_REGEX_USE_STD_MODULE +#include +#endif + module boost.regex; namespace boost::re_detail_600 { diff --git a/module/regex_smatch.cpp b/module/regex_smatch.cpp index b1bbc653..573a8611 100644 --- a/module/regex_smatch.cpp +++ b/module/regex_smatch.cpp @@ -1,8 +1,14 @@ -#if defined(__cpp_lib_modules) || (defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 193933523)) +module; + +#if defined(__cpp_lib_modules) || (defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 193933524)) #define BOOST_REGEX_USE_STD_MODULE #endif +#ifndef BOOST_REGEX_USE_STD_MODULE +#include +#endif + module boost.regex; namespace boost::re_detail_600 { diff --git a/module/regex_wsfind.cpp b/module/regex_wsfind.cpp index 4bcbcceb..eafb1f15 100644 --- a/module/regex_wsfind.cpp +++ b/module/regex_wsfind.cpp @@ -1,8 +1,14 @@ -#if defined(__cpp_lib_modules) || (defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 193933523)) +module; + +#if defined(__cpp_lib_modules) || (defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 193933524)) #define BOOST_REGEX_USE_STD_MODULE #endif +#ifndef BOOST_REGEX_USE_STD_MODULE +#include +#endif + module boost.regex; namespace boost::re_detail_600 { diff --git a/module/regex_wsmatch.cpp b/module/regex_wsmatch.cpp index 11cf6edd..5968f866 100644 --- a/module/regex_wsmatch.cpp +++ b/module/regex_wsmatch.cpp @@ -1,8 +1,14 @@ -#if defined(__cpp_lib_modules) || (defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 193933523)) +module; + +#if defined(__cpp_lib_modules) || (defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 193933524)) #define BOOST_REGEX_USE_STD_MODULE #endif +#ifndef BOOST_REGEX_USE_STD_MODULE +#include +#endif + module boost.regex; namespace boost::re_detail_600 { diff --git a/test/module/credit_card_example.cpp b/test/module/credit_card_example.cpp index 9d56f90b..56700412 100644 --- a/test/module/credit_card_example.cpp +++ b/test/module/credit_card_example.cpp @@ -16,7 +16,7 @@ * DESCRIPTION: Credit card number formatting code. */ -#if (defined(__cpp_lib_modules) || (defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 193933523))) && !defined(TEST_HEADERS) +#if (defined(__cpp_lib_modules) || (defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 193933524))) && !defined(TEST_HEADERS) import std; #elif defined(MSVC_EXPERIMENTAL_STD_MODULE) && !defined(TEST_HEADERS) import std.core; diff --git a/test/module/partial_regex_grep.cpp b/test/module/partial_regex_grep.cpp index e4fcd8d4..039798d2 100644 --- a/test/module/partial_regex_grep.cpp +++ b/test/module/partial_regex_grep.cpp @@ -16,7 +16,7 @@ * DESCRIPTION: Search example using partial matches. */ -#if (defined(__cpp_lib_modules) || (defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 193933523))) && !defined(TEST_HEADERS) +#if (defined(__cpp_lib_modules) || (defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 193933524))) && !defined(TEST_HEADERS) import std; #elif defined(MSVC_EXPERIMENTAL_STD_MODULE) && !defined(TEST_HEADERS) import std.core; diff --git a/test/module/partial_regex_iterate.cpp b/test/module/partial_regex_iterate.cpp index c0099d0d..e135190d 100644 --- a/test/module/partial_regex_iterate.cpp +++ b/test/module/partial_regex_iterate.cpp @@ -16,7 +16,7 @@ * DESCRIPTION: Search example using partial matches. */ -#if (defined(__cpp_lib_modules) || (defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 193933523))) && !defined(TEST_HEADERS) +#if (defined(__cpp_lib_modules) || (defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 193933524))) && !defined(TEST_HEADERS) import std; #elif defined(MSVC_EXPERIMENTAL_STD_MODULE) && !defined(TEST_HEADERS) import std.core; diff --git a/test/module/partial_regex_match.cpp b/test/module/partial_regex_match.cpp index fa61ab97..5c96ee35 100644 --- a/test/module/partial_regex_match.cpp +++ b/test/module/partial_regex_match.cpp @@ -19,7 +19,7 @@ //#include -#if (defined(__cpp_lib_modules) || (defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 193933523))) && !defined(TEST_HEADERS) +#if (defined(__cpp_lib_modules) || (defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 193933524))) && !defined(TEST_HEADERS) import std; #elif defined(MSVC_EXPERIMENTAL_STD_MODULE) && !defined(TEST_HEADERS) import std.core; diff --git a/test/module/regex_grep_example_1.cpp b/test/module/regex_grep_example_1.cpp index 131e538a..afa390de 100644 --- a/test/module/regex_grep_example_1.cpp +++ b/test/module/regex_grep_example_1.cpp @@ -16,7 +16,7 @@ * DESCRIPTION: regex_grep example 1: searches a cpp file for class definitions. */ -#if (defined(__cpp_lib_modules) || (defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 193933523))) && !defined(TEST_HEADERS) +#if (defined(__cpp_lib_modules) || (defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 193933524))) && !defined(TEST_HEADERS) import std; #elif defined(MSVC_EXPERIMENTAL_STD_MODULE) && !defined(TEST_HEADERS) import std.core; diff --git a/test/module/regex_grep_example_2.cpp b/test/module/regex_grep_example_2.cpp index 71d30c8d..7d66f22f 100644 --- a/test/module/regex_grep_example_2.cpp +++ b/test/module/regex_grep_example_2.cpp @@ -17,7 +17,7 @@ * using a global callback function. */ -#if (defined(__cpp_lib_modules) || (defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 193933523))) && !defined(TEST_HEADERS) +#if (defined(__cpp_lib_modules) || (defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 193933524))) && !defined(TEST_HEADERS) import std; #elif defined(MSVC_EXPERIMENTAL_STD_MODULE) && !defined(TEST_HEADERS) import std.core; diff --git a/test/module/regex_grep_example_3.cpp b/test/module/regex_grep_example_3.cpp index 35698dc5..f57b51e9 100644 --- a/test/module/regex_grep_example_3.cpp +++ b/test/module/regex_grep_example_3.cpp @@ -17,7 +17,7 @@ * using a bound member function callback. */ -#if (defined(__cpp_lib_modules) || (defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 193933523))) && !defined(TEST_HEADERS) +#if (defined(__cpp_lib_modules) || (defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 193933524))) && !defined(TEST_HEADERS) import std; #elif defined(MSVC_EXPERIMENTAL_STD_MODULE) && !defined(TEST_HEADERS) import std.core; diff --git a/test/module/regex_iterator_example.cpp b/test/module/regex_iterator_example.cpp index 6568838c..67ddb763 100644 --- a/test/module/regex_iterator_example.cpp +++ b/test/module/regex_iterator_example.cpp @@ -17,7 +17,7 @@ * using global data. */ -#if (defined(__cpp_lib_modules) || (defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 193933523))) && !defined(TEST_HEADERS) +#if (defined(__cpp_lib_modules) || (defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 193933524))) && !defined(TEST_HEADERS) import std; #elif defined(MSVC_EXPERIMENTAL_STD_MODULE) && !defined(TEST_HEADERS) import std.core; diff --git a/test/module/regex_match_example.cpp b/test/module/regex_match_example.cpp index 81dc8a49..5036b3cf 100644 --- a/test/module/regex_match_example.cpp +++ b/test/module/regex_match_example.cpp @@ -16,7 +16,7 @@ * DESCRIPTION: ftp based regex_match example. */ -#if (defined(__cpp_lib_modules) || (defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 193933523))) && !defined(TEST_HEADERS) +#if (defined(__cpp_lib_modules) || (defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 193933524))) && !defined(TEST_HEADERS) import std; #elif defined(MSVC_EXPERIMENTAL_STD_MODULE) && !defined(TEST_HEADERS) import std.core; diff --git a/test/module/regex_merge_example.cpp b/test/module/regex_merge_example.cpp index 056551ab..f8c95fb5 100644 --- a/test/module/regex_merge_example.cpp +++ b/test/module/regex_merge_example.cpp @@ -17,7 +17,7 @@ * converts a C++ file to syntax highlighted HTML. */ -#if (defined(__cpp_lib_modules) || (defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 193933523))) && !defined(TEST_HEADERS) +#if (defined(__cpp_lib_modules) || (defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 193933524))) && !defined(TEST_HEADERS) import std; #elif defined(MSVC_EXPERIMENTAL_STD_MODULE) && !defined(TEST_HEADERS) import std.core; diff --git a/test/module/regex_replace_example.cpp b/test/module/regex_replace_example.cpp index eeb2219d..52937d8d 100644 --- a/test/module/regex_replace_example.cpp +++ b/test/module/regex_replace_example.cpp @@ -17,7 +17,7 @@ * converts a C++ file to syntax highlighted HTML. */ -#if (defined(__cpp_lib_modules) || (defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 193933523))) && !defined(TEST_HEADERS) +#if (defined(__cpp_lib_modules) || (defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 193933524))) && !defined(TEST_HEADERS) import std; #elif defined(MSVC_EXPERIMENTAL_STD_MODULE) && !defined(TEST_HEADERS) import std.core; diff --git a/test/module/regex_search_example.cpp b/test/module/regex_search_example.cpp index 5f6c551a..0db092f0 100644 --- a/test/module/regex_search_example.cpp +++ b/test/module/regex_search_example.cpp @@ -16,7 +16,7 @@ * DESCRIPTION: regex_search example: searches a cpp file for class definitions. */ -#if (defined(__cpp_lib_modules) || (defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 193933523))) && !defined(TEST_HEADERS) +#if (defined(__cpp_lib_modules) || (defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 193933524))) && !defined(TEST_HEADERS) import std; #elif defined(MSVC_EXPERIMENTAL_STD_MODULE) && !defined(TEST_HEADERS) import std.core; diff --git a/test/module/regex_split_example_1.cpp b/test/module/regex_split_example_1.cpp index 22057b3f..ecab6f18 100644 --- a/test/module/regex_split_example_1.cpp +++ b/test/module/regex_split_example_1.cpp @@ -17,7 +17,7 @@ */ -#if (defined(__cpp_lib_modules) || (defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 193933523))) && !defined(TEST_HEADERS) +#if (defined(__cpp_lib_modules) || (defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 193933524))) && !defined(TEST_HEADERS) import std; #elif defined(MSVC_EXPERIMENTAL_STD_MODULE) && !defined(TEST_HEADERS) Simport std.core; diff --git a/test/module/regex_split_example_2.cpp b/test/module/regex_split_example_2.cpp index 2773a306..83469808 100644 --- a/test/module/regex_split_example_2.cpp +++ b/test/module/regex_split_example_2.cpp @@ -17,7 +17,7 @@ */ -#if (defined(__cpp_lib_modules) || (defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 193933523))) && !defined(TEST_HEADERS) +#if (defined(__cpp_lib_modules) || (defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 193933524))) && !defined(TEST_HEADERS) import std; #elif defined(MSVC_EXPERIMENTAL_STD_MODULE) && !defined(TEST_HEADERS) import std.core; diff --git a/test/module/regex_token_iterator_eg_1.cpp b/test/module/regex_token_iterator_eg_1.cpp index f40a8fbc..d20ac586 100644 --- a/test/module/regex_token_iterator_eg_1.cpp +++ b/test/module/regex_token_iterator_eg_1.cpp @@ -17,7 +17,7 @@ */ -#if (defined(__cpp_lib_modules) || (defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 193933523))) && !defined(TEST_HEADERS) +#if (defined(__cpp_lib_modules) || (defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 193933524))) && !defined(TEST_HEADERS) import std; #elif defined(MSVC_EXPERIMENTAL_STD_MODULE) && !defined(TEST_HEADERS) import std.core; diff --git a/test/module/regex_token_iterator_eg_2.cpp b/test/module/regex_token_iterator_eg_2.cpp index af5618bc..4c8f8dbd 100644 --- a/test/module/regex_token_iterator_eg_2.cpp +++ b/test/module/regex_token_iterator_eg_2.cpp @@ -16,7 +16,7 @@ * DESCRIPTION: regex_token_iterator example: spit out linked URL's. */ -#if (defined(__cpp_lib_modules) || (defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 193933523))) && !defined(TEST_HEADERS) +#if (defined(__cpp_lib_modules) || (defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 193933524))) && !defined(TEST_HEADERS) import std; #elif defined(MSVC_EXPERIMENTAL_STD_MODULE) && !defined(TEST_HEADERS) import std.core;