mirror of
https://github.com/boostorg/regex.git
synced 2025-07-29 12:07:28 +02:00
Clean up #includes.
This commit is contained in:
@ -58,9 +58,11 @@
|
||||
#ifdef BOOST_REGEX_STANDALONE
|
||||
#ifndef BOOST_REGEX_AS_MODULE
|
||||
#include <cassert>
|
||||
#endif
|
||||
# define BOOST_REGEX_ASSERT(x) assert(x)
|
||||
#else
|
||||
# define BOOST_REGEX_ASSERT(x) do{ if(x == 0) { std::printf("%s:%d Assertion Failed", __FILE__, __LINE__); std::abort(); } }while(0)
|
||||
#endif
|
||||
#else
|
||||
#include <boost/assert.hpp>
|
||||
# define BOOST_REGEX_ASSERT(x) BOOST_ASSERT(x)
|
||||
#endif
|
||||
@ -302,8 +304,6 @@
|
||||
* If there are no exceptions then we must report critical-errors
|
||||
* the only way we know how; by terminating.
|
||||
*/
|
||||
#include <cassert>
|
||||
|
||||
# define BOOST_REGEX_NOEH_ASSERT(x) assert(x);
|
||||
#else
|
||||
/*
|
||||
|
@ -19,9 +19,11 @@
|
||||
#ifndef BOOST_REGEX_V5_MATCH_FLAGS
|
||||
#define BOOST_REGEX_V5_MATCH_FLAGS
|
||||
|
||||
#ifndef BOOST_REGEX_AS_MODULE
|
||||
#ifdef __cplusplus
|
||||
# include <cstdint>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
namespace boost{
|
||||
|
@ -1,18 +1,15 @@
|
||||
|
||||
module;
|
||||
|
||||
#if defined(__cpp_lib_modules) || (defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 193933523))
|
||||
#define BOOST_REGEX_USE_STD_MODULE
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32) && __has_include(<windows.h>)
|
||||
//
|
||||
// This has to appear *before* import std; otherwise the compiler chokes.
|
||||
//
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cpp_lib_modules
|
||||
import std;
|
||||
#elif defined(MSVC_EXPERIMENTAL_STD_MODULE)
|
||||
import std.core;
|
||||
#else
|
||||
#if !defined(BOOST_REGEX_USE_STD_MODULE) && !defined(MSVC_EXPERIMENTAL_STD_MODULE)
|
||||
#include <cassert>
|
||||
#include <cstdint>
|
||||
#include <climits>
|
||||
@ -47,10 +44,13 @@ import std.core;
|
||||
#ifdef BOOST_HAS_THREADS
|
||||
#include <mutex>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <cwctype>
|
||||
#include <assert.h>
|
||||
#endif
|
||||
|
||||
#if !defined(BOOST_REGEX_USE_STD_MODULE) && defined(MSVC_EXPERIMENTAL_STD_MODULE)
|
||||
#include <cwchar>
|
||||
#endif
|
||||
|
||||
#if __has_include(<unicode/utypes.h>)
|
||||
#include <unicode/utypes.h>
|
||||
@ -64,6 +64,16 @@ import std.core;
|
||||
|
||||
export module boost.regex;
|
||||
|
||||
#if defined(BOOST_REGEX_USE_STD_MODULE)
|
||||
import std;
|
||||
#elif defined(MSVC_EXPERIMENTAL_STD_MODULE)
|
||||
import std.core;
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_FULL_VER
|
||||
#pragma warning(disable:5244)
|
||||
#endif
|
||||
|
||||
#include <boost/regex.hpp>
|
||||
|
||||
#if __has_include(<unicode/utypes.h>)
|
||||
|
@ -25,7 +25,11 @@ import std.core;
|
||||
#include <iostream>
|
||||
#endif
|
||||
|
||||
#ifdef TEST_HEADERS
|
||||
#include <boost/regex.hpp>
|
||||
#else
|
||||
import boost.regex;
|
||||
#endif
|
||||
|
||||
|
||||
bool validate_card_format(const std::string& s)
|
||||
|
@ -28,7 +28,11 @@ import std.core;
|
||||
#include <cstring>
|
||||
#endif
|
||||
|
||||
#ifdef TEST_HEADERS
|
||||
#include <boost/regex.hpp>
|
||||
#else
|
||||
import boost.regex;
|
||||
#endif
|
||||
|
||||
// match some kind of html tag:
|
||||
boost::regex e("<[^>]*>");
|
||||
|
@ -28,7 +28,11 @@ import std.core;
|
||||
#include <cstring>
|
||||
#endif
|
||||
|
||||
#ifdef TEST_HEADERS
|
||||
#include <boost/regex.hpp>
|
||||
#else
|
||||
import boost.regex;
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_NO_STDC_NAMESPACE
|
||||
namespace std{ using ::memmove; }
|
||||
|
@ -28,7 +28,11 @@ import std.core;
|
||||
#include <iostream>
|
||||
#endif
|
||||
|
||||
#ifdef TEST_HEADERS
|
||||
#include <boost/regex.hpp>
|
||||
#else
|
||||
import boost.regex;
|
||||
#endif
|
||||
|
||||
boost::regex e("(\\d{3,4})[- ]?(\\d{4})[- ]?(\\d{4})[- ]?(\\d{4})");
|
||||
|
||||
|
@ -28,7 +28,11 @@ import std.core;
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef TEST_HEADERS
|
||||
#include <boost/regex.hpp>
|
||||
#else
|
||||
import boost.regex;
|
||||
#endif
|
||||
|
||||
// purpose:
|
||||
// takes the contents of a file in the form of a string
|
||||
|
@ -28,7 +28,11 @@ import std.core;
|
||||
#include <iostream>
|
||||
#endif
|
||||
|
||||
#ifdef TEST_HEADERS
|
||||
#include <boost/regex.hpp>
|
||||
#else
|
||||
import boost.regex;
|
||||
#endif
|
||||
|
||||
// purpose:
|
||||
// takes the contents of a file in the form of a string
|
||||
|
@ -29,7 +29,11 @@ import std.core;
|
||||
#include <fstream>
|
||||
#endif
|
||||
|
||||
#ifdef TEST_HEADERS
|
||||
#include <boost/regex.hpp>
|
||||
#else
|
||||
import boost.regex;
|
||||
#endif
|
||||
|
||||
// purpose:
|
||||
// takes the contents of a file in the form of a string
|
||||
|
@ -29,7 +29,11 @@ import std.core;
|
||||
#include <algorithm>
|
||||
#endif
|
||||
|
||||
#ifdef TEST_HEADERS
|
||||
#include <boost/regex.hpp>
|
||||
#else
|
||||
import boost.regex;
|
||||
#endif
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
@ -27,7 +27,11 @@ import std.core;
|
||||
#include <iostream>
|
||||
#endif
|
||||
|
||||
#ifdef TEST_HEADERS
|
||||
#include <boost/regex.hpp>
|
||||
#else
|
||||
import boost.regex;
|
||||
#endif
|
||||
|
||||
using namespace std;
|
||||
using namespace boost;
|
||||
|
@ -31,7 +31,11 @@ import std.core;
|
||||
#include <iostream>
|
||||
#endif
|
||||
|
||||
#ifdef TEST_HEADERS
|
||||
#include <boost/regex.hpp>
|
||||
#else
|
||||
import boost.regex;
|
||||
#endif
|
||||
|
||||
// purpose:
|
||||
// takes the contents of a file and transform to
|
||||
|
@ -31,7 +31,11 @@ import std.core;
|
||||
#include <iostream>
|
||||
#endif
|
||||
|
||||
#ifdef TEST_HEADERS
|
||||
#include <boost/regex.hpp>
|
||||
#else
|
||||
import boost.regex;
|
||||
#endif
|
||||
|
||||
// purpose:
|
||||
// takes the contents of a file and transform to
|
||||
|
@ -27,7 +27,11 @@ import std.core;
|
||||
#include <fstream>
|
||||
#endif
|
||||
|
||||
#ifdef TEST_HEADERS
|
||||
#include <boost/regex.hpp>
|
||||
#else
|
||||
import boost.regex;
|
||||
#endif
|
||||
|
||||
// purpose:
|
||||
// takes the contents of a file in the form of a string
|
||||
|
@ -27,7 +27,11 @@ import std.core;
|
||||
#include <iostream>
|
||||
#endif
|
||||
|
||||
#ifdef TEST_HEADERS
|
||||
#include <boost/regex.hpp>
|
||||
#else
|
||||
import boost.regex;
|
||||
#endif
|
||||
|
||||
unsigned tokenise(std::list<std::string>& l, std::string& s)
|
||||
{
|
||||
|
@ -28,7 +28,11 @@ import std.core;
|
||||
#include <iterator>
|
||||
#endif
|
||||
|
||||
#ifdef TEST_HEADERS
|
||||
#include <boost/regex.hpp>
|
||||
#else
|
||||
import boost.regex;
|
||||
#endif
|
||||
|
||||
boost::regex e("<\\s*A\\s+[^>]*href\\s*=\\s*\"([^\"]*)\"",
|
||||
boost::regex::normal | boost::regex::icase);
|
||||
|
@ -26,7 +26,11 @@ import std.core;
|
||||
#include <string>
|
||||
#endif
|
||||
|
||||
#ifdef TEST_HEADERS
|
||||
#include <boost/regex.hpp>
|
||||
#else
|
||||
import boost.regex;
|
||||
#endif
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
@ -16,8 +16,11 @@
|
||||
* DESCRIPTION: regex_token_iterator example: spit out linked URL's.
|
||||
*/
|
||||
|
||||
|
||||
#ifdef TEST_HEADERS
|
||||
#include <boost/regex.hpp>
|
||||
#else
|
||||
import boost.regex;
|
||||
#endif
|
||||
|
||||
#ifdef __cpp_lib_modules
|
||||
import std;
|
||||
@ -28,7 +31,6 @@ import std.core;
|
||||
#include <iostream>
|
||||
#include <iterator>
|
||||
#endif
|
||||
|
||||
boost::regex e("<\\s*A\\s+[^>]*href\\s*=\\s*\"([^\"]*)\"",
|
||||
boost::regex::normal | boost::regex::icase);
|
||||
|
||||
|
Reference in New Issue
Block a user