aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build/root.build9
-rw-r--r--libbutl/b.cxx8
-rw-r--r--libbutl/b.mxx8
-rw-r--r--libbutl/base64.cxx8
-rw-r--r--libbutl/base64.mxx8
-rw-r--r--libbutl/buildfile40
-rw-r--r--libbutl/char-scanner.cxx8
-rw-r--r--libbutl/char-scanner.mxx8
-rw-r--r--libbutl/command.cxx8
-rw-r--r--libbutl/command.mxx8
-rw-r--r--libbutl/const-ptr.mxx8
-rw-r--r--libbutl/curl.cxx8
-rw-r--r--libbutl/curl.mxx8
-rw-r--r--libbutl/diagnostics.cxx8
-rw-r--r--libbutl/diagnostics.mxx8
-rw-r--r--libbutl/export.hxx2
-rw-r--r--libbutl/fdstream.cxx8
-rw-r--r--libbutl/fdstream.mxx10
-rw-r--r--libbutl/filesystem.cxx8
-rw-r--r--libbutl/filesystem.mxx8
-rw-r--r--libbutl/git.cxx8
-rw-r--r--libbutl/git.mxx8
-rw-r--r--libbutl/manifest-parser.cxx8
-rw-r--r--libbutl/manifest-parser.mxx8
-rw-r--r--libbutl/manifest-rewriter.cxx8
-rw-r--r--libbutl/manifest-rewriter.mxx8
-rw-r--r--libbutl/manifest-serializer.cxx8
-rw-r--r--libbutl/manifest-serializer.mxx8
-rw-r--r--libbutl/manifest-types.mxx8
-rw-r--r--libbutl/multi-index.mxx8
-rw-r--r--libbutl/openssl.cxx8
-rw-r--r--libbutl/openssl.mxx8
-rw-r--r--libbutl/optional.mxx10
-rw-r--r--libbutl/pager.cxx8
-rw-r--r--libbutl/pager.mxx8
-rw-r--r--libbutl/path-io.mxx8
-rw-r--r--libbutl/path-map.mxx8
-rw-r--r--libbutl/path.cxx8
-rw-r--r--libbutl/path.mxx8
-rw-r--r--libbutl/prefix-map.mxx8
-rw-r--r--libbutl/process-details.hxx2
-rw-r--r--libbutl/process-io.mxx8
-rw-r--r--libbutl/process-run.cxx8
-rw-r--r--libbutl/process.cxx8
-rw-r--r--libbutl/process.mxx8
-rw-r--r--libbutl/project-name.cxx8
-rw-r--r--libbutl/project-name.mxx8
-rw-r--r--libbutl/prompt.cxx8
-rw-r--r--libbutl/prompt.mxx8
-rw-r--r--libbutl/regex.cxx8
-rw-r--r--libbutl/regex.mxx8
-rw-r--r--libbutl/semantic-version.cxx8
-rw-r--r--libbutl/semantic-version.mxx8
-rw-r--r--libbutl/sendmail.cxx8
-rw-r--r--libbutl/sendmail.mxx8
-rw-r--r--libbutl/sha1.cxx8
-rw-r--r--libbutl/sha1.mxx8
-rw-r--r--libbutl/sha256.cxx10
-rw-r--r--libbutl/sha256.mxx8
-rw-r--r--libbutl/small-allocator.mxx8
-rw-r--r--libbutl/small-forward-list.mxx8
-rw-r--r--libbutl/small-list.mxx8
-rw-r--r--libbutl/small-vector.mxx8
-rw-r--r--libbutl/standard-version.cxx8
-rw-r--r--libbutl/standard-version.mxx8
-rw-r--r--libbutl/string-parser.cxx8
-rw-r--r--libbutl/string-parser.mxx8
-rw-r--r--libbutl/string-table.mxx8
-rw-r--r--libbutl/tab-parser.cxx8
-rw-r--r--libbutl/tab-parser.mxx8
-rw-r--r--libbutl/target-triplet.cxx8
-rw-r--r--libbutl/target-triplet.mxx8
-rw-r--r--libbutl/timestamp.cxx8
-rw-r--r--libbutl/timestamp.mxx10
-rw-r--r--libbutl/url.mxx8
-rw-r--r--libbutl/utility.cxx8
-rw-r--r--libbutl/utility.ixx2
-rw-r--r--libbutl/utility.mxx8
-rw-r--r--libbutl/vector-view.mxx8
-rw-r--r--libbutl/win32-utility.cxx2
-rw-r--r--libbutl/win32-utility.hxx2
-rw-r--r--tests/b-info/buildfile1
-rw-r--r--tests/b-info/driver.cxx6
-rw-r--r--tests/base64/buildfile1
-rw-r--r--tests/base64/driver.cxx6
-rw-r--r--tests/build/root.build14
-rw-r--r--tests/command/buildfile1
-rw-r--r--tests/command/driver.cxx6
-rw-r--r--tests/cpfile/buildfile1
-rw-r--r--tests/cpfile/driver.cxx6
-rw-r--r--tests/curl/buildfile1
-rw-r--r--tests/curl/driver.cxx6
-rw-r--r--tests/dir-iterator/buildfile1
-rw-r--r--tests/dir-iterator/driver.cxx6
-rw-r--r--tests/entry-time/buildfile1
-rw-r--r--tests/entry-time/driver.cxx6
-rw-r--r--tests/fdstream/buildfile1
-rw-r--r--tests/fdstream/driver.cxx6
-rw-r--r--tests/link/buildfile1
-rw-r--r--tests/link/driver.cxx6
-rw-r--r--tests/manifest-parser/buildfile1
-rw-r--r--tests/manifest-parser/driver.cxx6
-rw-r--r--tests/manifest-rewriter/buildfile1
-rw-r--r--tests/manifest-rewriter/driver.cxx6
-rw-r--r--tests/manifest-roundtrip/buildfile1
-rw-r--r--tests/manifest-roundtrip/driver.cxx6
-rw-r--r--tests/manifest-serializer/buildfile1
-rw-r--r--tests/manifest-serializer/driver.cxx6
-rw-r--r--tests/mventry/buildfile1
-rw-r--r--tests/mventry/driver.cxx6
-rw-r--r--tests/openssl/buildfile1
-rw-r--r--tests/openssl/driver.cxx6
-rw-r--r--tests/pager/buildfile1
-rw-r--r--tests/pager/driver.cxx6
-rw-r--r--tests/path-entry/buildfile1
-rw-r--r--tests/path-entry/driver.cxx6
-rw-r--r--tests/path/buildfile1
-rw-r--r--tests/path/driver.cxx6
-rw-r--r--tests/prefix-map/buildfile1
-rw-r--r--tests/prefix-map/driver.cxx6
-rw-r--r--tests/process-run/buildfile1
-rw-r--r--tests/process-run/driver.cxx6
-rw-r--r--tests/process/buildfile1
-rw-r--r--tests/process/driver.cxx6
-rw-r--r--tests/progress/buildfile1
-rw-r--r--tests/progress/driver.cxx6
-rw-r--r--tests/project-name/buildfile1
-rw-r--r--tests/project-name/driver.cxx6
-rw-r--r--tests/regex/buildfile1
-rw-r--r--tests/regex/driver.cxx6
-rw-r--r--tests/semantic-version/buildfile1
-rw-r--r--tests/semantic-version/driver.cxx6
-rw-r--r--tests/sendmail/buildfile1
-rw-r--r--tests/sendmail/driver.cxx6
-rw-r--r--tests/sha1/buildfile1
-rw-r--r--tests/sha1/driver.cxx6
-rw-r--r--tests/sha256/buildfile1
-rw-r--r--tests/sha256/driver.cxx6
-rw-r--r--tests/small-forward-list/buildfile1
-rw-r--r--tests/small-forward-list/driver.cxx6
-rw-r--r--tests/small-list/buildfile1
-rw-r--r--tests/small-list/driver.cxx6
-rw-r--r--tests/small-vector/buildfile1
-rw-r--r--tests/small-vector/driver.cxx6
-rw-r--r--tests/standard-version/buildfile1
-rw-r--r--tests/standard-version/driver.cxx6
-rw-r--r--tests/strcase/buildfile1
-rw-r--r--tests/strcase/driver.cxx6
-rw-r--r--tests/string-parser/buildfile1
-rw-r--r--tests/string-parser/driver.cxx6
-rw-r--r--tests/tab-parser/buildfile1
-rw-r--r--tests/tab-parser/driver.cxx6
-rw-r--r--tests/target-triplet/buildfile1
-rw-r--r--tests/target-triplet/driver.cxx6
-rw-r--r--tests/timestamp/buildfile1
-rw-r--r--tests/timestamp/driver.cxx6
-rw-r--r--tests/url/buildfile1
-rw-r--r--tests/url/driver.cxx6
-rw-r--r--tests/uuid/buildfile1
-rw-r--r--tests/wildcard/buildfile1
-rw-r--r--tests/wildcard/driver.cxx6
161 files changed, 443 insertions, 504 deletions
diff --git a/build/root.build b/build/root.build
index 9ef0ff5..8e824e2 100644
--- a/build/root.build
+++ b/build/root.build
@@ -2,16 +2,11 @@
# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
-cxx.std = experimental
-cxx.features.modules = ($force_modules == true)
+cxx.std = latest
using cxx
-if ($force_modules == true && !$cxx.features.modules)
- fail 'c++ compiler does not support modules'
-
-mxx{*}: extension = mxx
-hxx{*}: extension = hxx
+hxx{*}: extension = mxx # We also have .hxx; see libbutl/buildfile.
ixx{*}: extension = ixx
txx{*}: extension = txx
cxx{*}: extension = cxx
diff --git a/libbutl/b.cxx b/libbutl/b.cxx
index 5601e6f..3f26dc5 100644
--- a/libbutl/b.cxx
+++ b/libbutl/b.cxx
@@ -2,7 +2,7 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#include <libbutl/b.mxx>
#endif
@@ -10,7 +10,7 @@
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#include <vector>
#include <cstddef>
@@ -25,12 +25,12 @@
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
module butl.b;
// Only imports additional to interface.
#ifdef __clang__
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
diff --git a/libbutl/b.mxx b/libbutl/b.mxx
index b618c5b..39efe67 100644
--- a/libbutl/b.mxx
+++ b/libbutl/b.mxx
@@ -2,13 +2,13 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#pragma once
#endif
// C includes.
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#include <vector>
#include <cstddef> // size_tu
@@ -19,9 +19,9 @@
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
export module butl.b;
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
#endif
import butl.url;
diff --git a/libbutl/base64.cxx b/libbutl/base64.cxx
index c745ca6..d3ad501 100644
--- a/libbutl/base64.cxx
+++ b/libbutl/base64.cxx
@@ -2,13 +2,13 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#include <libbutl/base64.mxx>
#endif
// C includes.
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#include <vector>
@@ -21,12 +21,12 @@
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
module butl.base64;
// Only imports additional to interface.
#ifdef __clang__
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
diff --git a/libbutl/base64.mxx b/libbutl/base64.mxx
index 87d3c54..86f7fcd 100644
--- a/libbutl/base64.mxx
+++ b/libbutl/base64.mxx
@@ -2,13 +2,13 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#pragma once
#endif
// C includes.
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <iosfwd>
#include <string>
#include <vector>
@@ -16,9 +16,9 @@
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
export module butl.base64;
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
diff --git a/libbutl/buildfile b/libbutl/buildfile
index af0b4a0..8e88402 100644
--- a/libbutl/buildfile
+++ b/libbutl/buildfile
@@ -2,25 +2,25 @@
# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
-int_libs =
-
-if ($force_std_modules == true)
-{
- #@@ MOD is it really an interface dependency? I guess if we re-export
- # then it is? Or maybe it is special?
- #
- import int_libs += libstd-modules%liba{std-modules}
- cxx.poptions += -D__cpp_lib_modules
-}
-
-lib{butl}: {mxx hxx ixx txx cxx}{** -uuid-* +uuid-io -win32-utility -version} \
- {hxx}{version} $int_libs
+# This library was modularized using the Modules TS semantics (with support
+# for dual, module/header consumption) which was subsequently partially
+# dismantled. We, however, kept some of the changes in anticipation that they
+# would be useful when attempting to modularize using the merged modules
+# semantics. Specifically, there are currently headers with both .mxx and .hxx
+# extensions and the code is littered if the #if __cpp_[lib_]modules_ts
+# blocks.
+#
+# @@ If/when going back to using mxx{}, make sure to cleanup explicit .hxx.
+#
+lib{butl}: {hxx ixx txx cxx}{** -uuid-* +uuid-io -win32-utility} \
+ hxx{**.hxx -uuid-*.hxx +uuid-io.hxx -win32-utility.hxx \
+ -version.hxx} hxx{version}
windows = ($cxx.target.class == 'windows')
# Exclude these from compilation on non-Windows targets.
#
-lib{butl}: {hxx cxx}{win32-utility}: include = $windows
+lib{butl}: hxx{win32-utility.hxx} cxx{win32-utility}: include = $windows
# Our C-files are included into sha256.cxx (sha256c.c) and timestamp.cxx
# (strptime.c timelocal.h timelocal.c), so treat them as files exclude from
@@ -46,8 +46,8 @@ elif ($windows)
# pick up an installed one) and don't remove it when cleaning in src (so that
# clean results in a state identical to distributed).
#
-hxx{version}: in{version} $src_root/manifest
-hxx{version}:
+hxx{version.hxx}: in{version} $src_root/manifest
+hxx{version.hxx}:
{
dist = true
clean = ($src_root != $out_root)
@@ -69,11 +69,7 @@ else
# Export options.
#
-lib{butl}:
-{
- cxx.export.poptions = "-I$out_root" "-I$src_root"
- cxx.export.libs = $int_libs
-}
+lib{butl}: cxx.export.poptions = "-I$out_root" "-I$src_root"
liba{butl}: cxx.export.poptions += -DLIBBUTL_STATIC
libs{butl}: cxx.export.poptions += -DLIBBUTL_SHARED
@@ -90,7 +86,7 @@ else
# Install into the libbutl/ subdirectory of, say, /usr/include/
# recreating subdirectories.
#
-{mxx hxx ixx txx}{*}:
+{hxx ixx txx}{*}:
{
install = include/libbutl/
install.subdirs = true
diff --git a/libbutl/char-scanner.cxx b/libbutl/char-scanner.cxx
index 7284143..4d71c76 100644
--- a/libbutl/char-scanner.cxx
+++ b/libbutl/char-scanner.cxx
@@ -2,13 +2,13 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#include <libbutl/char-scanner.mxx>
#endif
// C includes.
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string> // char_traits
#include <cstdint> // uint64_t
#include <istream>
@@ -16,12 +16,12 @@
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
module butl.char_scanner;
// Only imports additional to interface.
#ifdef __clang__
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
diff --git a/libbutl/char-scanner.mxx b/libbutl/char-scanner.mxx
index 457435b..5d05ca6 100644
--- a/libbutl/char-scanner.mxx
+++ b/libbutl/char-scanner.mxx
@@ -2,13 +2,13 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#pragma once
#endif
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string> // char_traits
#include <cstdint> // uint64_t
#include <istream>
@@ -16,9 +16,9 @@
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
export module butl.char_scanner;
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
diff --git a/libbutl/command.cxx b/libbutl/command.cxx
index 89d7c68..923d595 100644
--- a/libbutl/command.cxx
+++ b/libbutl/command.cxx
@@ -2,13 +2,13 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#include <libbutl/command.mxx>
#endif
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <map>
#include <string>
#include <cstddef>
@@ -22,12 +22,12 @@
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
module butl.command;
// Only imports additional to interface.
#ifdef __clang__
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
diff --git a/libbutl/command.mxx b/libbutl/command.mxx
index e62a032..354788d 100644
--- a/libbutl/command.mxx
+++ b/libbutl/command.mxx
@@ -2,11 +2,11 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#pragma once
#endif
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <map>
#include <string>
#include <cstddef> // size_t
@@ -15,9 +15,9 @@
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
export module butl.command;
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
#endif
import butl.process;
diff --git a/libbutl/const-ptr.mxx b/libbutl/const-ptr.mxx
index 38f7b44..7291ee6 100644
--- a/libbutl/const-ptr.mxx
+++ b/libbutl/const-ptr.mxx
@@ -2,21 +2,21 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#pragma once
#endif
// C includes.
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <cstddef> // nullptr_t
#endif
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
export module butl.const_ptr;
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core; // @@ MOD std.fundamental.
#endif
#endif
diff --git a/libbutl/curl.cxx b/libbutl/curl.cxx
index 93aa010..f88869b 100644
--- a/libbutl/curl.cxx
+++ b/libbutl/curl.cxx
@@ -2,7 +2,7 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#include <libbutl/curl.mxx>
#endif
@@ -10,7 +10,7 @@
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#include <utility> // move()
@@ -19,12 +19,12 @@
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
module butl.curl;
// Only imports additional to interface.
#ifdef __clang__
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
#endif
import butl.path;
diff --git a/libbutl/curl.mxx b/libbutl/curl.mxx
index d6a068d..4d69866 100644
--- a/libbutl/curl.mxx
+++ b/libbutl/curl.mxx
@@ -2,13 +2,13 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#pragma once
#endif
// C includes.
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#include <type_traits>
@@ -19,9 +19,9 @@
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
export module butl.curl;
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
#endif
import butl.path;
diff --git a/libbutl/diagnostics.cxx b/libbutl/diagnostics.cxx
index 83e09e3..43d931f 100644
--- a/libbutl/diagnostics.cxx
+++ b/libbutl/diagnostics.cxx
@@ -2,7 +2,7 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#include <libbutl/diagnostics.mxx>
#endif
@@ -15,7 +15,7 @@
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <utility>
#include <exception>
@@ -28,12 +28,12 @@
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
module butl.diagnostics;
// Only imports additional to interface.
#ifdef __clang__
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
diff --git a/libbutl/diagnostics.mxx b/libbutl/diagnostics.mxx
index 1bf50ac..43f13ad 100644
--- a/libbutl/diagnostics.mxx
+++ b/libbutl/diagnostics.mxx
@@ -2,13 +2,13 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#pragma once
#endif
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <ostream>
#include <sstream>
#include <utility> // move(), forward()
@@ -17,9 +17,9 @@
#include <libbutl/ft/exception.hxx> // uncaught_exceptions
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
export module butl.diagnostics;
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
diff --git a/libbutl/export.hxx b/libbutl/export.hxx
index 88630ca..231c1af 100644
--- a/libbutl/export.hxx
+++ b/libbutl/export.hxx
@@ -6,7 +6,7 @@
// If modules are available, setup the module export.
//
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
# define LIBBUTL_MODEXPORT export
#else
# define LIBBUTL_MODEXPORT
diff --git a/libbutl/fdstream.cxx b/libbutl/fdstream.cxx
index c8b120e..9bc62d9 100644
--- a/libbutl/fdstream.cxx
+++ b/libbutl/fdstream.cxx
@@ -2,7 +2,7 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#include <libbutl/fdstream.mxx>
#endif
@@ -35,7 +35,7 @@
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <vector>
#include <string>
#include <istream>
@@ -56,12 +56,12 @@
#include <libbutl/ft/exception.hxx> // uncaught_exceptions
#include <libbutl/process-details.hxx>
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
module butl.fdstream;
// Only imports additional to interface.
#ifdef __clang__
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
import std.threading; // Clang wants it in purview (see process-details.hxx).
diff --git a/libbutl/fdstream.mxx b/libbutl/fdstream.mxx
index dd46ad2..a3d9039 100644
--- a/libbutl/fdstream.mxx
+++ b/libbutl/fdstream.mxx
@@ -2,13 +2,13 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#pragma once
#endif
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <ios> // streamsize
#include <vector>
#include <string>
@@ -23,9 +23,9 @@
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
export module butl.fdstream;
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
@@ -54,7 +54,7 @@ LIBBUTL_MODEXPORT namespace butl
constexpr operator int () const {return -1;}
};
-#if defined(__cpp_modules) && defined(__clang__) //@@ MOD Clang duplicate sym.
+#if defined(__cpp_modules_ts) && defined(__clang__) //@@ MOD Clang duplicate sym.
inline
#endif
constexpr nullfd_t nullfd (-1);
diff --git a/libbutl/filesystem.cxx b/libbutl/filesystem.cxx
index f78c876..b0991b2 100644
--- a/libbutl/filesystem.cxx
+++ b/libbutl/filesystem.cxx
@@ -2,7 +2,7 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#include <libbutl/filesystem.mxx>
#endif
@@ -36,7 +36,7 @@
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <cstddef>
#include <cstdint>
#include <utility>
@@ -51,12 +51,12 @@
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
module butl.filesystem;
// Only imports additional to interface.
#ifdef __clang__
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
#endif
import butl.path;
diff --git a/libbutl/filesystem.mxx b/libbutl/filesystem.mxx
index 9b0aacb..2e3a0d9 100644
--- a/libbutl/filesystem.mxx
+++ b/libbutl/filesystem.mxx
@@ -2,7 +2,7 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#pragma once
#endif
@@ -23,7 +23,7 @@
typedef int mode_t;
#endif
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <cstddef> // ptrdiff_t
#include <cstdint> // uint16_t, etc
#include <utility> // move(), pair
@@ -34,10 +34,10 @@
#endif
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
export module butl.filesystem;
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
#endif
diff --git a/libbutl/git.cxx b/libbutl/git.cxx
index 4ada0c4..0f58398 100644
--- a/libbutl/git.cxx
+++ b/libbutl/git.cxx
@@ -2,7 +2,7 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#include <libbutl/git.mxx>
#endif
@@ -10,7 +10,7 @@
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#include <cstddef> // size_t
@@ -18,12 +18,12 @@
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
module butl.git;
// Only imports additional to interface.
#ifdef __clang__
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
#endif
import butl.path;
diff --git a/libbutl/git.mxx b/libbutl/git.mxx
index 92baa46..997273f 100644
--- a/libbutl/git.mxx
+++ b/libbutl/git.mxx
@@ -2,21 +2,21 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#pragma once
#endif
// C includes.
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#endif
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
export module butl.git;
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
#endif
import butl.path;
diff --git a/libbutl/manifest-parser.cxx b/libbutl/manifest-parser.cxx
index 49b9ee0..e525812 100644
--- a/libbutl/manifest-parser.cxx
+++ b/libbutl/manifest-parser.cxx
@@ -2,13 +2,13 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#include <libbutl/manifest-parser.mxx>
#endif
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#include <vector>
#include <cstdint>
@@ -20,12 +20,12 @@
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
module butl.manifest_parser;
// Only imports additional to interface.
#ifdef __clang__
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
diff --git a/libbutl/manifest-parser.mxx b/libbutl/manifest-parser.mxx
index a23d64f..4ec31bf 100644
--- a/libbutl/manifest-parser.mxx
+++ b/libbutl/manifest-parser.mxx
@@ -2,13 +2,13 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#pragma once
#endif
// C includes.
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#include <vector>
#include <iosfwd>
@@ -20,9 +20,9 @@
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
export module butl.manifest_parser;
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
diff --git a/libbutl/manifest-rewriter.cxx b/libbutl/manifest-rewriter.cxx
index e5b4eae..1d7b1df 100644
--- a/libbutl/manifest-rewriter.cxx
+++ b/libbutl/manifest-rewriter.cxx
@@ -2,7 +2,7 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#include <libbutl/manifest-rewriter.mxx>
#endif
@@ -10,7 +10,7 @@
// C includes.
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#include <cstdint> // uint64_t
#include <cstddef> // size_t
@@ -18,12 +18,12 @@
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
module butl.manifest_rewriter;
// Only imports additional to interface.
#ifdef __clang__
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
#endif
import butl.path;
diff --git a/libbutl/manifest-rewriter.mxx b/libbutl/manifest-rewriter.mxx
index 8ad22b3..7328373 100644
--- a/libbutl/manifest-rewriter.mxx
+++ b/libbutl/manifest-rewriter.mxx
@@ -2,20 +2,20 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#pragma once
#endif
// C includes.
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#endif
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
export module butl.manifest_rewriter;
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
#endif
import butl.path;
import butl.fdstream;
diff --git a/libbutl/manifest-serializer.cxx b/libbutl/manifest-serializer.cxx
index 4284ec6..c17f4e9 100644
--- a/libbutl/manifest-serializer.cxx
+++ b/libbutl/manifest-serializer.cxx
@@ -2,13 +2,13 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#include <libbutl/manifest-serializer.mxx>
#endif
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#include <vector>
#include <cstddef>
@@ -19,12 +19,12 @@
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
module butl.manifest_serializer;
// Only imports additional to interface.
#ifdef __clang__
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
diff --git a/libbutl/manifest-serializer.mxx b/libbutl/manifest-serializer.mxx
index 2a8d32e..bab6bd2 100644
--- a/libbutl/manifest-serializer.mxx
+++ b/libbutl/manifest-serializer.mxx
@@ -2,13 +2,13 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#pragma once
#endif
// C includes.
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#include <vector>
#include <iosfwd>
@@ -19,9 +19,9 @@
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
export module butl.manifest_serializer;
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
diff --git a/libbutl/manifest-types.mxx b/libbutl/manifest-types.mxx
index 70bf3b7..123a5c7 100644
--- a/libbutl/manifest-types.mxx
+++ b/libbutl/manifest-types.mxx
@@ -2,22 +2,22 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#pragma once
#endif
// C includes.
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#include <cstdint> // uint64_t
#endif
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
export module butl.manifest_types;
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
#endif
#else
diff --git a/libbutl/multi-index.mxx b/libbutl/multi-index.mxx
index 6823a2e..d6c3f15 100644
--- a/libbutl/multi-index.mxx
+++ b/libbutl/multi-index.mxx
@@ -2,22 +2,22 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#pragma once
#endif
// C includes.
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <utility> // declval()
#include <functional> // hash
#endif
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
export module butl.multi_index;
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
#endif
#endif
diff --git a/libbutl/openssl.cxx b/libbutl/openssl.cxx
index 739fd8f..9159036 100644
--- a/libbutl/openssl.cxx
+++ b/libbutl/openssl.cxx
@@ -2,13 +2,13 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#include <libbutl/openssl.mxx>
#endif
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#include <utility> // move()
@@ -16,12 +16,12 @@
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
module butl.openssl;
// Only imports additional to interface.
#ifdef __clang__
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
#endif
import butl.path;
diff --git a/libbutl/openssl.mxx b/libbutl/openssl.mxx
index 37f10bb..7d89dd7 100644
--- a/libbutl/openssl.mxx
+++ b/libbutl/openssl.mxx
@@ -2,13 +2,13 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#pragma once
#endif
// C includes.
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#include <type_traits>
@@ -18,9 +18,9 @@
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
export module butl.openssl;
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
#endif
import butl.path;
diff --git a/libbutl/optional.mxx b/libbutl/optional.mxx
index 601e054..e49c0ac 100644
--- a/libbutl/optional.mxx
+++ b/libbutl/optional.mxx
@@ -2,7 +2,7 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#pragma once
#endif
@@ -55,7 +55,7 @@
# endif
#endif
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#ifdef LIBBUTL_STD_OPTIONAL
# include <optional>
#else
@@ -67,9 +67,9 @@
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
export module butl.optional;
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
#endif
#endif
@@ -92,7 +92,7 @@ LIBBUTL_MODEXPORT namespace butl
// Simple optional class template while waiting for std::optional.
//
struct nullopt_t {constexpr explicit nullopt_t (int) {}};
-#if defined(__cpp_modules) && defined(__clang__) //@@ MOD Clang duplicate sym.
+#if defined(__cpp_modules_ts) && defined(__clang__) //@@ MOD Clang duplicate sym.
inline
#endif
constexpr nullopt_t nullopt (1);
diff --git a/libbutl/pager.cxx b/libbutl/pager.cxx
index af3831c..7ddbe72 100644
--- a/libbutl/pager.cxx
+++ b/libbutl/pager.cxx
@@ -2,7 +2,7 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#include <libbutl/pager.mxx>
#endif
@@ -15,7 +15,7 @@
# include <libbutl/win32-utility.hxx>
#endif
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#include <vector>
#include <iostream>
@@ -30,12 +30,12 @@
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
module butl.pager;
// Only imports additional to interface.
#ifdef __clang__
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
diff --git a/libbutl/pager.mxx b/libbutl/pager.mxx
index 08cf935..70508cc 100644
--- a/libbutl/pager.mxx
+++ b/libbutl/pager.mxx
@@ -2,13 +2,13 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#pragma once
#endif
// C includes.
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#include <vector>
#include <iostream>
@@ -16,9 +16,9 @@
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
export module butl.pager;
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
diff --git a/libbutl/path-io.mxx b/libbutl/path-io.mxx
index 77cd9a8..6c9f93b 100644
--- a/libbutl/path-io.mxx
+++ b/libbutl/path-io.mxx
@@ -2,21 +2,21 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#pragma once
#endif
// C includes.
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <ostream>
#endif
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
export module butl.path_io;
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core; //@@ MOD TMP (should not be needed).
import std.io;
#endif
diff --git a/libbutl/path-map.mxx b/libbutl/path-map.mxx
index 33edf9f..1cd4ab0 100644
--- a/libbutl/path-map.mxx
+++ b/libbutl/path-map.mxx
@@ -2,21 +2,21 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#pragma once
#endif
// C includes.
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <algorithm> // min()
#endif
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
export module butl.path_map;
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
#endif
import butl.path;
diff --git a/libbutl/path.cxx b/libbutl/path.cxx
index 3216978..f027233 100644
--- a/libbutl/path.cxx
+++ b/libbutl/path.cxx
@@ -2,7 +2,7 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#include <libbutl/path.mxx>
#endif
@@ -27,7 +27,7 @@
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#include <vector>
#include <cstddef>
@@ -37,12 +37,12 @@
#include <cstring> // strcpy()
#endif
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
module butl.path;
// Only imports additional to interface.
#ifdef __clang__
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
#endif
#endif
diff --git a/libbutl/path.mxx b/libbutl/path.mxx
index 25f29c6..3f3a844 100644
--- a/libbutl/path.mxx
+++ b/libbutl/path.mxx
@@ -2,13 +2,13 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#pragma once
#endif
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#include <cstddef> // ptrdiff_t
#include <utility> // move(), swap()
@@ -24,9 +24,9 @@
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
export module butl.path;
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
#endif
#ifdef _WIN32
diff --git a/libbutl/prefix-map.mxx b/libbutl/prefix-map.mxx
index b9e31a5..d50f257 100644
--- a/libbutl/prefix-map.mxx
+++ b/libbutl/prefix-map.mxx
@@ -2,13 +2,13 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#pragma once
#endif
// C includes.
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <map>
#include <string>
#include <utility> // move()
@@ -17,9 +17,9 @@
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
export module butl.prefix_map;
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
#endif
#endif
diff --git a/libbutl/process-details.hxx b/libbutl/process-details.hxx
index 2c2606f..4a9319b 100644
--- a/libbutl/process-details.hxx
+++ b/libbutl/process-details.hxx
@@ -6,7 +6,7 @@
#include <libbutl/ft/shared_mutex.hxx>
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core; //@@ MOD TMP (dummy std.threading).
import std.threading;
#else
diff --git a/libbutl/process-io.mxx b/libbutl/process-io.mxx
index 5deeac3..af4c3c0 100644
--- a/libbutl/process-io.mxx
+++ b/libbutl/process-io.mxx
@@ -2,21 +2,21 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#pragma once
#endif
// C includes.
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <ostream>
#endif
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
export module butl.process_io;
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core; //@@ MOD TMP (should not be needed).
import std.io;
#endif
diff --git a/libbutl/process-run.cxx b/libbutl/process-run.cxx
index e1763e6..14db79e 100644
--- a/libbutl/process-run.cxx
+++ b/libbutl/process-run.cxx
@@ -2,25 +2,25 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#include <libbutl/process.mxx>
#endif
// C includes.
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <cstdlib> // exit()
#include <iostream> // cerr
#endif
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
module butl.process;
// Only imports additional to interface.
#ifdef __clang__
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
diff --git a/libbutl/process.cxx b/libbutl/process.cxx
index 36925fa..3db4edc 100644
--- a/libbutl/process.cxx
+++ b/libbutl/process.cxx
@@ -2,7 +2,7 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#include <libbutl/process.mxx>
#endif
@@ -85,7 +85,7 @@
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#include <vector>
#include <chrono>
@@ -115,12 +115,12 @@ namespace butl
shared_mutex process_spawn_mutex; // Out of module purview.
}
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
module butl.process;
// Only imports additional to interface.
#ifdef __clang__
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
import std.threading; // Clang wants it in purview (see process-details.hxx).
diff --git a/libbutl/process.mxx b/libbutl/process.mxx
index c18ae43..655650e 100644
--- a/libbutl/process.mxx
+++ b/libbutl/process.mxx
@@ -2,7 +2,7 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#pragma once
#endif
@@ -12,7 +12,7 @@
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#include <vector>
#include <chrono>
@@ -26,9 +26,9 @@
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
export module butl.process;
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
diff --git a/libbutl/project-name.cxx b/libbutl/project-name.cxx
index 9cc3d8e..43da5a7 100644
--- a/libbutl/project-name.cxx
+++ b/libbutl/project-name.cxx
@@ -2,11 +2,11 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#include <libbutl/project-name.mxx>
#endif
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#include <vector>
#include <utility> // move()
@@ -17,12 +17,12 @@
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
module butl.project_name;
// Only imports additional to interface.
#ifdef __clang__
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
diff --git a/libbutl/project-name.mxx b/libbutl/project-name.mxx
index 131a1e0..65ba2ba 100644
--- a/libbutl/project-name.mxx
+++ b/libbutl/project-name.mxx
@@ -2,13 +2,13 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#pragma once
#endif
// C includes.
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#include <utility> // move()
#include <ostream>
@@ -16,9 +16,9 @@
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
export module butl.project_name;
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
diff --git a/libbutl/prompt.cxx b/libbutl/prompt.cxx
index 09952c0..ec67ccb 100644
--- a/libbutl/prompt.cxx
+++ b/libbutl/prompt.cxx
@@ -2,11 +2,11 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#include <libbutl/prompt.mxx>
#endif
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#include <iostream>
@@ -14,12 +14,12 @@
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
module butl.prompt;
// Only imports additional to interface.
#ifdef __clang__
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
diff --git a/libbutl/prompt.mxx b/libbutl/prompt.mxx
index 87bded2..e592d13 100644
--- a/libbutl/prompt.mxx
+++ b/libbutl/prompt.mxx
@@ -2,21 +2,21 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#pragma once
#endif
// C includes.
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#endif
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
export module butl.prompt;
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
#endif
#endif
diff --git a/libbutl/regex.cxx b/libbutl/regex.cxx
index ab32693..4a4a118 100644
--- a/libbutl/regex.cxx
+++ b/libbutl/regex.cxx
@@ -2,13 +2,13 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#include <libbutl/regex.mxx>
#endif
// C includes.
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <regex>
#include <string>
@@ -22,12 +22,12 @@
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
module butl.regex;
// Only imports additional to interface.
#ifdef __clang__
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
import std.regex;
diff --git a/libbutl/regex.mxx b/libbutl/regex.mxx
index 4c21c16..172064d 100644
--- a/libbutl/regex.mxx
+++ b/libbutl/regex.mxx
@@ -2,13 +2,13 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#pragma once
#endif
// C includes.
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <regex>
#include <iosfwd>
#include <string>
@@ -27,9 +27,9 @@
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
export module butl.regex;
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
import std.regex; // @@ MOD TODO should probably be re-exported.
diff --git a/libbutl/semantic-version.cxx b/libbutl/semantic-version.cxx
index e3cd775..ef2a583 100644
--- a/libbutl/semantic-version.cxx
+++ b/libbutl/semantic-version.cxx
@@ -2,13 +2,13 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#include <libbutl/semantic-version.mxx>
#endif
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#include <cstddef>
#include <cstdint>
@@ -22,12 +22,12 @@
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
module butl.semantic_version;
// Only imports additional to interface.
#ifdef __clang__
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
diff --git a/libbutl/semantic-version.mxx b/libbutl/semantic-version.mxx
index eb83705..35bf1b8 100644
--- a/libbutl/semantic-version.mxx
+++ b/libbutl/semantic-version.mxx
@@ -2,13 +2,13 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#pragma once
#endif
// C includes.
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#include <cstddef> // size_t
#include <cstdint> // uint*_t
@@ -18,9 +18,9 @@
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
export module butl.semantic_version;
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
diff --git a/libbutl/sendmail.cxx b/libbutl/sendmail.cxx
index 0a9f618..21e1cf1 100644
--- a/libbutl/sendmail.cxx
+++ b/libbutl/sendmail.cxx
@@ -2,24 +2,24 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#include <libbutl/sendmail.mxx>
#endif
// C includes.
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#endif
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
module butl.sendmail;
// Only imports additional to interface.
#ifdef __clang__
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
#endif
import butl.process;
diff --git a/libbutl/sendmail.mxx b/libbutl/sendmail.mxx
index bbc08cd..9305c1b 100644
--- a/libbutl/sendmail.mxx
+++ b/libbutl/sendmail.mxx
@@ -2,13 +2,13 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#pragma once
#endif
// C includes.
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#include <cstddef> // size_t
@@ -17,9 +17,9 @@
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
export module butl.sendmail;
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
#endif
import butl.process;
diff --git a/libbutl/sha1.cxx b/libbutl/sha1.cxx
index a174cb7..1ca8a2a 100644
--- a/libbutl/sha1.cxx
+++ b/libbutl/sha1.cxx
@@ -2,7 +2,7 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#include <libbutl/sha1.mxx>
#endif
@@ -44,7 +44,7 @@ extern "C"
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#include <cstddef>
#include <cstdint>
@@ -52,12 +52,12 @@ extern "C"
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
module butl.sha1;
// Only imports additional to interface.
#ifdef __clang__
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
#endif
#endif
diff --git a/libbutl/sha1.mxx b/libbutl/sha1.mxx
index de7a3dd..26d4b59 100644
--- a/libbutl/sha1.mxx
+++ b/libbutl/sha1.mxx
@@ -2,13 +2,13 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#pragma once
#endif
// C includes.
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#include <cstddef> // size_t
#include <cstdint>
@@ -17,9 +17,9 @@
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
export module butl.sha1;
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
#endif
#endif
diff --git a/libbutl/sha256.cxx b/libbutl/sha256.cxx
index e988ef2..6dbe2a0 100644
--- a/libbutl/sha256.cxx
+++ b/libbutl/sha256.cxx
@@ -2,7 +2,7 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#include <libbutl/sha256.mxx>
#endif
@@ -29,7 +29,7 @@ extern "C"
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#include <cstddef>
#include <cstdint>
@@ -40,16 +40,16 @@ extern "C"
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
module butl.sha256;
// Only imports additional to interface.
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.io;
#endif
#ifdef __clang__
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
#endif
#endif
diff --git a/libbutl/sha256.mxx b/libbutl/sha256.mxx
index cd72ef5..fca8b91 100644
--- a/libbutl/sha256.mxx
+++ b/libbutl/sha256.mxx
@@ -2,13 +2,13 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#pragma once
#endif
// C includes.
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#include <cstddef> // size_t
#include <cstdint>
@@ -18,9 +18,9 @@
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
export module butl.sha256;
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
#endif
#endif
diff --git a/libbutl/small-allocator.mxx b/libbutl/small-allocator.mxx
index b3b4f8e..6b17224 100644
--- a/libbutl/small-allocator.mxx
+++ b/libbutl/small-allocator.mxx
@@ -2,13 +2,13 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#pragma once
#endif
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <cstddef> // size_t
#include <utility> // move()
#include <type_traits> // true_type, is_same
@@ -16,9 +16,9 @@
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
export module butl.small_allocator;
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
#endif
#endif
diff --git a/libbutl/small-forward-list.mxx b/libbutl/small-forward-list.mxx
index 17d58de..956e1f1 100644
--- a/libbutl/small-forward-list.mxx
+++ b/libbutl/small-forward-list.mxx
@@ -2,11 +2,11 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#pragma once
#endif
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <cstddef> // size_t
#include <utility> // move()
#include <forward_list>
@@ -14,9 +14,9 @@
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
export module butl.small_forward_list;
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
#endif
import butl.small_allocator;
diff --git a/libbutl/small-list.mxx b/libbutl/small-list.mxx
index 75c66e3..40a583d 100644
--- a/libbutl/small-list.mxx
+++ b/libbutl/small-list.mxx
@@ -2,11 +2,11 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#pragma once
#endif
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <list>
#include <cstddef> // size_t
#include <utility> // move()
@@ -14,9 +14,9 @@
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
export module butl.small_list;
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
#endif
import butl.small_allocator;
diff --git a/libbutl/small-vector.mxx b/libbutl/small-vector.mxx
index d21cc46..fa9c702 100644
--- a/libbutl/small-vector.mxx
+++ b/libbutl/small-vector.mxx
@@ -2,11 +2,11 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#pragma once
#endif
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <vector>
#include <cstddef> // size_t
#include <utility> // move()
@@ -14,9 +14,9 @@
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
export module butl.small_vector;
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
#endif
import butl.small_allocator;
diff --git a/libbutl/standard-version.cxx b/libbutl/standard-version.cxx
index 41b3611..bb76ad6 100644
--- a/libbutl/standard-version.cxx
+++ b/libbutl/standard-version.cxx
@@ -2,13 +2,13 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#include <libbutl/standard-version.mxx>
#endif
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#include <cstdint>
#include <cstddef>
@@ -21,12 +21,12 @@
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
module butl.standard_version;
// Only imports additional to interface.
#ifdef __clang__
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
diff --git a/libbutl/standard-version.mxx b/libbutl/standard-version.mxx
index d9e46c7..c899e57 100644
--- a/libbutl/standard-version.mxx
+++ b/libbutl/standard-version.mxx
@@ -2,13 +2,13 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#pragma once
#endif
// C includes.
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#include <cstdint> // uint*_t
#include <cstddef> // size_t
@@ -17,9 +17,9 @@
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
export module butl.standard_version;
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
diff --git a/libbutl/string-parser.cxx b/libbutl/string-parser.cxx
index 3e058dc..f547eaa 100644
--- a/libbutl/string-parser.cxx
+++ b/libbutl/string-parser.cxx
@@ -2,13 +2,13 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#include <libbutl/string-parser.mxx>
#endif
// C includes.
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#include <vector>
#include <cstddef>
@@ -18,12 +18,12 @@
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
module butl.string_parser;
// Only imports additional to interface.
#ifdef __clang__
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
#endif
#endif
diff --git a/libbutl/string-parser.mxx b/libbutl/string-parser.mxx
index c2e2684..db8204d 100644
--- a/libbutl/string-parser.mxx
+++ b/libbutl/string-parser.mxx
@@ -2,13 +2,13 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#pragma once
#endif
// C includes.
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#include <vector>
#include <cstddef> // size_t
@@ -18,9 +18,9 @@
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
export module butl.string_parser;
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
#endif
#endif
diff --git a/libbutl/string-table.mxx b/libbutl/string-table.mxx
index a7025ae..201fb11 100644
--- a/libbutl/string-table.mxx
+++ b/libbutl/string-table.mxx
@@ -2,13 +2,13 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#pragma once
#endif
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#include <vector>
#include <unordered_map>
@@ -19,9 +19,9 @@
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
export module butl.string_table;
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
#endif
import butl.multi_index;
diff --git a/libbutl/tab-parser.cxx b/libbutl/tab-parser.cxx
index adce67c..b3a247a 100644
--- a/libbutl/tab-parser.cxx
+++ b/libbutl/tab-parser.cxx
@@ -2,13 +2,13 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#include <libbutl/tab-parser.mxx>
#endif
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#include <vector>
#include <cstdint>
@@ -20,12 +20,12 @@
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
module butl.tab_parser;
// Only imports additional to interface.
#ifdef __clang__
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
diff --git a/libbutl/tab-parser.mxx b/libbutl/tab-parser.mxx
index 716099c..3262632 100644
--- a/libbutl/tab-parser.mxx
+++ b/libbutl/tab-parser.mxx
@@ -2,13 +2,13 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#pragma once
#endif
// C includes.
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <iosfwd>
#include <string>
#include <vector>
@@ -18,9 +18,9 @@
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
export module butl.tab_parser;
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
diff --git a/libbutl/target-triplet.cxx b/libbutl/target-triplet.cxx
index dd35c0a..ba4a14e 100644
--- a/libbutl/target-triplet.cxx
+++ b/libbutl/target-triplet.cxx
@@ -2,13 +2,13 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#include <libbutl/target-triplet.mxx>
#endif
// C includes.
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#include <ostream>
@@ -17,12 +17,12 @@
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
module butl.target_triplet;
// Only imports additional to interface.
#ifdef __clang__
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
diff --git a/libbutl/target-triplet.mxx b/libbutl/target-triplet.mxx
index de4533e..23b3255 100644
--- a/libbutl/target-triplet.mxx
+++ b/libbutl/target-triplet.mxx
@@ -2,22 +2,22 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#pragma once
#endif
// C includes.
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#include <ostream>
#endif
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
export module butl.target_triplet;
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
diff --git a/libbutl/timestamp.cxx b/libbutl/timestamp.cxx
index 47ebfea..8bbd86c 100644
--- a/libbutl/timestamp.cxx
+++ b/libbutl/timestamp.cxx
@@ -2,7 +2,7 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#include <libbutl/timestamp.mxx>
#endif
@@ -33,7 +33,7 @@ extern "C"
#endif
#endif
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#include <chrono>
@@ -59,12 +59,12 @@ extern "C"
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
module butl.timestamp;
// Only imports additional to interface.
#ifdef __clang__
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
diff --git a/libbutl/timestamp.mxx b/libbutl/timestamp.mxx
index 649a4e7..2c25972 100644
--- a/libbutl/timestamp.mxx
+++ b/libbutl/timestamp.mxx
@@ -2,13 +2,13 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#pragma once
#endif
// C includes.
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <iosfwd>
#include <string>
#include <chrono>
@@ -16,9 +16,9 @@
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
export module butl.timestamp;
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
@@ -62,7 +62,7 @@ LIBBUTL_MODEXPORT namespace butl
// unreal and all of them are less than any non-special value (strictly
// speaking unreal is no greater (older) than any real value).
//
-#if defined(__cpp_modules) && defined(__clang__) //@@ MOD Clang duplicate sym.
+#if defined(__cpp_modules_ts) && defined(__clang__) //@@ MOD Clang duplicate sym.
inline const timestamp::rep timestamp_unknown_rep = -1;
inline const timestamp timestamp_unknown = timestamp (duration (-1));
inline const timestamp::rep timestamp_nonexistent_rep = 0;
diff --git a/libbutl/url.mxx b/libbutl/url.mxx
index 585526a..90f1cc2 100644
--- a/libbutl/url.mxx
+++ b/libbutl/url.mxx
@@ -2,7 +2,7 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#pragma once
#endif
@@ -10,7 +10,7 @@
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#include <cstdint> // uint*_t
#include <utility> // move()
@@ -23,9 +23,9 @@
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
export module butl.url;
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
diff --git a/libbutl/utility.cxx b/libbutl/utility.cxx
index a4c183a..fe0fa98 100644
--- a/libbutl/utility.cxx
+++ b/libbutl/utility.cxx
@@ -2,7 +2,7 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#include <libbutl/utility.mxx>
#endif
@@ -12,7 +12,7 @@
#include <stdlib.h> // setenv(), unsetenv(), _putenv()
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#include <cstddef>
#include <utility>
@@ -25,12 +25,12 @@
#include <libbutl/ft/lang.hxx>
#include <libbutl/ft/exception.hxx>
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
module butl.utility;
// Only imports additional to interface.
#ifdef __clang__
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
diff --git a/libbutl/utility.ixx b/libbutl/utility.ixx
index 7106a6e..04fb161 100644
--- a/libbutl/utility.ixx
+++ b/libbutl/utility.ixx
@@ -2,7 +2,7 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <cstdlib> // getenv()
#endif
diff --git a/libbutl/utility.mxx b/libbutl/utility.mxx
index a0f4aaf..8085e79 100644
--- a/libbutl/utility.mxx
+++ b/libbutl/utility.mxx
@@ -2,7 +2,7 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#pragma once
#endif
@@ -12,7 +12,7 @@
# include <string.h> // _stricmp(), _strnicmp()
#endif
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#include <iosfwd> // ostream
#include <istream>
@@ -29,9 +29,9 @@
#include <libbutl/ft/lang.hxx> // thread_local
#include <libbutl/ft/exception.hxx> // uncaught_exceptions
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
export module butl.utility;
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
diff --git a/libbutl/vector-view.mxx b/libbutl/vector-view.mxx
index 4966c3a..d0af9b4 100644
--- a/libbutl/vector-view.mxx
+++ b/libbutl/vector-view.mxx
@@ -2,13 +2,13 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules
+#ifndef __cpp_modules_ts
#pragma once
#endif
// C includes.
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <vector>
#include <cstddef> // size_t, ptrdiff_t
#include <utility> // swap()
@@ -18,9 +18,9 @@
// Other includes.
-#ifdef __cpp_modules
+#ifdef __cpp_modules_ts
export module butl.vector_view;
-#ifdef __cpp_lib_modules
+#ifdef __cpp_lib_modules_ts
import std.core;
#endif
#endif
diff --git a/libbutl/win32-utility.cxx b/libbutl/win32-utility.cxx
index eb4d216..d6d6180 100644
--- a/libbutl/win32-utility.cxx
+++ b/libbutl/win32-utility.cxx
@@ -9,7 +9,7 @@
//
#ifdef _WIN32
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <memory> // unique_ptr
#else
import std.core;
diff --git a/libbutl/win32-utility.hxx b/libbutl/win32-utility.hxx
index 79130ca..7d7b243 100644
--- a/libbutl/win32-utility.hxx
+++ b/libbutl/win32-utility.hxx
@@ -32,7 +32,7 @@
# endif
#endif
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#else
import std.core;
diff --git a/tests/b-info/buildfile b/tests/b-info/buildfile
index fd83787..0a05594 100644
--- a/tests/b-info/buildfile
+++ b/tests/b-info/buildfile
@@ -3,6 +3,5 @@
# license : MIT; see accompanying LICENSE file
import libs = libbutl%lib{butl}
-libs += $stdmod_lib
exe{driver}: {hxx cxx}{*} $libs testscript
diff --git a/tests/b-info/driver.cxx b/tests/b-info/driver.cxx
index b128179..e22a018 100644
--- a/tests/b-info/driver.cxx
+++ b/tests/b-info/driver.cxx
@@ -4,15 +4,15 @@
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#include <iostream>
#endif
// Other includes.
-#ifdef __cpp_modules
-#ifdef __cpp_lib_modules
+#ifdef __cpp_modules_ts
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
diff --git a/tests/base64/buildfile b/tests/base64/buildfile
index c85126a..02a4f1e 100644
--- a/tests/base64/buildfile
+++ b/tests/base64/buildfile
@@ -3,6 +3,5 @@
# license : MIT; see accompanying LICENSE file
import libs = libbutl%lib{butl}
-libs += $stdmod_lib
exe{driver}: {hxx cxx}{*} $libs
diff --git a/tests/base64/driver.cxx b/tests/base64/driver.cxx
index 7746637..601f914 100644
--- a/tests/base64/driver.cxx
+++ b/tests/base64/driver.cxx
@@ -4,7 +4,7 @@
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#include <vector>
#include <sstream>
@@ -12,8 +12,8 @@
// Other includes.
-#ifdef __cpp_modules
-#ifdef __cpp_lib_modules
+#ifdef __cpp_modules_ts
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
diff --git a/tests/build/root.build b/tests/build/root.build
index 7e30c57..126009d 100644
--- a/tests/build/root.build
+++ b/tests/build/root.build
@@ -2,22 +2,10 @@
# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
-cxx.std = experimental
-cxx.features.modules = ($force_modules == true)
+cxx.std = latest
using cxx
-if ($force_modules == true && !$cxx.features.modules)
- fail 'c++ compiler does not support modules'
-
-if ($force_std_modules == true)
-{
- import stdmod_lib = libstd-modules%liba{std-modules}
- cxx.poptions += -D__cpp_lib_modules
-}
-else
- stdmod_lib =
-
hxx{*}: extension = hxx
cxx{*}: extension = cxx
diff --git a/tests/command/buildfile b/tests/command/buildfile
index cb0f272..27e74e8 100644
--- a/tests/command/buildfile
+++ b/tests/command/buildfile
@@ -3,6 +3,5 @@
# license : MIT; see accompanying LICENSE file
import libs = libbutl%lib{butl}
-libs += $stdmod_lib
exe{driver}: {hxx cxx}{*} $libs testscript
diff --git a/tests/command/driver.cxx b/tests/command/driver.cxx
index a1baf68..39d38aa 100644
--- a/tests/command/driver.cxx
+++ b/tests/command/driver.cxx
@@ -4,7 +4,7 @@
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <ios>
#include <string>
#include <vector>
@@ -14,8 +14,8 @@
// Other includes.
-#ifdef __cpp_modules
-#ifdef __cpp_lib_modules
+#ifdef __cpp_modules_ts
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
diff --git a/tests/cpfile/buildfile b/tests/cpfile/buildfile
index 3b42372..d7ac6a7 100644
--- a/tests/cpfile/buildfile
+++ b/tests/cpfile/buildfile
@@ -3,6 +3,5 @@
# license : MIT; see accompanying LICENSE file
import libs = libbutl%lib{butl}
-libs += $stdmod_lib
exe{driver}: {hxx cxx}{*} $libs
diff --git a/tests/cpfile/driver.cxx b/tests/cpfile/driver.cxx
index 3f97db7..5576a4f 100644
--- a/tests/cpfile/driver.cxx
+++ b/tests/cpfile/driver.cxx
@@ -4,7 +4,7 @@
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <ios>
#include <string>
#include <system_error>
@@ -12,8 +12,8 @@
// Other includes.
-#ifdef __cpp_modules
-#ifdef __cpp_lib_modules
+#ifdef __cpp_modules_ts
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
diff --git a/tests/curl/buildfile b/tests/curl/buildfile
index fe5c7e0..87f9bf0 100644
--- a/tests/curl/buildfile
+++ b/tests/curl/buildfile
@@ -3,6 +3,5 @@
# license : MIT; see accompanying LICENSE file
import libs = libbutl%lib{butl}
-libs += $stdmod_lib
exe{driver}: {hxx cxx}{*} $libs testscript
diff --git a/tests/curl/driver.cxx b/tests/curl/driver.cxx
index f2769a8..d90f536 100644
--- a/tests/curl/driver.cxx
+++ b/tests/curl/driver.cxx
@@ -4,15 +4,15 @@
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <iostream>
#include <system_error>
#endif
// Other includes.
-#ifdef __cpp_modules
-#ifdef __cpp_lib_modules
+#ifdef __cpp_modules_ts
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
diff --git a/tests/dir-iterator/buildfile b/tests/dir-iterator/buildfile
index 00ad823..2d44bbb 100644
--- a/tests/dir-iterator/buildfile
+++ b/tests/dir-iterator/buildfile
@@ -3,6 +3,5 @@
# license : MIT; see accompanying LICENSE file
import libs = libbutl%lib{butl}
-libs += $stdmod_lib
exe{driver}: {hxx cxx}{*} $libs testscript
diff --git a/tests/dir-iterator/driver.cxx b/tests/dir-iterator/driver.cxx
index 7598a4f..4fd04b7 100644
--- a/tests/dir-iterator/driver.cxx
+++ b/tests/dir-iterator/driver.cxx
@@ -4,15 +4,15 @@
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <cstddef> // size_t
#include <iostream>
#endif
// Other includes.
-#ifdef __cpp_modules
-#ifdef __cpp_lib_modules
+#ifdef __cpp_modules_ts
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
diff --git a/tests/entry-time/buildfile b/tests/entry-time/buildfile
index 3a21d56..97273ea 100644
--- a/tests/entry-time/buildfile
+++ b/tests/entry-time/buildfile
@@ -3,6 +3,5 @@
# license : MIT; see accompanying LICENSE file
import libs = libbutl%lib{butl}
-libs += $stdmod_lib
exe{driver}: {hxx cxx}{*} $libs testscript
diff --git a/tests/entry-time/driver.cxx b/tests/entry-time/driver.cxx
index 9ce27ee..64538ea 100644
--- a/tests/entry-time/driver.cxx
+++ b/tests/entry-time/driver.cxx
@@ -4,7 +4,7 @@
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#include <chrono>
#include <iostream>
@@ -12,8 +12,8 @@
// Other includes.
-#ifdef __cpp_modules
-#ifdef __cpp_lib_modules
+#ifdef __cpp_modules_ts
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
diff --git a/tests/fdstream/buildfile b/tests/fdstream/buildfile
index f69bc95..cf3d3aa 100644
--- a/tests/fdstream/buildfile
+++ b/tests/fdstream/buildfile
@@ -3,7 +3,6 @@
# license : MIT; see accompanying LICENSE file
import libs = libbutl%lib{butl}
-libs += $stdmod_lib
exe{driver}: {hxx cxx}{*} $libs
diff --git a/tests/fdstream/driver.cxx b/tests/fdstream/driver.cxx
index ee75a31..4a85526 100644
--- a/tests/fdstream/driver.cxx
+++ b/tests/fdstream/driver.cxx
@@ -8,7 +8,7 @@
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#ifndef _WIN32
# include <chrono>
#endif
@@ -27,8 +27,8 @@
// Other includes.
-#ifdef __cpp_modules
-#ifdef __cpp_lib_modules
+#ifdef __cpp_modules_ts
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#ifndef _WIN32
diff --git a/tests/link/buildfile b/tests/link/buildfile
index fb9956a..881625c 100644
--- a/tests/link/buildfile
+++ b/tests/link/buildfile
@@ -3,6 +3,5 @@
# license : MIT; see accompanying LICENSE file
import libs = libbutl%lib{butl}
-libs += $stdmod_lib
exe{driver}: {hxx cxx}{*} $libs
diff --git a/tests/link/driver.cxx b/tests/link/driver.cxx
index 6489d8d..362219e 100644
--- a/tests/link/driver.cxx
+++ b/tests/link/driver.cxx
@@ -4,7 +4,7 @@
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <set>
#include <utility> // pair
#include <iostream> // cerr
@@ -13,8 +13,8 @@
// Other includes.
-#ifdef __cpp_modules
-#ifdef __cpp_lib_modules
+#ifdef __cpp_modules_ts
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
diff --git a/tests/manifest-parser/buildfile b/tests/manifest-parser/buildfile
index 1aa59e4..5be14d3 100644
--- a/tests/manifest-parser/buildfile
+++ b/tests/manifest-parser/buildfile
@@ -3,6 +3,5 @@
# license : MIT; see accompanying LICENSE file
import libs = libbutl%lib{butl}
-libs += $stdmod_lib
exe{driver}: {hxx cxx}{*} $libs
diff --git a/tests/manifest-parser/driver.cxx b/tests/manifest-parser/driver.cxx
index d11ba8f..65e6821 100644
--- a/tests/manifest-parser/driver.cxx
+++ b/tests/manifest-parser/driver.cxx
@@ -4,7 +4,7 @@
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <vector>
#include <string>
#include <utility> // pair, move()
@@ -14,8 +14,8 @@
// Other includes.
-#ifdef __cpp_modules
-#ifdef __cpp_lib_modules
+#ifdef __cpp_modules_ts
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
diff --git a/tests/manifest-rewriter/buildfile b/tests/manifest-rewriter/buildfile
index c231631..3f04982 100644
--- a/tests/manifest-rewriter/buildfile
+++ b/tests/manifest-rewriter/buildfile
@@ -3,6 +3,5 @@
# license : MIT; see accompanying LICENSE file
import libs = libbutl%lib{butl}
-libs += $stdmod_lib
exe{driver}: {hxx cxx}{*} $libs
diff --git a/tests/manifest-rewriter/driver.cxx b/tests/manifest-rewriter/driver.cxx
index 11269ab..2033af0 100644
--- a/tests/manifest-rewriter/driver.cxx
+++ b/tests/manifest-rewriter/driver.cxx
@@ -4,7 +4,7 @@
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <vector>
#include <string>
#include <cstdint> // uint64_t
@@ -15,8 +15,8 @@
// Other includes.
-#ifdef __cpp_modules
-#ifdef __cpp_lib_modules
+#ifdef __cpp_modules_ts
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
diff --git a/tests/manifest-roundtrip/buildfile b/tests/manifest-roundtrip/buildfile
index c251fb5..33a7814 100644
--- a/tests/manifest-roundtrip/buildfile
+++ b/tests/manifest-roundtrip/buildfile
@@ -3,7 +3,6 @@
# license : MIT; see accompanying LICENSE file
import libs = libbutl%lib{butl}
-libs += $stdmod_lib
exe{driver}: {hxx cxx}{*} $libs
exe{driver}: manifest: test.roundtrip = true
diff --git a/tests/manifest-roundtrip/driver.cxx b/tests/manifest-roundtrip/driver.cxx
index e13688d..3936f77 100644
--- a/tests/manifest-roundtrip/driver.cxx
+++ b/tests/manifest-roundtrip/driver.cxx
@@ -4,15 +4,15 @@
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#include <iostream>
#endif
// Other includes.
-#ifdef __cpp_modules
-#ifdef __cpp_lib_modules
+#ifdef __cpp_modules_ts
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
diff --git a/tests/manifest-serializer/buildfile b/tests/manifest-serializer/buildfile
index 82b0f09..6ac57e5 100644
--- a/tests/manifest-serializer/buildfile
+++ b/tests/manifest-serializer/buildfile
@@ -3,6 +3,5 @@
# license : MIT; see accompanying LICENSE file
import libs = libbutl%lib{butl}
-libs += $stdmod_lib
exe{driver}: {hxx cxx}{*} $libs
diff --git a/tests/manifest-serializer/driver.cxx b/tests/manifest-serializer/driver.cxx
index 4cddb57..c471776 100644
--- a/tests/manifest-serializer/driver.cxx
+++ b/tests/manifest-serializer/driver.cxx
@@ -4,7 +4,7 @@
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <vector>
#include <string>
#include <utility> // pair
@@ -14,8 +14,8 @@
// Other includes.
-#ifdef __cpp_modules
-#ifdef __cpp_lib_modules
+#ifdef __cpp_modules_ts
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
diff --git a/tests/mventry/buildfile b/tests/mventry/buildfile
index e3dc517..7ebb572 100644
--- a/tests/mventry/buildfile
+++ b/tests/mventry/buildfile
@@ -3,6 +3,5 @@
# license : MIT; see accompanying LICENSE file
import libs = libbutl%lib{butl}
-libs += $stdmod_lib
exe{driver}: {hxx cxx}{*} $libs testscript
diff --git a/tests/mventry/driver.cxx b/tests/mventry/driver.cxx
index b705831..8422c81 100644
--- a/tests/mventry/driver.cxx
+++ b/tests/mventry/driver.cxx
@@ -4,15 +4,15 @@
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <iostream>
#include <system_error>
#endif
// Other includes.
-#ifdef __cpp_modules
-#ifdef __cpp_lib_modules
+#ifdef __cpp_modules_ts
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
diff --git a/tests/openssl/buildfile b/tests/openssl/buildfile
index 7e6a4b8..e74b94b 100644
--- a/tests/openssl/buildfile
+++ b/tests/openssl/buildfile
@@ -3,6 +3,5 @@
# license : MIT; see accompanying LICENSE file
import libs = libbutl%lib{butl}
-libs += $stdmod_lib
exe{driver}: {hxx cxx}{*} $libs testscript
diff --git a/tests/openssl/driver.cxx b/tests/openssl/driver.cxx
index c84f838..a1d0f4e 100644
--- a/tests/openssl/driver.cxx
+++ b/tests/openssl/driver.cxx
@@ -4,7 +4,7 @@
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <vector>
#include <iostream>
#include <iterator>
@@ -13,8 +13,8 @@
// Other includes.
-#ifdef __cpp_modules
-#ifdef __cpp_lib_modules
+#ifdef __cpp_modules_ts
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
diff --git a/tests/pager/buildfile b/tests/pager/buildfile
index 4b601ab..51d9bee 100644
--- a/tests/pager/buildfile
+++ b/tests/pager/buildfile
@@ -3,6 +3,5 @@
# license : MIT; see accompanying LICENSE file
import libs = libbutl%lib{butl}
-libs += $stdmod_lib
exe{driver}: {hxx cxx}{*} $libs
diff --git a/tests/pager/driver.cxx b/tests/pager/driver.cxx
index 3eb9a81..e2681b4 100644
--- a/tests/pager/driver.cxx
+++ b/tests/pager/driver.cxx
@@ -4,7 +4,7 @@
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <ios> // ios_base::failure
#include <vector>
#include <string>
@@ -15,8 +15,8 @@
// Other includes.
-#ifdef __cpp_modules
-#ifdef __cpp_lib_modules
+#ifdef __cpp_modules_ts
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
diff --git a/tests/path-entry/buildfile b/tests/path-entry/buildfile
index 9298fe4..7acbd7f 100644
--- a/tests/path-entry/buildfile
+++ b/tests/path-entry/buildfile
@@ -3,6 +3,5 @@
# license : MIT; see accompanying LICENSE file
import libs = libbutl%lib{butl}
-libs += $stdmod_lib
exe{driver}: {hxx cxx}{*} $libs testscript
diff --git a/tests/path-entry/driver.cxx b/tests/path-entry/driver.cxx
index 252a6ca..797a5ef 100644
--- a/tests/path-entry/driver.cxx
+++ b/tests/path-entry/driver.cxx
@@ -4,15 +4,15 @@
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <iostream>
#include <system_error>
#endif
// Other includes.
-#ifdef __cpp_modules
-#ifdef __cpp_lib_modules
+#ifdef __cpp_modules_ts
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
diff --git a/tests/path/buildfile b/tests/path/buildfile
index 0efbf6e..3e81b26 100644
--- a/tests/path/buildfile
+++ b/tests/path/buildfile
@@ -3,6 +3,5 @@
# license : MIT; see accompanying LICENSE file
import libs = libbutl%lib{butl}
-libs += $stdmod_lib
exe{driver}: {hxx cxx}{*} $libs
diff --git a/tests/path/driver.cxx b/tests/path/driver.cxx
index ededb58..72fdf9f 100644
--- a/tests/path/driver.cxx
+++ b/tests/path/driver.cxx
@@ -4,15 +4,15 @@
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <iostream>
#include <type_traits>
#endif
// Other includes.
-#ifdef __cpp_modules
-#ifdef __cpp_lib_modules
+#ifdef __cpp_modules_ts
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
diff --git a/tests/prefix-map/buildfile b/tests/prefix-map/buildfile
index 5a038b6..5b94a17 100644
--- a/tests/prefix-map/buildfile
+++ b/tests/prefix-map/buildfile
@@ -3,6 +3,5 @@
# license : MIT; see accompanying LICENSE file
import libs = libbutl%lib{butl}
-libs += $stdmod_lib
exe{driver}: {hxx cxx}{*} $libs
diff --git a/tests/prefix-map/driver.cxx b/tests/prefix-map/driver.cxx
index dc820a3..23e9e60 100644
--- a/tests/prefix-map/driver.cxx
+++ b/tests/prefix-map/driver.cxx
@@ -4,15 +4,15 @@
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#include <iostream>
#endif
// Other includes.
-#ifdef __cpp_modules
-#ifdef __cpp_lib_modules
+#ifdef __cpp_modules_ts
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
diff --git a/tests/process-run/buildfile b/tests/process-run/buildfile
index 0c88f5a..a8f0f81 100644
--- a/tests/process-run/buildfile
+++ b/tests/process-run/buildfile
@@ -3,6 +3,5 @@
# license : MIT; see accompanying LICENSE file
import libs = libbutl%lib{butl}
-libs += $stdmod_lib
exe{driver}: {hxx cxx}{*} $libs testscript
diff --git a/tests/process-run/driver.cxx b/tests/process-run/driver.cxx
index 8335e9b..e27d9e1 100644
--- a/tests/process-run/driver.cxx
+++ b/tests/process-run/driver.cxx
@@ -4,15 +4,15 @@
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#include <iostream>
#endif
// Other includes.
-#ifdef __cpp_modules
-#ifdef __cpp_lib_modules
+#ifdef __cpp_modules_ts
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
diff --git a/tests/process/buildfile b/tests/process/buildfile
index 8c932d8..43b4085 100644
--- a/tests/process/buildfile
+++ b/tests/process/buildfile
@@ -3,6 +3,5 @@
# license : MIT; see accompanying LICENSE file
import libs = libbutl%lib{butl}
-libs += $stdmod_lib
exe{driver}: {hxx cxx}{*} $libs testscript
diff --git a/tests/process/driver.cxx b/tests/process/driver.cxx
index ea42c07..e3c8e4a 100644
--- a/tests/process/driver.cxx
+++ b/tests/process/driver.cxx
@@ -4,7 +4,7 @@
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <ios>
#include <string>
#include <vector>
@@ -15,8 +15,8 @@
// Other includes.
-#ifdef __cpp_modules
-#ifdef __cpp_lib_modules
+#ifdef __cpp_modules_ts
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
diff --git a/tests/progress/buildfile b/tests/progress/buildfile
index ee983e0..e1a1e77 100644
--- a/tests/progress/buildfile
+++ b/tests/progress/buildfile
@@ -3,6 +3,5 @@
# license : MIT; see accompanying LICENSE file
import libs = libbutl%lib{butl}
-libs += $stdmod_lib
exe{driver}: {hxx cxx}{*} $libs
diff --git a/tests/progress/driver.cxx b/tests/progress/driver.cxx
index b306b3b..fd7996d 100644
--- a/tests/progress/driver.cxx
+++ b/tests/progress/driver.cxx
@@ -11,7 +11,7 @@
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#include <cstddef> // size_t
#include <iostream>
@@ -22,8 +22,8 @@
// Other includes.
-#ifdef __cpp_modules
-#ifdef __cpp_lib_modules
+#ifdef __cpp_modules_ts
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#ifndef _WIN32
diff --git a/tests/project-name/buildfile b/tests/project-name/buildfile
index 55e7e70..80c221c 100644
--- a/tests/project-name/buildfile
+++ b/tests/project-name/buildfile
@@ -3,6 +3,5 @@
# license : MIT; see accompanying LICENSE file
import libs = libbutl%lib{butl}
-libs += $stdmod_lib
exe{driver}: {hxx cxx}{*} $libs testscript
diff --git a/tests/project-name/driver.cxx b/tests/project-name/driver.cxx
index 45cc72f..6c888a8 100644
--- a/tests/project-name/driver.cxx
+++ b/tests/project-name/driver.cxx
@@ -4,7 +4,7 @@
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <ios> // ios::*bit
#include <string>
#include <iostream>
@@ -13,8 +13,8 @@
// Other includes.
-#ifdef __cpp_modules
-#ifdef __cpp_lib_modules
+#ifdef __cpp_modules_ts
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
diff --git a/tests/regex/buildfile b/tests/regex/buildfile
index 3ac2e44..91eb225 100644
--- a/tests/regex/buildfile
+++ b/tests/regex/buildfile
@@ -3,6 +3,5 @@
# license : MIT; see accompanying LICENSE file
import libs = libbutl%lib{butl}
-libs += $stdmod_lib
exe{driver}: {hxx cxx}{*} $libs testscript
diff --git a/tests/regex/driver.cxx b/tests/regex/driver.cxx
index 7815a9b..4fee290 100644
--- a/tests/regex/driver.cxx
+++ b/tests/regex/driver.cxx
@@ -4,7 +4,7 @@
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#include <iostream>
#include <exception>
@@ -12,8 +12,8 @@
// Other includes.
-#ifdef __cpp_modules
-#ifdef __cpp_lib_modules
+#ifdef __cpp_modules_ts
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
import std.regex; // @@ MOD TODO: shouldn't be necessary (re-export).
diff --git a/tests/semantic-version/buildfile b/tests/semantic-version/buildfile
index cf0beca..250abd7 100644
--- a/tests/semantic-version/buildfile
+++ b/tests/semantic-version/buildfile
@@ -3,6 +3,5 @@
# license : MIT; see accompanying LICENSE file
import libs = libbutl%lib{butl}
-libs += $stdmod_lib
exe{driver}: {hxx cxx}{*} $libs
diff --git a/tests/semantic-version/driver.cxx b/tests/semantic-version/driver.cxx
index fa67d2b..9ffe671 100644
--- a/tests/semantic-version/driver.cxx
+++ b/tests/semantic-version/driver.cxx
@@ -4,14 +4,14 @@
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <iostream>
#endif
// Other includes.
-#ifdef __cpp_modules
-#ifdef __cpp_lib_modules
+#ifdef __cpp_modules_ts
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
diff --git a/tests/sendmail/buildfile b/tests/sendmail/buildfile
index a1cc9e4..7ca4436 100644
--- a/tests/sendmail/buildfile
+++ b/tests/sendmail/buildfile
@@ -3,6 +3,5 @@
# license : MIT; see accompanying LICENSE file
import libs = libbutl%lib{butl}
-libs += $stdmod_lib
exe{driver}: {hxx cxx}{*} $libs testscript
diff --git a/tests/sendmail/driver.cxx b/tests/sendmail/driver.cxx
index 82e8bfb..c4e3445 100644
--- a/tests/sendmail/driver.cxx
+++ b/tests/sendmail/driver.cxx
@@ -4,15 +4,15 @@
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <iostream>
#include <system_error>
#endif
// Other includes.
-#ifdef __cpp_modules
-#ifdef __cpp_lib_modules
+#ifdef __cpp_modules_ts
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
diff --git a/tests/sha1/buildfile b/tests/sha1/buildfile
index 670bed5..d19464a 100644
--- a/tests/sha1/buildfile
+++ b/tests/sha1/buildfile
@@ -3,6 +3,5 @@
# license : MIT; see accompanying LICENSE file
import libs = libbutl%lib{butl}
-libs += $stdmod_lib
exe{driver}: {hxx cxx}{*} $libs
diff --git a/tests/sha1/driver.cxx b/tests/sha1/driver.cxx
index 1233704..83d0fe9 100644
--- a/tests/sha1/driver.cxx
+++ b/tests/sha1/driver.cxx
@@ -4,15 +4,15 @@
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#include <cstddef> // size_t
#endif
// Other includes.
-#ifdef __cpp_modules
-#ifdef __cpp_lib_modules
+#ifdef __cpp_modules_ts
+#ifdef __cpp_lib_modules_ts
import std.core;
#endif
import butl.sha1;
diff --git a/tests/sha256/buildfile b/tests/sha256/buildfile
index 670bed5..d19464a 100644
--- a/tests/sha256/buildfile
+++ b/tests/sha256/buildfile
@@ -3,6 +3,5 @@
# license : MIT; see accompanying LICENSE file
import libs = libbutl%lib{butl}
-libs += $stdmod_lib
exe{driver}: {hxx cxx}{*} $libs
diff --git a/tests/sha256/driver.cxx b/tests/sha256/driver.cxx
index 43c9905..77298b2 100644
--- a/tests/sha256/driver.cxx
+++ b/tests/sha256/driver.cxx
@@ -4,15 +4,15 @@
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#include <cstddef> // size_t
#endif
// Other includes.
-#ifdef __cpp_modules
-#ifdef __cpp_lib_modules
+#ifdef __cpp_modules_ts
+#ifdef __cpp_lib_modules_ts
import std.core;
#endif
import butl.path;
diff --git a/tests/small-forward-list/buildfile b/tests/small-forward-list/buildfile
index 6730dde..f43ab7a 100644
--- a/tests/small-forward-list/buildfile
+++ b/tests/small-forward-list/buildfile
@@ -3,6 +3,5 @@
# license : MIT; see accompanying LICENSE file
import libs = libbutl%lib{butl}
-libs += $stdmod_lib
exe{driver}: {hxx cxx}{*} $libs
diff --git a/tests/small-forward-list/driver.cxx b/tests/small-forward-list/driver.cxx
index ea4489b..a16fcac 100644
--- a/tests/small-forward-list/driver.cxx
+++ b/tests/small-forward-list/driver.cxx
@@ -4,15 +4,15 @@
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#include <iostream>
#endif
// Other includes.
-#ifdef __cpp_modules
-#ifdef __cpp_lib_modules
+#ifdef __cpp_modules_ts
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
diff --git a/tests/small-list/buildfile b/tests/small-list/buildfile
index 708f902..0e8dde6 100644
--- a/tests/small-list/buildfile
+++ b/tests/small-list/buildfile
@@ -3,6 +3,5 @@
# license : MIT; see accompanying LICENSE file
import libs = libbutl%lib{butl}
-libs += $stdmod_lib
exe{driver}: {hxx cxx}{*} $libs
diff --git a/tests/small-list/driver.cxx b/tests/small-list/driver.cxx
index 59983aa..3f40991 100644
--- a/tests/small-list/driver.cxx
+++ b/tests/small-list/driver.cxx
@@ -4,15 +4,15 @@
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#include <iostream>
#endif
// Other includes.
-#ifdef __cpp_modules
-#ifdef __cpp_lib_modules
+#ifdef __cpp_modules_ts
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
diff --git a/tests/small-vector/buildfile b/tests/small-vector/buildfile
index 1145a6d..3be8d20 100644
--- a/tests/small-vector/buildfile
+++ b/tests/small-vector/buildfile
@@ -3,6 +3,5 @@
# license : MIT; see accompanying LICENSE file
import libs = libbutl%lib{butl}
-libs += $stdmod_lib
exe{driver}: {hxx cxx}{*} $libs
diff --git a/tests/small-vector/driver.cxx b/tests/small-vector/driver.cxx
index 38948f8..4b11437 100644
--- a/tests/small-vector/driver.cxx
+++ b/tests/small-vector/driver.cxx
@@ -4,15 +4,15 @@
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#include <iostream>
#endif
// Other includes.
-#ifdef __cpp_modules
-#ifdef __cpp_lib_modules
+#ifdef __cpp_modules_ts
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
diff --git a/tests/standard-version/buildfile b/tests/standard-version/buildfile
index 9935456..0305c9c 100644
--- a/tests/standard-version/buildfile
+++ b/tests/standard-version/buildfile
@@ -3,6 +3,5 @@
# license : MIT; see accompanying LICENSE file
import libs = libbutl%lib{butl}
-libs += $stdmod_lib
exe{driver}: {hxx cxx}{*} $libs testscript
diff --git a/tests/standard-version/driver.cxx b/tests/standard-version/driver.cxx
index 72dbb4a..54fcfb8 100644
--- a/tests/standard-version/driver.cxx
+++ b/tests/standard-version/driver.cxx
@@ -4,7 +4,7 @@
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <ios> // ios::failbit, ios::badbit
#include <string>
#include <cstdint> // uint*_t
@@ -14,8 +14,8 @@
// Other includes.
-#ifdef __cpp_modules
-#ifdef __cpp_lib_modules
+#ifdef __cpp_modules_ts
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
diff --git a/tests/strcase/buildfile b/tests/strcase/buildfile
index 1b41f73..1aab4ab 100644
--- a/tests/strcase/buildfile
+++ b/tests/strcase/buildfile
@@ -3,6 +3,5 @@
# license : MIT; see accompanying LICENSE file
import libs = libbutl%lib{butl}
-libs += $stdmod_lib
exe{driver}: {hxx cxx}{*} $libs
diff --git a/tests/strcase/driver.cxx b/tests/strcase/driver.cxx
index 2ba095a..e9b779c 100644
--- a/tests/strcase/driver.cxx
+++ b/tests/strcase/driver.cxx
@@ -4,14 +4,14 @@
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#endif
// Other includes.
-#ifdef __cpp_modules
-#ifdef __cpp_lib_modules
+#ifdef __cpp_modules_ts
+#ifdef __cpp_lib_modules_ts
import std.core;
#endif
import butl.utility;
diff --git a/tests/string-parser/buildfile b/tests/string-parser/buildfile
index cbea595..98e94da 100644
--- a/tests/string-parser/buildfile
+++ b/tests/string-parser/buildfile
@@ -3,6 +3,5 @@
# license : MIT; see accompanying LICENSE file
import libs = libbutl%lib{butl}
-libs += $stdmod_lib
exe{driver}: {hxx cxx}{*} $libs testscript
diff --git a/tests/string-parser/driver.cxx b/tests/string-parser/driver.cxx
index b908b6b..4ffeb6a 100644
--- a/tests/string-parser/driver.cxx
+++ b/tests/string-parser/driver.cxx
@@ -4,7 +4,7 @@
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#include <vector>
#include <iostream>
@@ -12,8 +12,8 @@
// Other includes.
-#ifdef __cpp_modules
-#ifdef __cpp_lib_modules
+#ifdef __cpp_modules_ts
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
diff --git a/tests/tab-parser/buildfile b/tests/tab-parser/buildfile
index c527af6..fd666d0 100644
--- a/tests/tab-parser/buildfile
+++ b/tests/tab-parser/buildfile
@@ -3,6 +3,5 @@
# license : MIT; see accompanying LICENSE file
import libs = libbutl%lib{butl}
-libs += $stdmod_lib
exe{driver}: {hxx cxx}{*} $libs testscript
diff --git a/tests/tab-parser/driver.cxx b/tests/tab-parser/driver.cxx
index 59622b6..3a5ffa3 100644
--- a/tests/tab-parser/driver.cxx
+++ b/tests/tab-parser/driver.cxx
@@ -4,15 +4,15 @@
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#include <iostream>
#endif
// Other includes.
-#ifdef __cpp_modules
-#ifdef __cpp_lib_modules
+#ifdef __cpp_modules_ts
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
diff --git a/tests/target-triplet/buildfile b/tests/target-triplet/buildfile
index ea258d4..6a77de4 100644
--- a/tests/target-triplet/buildfile
+++ b/tests/target-triplet/buildfile
@@ -3,6 +3,5 @@
# license : MIT; see accompanying LICENSE file
import libs = libbutl%lib{butl}
-libs += $stdmod_lib
exe{driver}: {hxx cxx}{*} $libs
diff --git a/tests/target-triplet/driver.cxx b/tests/target-triplet/driver.cxx
index b6da550..3d0522c 100644
--- a/tests/target-triplet/driver.cxx
+++ b/tests/target-triplet/driver.cxx
@@ -4,7 +4,7 @@
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#include <iostream>
#include <stdexcept> // invalid_argument
@@ -12,8 +12,8 @@
// Other includes.
-#ifdef __cpp_modules
-#ifdef __cpp_lib_modules
+#ifdef __cpp_modules_ts
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
diff --git a/tests/timestamp/buildfile b/tests/timestamp/buildfile
index 0a0857e..6da0f57 100644
--- a/tests/timestamp/buildfile
+++ b/tests/timestamp/buildfile
@@ -3,6 +3,5 @@
# license : MIT; see accompanying LICENSE file
import libs = libbutl%lib{butl}
-libs += $stdmod_lib
exe{driver}: {hxx cxx}{*} $libs
diff --git a/tests/timestamp/driver.cxx b/tests/timestamp/driver.cxx
index 198c745..fbed9ec 100644
--- a/tests/timestamp/driver.cxx
+++ b/tests/timestamp/driver.cxx
@@ -6,7 +6,7 @@
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <chrono>
#include <locale>
#include <clocale>
@@ -17,8 +17,8 @@
// Other includes.
-#ifdef __cpp_modules
-#ifdef __cpp_lib_modules
+#ifdef __cpp_modules_ts
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
diff --git a/tests/url/buildfile b/tests/url/buildfile
index e3a666e..7a1a98a 100644
--- a/tests/url/buildfile
+++ b/tests/url/buildfile
@@ -3,6 +3,5 @@
# license : MIT; see accompanying LICENSE file
import libs = libbutl%lib{butl}
-libs += $stdmod_lib
exe{driver}: {hxx cxx}{*} $libs testscript
diff --git a/tests/url/driver.cxx b/tests/url/driver.cxx
index cb2c738..8160d7d 100644
--- a/tests/url/driver.cxx
+++ b/tests/url/driver.cxx
@@ -4,7 +4,7 @@
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <string>
#include <utility> // move()
#include <iostream>
@@ -14,8 +14,8 @@
// Other includes.
-#ifdef __cpp_modules
-#ifdef __cpp_lib_modules
+#ifdef __cpp_modules_ts
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif
diff --git a/tests/uuid/buildfile b/tests/uuid/buildfile
index 99d37e8..6c17ded 100644
--- a/tests/uuid/buildfile
+++ b/tests/uuid/buildfile
@@ -3,6 +3,5 @@
# license : MIT; see accompanying LICENSE file
import libs = libbutl%lib{butl}
-libs += $stdmod_lib
exe{driver}: {hxx cxx}{*} $libs
diff --git a/tests/wildcard/buildfile b/tests/wildcard/buildfile
index 81ca057..a25566a 100644
--- a/tests/wildcard/buildfile
+++ b/tests/wildcard/buildfile
@@ -3,6 +3,5 @@
# license : MIT; see accompanying LICENSE file
import libs = libbutl%lib{butl}
-libs += $stdmod_lib
exe{driver}: {hxx cxx}{*} $libs testscript
diff --git a/tests/wildcard/driver.cxx b/tests/wildcard/driver.cxx
index d8f63d4..7bc1661 100644
--- a/tests/wildcard/driver.cxx
+++ b/tests/wildcard/driver.cxx
@@ -4,7 +4,7 @@
#include <cassert>
-#ifndef __cpp_lib_modules
+#ifndef __cpp_lib_modules_ts
#include <map>
#include <string>
#include <vector>
@@ -15,8 +15,8 @@
// Other includes.
-#ifdef __cpp_modules
-#ifdef __cpp_lib_modules
+#ifdef __cpp_modules_ts
+#ifdef __cpp_lib_modules_ts
import std.core;
import std.io;
#endif