Compare commits

...

37 Commits

Author SHA1 Message Date
3a50c6828c Restrict fix to where we really need it. 2024-11-04 18:12:47 +00:00
be12f75b22 Tidy up code, add test. 2024-11-04 17:05:08 +00:00
39ee6e36b0 Tentative fix for #227. 2024-11-04 16:38:46 +00:00
bd0e76f42f Correct example/Jamfile.v2 so that grep gets valid command line argum… (#229)
* Correct example/Jamfile.v2 so that grep gets valid command line arguments.
2024-11-02 18:29:39 +00:00
bb9f2b1984 Merge pull request #224 from boostorg/pr/default-build-warnings
Move <warnings>all from requirements to default-build. Fixes #223.
2024-09-03 11:31:27 +01:00
49c4e8cb8f Merge pull request #221 from boostorg/pr/fix-clang-cl-2
Define _CRT_SECURE_NO_WARNINGS instead of using wcscpy_s. Fixes #219.
2024-09-03 11:29:56 +01:00
e61e5e111e Merge pull request #222 from boostorg/pr/add-verbatim
Add VERBATIM to the remaining add_custom_target as well
2024-09-03 11:28:11 +01:00
ccfc76570f Move <warnings>all from requirements to default-build. Fixes #223. 2024-09-02 11:05:00 +03:00
cff442b3e7 Add VERBATIM to the remaining add_custom_target as well 2024-09-02 10:23:02 +03:00
65726f3d2f Define _CRT_SECURE_NO_WARNINGS instead of using wcscpy_s. Fixes #219. 2024-09-02 10:07:29 +03:00
5243906d23 Merge pull request #218 from k3DW/deprecated-declarations
Fix deprecated-declarations error on clang-win
2024-08-24 11:35:31 +01:00
bd821cdedf Merge pull request #216 from BrianWeed/patch-1
Performance improvement
2024-08-24 11:34:43 +01:00
d3697ab023 Fix deprecated-declarations error on clang-win 2024-08-22 23:28:35 -05:00
dca0bdcd7e Merge pull request #215 from grafikrobot/modular
Add support for modular build structure.
2024-08-19 09:21:05 +01:00
d4e7ac721c Performance improvement
By-value sink params can be moved into their final destination
2024-08-14 14:12:23 -04:00
1144c1dad8 Add VERBATIM to add_custom_target 2024-08-08 21:54:58 -05:00
cd92ca1ed0 Update build deps. 2024-08-07 23:46:57 -05:00
e3840cf3a6 Split b2 dependencies into public and private. 2024-07-26 17:43:46 -05:00
fdacaf7d6d Move inter-lib dependencies to a project variable and into the build targets. 2024-07-23 22:34:22 -05:00
fa2d2e1008 Update copyright dates. 2024-07-20 22:52:03 -05:00
e5a7bbd399 Change all <source> references to <library>. 2024-07-20 19:42:20 -05:00
028935b104 Bump B2 require to 5.2 2024-06-14 11:33:56 -05:00
f9c3c8c461 Add requires-b2 check to top-level build file. 2024-05-05 09:00:01 -05:00
126875cac9 Update library dependencies. 2024-04-29 22:08:35 -05:00
e469b8aae5 Fix extra arg for lib declaration. 2024-04-28 21:00:15 -05:00
801d83fb4f Add missing NO_LIB usage requirements. 2024-04-28 20:16:39 -05:00
8e2a51e905 Add missing lib reference. 2024-04-25 22:56:00 -05:00
72652f7cde Add missing file. 2024-04-10 17:47:08 -05:00
8dc1fd4a3b Update build dependencies and fix test compile error from depending on Boost.Config test files. 2024-04-10 17:46:03 -05:00
e5ac7686cd Sync from upstream. 2024-04-10 08:40:31 -05:00
1dcd331879 Switch to library requirements instead of source. As source puts extra source in install targets. 2024-03-29 21:15:59 -05:00
cb55913293 Remove obsolete Jamfile option.
Fixes https://github.com/boostorg/regex/issues/176
2024-03-25 18:18:18 +00:00
3e32c14965 Merge pull request #208 from boostorg/issue197
Suppress conversion warnings in match_results.
2024-03-25 17:42:43 +00:00
c82a797230 Suppress conversion warnings in match_results.
When passing std::size_t arguments to length(), str() and operator[] by making these templates enable_if'd on is_integral.
Fixes https://github.com/boostorg/regex/issues/197.
2024-03-25 17:31:32 +00:00
260982ea9e Merge pull request #207 from boostorg/update_concepts
Update concepts to check for accidental char_traits usage.
2024-03-25 16:56:56 +00:00
571fbaf80d Sync from upstream. 2024-03-23 13:52:44 -05:00
85580fd1ea Make the library modular usable. 2024-03-11 08:38:17 -05:00
14 changed files with 1736 additions and 92 deletions

30
build.jam Normal file
View File

@ -0,0 +1,30 @@
# Copyright René Ferdinand Rivera Morell 2023-2024
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
require-b2 5.2 ;
constant boost_dependencies :
/boost/assert//boost_assert
/boost/concept_check//boost_concept_check
/boost/config//boost_config
/boost/predef//boost_predef
/boost/static_assert//boost_static_assert
/boost/throw_exception//boost_throw_exception
/boost/type_traits//boost_type_traits ;
project /boost/regex
: common-requirements
<include>include
;
explicit
[ alias boost_regex : build//boost_regex ]
[ alias all : boost_regex example test ]
;
call-if : boost-library regex
: install boost_regex
;

View File

@ -1,15 +1,20 @@
# copyright John Maddock 2003
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt.
import modules ;
import testing ;
import errors ;
project : requirements
# default to all warnings on:
<warnings>all
constant boost_dependencies_private :
/boost/core//boost_core
;
project
: default-build <warnings>all
: common-requirements <library>$(boost_dependencies)
: requirements <library>$(boost_dependencies_private)
;
local disable-icu = [ MATCH (--disable-icu) : [ modules.peek : ARGV ] ] ;
@ -17,13 +22,13 @@ local disable-icu = [ MATCH (--disable-icu) : [ modules.peek : ARGV ] ] ;
rule path_options ( properties * )
{
local result ;
if <address-model>64 in $(properties) && <toolset>msvc in $(properties)
if <address-model>64 in $(properties) && <toolset>msvc in $(properties)
{
result = <search>$(ICU_PATH)/bin64 <search>$(ICU_PATH)/lib64 ;
result = <search>$(ICU_PATH)/bin64 <search>$(ICU_PATH)/lib64 ;
}
else
{
result = <search>$(ICU_PATH)/bin <search>$(ICU_PATH)/lib ;
result = <search>$(ICU_PATH)/bin <search>$(ICU_PATH)/lib ;
}
return $(result) ;
}
@ -34,24 +39,24 @@ rule path_options ( properties * )
if ! $(disable-icu)
{
if [ modules.peek : ICU_LINK ]
{
{
errors.user-error : "The ICU_LINK option is no longer supported by the Boost.Regex build - please refer to the documentation for equivalent options" ;
}
if [ modules.peek : ICU_PATH ]
{
{
ICU_PATH = [ modules.peek : ICU_PATH ] ;
}
if [ modules.peek : ICU_ICUUC_NAME ]
{
{
ICU_ICUUC_NAME = [ modules.peek : ICU_ICUUC_NAME ] ;
}
if [ modules.peek : ICU_ICUDT_NAME ]
{
{
ICU_ICUDT_NAME = [ modules.peek : ICU_ICUDT_NAME ] ;
}
if [ modules.peek : ICU_ICUIN_NAME ]
{
{
ICU_ICUIN_NAME = [ modules.peek : ICU_ICUIN_NAME ] ;
}
@ -102,8 +107,8 @@ if ! $(disable-icu)
lib icuin : : <name>this_is_an_invalid_library_name ;
}
ICU_OPTS =
<include>$(ICU_PATH)/include
ICU_OPTS =
<include>$(ICU_PATH)/include
<runtime-link>shared:<library>icuuc/<link>shared
<runtime-link>shared:<library>icudt/<link>shared
<runtime-link>shared:<library>icuin/<link>shared
@ -111,7 +116,7 @@ if ! $(disable-icu)
<runtime-link>static:<library>icudt
<runtime-link>static:<library>icuin
<target-os>windows,<toolset>clang:<linkflags>"advapi32.lib"
<define>BOOST_HAS_ICU=1
<define>BOOST_HAS_ICU=1
<runtime-link>static:<define>U_STATIC_IMPLEMENTATION=1
;
@ -144,16 +149,15 @@ explicit has_icu ;
alias icu_options : : : : [ check-target-builds has_icu : $(ICU_OPTS) : ] ;
SOURCES =
SOURCES =
posix_api.cpp
wide_posix_api.cpp
;
lib boost_regex : ../src/$(SOURCES) icu_options
:
<link>shared:<define>BOOST_REGEX_DYN_LINK=1
<toolset>gcc-cygwin:<link>static
:
<link>shared:<define>BOOST_REGEX_DYN_LINK=1
<toolset>gcc-cygwin:<link>static
: :
<define>BOOST_REGEX_NO_LIB=1
;
boost-install boost_regex ;

View File

@ -1,32 +1,34 @@
# copyright John Maddock 2003
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt.
project
: requirements
<threading>multi
: requirements
<library>/boost/regex//boost_regex
<library>/boost/timer//boost_timer
<threading>multi
<link>shared:<define>BOOST_REGEX_DYN_LINK=1
# There are unidentified linker problems on these platforms:
<toolset>mipspro-7.4:<link>static
<toolset>sun-5.9:<link>static
<toolset>msvc:<warnings>all
<toolset>gcc:<warnings>all
<toolset>gcc:<cxxflags>-Wextra
<toolset>gcc:<warnings>extra
<define>U_USING_ICU_NAMESPACE=0
#<toolset>gcc-mw:<link>static
#<toolset>gcc-mingw:<link>static
<toolset>gcc-cygwin:<link>static
<define>BOOST_TIMER_ENABLE_DEPRECATED
;
rule regex-test-run ( sources + : input * : name * )
{
return [
return [
run
# sources
$(sources)
# dependencies
../build//boost_regex
/boost/regex//boost_regex
: # additional args
$(input)
: # test-files
@ -37,32 +39,33 @@ rule regex-test-run ( sources + : input * : name * )
] ;
}
path-constant HERE : . ;
test-suite regex-examples :
[ regex-test-run timer/regex_timer.cpp : $(BOOST_ROOT)/libs/regex/example/timer/input_script.txt ]
[ regex-test-run grep/grep.cpp ../../program_options/build//boost_program_options/<link>static : -n -b $(BOOST_ROOT)/boost/regex.hpp $(BOOST_ROOT)/boost/type_traits.hpp : test_grep ]
[ regex-test-run timer/regex_timer.cpp /boost/smart_ptr//boost_smart_ptr : $(HERE)/timer/input_script.txt ]
[ regex-test-run grep/grep.cpp /boost/program_options//boost_program_options/<link>static : -n -b -E include $(HERE)/../include/boost/regex.hpp : test_grep ]
[ regex-test-run snippets/credit_card_example.cpp ]
[ regex-test-run snippets/mfc_example.cpp ]
[ regex-test-run snippets/icu_example.cpp ]
[ regex-test-run snippets/partial_regex_grep.cpp : $(BOOST_ROOT)/libs/regex/index.htm ]
[ regex-test-run snippets/partial_regex_iterate.cpp : $(BOOST_ROOT)/libs/regex/index.htm ]
[ regex-test-run snippets/partial_regex_grep.cpp : $(HERE)/../index.htm ]
[ regex-test-run snippets/partial_regex_iterate.cpp : $(HERE)/../index.htm ]
[ regex-test-run snippets/partial_regex_match.cpp : 1234-5678-8765-4 ]
[ regex-test-run snippets/regex_grep_example_1.cpp : $(BOOST_ROOT)/boost/regex/v5/regex_token_iterator.hpp ]
[ regex-test-run snippets/regex_grep_example_2.cpp : $(BOOST_ROOT)/boost/regex/v5/regex_token_iterator.hpp ]
[ regex-test-run snippets/regex_grep_example_3.cpp : $(BOOST_ROOT)/boost/regex/v5/regex_token_iterator.hpp ]
[ regex-test-run snippets/regex_grep_example_4.cpp : $(BOOST_ROOT)/boost/regex/v5/regex_token_iterator.hpp ]
[ regex-test-run snippets/regex_grep_example_1.cpp : $(HERE)/../include/boost/regex/v5/regex_iterator.hpp ]
[ regex-test-run snippets/regex_grep_example_2.cpp : $(HERE)/../include/boost/regex/v5/regex_iterator.hpp ]
[ regex-test-run snippets/regex_grep_example_3.cpp : $(HERE)/../include/boost/regex/v5/regex_iterator.hpp ]
[ regex-test-run snippets/regex_grep_example_4.cpp : $(HERE)/../include/boost/regex/v5/regex_iterator.hpp ]
[ regex-test-run snippets/regex_match_example.cpp : -auto ]
[ regex-test-run snippets/regex_merge_example.cpp : $(BOOST_ROOT)/boost/regex/v5/regex_token_iterator.hpp ]
[ regex-test-run snippets/regex_replace_example.cpp : $(BOOST_ROOT)/boost/regex/v5/regex_token_iterator.hpp ]
[ regex-test-run snippets/regex_search_example.cpp : $(BOOST_ROOT)/boost/regex/v5/regex_token_iterator.hpp ]
[ regex-test-run snippets/regex_merge_example.cpp : $(HERE)/../include/boost/regex/v5/regex_iterator.hpp ]
[ regex-test-run snippets/regex_replace_example.cpp : $(HERE)/../include/boost/regex/v5/regex_iterator.hpp ]
[ regex-test-run snippets/regex_search_example.cpp : $(HERE)/../include/boost/regex/v5/regex_iterator.hpp ]
[ regex-test-run snippets/regex_split_example_1.cpp : -auto ]
[ regex-test-run snippets/regex_split_example_2.cpp : $(BOOST_ROOT)/libs/regex/doc/html/index.html ]
[ regex-test-run snippets/regex_split_example_2.cpp : $(HERE)/../doc/html/index.html ]
[ regex-test-run snippets/regex_token_iterator_eg_1.cpp : -auto ]
[ regex-test-run snippets/regex_token_iterator_eg_2.cpp : $(BOOST_ROOT)/libs/regex/doc/html/index.html ]
[ regex-test-run snippets/regex_iterator_example.cpp : $(BOOST_ROOT)/boost/regex/v5/regex_token_iterator.hpp ]
[ regex-test-run snippets/regex_token_iterator_eg_2.cpp : $(HERE)/../doc/html/index.html ]
[ regex-test-run snippets/regex_iterator_example.cpp : $(HERE)/../include/boost/regex/v5/regex_iterator.hpp ]
[ run snippets/captures_example.cpp
../test/captures//boost_regex_extra
: : : <threading>multi <define>BOOST_REGEX_MATCH_EXTRA=1 ]
;

View File

@ -97,15 +97,23 @@ public:
bool empty() const
{ return m_subs.size() < 2; }
// element access:
difference_type length(int sub = 0) const
private:
difference_type do_get_length(int sub = 0) const
{
if(m_is_singular)
if (m_is_singular)
raise_logic_error();
sub += 2;
if((sub < (int)m_subs.size()) && (sub > 0))
if ((sub < (int)m_subs.size()) && (sub > 0))
return m_subs[sub].length();
return 0;
}
public:
template <class Integer>
typename std::enable_if<std::is_integral<Integer>::value, difference_type>::type length(Integer sub) const
{
return do_get_length(static_cast<int>(sub));
}
difference_type length() const { return do_get_length(0); }
difference_type length(const char_type* sub) const
{
if(m_is_singular)
@ -161,7 +169,8 @@ public:
{
return position(sub.c_str());
}
string_type str(int sub = 0) const
private:
string_type do_get_string(int sub = 0) const
{
if(m_is_singular)
raise_logic_error();
@ -177,6 +186,13 @@ public:
}
return result;
}
public:
template <class Integer>
typename std::enable_if<std::is_integral<Integer>::value, string_type>::type str(Integer sub) const
{
return do_get_string(static_cast<int>(sub));
}
string_type str() const { return do_get_string(0); }
string_type str(const char_type* sub) const
{
return (*this)[sub].str();
@ -196,7 +212,8 @@ public:
{
return (*this)[sub].str();
}
const_reference operator[](int sub) const
private:
const_reference get_at(int sub) const
{
if(m_is_singular && m_subs.empty())
raise_logic_error();
@ -207,6 +224,12 @@ public:
}
return m_null;
}
public:
template <class Integer>
typename std::enable_if<std::is_integral<Integer>::value, const_reference>::type operator[](Integer sub) const
{
return get_at(static_cast<int>(sub));
}
//
// Named sub-expressions:
//
@ -530,7 +553,7 @@ public:
void set_named_subs(std::shared_ptr<named_sub_type> subs)
{
m_named_subs = subs;
m_named_subs = std::move(subs);
}
private:

View File

@ -1204,7 +1204,10 @@ bool perl_matcher<BidiIterator, Allocator, traits>::skip_until_paren(int index,
else if(pstate->type == syntax_element_startmark)
{
int idx = static_cast<const re_brace*>(pstate)->index;
pstate = pstate->next.p;
if(idx > 0)
match_startmark();
else
pstate = pstate->next.p;
skip_until_paren(idx, false);
continue;
}

View File

@ -16,6 +16,7 @@
* DESCRIPTION: Implements the wide character POSIX API wrappers.
*/
#define _CRT_SECURE_NO_WARNINGS // for std::wcscpy
#define BOOST_REGEX_SOURCE
#include <boost/regex/config.hpp>
@ -169,11 +170,7 @@ BOOST_REGEX_DECL regsize_t BOOST_REGEX_CCALL regerrorW(int code, const regex_tW*
{
result = std::wcslen(wnames[code]) + 1;
if(buf_size >= result)
#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) && !defined(_WIN32_WCE) && !defined(UNDER_CE)
::wcscpy_s(buf, buf_size, wnames[code]);
#else
std::wcscpy(buf, wnames[code]);
#endif
return result;
}
return result;
@ -193,11 +190,7 @@ BOOST_REGEX_DECL regsize_t BOOST_REGEX_CCALL regerrorW(int code, const regex_tW*
(boost::core::swprintf)(localbuf, 5, L"%d", i);
#endif
if(std::wcslen(localbuf) < buf_size)
#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) && !defined(_WIN32_WCE) && !defined(UNDER_CE)
::wcscpy_s(buf, buf_size, localbuf);
#else
std::wcscpy(buf, localbuf);
#endif
return std::wcslen(localbuf) + 1;
}
}
@ -207,11 +200,7 @@ BOOST_REGEX_DECL regsize_t BOOST_REGEX_CCALL regerrorW(int code, const regex_tW*
(boost::core::swprintf)(localbuf, 5, L"%d", 0);
#endif
if(std::wcslen(localbuf) < buf_size)
#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) && !defined(_WIN32_WCE) && !defined(UNDER_CE)
::wcscpy_s(buf, buf_size, localbuf);
#else
std::wcscpy(buf, localbuf);
#endif
return std::wcslen(localbuf) + 1;
}
if(code <= (int)REG_E_UNKNOWN)

View File

@ -1,15 +1,16 @@
# copyright John Maddock 2003
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt.
project
: requirements
<threading>multi
<link>shared:<define>BOOST_REGEX_DYN_LINK=1
<toolset>msvc-7.1:<define>TEST_MFC=1
: requirements
<library>/boost/regex//boost_regex
<library>/boost/detail//boost_detail
<threading>multi
<link>shared:<define>BOOST_REGEX_DYN_LINK=1
<toolset>msvc-7.1:<define>TEST_MFC=1
<toolset>msvc-7.0:<define>TEST_MFC=1
<toolset>msvc:<asynch-exceptions>on
# There are unidentified linker problems on these platforms:
<toolset>mipspro-7.4:<link>static
<toolset>sun-5.9:<link>static
@ -21,6 +22,8 @@ project
#<toolset>gcc-mingw:<link>static
#<toolset>gcc-cygwin:<link>static
<toolset>sun:<link>static
<include>../src
<include>.
;
#
@ -28,14 +31,14 @@ project
#
rule regex-test ( name : sources + : requirements * : input-files * )
{
return [ run $(sources) ../build//boost_regex
return [ run $(sources) /boost/regex//boost_regex
:
: $(input-files)
: $(requirements)
: $(name) ] ;
}
R_SOURCE =
R_SOURCE =
basic_tests.cpp
main.cpp
wmain.cpp
@ -70,7 +73,7 @@ run regress/$(R_SOURCE) ../build//boost_regex ../build//icu_options
: regex_regress ;
run regress/$(R_SOURCE) ../build//boost_regex
../../thread/build//boost_thread ../build//icu_options
/boost/thread//boost_thread ../build//icu_options
: # command line
: # input files
: # requirements
@ -78,7 +81,7 @@ run regress/$(R_SOURCE) ../build//boost_regex
: regex_regress_threaded ;
run regress/$(R_SOURCE) ../build//boost_regex
../../thread/build//boost_thread ../build//icu_options
/boost/thread//boost_thread ../build//icu_options
: # command line
: # input files
: # requirements
@ -98,15 +101,15 @@ run unicode/unicode_iterator_test.cpp : : : release <define>TEST_UTF16 : unicode
run unicode/unicode_casefold_test.cpp ../build//boost_regex ../build//icu_options ;
run object_cache/object_cache_test.cpp ;
run config_info/regex_config_info.cpp ../build//boost_regex/<link>static : : : <test-info>always_show_run_output ;
run config_info/regex_config_info.cpp ../build//boost_regex : : : <test-info>always_show_run_output : regex_dll_config_info ;
run config_info/regex_config_info.cpp ../build//boost_regex : : : <test-info>always_show_run_output : regex_dll_config_info ;
run collate_info/collate_info.cpp ../build//boost_regex : : : <test-info>always_show_run_output : test_collate_info ;
link concepts/concept_check.cpp : <toolset>gcc:<cxxflags>-Wno-deprecated-copy ;
link concepts/concept_check.cpp /boost/range//boost_range : <toolset>gcc:<cxxflags>-Wno-deprecated-copy ;
link concepts/concept_check.cpp : <define>BOOST_REGEX_STANDALONE <toolset>gcc:<cxxflags>-Wno-deprecated-copy : standalone_concept_check ;
link concepts/icu_concept_check.cpp : <define>BOOST_REGEX_STANDALONE <toolset>gcc:<cxxflags>-Wno-deprecated-copy ;
link concepts/icu_concept_check.cpp : <toolset>gcc:<cxxflags>-Wno-deprecated-copy : standalone_icu_concept_check ;
link concepts/range_concept_check.cpp : <toolset>gcc:<cxxflags>-Wno-deprecated-copy ;
run concepts/test_bug_11988.cpp ;
run captures/captures_test.cpp ../build//icu_options : : : <threading>multi <define>BOOST_REGEX_MATCH_EXTRA=1 <define>BOOST_REGEX_NO_LIB=1 : captures_test ;
link concepts/range_concept_check.cpp : <toolset>gcc:<cxxflags>-Wno-deprecated-copy <library>/boost/range//boost_range ;
run concepts/test_bug_11988.cpp ;
run captures/captures_test.cpp ../build//icu_options /boost/array//boost_array : : : <threading>multi <define>BOOST_REGEX_MATCH_EXTRA=1 <define>BOOST_REGEX_NO_LIB=1 : captures_test ;
run regress/$(R_SOURCE) ./noeh_test//boost_regex_noeh ../build//icu_options : : : <define>BOOST_NO_EXCEPTIONS=1 <exception-handling>off <link>static <runtime-link>shared : regex_regress_noeh ;
compile test_consolidated.cpp ;
@ -114,12 +117,12 @@ build-project ../example ;
# `quick` target (for CI)
run quick.cpp ../build//boost_regex ;
compile test_warnings.cpp
compile test_warnings.cpp
: <toolset>msvc:<warnings>all <toolset>msvc:<warnings-as-errors>on
<toolset>gcc:<warnings>all <toolset>gcc:<warnings-as-errors>on
<toolset>clang:<warnings>all <toolset>clang:<warnings-as-errors>on ;
compile test_warnings.cpp
compile test_warnings.cpp
: <toolset>msvc:<warnings>all <toolset>msvc:<warnings-as-errors>on
<toolset>gcc:<warnings>all <toolset>gcc:<warnings-as-errors>on
<toolset>clang:<warnings>all <toolset>clang:<warnings-as-errors>on
@ -131,4 +134,5 @@ compile test_windows_defs_2.cpp ;
compile test_windows_defs_3.cpp ;
compile test_windows_defs_4.cpp ;
run issue153.cpp : : : <toolset>msvc:<linkflags>-STACK:2097152 ;
run issue153.cpp : : : "<toolset>msvc:<linkflags>-STACK:2097152" ;
run issue227.cpp ;

View File

@ -15,4 +15,4 @@ target_link_libraries(quick Boost::regex Boost::core)
enable_testing()
add_test(quick quick)
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $<CONFIG>)
add_custom_target(check VERBATIM COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $<CONFIG>)

View File

@ -20,4 +20,4 @@ target_link_libraries(quick Boost::regex Boost::core)
enable_testing()
add_test(quick quick)
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $<CONFIG>)
add_custom_target(check VERBATIM COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $<CONFIG>)

View File

@ -19,4 +19,4 @@ target_link_libraries(quick_icu Boost::regex_icu)
enable_testing()
add_test(quick_icu quick_icu)
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $<CONFIG>)
add_custom_target(check VERBATIM COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $<CONFIG>)

1569
test/config_info.cpp Normal file

File diff suppressed because it is too large Load Diff

View File

@ -19,7 +19,7 @@
#endif
#define main OLD_MAIN
#include <libs/config/test/config_info.cpp>
#include <config_info.cpp>
#undef main
#ifndef NEW_MAIN
# define NEW_MAIN main

19
test/issue227.cpp Normal file
View File

@ -0,0 +1,19 @@
/*
* Copyright (c) 2024
* Christian Mazakas
*
* Use, modification and distribution are subject to the
* Boost Software License, Version 1.0. (See accompanying file
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*
*/
#include <boost/regex.hpp>
#include <string>
int main() {
boost::regex rx("(*ACCEPT)*+\\1((*ACCEPT)*+\\K)");
std::string str = "Z";
boost::smatch what;
boost::regex_search(str, what, rx, boost::match_default | boost::match_partial);
}

View File

@ -3,12 +3,12 @@
* Copyright (c) 2011
* John Maddock
*
* Use, modification and distribution are subject to the
* Boost Software License, Version 1.0. (See accompanying file
* Use, modification and distribution are subject to the
* Boost Software License, Version 1.0. (See accompanying file
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*
*/
#include <libs/regex/src/posix_api.cpp>
#include <libs/regex/src/wide_posix_api.cpp>
#include <posix_api.cpp>
#include <wide_posix_api.cpp>