664 Commits

Author SHA1 Message Date
jzmaddock
c898c51ea1 Merge branch 'develop' into modules
Fixed Conflicts:
	include/boost/regex/v5/basic_regex.hpp
	include/boost/regex/v5/basic_regex_creator.hpp
	include/boost/regex/v5/c_regex_traits.hpp
	include/boost/regex/v5/mem_block_cache.hpp
	include/boost/regex/v5/regex_format.hpp
	include/boost/regex/v5/regex_iterator.hpp
	include/boost/regex/v5/regex_raw_buffer.hpp
	include/boost/regex/v5/regex_token_iterator.hpp
2024-12-18 17:55:24 +00:00
jzmaddock
57ca08240e Make backstep calculation non-recursive.
Refs https://github.com/boostorg/regex/pull/236.
2024-12-16 16:58:25 +00:00
Christian Mazakas
0cbaa4ef17 fix #232 (#234)
* add failing test case
* fix issue #232
Credit to OSS-Fuzz for finding the problematic test regexes and configurations.
2024-12-05 13:08:52 +00:00
Christian Mazakas
f0afa5d9b8 #include cleanup (#231)
* update library headers to have self-contained #includes

* update gha ci to run for feature/** branches
2024-11-23 11:10:27 +00:00
jzmaddock
9a8d2b13a3 Tentative fix for #227. (#230)
Fixes #227.
2024-11-06 09:20:07 +00:00
Brian Weed
d4e7ac721c Performance improvement
By-value sink params can be moved into their final destination
2024-08-14 14:12:23 -04:00
jzmaddock
2c0058a902 Hide key template instances behind factory functions.
And provide a separate "module library"
Update testing scripts.
2024-04-18 16:37:12 +01:00
jzmaddock
fbfdda66fd Clean up #includes. 2024-04-10 12:28:57 +01:00
jzmaddock
15acbd5117 Merge branch 'develop' into modules
Fixed Conflicts:
	include/boost/regex/config.hpp

Also fix up msvc build failures.
Example now build with msvc or with clang.  The build script is still hopelessly broken though.
2024-04-04 19:17:39 +01:00
jzmaddock
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
jzmaddock
6efa868bfa Update concepts to check for accidental char_traits usage.
Fixes: https://github.com/boostorg/regex/issues/202.
2024-03-25 13:26:54 +00:00
jzmaddock
b1301061e5 Merge pull request #206 from boostorg/remove_nothrow
Remove throw() specification.
2024-03-24 17:00:44 +00:00
jzmaddock
6b78d0af7f Merge pull request #191 from ecatmur/deprecated-copy
Default empty destructor.
2024-03-24 16:47:49 +00:00
jzmaddock
ecd5c207cf Remove throw() specification. 2024-03-24 16:45:43 +00:00
jzmaddock
6796ffa590 Expunge C++03'isms from the docs. 2024-03-23 19:03:45 +00:00
jzmaddock
6579375f35 Remove outdated C++03 code. 2024-03-23 17:45:04 +00:00
jzmaddock
1e0938cca6 Try again with CI.
Suppress some warnings.
2024-03-19 17:14:25 +00:00
jzmaddock
ae34d3cfc5 Rework format string protection to be non-throwing.
Remove old test case, fix up tests to disable testing the new issues on the recursive implementation which will be going soon anyway.
2024-03-17 16:12:14 +00:00
jzmaddock
1d50b15245 Correction for standalone mode. 2024-03-16 19:09:57 +00:00
jzmaddock
b86985e65a Set a limit on max recursions.
Applies to last remaining recursive calls in regex creation, and format string parsing.
Added tests, and updated CI.
2024-03-16 19:06:10 +00:00
Ed Catmur
57ccc945bd Default empty destructor.
The compiler-generated copy constructor and copy assignment operator are deprecated since C++11 on classes with user-declared destructors.

This change allows clean compilation with the -Wdeprecated-copy-dtor/-Wdeprecated-copy-with-user-provided-dtor flag.
2023-02-22 19:59:38 +00:00
jzmaddock
430419705b Simplify snprintf workaround usage.
Via boost/core/snprintf.hpp
Remove some obsolete workarounds.
Remove tabs in files.
Supersedes https://github.com/boostorg/regex/pull/188.
2022-12-13 18:48:59 +00:00
jzmaddock
3efc3f93c7 Merge pull request #166 from chrisse74/develop
Fix unused variable warnings
2022-12-02 17:05:13 +00:00
jzmaddock
66389f6e21 Add module support and tests. 2022-04-20 19:39:27 +01:00
jzmaddock
ae7819ddb1 Fix for numeric overflow found during fuzzing. 2022-04-06 17:52:09 +01:00
jzmaddock
76e7a4218e Fix for building with BOOST_REGEX_MAX_CACHE_BLOCKS=0.
Also fix some msvc warnings in test_sets.cpp.
Add test case.
Fixes the issues in https://github.com/boostorg/regex/pull/171
2022-03-07 16:32:43 +00:00
Christian Maurer
54a5ed8509 Fix unused variable warnings 2021-11-09 16:24:52 +01:00
jzmaddock
c91684ca1f Merge pull request #164 from zhangyiru/develop
sync PR 162 and PR 163 to v4
2021-10-20 18:06:23 +01:00
jzmaddock
354e02f141 Correct stack unwinding inside recursions when seeing (*SKIP).
Fixes https://github.com/boostorg/regex/issues/152.
2021-10-20 12:12:57 +01:00
zhangyiru
13ba033116 sync PR 162 and PR 163 to v4 2021-10-15 10:36:47 -04:00
jzmaddock
b10c089aba Disallow repeating a case-change group.
Turn assertion into an error.
Fixes: https://github.com/boostorg/regex/issues/151
2021-10-13 17:59:56 +01:00
John Maddock
d1b4834b9b Merge branch 'patch-2' of https://github.com/zhangyiru/regex into issue153 2021-10-12 19:23:46 +01:00
jzmaddock
1d17ca9d5d Add tests for https://github.com/boostorg/regex/issues/153
Make runtime errors, regex_error's.
2021-10-12 19:23:18 +01:00
jzmaddock
1e524968bb Fix missing #include, fix test cases. 2021-10-09 16:43:53 +01:00
jzmaddock
a013cf3c5f Remove dead #include. 2021-10-08 17:47:42 +01:00
jzmaddock
74347b95af Allow back references to refer to a capture that hasn't happened yet ("forward reference").
Fixes https://github.com/boostorg/regex/issues/133.
2021-10-08 14:51:01 +01:00
jzmaddock
10cff29314 Change \B to be the opposite of \b.
Also update docs.
Fixes https://github.com/boostorg/regex/issues/123.
2021-10-07 18:52:27 +01:00
jzmaddock
e68f82c346 Remove windows.h dependency. 2021-10-05 19:55:01 +01:00
zhangyiru
248c69d68b increase used_block_count when use put_mem_block
increase used_block_count when use put_mem_block in unwind_extra_block
2021-09-18 14:26:14 +08:00
Daniel Krügler
5ad8906e91 #148: icu_regex_traits::translate_nocase doesn't use case-folding
In translate_nocase replace u_tolower by u_foldCase(c, U_FOLD_CASE_DEFAULT) suitable for single codeunit case folding
2021-08-12 22:07:57 +02:00
jzmaddock
d312a085b1 Fix infinite loop in parser.
Fixes: https://github.com/boostorg/regex/issues/140.
2021-06-26 13:52:23 +01:00
jzmaddock
151c144b75 Merge pull request #135 from Kojoley/prune-iostream-includes
Prune <iostream> includes
2021-06-11 18:21:35 +01:00
jzmaddock
f4c21ba011 Merge pull request #134 from Kojoley/cease-dependence-on-iterator
Cease dependence on Iterator
2021-06-11 18:20:52 +01:00
jzmaddock
e9cde852b3 Merge pull request #132 from ClaymorePT/regex_mutex_fix
Fixes wrong type for mutex in regex v5
2021-06-11 18:12:45 +01:00
Nikita Kniazev
cd30a0560f Prune <iostream> includes 2021-06-07 02:11:41 +03:00
Nikita Kniazev
d2a5ddd8a9 Cease dependence on Iterator
It is a fat dependence because it brings Fusion.
2021-06-07 01:47:25 +03:00
jzmaddock
dc9c5c50be Don't redefine macros.
Fixes https://github.com/boostorg/regex/issues/127
2021-06-06 09:07:28 +01:00
Carlos Miguel Ferreira
6064875bff Fixes wrong type for mutex in regex v5
With the Boost.Regex to ehader-only library, the declaration
of a mutex that should have been changed from boost::static_mutex
to std::mutex was left behind. This was preventing regex from
being built for older arm platforms [1]

[1]: https://github.com/openwrt/packages/issues/15725

Signed-off-by: Carlos Miguel Ferreira <carlosmf.pt@gmail.com>
2021-06-03 23:10:37 +01:00
Matt Borland
51d2661b76 Add missing header 2021-04-10 18:08:00 +03:00
jzmaddock
92fe5dd4d6 Fixes and testing update for MSVC in C++20 mode. 2021-03-07 08:42:18 +00:00