From c09cd7512491cee1e82c1ad8128ce9fd4bc3f79b Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 22 Sep 2017 23:32:28 +0200 Subject: Initial modularization with both Clang and VC hacks Note: gave up on VC about half way though. --- libbutl/regex.cxx | 35 ++++++++++++++++++++++++++++++----- 1 file changed, 30 insertions(+), 5 deletions(-) (limited to 'libbutl/regex.cxx') diff --git a/libbutl/regex.cxx b/libbutl/regex.cxx index a177a74..1da325b 100644 --- a/libbutl/regex.cxx +++ b/libbutl/regex.cxx @@ -2,17 +2,42 @@ // copyright : Copyright (c) 2014-2017 Code Synthesis Ltd // license : MIT; see accompanying LICENSE file -#include - -#if defined(_MSC_VER) && _MSC_VER <= 1911 -# include // strstr() +#ifndef __cpp_modules +#include #endif +// C includes. + +#ifndef __cpp_lib_modules +#include +#include + #include #include #include // runtime_error +#if defined(_MSC_VER) && _MSC_VER <= 1911 +# include // strstr() +#endif +#endif + +// Other includes. -#include // operator<<(ostream, exception) +#ifdef __cpp_modules +module butl.regex; + +// Only imports additional to interface. +#ifdef __clang__ +#ifdef __cpp_lib_modules +import std.core; +import std.io; +//@@ MOD TODO import std.regex; +#endif +#endif + +import butl.utility; // operator<<(ostream, exception) +#else +#include +#endif namespace std { -- cgit v1.1