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