diff --git a/.github/workflows/build-cppfront.yaml b/.github/workflows/build-cppfront.yaml index 1e0db7bbe..be4f9045f 100644 --- a/.github/workflows/build-cppfront.yaml +++ b/.github/workflows/build-cppfront.yaml @@ -1,4 +1,5 @@ name: Multi-platform Build of cppfront + on: pull_request: paths-ignore: @@ -8,16 +9,27 @@ on: - 'docs/**' workflow_dispatch: +permissions: + # Restrict permissions to read-only for security + contents: read + +concurrency: + # Specific group name to cancel in-progress builds for the same PR/ref + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: - build-windows: - runs-on: windows-latest - steps: - - uses: actions/checkout@v4 - - uses: ilammy/msvc-dev-cmd@v1 - - name: Compiler name & version - run: cl.exe - - name: Build - run: cl.exe source/cppfront.cpp -std:c++latest -MD -EHsc -experimental:module -W4 -WX + # Comment out the Windows build until it is fixed + # build-windows: + # runs-on: windows-latest + # steps: + # - uses: actions/checkout@v4 + # - uses: ilammy/msvc-dev-cmd@v1 + # - name: Compiler name & version + # run: cl.exe + # - name: Build + # run: cl.exe source/cppfront.cpp -std:c++latest -MD -EHsc -W4 -WX + build-unix-like: strategy: fail-fast: false @@ -35,7 +47,10 @@ jobs: - compiler: clang++-14 cxx-std: 'c++2b' include: - - runs-on: macos-latest + - runs-on: macos-14 + compiler: clang++ + cxx-std: 'c++20' + - runs-on: macos-15 compiler: clang++ cxx-std: 'c++20' - runs-on: ubuntu-22.04 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index ac9d3ed84..7dd2f48a9 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -10,10 +10,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: 3.x - - uses: actions/cache@v2 + - uses: actions/cache@v4 with: key: ${{ github.ref }} path: .cache diff --git a/.github/workflows/regression-tests.yml b/.github/workflows/regression-tests.yaml similarity index 78% rename from .github/workflows/regression-tests.yml rename to .github/workflows/regression-tests.yaml index f31562f58..45a114854 100644 --- a/.github/workflows/regression-tests.yml +++ b/.github/workflows/regression-tests.yaml @@ -9,6 +9,15 @@ on: - 'docs/**' workflow_dispatch: +permissions: + # Restrict permissions to read-only for security + contents: read + +concurrency: + # Specific group name to cancel in-progress builds for the same PR/ref + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: regression-tests: name: ${{ matrix.shortosname }} | ${{ matrix.compiler }} | ${{ matrix.cxx_std }} | ${{ matrix.stdlib }} | ${{ matrix.os }} @@ -25,19 +34,14 @@ jobs: cxx_std: [c++2b] stdlib: [libstdc++] include: - - os: ubuntu-20.04 - shortosname: ubu-20 - compiler: g++-10 - cxx_std: c++20 - stdlib: libstdc++ - os: ubuntu-24.04 shortosname: ubu-24 - compiler: clang++-18 + compiler: clang++-19 cxx_std: c++20 stdlib: libstdc++ - os: ubuntu-24.04 shortosname: ubu-24 - compiler: clang++-18 + compiler: clang++-19 cxx_std: c++23 stdlib: libc++-18-dev - os: ubuntu-22.04 @@ -50,46 +54,37 @@ jobs: compiler: clang++-15 cxx_std: c++20 stdlib: libc++-15-dev - - os: ubuntu-20.04 - shortosname: ubu-20 - compiler: clang++-12 - cxx_std: c++20 - stdlib: libstdc++ - os: macos-14 shortosname: mac-14 compiler: clang++ cxx_std: c++2b stdlib: default - - os: macos-13 - shortosname: mac-13 - compiler: clang++ - cxx_std: c++2b - stdlib: default - - os: macos-13 - shortosname: mac-13 - compiler: clang++-15 - cxx_std: c++2b - stdlib: default - - os: windows-2022 - shortosname: win-22 - compiler: cl.exe - cxx_std: c++latest - stdlib: default - - os: windows-2022 - shortosname: win-22 - compiler: cl.exe - cxx_std: c++20 - stdlib: default + # Comment out Windows tests until build on Windows is fixed + # - os: windows-2025 + # shortosname: win-25 + # compiler: cl.exe + # cxx_std: c++latest + # stdlib: default + # - os: windows-2025 + # shortosname: win-25 + # compiler: cl.exe + # cxx_std: c++20 + # stdlib: default steps: - name: Checkout repo uses: actions/checkout@v4 - - name: Prepare compilers + - name: Prepare compilers - macOS if: matrix.os == 'macos-13' run: | sudo xcode-select --switch /Applications/Xcode_14.3.1.app sudo ln -s "$(brew --prefix llvm@15)/bin/clang" /usr/local/bin/clang++-15 + - name: Prepare compilers - Ubuntu 24.04 + if: matrix.os == 'ubuntu-24.04' + run: | + sudo sudo apt-get install clang-19 + - name: Run regression tests - Linux and macOS version if: startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macos') run: | diff --git a/.gitignore b/.gitignore index a802eea9f..4ed68fa53 100644 --- a/.gitignore +++ b/.gitignore @@ -39,3 +39,10 @@ venv/* buildh2.bat gen_version.bat mkdocs_serve.sh +experimental/a.out +cppfront/x64/Debug/microsoft/STL/std.compat.ixx.ifc.dt.d.json +cppfront/x64/Debug/microsoft/STL/std.compat.ixx.ifc.dt.module.json +cppfront/x64/Debug/microsoft/STL/std.compat.ixx.ifc.dt.module.json.command +cppfront/x64/Debug/microsoft/STL/std.ixx.ifc.dt.d.json +cppfront/x64/Debug/microsoft/STL/std.ixx.ifc.dt.module.json +cppfront/x64/Debug/microsoft/STL/std.ixx.ifc.dt.module.json.command diff --git a/CITATION.cff b/CITATION.cff index b10aea847..9d8190f12 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -9,4 +9,4 @@ authors: family-names: Sutter repository-code: 'https://github.com/hsutter/cppfront' abstract: A personal experimental C++ Syntax 2 -> Syntax 1 compiler -license: CC-BY-NC-ND-4.0 +license: Apache-2.0 WITH LLVM-exception diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d27b74165..386cba3c5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,9 +1,10 @@ -This is the contributor license agreement. If you are looking for the usage license, see here: [usage license](https://github.com/hsutter/cppfront/blob/main/LICENSE) +## Contributing -## cppfront Contributor License Agreement +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant the rights to use your contribution. A sample of the CLA is below. -By contributing content to cppfront (i.e., submitting a pull request for inclusion in this repository): -- You warrant that your material is original, or you have the right to contribute it. -- With respect to the material that you own, you grant a worldwide, non-exclusive, irrevocable, transferable, and royalty-free license to your contributed material to Herb Sutter to display, reproduce, perform, distribute, and create derivative works of that material for commercial or non-commercial use. -- With respect to any other material you contribute, such material must be under a worldwide, non-exclusive, irrevocable, transferable, and royalty-free license sufficient to allow Herb Sutter to display, reproduce, perform, distribute, and create derivative works of that material for commercial or non-commercial use. +When you submit a pull request, a CLA bot or human will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided. You will only need to do this once for all your contributions to cppfront. + +## Cppfront Contribution License Agreement (Sample) + +A sample can be found here: [Cppfront CLA 2024-10 - sample.pdf](docs/Cppfront CLA 2024-10 - sample.pdf) diff --git a/LICENSE b/LICENSE index 1689a5eac..e582264d1 100644 --- a/LICENSE +++ b/LICENSE @@ -1,11 +1,236 @@ -Copyright (c) Herb Sutter -SPDX-License-Identifier: CC-BY-NC-ND-4.0 - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +Copyright 2022-2024 Herb Sutter +SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +Cppfront is under the Apache License v2.0 with LLVM Exception: + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +---- LLVM Exceptions to the Apache 2.0 License ---- + +As an exception, if, as a result of your compiling your source code, portions +of this Software are embedded into an Object form of such source code, you +may redistribute such embedded portions in such Object form without complying +with the conditions of Sections 4(a), 4(b) and 4(d) of the License. + +In addition, if you combine or link compiled forms of this Software with +software that is licensed under the GPLv2 ("Combined Software") and if a +court of competent jurisdiction determines that the patent provision (Section +3), the indemnity provision (Section 9) or other Section of the License +conflicts with the conditions of the GPLv2, you may retroactively and +prospectively choose to deem waived or otherwise exclude such Section(s) of +the License, but only in their entirety and only with respect to the Combined +Software. diff --git a/README.md b/README.md index 180191197..02a3a5172 100644 --- a/README.md +++ b/README.md @@ -8,15 +8,21 @@ Copyright (c) Herb Sutter • See [License](LICENSE) Cppfront is a compiler from an experimental C++ 'syntax 2' (Cpp2) to today's 'syntax 1' (Cpp1), to prove out some concepts, share some ideas, and prototype features that can also be proposed for evolving today's C++. +You can find the current status summary here: **[Cppfront status summary (summer 2026)](https://github.com/hsutter/cppfront/discussions/1450)** + ## Documentation: [available here](https://hsutter.github.io/cppfront/) + - [Installation](https://hsutter.github.io/cppfront/welcome/overview/#how-do-i-get-and-build-cppfront) + ## What's different about this project? In short, it aims to help evolve C++ itself, not to be a "C++ successor." **What it isn't.** Cpp2 is not a successor or alternate language with its own divergent or incompatible ecosystem. For example, it does not have its own nonstandard incompatible modules/concepts/etc. that compete with the Standard C++ features; it does not replace your Standard C++ compiler or other tools; and it does not require any changes to your Standard C++ compiler or standard library or other libraries or tools to keep fully using all of them. -**What it is.** Cpp2 aims to be another "skin" for C++ itself, just a simpler and safer way to write ordinary C++ types/functions/objects, and a faster way to experiment with proposals for future new Standard C++ features in a simpler compiler and syntax flavor. It seamlessly uses Standard C++ modules and concepts requirements and other features, and it works with all existing C++20 or higher compilers and libraries and tools right out of the box with no changes required to use them all seamlessly and directly with zero overhead. +**What it is.** Cpp2 aims to be another "skin" for C++ itself, just a simpler and safer way to write ordinary C++ types/functions/objects, and a faster way to experiment with proposals for future new Standard C++ features in a simpler compiler and syntax flavor. It seamlessly uses Standard C++ modules, concept requirements, and other features. + +It also works with all existing C++20 (or higher) compilers, libraries, and tools right out of the box with no changes required to use them all seamlessly and directly, with zero overhead. For more, see [What is Cpp2?](https://hsutter.github.io/cppfront/#what-is-cpp2). diff --git a/build_h2.bat b/build_h2.bat new file mode 100644 index 000000000..50e0da0c4 --- /dev/null +++ b/build_h2.bat @@ -0,0 +1,7 @@ +@echo off +cd source +cppfront reflect.h2 -verb %1 +cd ..\include +cppfront cpp2regex.h2 -verb %1 +cppfront cpp2taylor.h2 -verb %1 +cd.. diff --git a/docs/Cppfront CLA 2024-10 - sample.pdf b/docs/Cppfront CLA 2024-10 - sample.pdf new file mode 100644 index 000000000..85f8a4cb6 Binary files /dev/null and b/docs/Cppfront CLA 2024-10 - sample.pdf differ diff --git a/docs/cpp2/functions.md b/docs/cpp2/functions.md index f4a648d64..db0bccc78 100644 --- a/docs/cpp2/functions.md +++ b/docs/cpp2/functions.md @@ -382,16 +382,76 @@ outer: while i `#!cpp throw`, `#!cpp try`, `#!cpp catch` — Exceptions + +**`#!cpp throw`**, **`#!cpp try`** and **`#!cpp catch`** are like always in C++, except: + +- `#!cpp throw(something)` requires parentheses around the thrown value +- `#!cpp catch` uses Cpp2's usual [parameter syntax](#parameters), so you can write `#!cpp catch(obj: type)` to catch an exception of a specific type, and `#!cpp catch(_)` to catch any thrown exception + +For example: + +``` cpp title="Throw, try, catch" hl_lines="1 3-5 9-11" +// This program will print "caught something else" +main: () = { + try { + throw( "xyzzy" ); + } + catch( i: int ) { + std::cout << "caught int with value " << i; + } + catch( _ ) { + std::cout << "caught something else"; + } +} +``` + + +### `#!cpp static` — Global variables inside functions + +**`#!cpp static`** can be specified as the first token of a local variable declaration at function scope, to denote that the variable is a global value initialized thread-safely the first time the line is executed (aka C++ "function local static," aka "magic static"). + +For example (see also [`@singleton`](metafunctions.md#singleton)): + +``` cpp title="static variable (function local scope only)" hl_lines="15" +// For exposition only - normally, use @singleton for convenience +my_singleton: type = { + value : int = 42; + + print : (this) = std::cout << "(value)$\n"; + + //-------------------------------------------------------------------- + // writing '@singleton type' above would generate these two functions + // but this example shows them for exposition of 'static' + // + private + operator=: (out this) = { } + + instance : () -> forward my_singleton = { + static _instance: my_singleton = (); // singleton variable + return _instance; + } + //-------------------------------------------------------------------- +} + +main: () = { + my_singleton::instance().print(); +} +``` + + ## Move/forward from definite last use In a function body, a **definite last use** of a local name is a single use of that name in a statement that is not in a loop, where no control flow path after that statement mentions the name again. For each definite last use: -- If the name is a local object or a `copy` or `move` parameter, we know the object will not be used again before being destroyed, and so the object is automatically treated as an rvalue (move candidate). If the expression that contains the last use is able to move from the rvalue, the move will happen automatically. +- If the name is a `copy` or `move` parameter or is a local object whose name does not start with `guard`, we know the object will not be used again before being destroyed, and so the object is automatically treated as an rvalue (move candidate). If the expression that contains the last use is able to move from the rvalue, the move will happen automatically. - If the name is a `forward` parameter, the object is automatically forwarded to preserve its constness and value category (`std::forward`-ed). +> Note: This gives language meaning to a naming convention of `guard` as a name prefix for "guard" stack objects, such as local `std::scoped_lock` objects, whose destructors are always the object's real last use. + For example: ``` cpp title="Definite last uses" linenums="1" hl_lines="13 16 19 21" diff --git a/docs/cpp2/generalized-copy-move-construction-assignment.png b/docs/cpp2/generalized-copy-move-construction-assignment.png new file mode 100644 index 000000000..61713bbb2 Binary files /dev/null and b/docs/cpp2/generalized-copy-move-construction-assignment.png differ diff --git a/docs/cpp2/metafunctions.md b/docs/cpp2/metafunctions.md index 8a8eaf751..ced16e13f 100644 --- a/docs/cpp2/metafunctions.md +++ b/docs/cpp2/metafunctions.md @@ -365,8 +365,69 @@ main: () = { ``` +### For other common types + +#### `encapsulated` + +An `encapsulated` type is one that has no public data members. + + +#### `noncopyable` + +A `noncopyable` type is one that has no user-defined copy or move functions (`operator=` with `this` and `that` parameters). + + +#### `singleton` + +A `singleton` type is one that has only one global object (instance) in the whole program. The single object is initialized lazily the first time it is accessed. A singleton type has no constructors other than a generated default constructor (note: therefore all data members must have default values), and provides a generated `instance()` function to create and give access to the global instance. + +For example: + +``` cpp title="A templated custom safe union type" hl_lines="1 7" +my_singleton: @singleton type = { + value: int = 42; + print: (this) = std::cout << "(value)$\n"; +} + +main: () = { + my_singleton::instance().print(); +} +``` + + ### For computational and functional types +#### `autodiff` + +An `autodiff` type is extended so that derivatives can be computed. The metafunction adds for each function and member function a differentiated version. **This is a proof of concept implementation. Expect it to break.** +A simple hello diff example is: + +``` cpp +ad: @autodiff type = { + func: (x: double) -> (r: double) = { + r = x * x; + } +} + +main: (args) = { + x := 3.0; + x_d := 1.0; + + r := ad::func_d(x, x_d); + + std::cout << "Derivative of 'x*x' at (x)$ is (r.r_d)$" << std::endl; +} +``` + +The `@autodiff` metafunction mostly supports the forward mode of algorithmic differentiation. The reverse mode is only partly implemented and not yet well tested. +See [Supported autodiff features](../notes/autodiff_status.md) for a list of supported language features. + +Options can be given by text template arguments, e.g. `@autodiff<"reverse">` enables the reverse mode. +| Option | Description | +| `"reverse"` | Reverse mode algorithmic differentiation. Default suffix `_b`. | +| `"order="` | Higher order derivatives. `` can be arbitrary. See `regression-tests/pure2-autodiff-higher-order.cpp2` for examples. | +| `"suffix="` | Change the forward mode suffix. Can be used to apply autodiff multiple times. E.g. `@autodiff @autodiff<"suffix=_d2">`. | +| `"rws_suffix="` | Change the reverse mode suffix. | #### `regex` diff --git a/docs/cpp2/objects.md b/docs/cpp2/objects.md index d3c746c75..5f918ad51 100644 --- a/docs/cpp2/objects.md +++ b/docs/cpp2/objects.md @@ -14,7 +14,7 @@ Its declaration is written using the same **name `:` kind `=` value** [declarati For example: ``` cpp title="Declaring some objects" hl_lines="3 4 7-9 12 13" -// numbers is an object of type std::vector, +// numbers is an object of type std::vector, // defined as having the initial contents 1, 2, 3 numbers: std::vector = (1, 2, 3); numbers: std::vector = (1, 2, 3); // same, deducing the vector's type diff --git a/docs/cpp2/types.md b/docs/cpp2/types.md index ea3e65b68..7ee30bc1b 100644 --- a/docs/cpp2/types.md +++ b/docs/cpp2/types.md @@ -148,18 +148,16 @@ As mentioned above: This graphic summarizes these generalizations. For convenience I've numbered the (A)ssignment and (M)ove defaults. -![image](https://user-images.githubusercontent.com/1801526/226261443-03125a35-7890-4cc7-bf7d-f23b3a0bb0df.png) +![image](generalized-copy-move-construction-assignment.png) In Cpp1 terms, they can be described as follows: - **(M)ove, M1, M2:** If you write a copy constructor or assignment operator, but not a corresponding move constructor or assignment operator, the latter is generated. -- **(A)ssignment, A1, A2, A3:** If you write a copy or move or converting constructor, but not a corresponding copy or move or converting assignment operator, the latter is generated. +- **(A)ssignment, A1, A3:** If you write a generalized constructor, but none of the three more-specific copy/move constructor/assignment functions, the latter three get generated. If you write a converting copy constructor, but no converting assignment operator for the same type and this is not a polymorphic type, the latter is generated. - **The arrows are transitive.** For example, if you write a copy constructor and nothing else, the move constructor, copy assignment operator, and move assignment operator are generated. -- **M2 is preferred over A2.** Both M2 and A2 can generate a missing `#!cpp (inout this, move that)` function. If both options are available, Cpp2 prefers to use M2 (generate move assignment from copy assignment, which could itself have been generated from copy construction) rather than A2 (generate move assignment from move construction). This is because M2 is a better fit: Move assignment is more like copy assignment than like move construction, because assignments are designed structurally to set the value of an existing `#!cpp this` object. - The most general `#!cpp operator=` with `that` is `#!cpp (out this, that)`. In Cpp1 terms, it generates all four combinations of { copy, move } x { constructor, assignment }. This is often sufficient, so you can write all these value-setting functions just once. If you do want to write a more specific version that does something else, though, you can always write it too. > Note: Generating `#!cpp inout this` (assignment) from `#!cpp out this` also generates **converting assignment** from converting construction, which is a new thing. Today in Cpp1, if you write a converting constructor from another type `X`, you may or may not write the corresponding assignment from `X`; in Cpp2 you will get that by default, and it sets the object to the same state as the converting constructor from `X` does. @@ -218,7 +216,7 @@ mytype: type print(); } - print: (this) = std::cout << "value is [(name)$] [(social_handle)$]\n"; + print: (this) = { std::cout << "value is [(name)$] [(social_handle)$]\n"; } } // The above definition of mytype allows all of the following... diff --git a/docs/notes/autodiff_status.md b/docs/notes/autodiff_status.md new file mode 100644 index 000000000..bb9a8a4e1 --- /dev/null +++ b/docs/notes/autodiff_status.md @@ -0,0 +1,34 @@ +# Supported algorithmic differentiation (autodiff) features + +The listings might be incomplete. If something is missing, it is not supported. Algorithmic differentiation is applied via the [`autodiff` metafunction](../cpp2/metafunctions.md#autodiff). Maybe the planned features are added in 2026. Do not wait for them. The autodif feature is a proof of concept implementation. + +** Reverse mode algorithmic differentiation is very experimental. Expect it to break. ** + +## Currently supported or planned features + +| Description | Status forward | Status reverse | +| --- | --- | --- | +| Type definitions (structures) | Supported | Supported | +| Member values | Supported | Planned | +| Member functions | Supported | Supported | +| Function arguments | Supported | Supported | +| Function return arguments | Supported | Supported | +| Addition and multiplication | Supported | Supported | +| Prefix addition and subtraction | Supported | Planned | +| Static member function calls | Supported | Supported | +| Member function calls | Supported | Planned | +| Function calls | Supported | Supported | +| Math functions (sin, cos, exp, sqrt) | Supported | Supported | +| If else | Supported | Planned | +| Return statement | Supported | Planned | +| Intermediate variables | Supported | Supported | +| Passive variables | Supported | Supported | +| While loop | Supported | Planned | +| Do while loop | Supported | Planned | +| For loop | Supported | Supported | +| Template arguments | Planned | Planned | +| Lambda functions | Planned | Planned | + + + + diff --git a/docs/notes/regex_status.md b/docs/notes/regex_status.md index fa43c928a..0ef8ef7f8 100644 --- a/docs/notes/regex_status.md +++ b/docs/notes/regex_status.md @@ -15,7 +15,7 @@ The listings are taken from the [Perl regex docs](https://perldoc.perl.org/perlr | **`s`** | Treat the string as single line. That is, change `.` to match any character whatsoever, even a newline, which normally it would not match. | Supported | | ***`x` and `xx`** | Extend your pattern's legibility by permitting whitespace and comments. For details see: [Perl regex docs: `/x` and `/xx`](https://perldoc.perl.org/perlre#/x-and-/xx). | Supported | | **`n`** | Prevent the grouping metacharacters `(` and `)` from capturing. This modifier will stop `$1`, `$2`, etc. from being filled in. | Supported | -| **`c`** | Keep the current position during repeated matching. | Planned | +| **`c`** | Keep the current position during repeated matching. | Supported | ### Escape sequences __(Complete)__ @@ -96,7 +96,7 @@ The listings are taken from the [Perl regex docs](https://perldoc.perl.org/perlr | **`\A`** | Match only at beginning of string | Supported | | **`\Z`** | Match only at end of string, or before newline at the end | Supported | | **`\z`** | Match only at end of string | Supported | -| **`\G`** | Match only at pos() (e.g. at the end-of-match position of prior m//g) | Planned | +| **`\G`** | Match only at pos() (e.g. at the end-of-match position of prior m//g) | Supported | ### Capture groups __(Complete)__ @@ -128,8 +128,8 @@ The listings are taken from the [Perl regex docs](https://perldoc.perl.org/perlr | **`(?'NAME'pattern)`** | Named capture group | Supported | | **`(?(condition)yes-pattern`|`no-pattern)`** | Conditional patterns. | Planned | | **`(?(condition)yes-pattern)`** | Conditional patterns. | Planned | -| **`(?>pattern)`** | Atomic patterns. (Disable backtrack.) | Planned | -| **`(*atomic:pattern)`** | Atomic patterns. (Disable backtrack.) | Planned | +| **`(?>pattern)`** | Atomic patterns. (Disable backtrack.) | Supported | +| **`(*atomic:pattern)`** | Atomic patterns. (Disable backtrack.) | Supported | ### Lookaround Assertions @@ -142,12 +142,12 @@ The listings are taken from the [Perl regex docs](https://perldoc.perl.org/perlr | **`(?!pattern)`** | Negative look ahead. | Supported | | **`(*nla:pattern)`** | Negative look ahead. | Supported | | **`(*negative_lookahead:pattern)`** | Negative look ahead. | Supported | -| **`(?<=pattern)`** | Positive look behind. | Planned | -| **`(*plb:pattern)`** | Positive look behind. | Planned | -| **`(*positive_lookbehind:pattern)`** | Positive look behind. | Planned | -| **`(?Planned | -| **`(*nlb:pattern)`** | Negative look behind. | Planned | -| **`(*negative_lookbehind:pattern)`** | Negative look behind. | Planned | +| **`(?<=pattern)`** | Positive look behind. | Supported | +| **`(*plb:pattern)`** | Positive look behind. | Supported | +| **`(*positive_lookbehind:pattern)`** | Positive look behind. | Supported | +| **`(?Supported | +| **`(*nlb:pattern)`** | Negative look behind. | Supported | +| **`(*negative_lookbehind:pattern)`** | Negative look behind. | Supported | ### Special Backtracking Control Verbs diff --git a/docs/welcome/hello-world.md b/docs/welcome/hello-world.md index 1e9ab6771..5a59a6030 100644 --- a/docs/welcome/hello-world.md +++ b/docs/welcome/hello-world.md @@ -24,8 +24,9 @@ main: () = { hello( words[1] ); } -hello: (msg: std::string_view) = +hello: (msg: std::string_view) = { std::cout << "Hello, (msg)$!\n"; +} ``` This short program code already illustrates a few Cpp2 essentials. @@ -151,4 +152,4 @@ Hello, world! ### ➤ Next: [Adding cppfront to your existing C++ project](integration.md) -[^clean-cpp1]: For presentation purposes, this documentation generally shows the `.cpp` as generated when using cppfront's `-c` (short for `-clean-cpp1`), which suppresses extra information cppfront normally emits in the `.cpp` to light up C++ tools (e.g., to let IDEs integrate cppfront error message output, debuggers step to the right lines in Cpp2 source code, and so forth). In normal use, you won't need or even want `-c`. +[^clean-cpp1]: For presentation purposes, this documentation generally shows the `.cpp` as generated when using cppfront's `-cl` (short for `-clean-cpp1`), which suppresses extra information cppfront normally emits in the `.cpp` to light up C++ tools (e.g., to let IDEs integrate cppfront error message output, debuggers step to the right lines in Cpp2 source code, and so forth). In normal use, you won't need or even want `-cl`. diff --git a/experimental/extrinsic_storage.h b/experimental/extrinsic_storage.h new file mode 100644 index 000000000..aeea072bf --- /dev/null +++ b/experimental/extrinsic_storage.h @@ -0,0 +1,379 @@ + +// Copyright 2022-2024 Herb Sutter +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +// Part of the Cppfront Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://github.com/hsutter/cppfront/blob/main/LICENSE for license information. + +#ifndef CPP2_EXPERIMENTAL_EXTRINSIC_STORAGE_H +#define CPP2_EXPERIMENTAL_EXTRINSIC_STORAGE_H + +// ***************************************************************** +// Enable/disable debug instrumentation and statistics printing here +constexpr inline auto debug_instrumentation = true; + +// Try with/without m_o_relaxed +#define M_O_RELAXED , std::memory_order_relaxed +#define M_O_RELAXED_NOCOMMA std::memory_order_relaxed +//#define M_O_RELAXED +//#define M_O_RELAXED_NOCOMMA +// ***************************************************************** + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +//----------------------------------------------------------------------------------- +// Some helpers +// +auto print(std::integral auto val) -> std::string { + auto ret = std::to_string(val % 10); + auto pos = 0; + while ((val /= 10) > 0) { + if ((++pos % 3) == 0) { ret = ',' + ret; } + ret = std::to_string(val % 10) + ret; + } + return ret; +} + +constexpr inline auto is_prime(auto value) noexcept -> bool { + constexpr int primes[] = { 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997, 1009, 1013, 1019, 1021, 1031, 1033, 1039, 1049, 1051, 1061, 1063, 1069, 1087, 1091, 1093, 1097, 1103, 1109, 1117, 1123, 1129, 1151, 1153, 1163, 1171, 1181, 1187, 1193, 1201, 1213, 1217, 1223, 1229, 1231, 1237, 1249, 1259, 1277, 1279, 1283, 1289, 1291, 1297, 1301, 1303, 1307, 1319, 1321, 1327, 1361, 1367, 1373, 1381, 1399, 1409, 1423, 1427, 1429, 1433, 1439, 1447, 1451, 1453, 1459, 1471, 1481, 1483, 1487, 1489, 1493, 1499, 1511, 1523, 1531, 1543, 1549, 1553, 1559, 1567, 1571, 1579, 1583, 1597, 1601, 1607, 1609, 1613, 1619, 1621, 1627, 1637, 1657, 1663, 1667, 1669, 1693, 1697, 1699, 1709, 1721, 1723, 1733, 1741, 1747, 1753, 1759, 1777, 1783, 1787, 1789, 1801, 1811, 1823, 1831, 1847, 1861, 1867, 1871, 1873, 1877, 1879, 1889, 1901, 1907, 1913, 1931, 1933, 1949, 1951, 1973, 1979, 1987, 1993, 1997, 1999, 2003, 2011, 2017, 2027, 2029, 2039, 2053, 2063, 2069, 2081, 2083, 2087, 2089, 2099, 2111, 2113, 2129, 2131, 2137, 2141, 2143, 2153, 2161, 2179, 2203, 2207, 2213, 2221, 2237, 2239, 2243, 2251, 2267, 2269, 2273, 2281, 2287, 2293, 2297, 2309, 2311, 2333, 2339, 2341, 2347, 2351, 2357, 2371, 2377, 2381, 2383, 2389, 2393, 2399, 2411, 2417, 2423, 2437, 2441, 2447, 2459, 2467, 2473, 2477, 2503, 2521, 2531, 2539, 2543, 2549, 2551, 2557, 2579, 2591, 2593, 2609, 2617, 2621, 2633, 2647, 2657, 2659, 2663, 2671, 2677, 2683, 2687, 2689, 2693, 2699, 2707, 2711, 2713, 2719, 2729, 2731, 2741, 2749, 2753, 2767, 2777, 2789, 2791, 2797, 2801, 2803, 2819, 2833, 2837, 2843, 2851, 2857, 2861, 2879, 2887, 2897, 2903, 2909, 2917, 2927, 2939, 2953, 2957, 2963, 2969, 2971, 2999, 3001, 3011, 3019, 3023, 3037, 3041, 3049, 3061, 3067, 3079, 3083, 3089, 3109, 3119, 3121, 3137, 3163, 3167, 3169, 3181, 3187, 3191, 3203, 3209, 3217, 3221, 3229, 3251, 3253, 3257, 3259, 3271, 3299, 3301, 3307, 3313, 3319, 3323, 3329, 3331, 3343, 3347, 3359, 3361, 3371, 3373, 3389, 3391, 3407, 3413, 3433, 3449, 3457, 3461, 3463, 3467, 3469, 3491, 3499, 3511, 3517, 3527, 3529, 3533, 3539, 3541, 3547, 3557, 3559, 3571, 3581, 3583, 3593, 3607, 3613, 3617, 3623, 3631, 3637, 3643, 3659, 3671, 3673, 3677, 3691, 3697, 3701, 3709, 3719, 3727, 3733, 3739, 3761, 3767, 3769, 3779, 3793, 3797, 3803, 3821, 3823, 3833, 3847, 3851, 3853, 3863, 3877, 3881, 3889, 3907, 3911, 3917, 3919, 3923, 3929, 3931, 3943, 3947, 3967, 3989, 4001, 4003, 4007, 4013, 4019, 4021, 4027, 4049, 4051, 4057, 4073, 4079, 4091, 4093, 4099, 4111, 4127, 4129, 4133, 4139, 4153, 4157, 4159, 4177, 4201, 4211, 4217, 4219, 4229, 4231, 4241, 4243, 4253, 4259, 4261, 4271, 4273, 4283, 4289, 4297, 4327, 4337, 4339, 4349, 4357, 4363, 4373, 4391, 4397, 4409, 4421, 4423, 4441, 4447, 4451, 4457, 4463, 4481, 4483, 4493, 4507, 4513, 4517, 4519, 4523, 4547, 4549, 4561, 4567, 4583, 4591, 4597, 4603, 4621, 4637, 4639, 4643, 4649, 4651, 4657, 4663, 4673, 4679, 4691, 4703, 4721, 4723, 4729, 4733, 4751, 4759, 4783, 4787, 4789, 4793, 4799, 4801, 4813, 4817, 4831, 4861, 4871, 4877, 4889, 4903, 4909, 4919, 4931, 4933, 4937, 4943, 4951, 4957, 4967, 4969, 4973, 4987, 4993, 4999, 5003, 5009, 5011, 5021, 5023, 5039, 5051, 5059, 5077, 5081, 5087, 5099, 5101, 5107, 5113, 5119, 5147, 5153, 5167, 5171, 5179, 5189, 5197, 5209, 5227, 5231, 5233, 5237, 5261, 5273, 5279, 5281, 5297, 5303, 5309, 5323, 5333, 5347, 5351, 5381, 5387, 5393, 5399, 5407, 5413, 5417, 5419, 5431, 5437, 5441, 5443, 5449, 5471, 5477, 5479, 5483, 5501, 5503, 5507, 5519, 5521, 5527, 5531, 5557, 5563, 5569, 5573, 5581, 5591, 5623, 5639, 5641, 5647, 5651, 5653, 5657, 5659, 5669, 5683, 5689, 5693, 5701, 5711, 5717, 5737, 5741, 5743, 5749, 5779, 5783, 5791, 5801, 5807, 5813, 5821, 5827, 5839, 5843, 5849, 5851, 5857, 5861, 5867, 5869, 5879, 5881, 5897, 5903, 5923, 5927, 5939, 5953, 5981, 5987, 6007, 6011, 6029, 6037, 6043, 6047, 6053, 6067, 6073, 6079, 6089, 6091, 6101, 6113, 6121, 6131, 6133, 6143, 6151, 6163, 6173, 6197, 6199, 6203, 6211, 6217, 6221, 6229, 6247, 6257, 6263, 6269, 6271, 6277, 6287, 6299, 6301, 6311, 6317, 6323, 6329, 6337, 6343, 6353, 6359, 6361, 6367, 6373, 6379, 6389, 6397, 6421, 6427, 6449, 6451, 6469, 6473, 6481, 6491, 6521, 6529, 6547, 6551, 6553, 6563, 6569, 6571, 6577, 6581, 6599, 6607, 6619, 6637, 6653, 6659, 6661, 6673, 6679, 6689, 6691, 6701, 6703, 6709, 6719, 6733, 6737, 6761, 6763, 6779, 6781, 6791, 6793, 6803, 6823, 6827, 6829, 6833, 6841, 6857, 6863, 6869, 6871, 6883, 6899, 6907, 6911, 6917, 6947, 6949, 6959, 6961, 6967, 6971, 6977, 6983, 6991, 6997, 7001, 7013, 7019, 7027, 7039, 7043, 7057, 7069, 7079, 7103, 7109, 7121, 7127, 7129, 7151, 7159, 7177, 7187, 7193, 7207, 7211, 7213, 7219, 7229, 7237, 7243, 7247, 7253, 7283, 7297, 7307, 7309, 7321, 7331, 7333, 7349, 7351, 7369, 7393, 7411, 7417, 7433, 7451, 7457, 7459, 7477, 7481, 7487, 7489, 7499, 7507, 7517, 7523, 7529, 7537, 7541, 7547, 7549, 7559, 7561, 7573, 7577, 7583, 7589, 7591, 7603, 7607, 7621, 7639, 7643, 7649, 7669, 7673, 7681, 7687, 7691, 7699, 7703, 7717, 7723, 7727, 7741, 7753, 7757, 7759, 7789, 7793, 7817, 7823, 7829, 7841, 7853, 7867, 7873, 7877, 7879, 7883, 7901, 7907, 7919 }; + return std::find( std::begin(primes), std::end(primes), value ) != std::end(primes); +} + + +//----------------------------------------------------------------------------------- +// Stub in just enough of atomic for this use +// +template +class atomic_unique_ptr { + std::atomic p = {}; +public: + atomic_unique_ptr () noexcept = default; + atomic_unique_ptr (atomic_unique_ptr const&) noexcept = delete; // this use doesn't need movability + ~atomic_unique_ptr() noexcept { delete p.load(); } + + explicit atomic_unique_ptr(std::unique_ptr&& up) noexcept : p{up.release()} { } // but we do need convertability + auto release() noexcept -> std::unique_ptr { auto ret = std::unique_ptr(p.load()); p.store(nullptr); return ret; } + // and for an emptying mutating move function I prefer a named function + // to a conversion operator (even one that's 'explicit' and &&-qualified) + + auto load(std::memory_order m_o = std::memory_order_seq_cst) const noexcept -> T* { return p.load(m_o); } + + // We only need c_e_weak(null, desired), so can provide this simpler API + auto compare_exchange_weak_null(std::unique_ptr& desired) noexcept -> bool { + T* null = nullptr; + if (p.compare_exchange_weak(null, desired.get())) { + desired.release(); + return true; + } + return false; + } +}; + + +//----------------------------------------------------------------------------------- +// extrinsic_storage - constant-time lock-free data structure to nonintrusively +// store external additional data for program objects +// +// Template parameters +// Data additional data to store for each object +// Buckets #buckets in hash table +// +// Concurrency +// Lock-free for insertion if additional storage is needed +// Wait-free for all other operations, including insertion that doesn't grow storage +// Note: Every use of explicit std::memory_order_* (aka m_o_*) MUST include rationale +// +// Complexity +// Constant-time could be achieved by periodically growing the hash table (not implemented) +// + +template // fixed is ok for prototyping; can be made dynamic to maintain O(K) + requires (is_prime(Buckets)) +class extrinsic_storage { +public: + using Key = std::atomic; + using Value = Data; + + ~extrinsic_storage() { + debug_report(); + + // Explicitly iterate the cleanup work to minimize stack use + // Without this cleanup traversal, automatic safe-by-construction + // cleanup would still occur but would be recursive and could + // require stack space proportional to the largest bucket size + for (auto& bucket : buckets) { + auto pnext = bucket.next.release(); + while (pnext) { + auto pdelete = std::move(pnext); + pnext = pdelete->next.release(); + } + } + } + + //-------------------------------------------------------------------------- + // find_or_insert( pobj ) - returns the data entry for pobj + // + // If pobj does not yet have an entry, creates it + // Returns null only if not present and allocation is needed but fails + // + auto find_or_insert(void* pobj) noexcept -> Value* { + if constexpr (debug_instrumentation) { + // m_o_relaxed is enough, inc order doesn't matter for totals + instrument_access_count.fetch_add(1 M_O_RELAXED); + } + return lookup(pobj, lookup_mode::find_or_insert); + } + + //-------------------------------------------------------------------------- + // find( pobj ) - returns the data entry for pobj or null if not present + // + auto find(void* pobj) noexcept -> Value* { + if constexpr (debug_instrumentation) { + // m_o_relaxed is enough, inc order doesn't matter for totals + instrument_access_count.fetch_add(1 M_O_RELAXED); + } + return lookup(pobj, lookup_mode::find); + } + + //-------------------------------------------------------------------------- + // erase( pobj ) - removes the entry for pobj + // + auto erase(void* pobj) noexcept -> void { + if constexpr (debug_instrumentation) { + // m_o_relaxed is enough, inc order doesn't matter for totals + instrument_erase_count.fetch_add(1 M_O_RELAXED); + } + lookup(pobj, lookup_mode::erase); + } + +private: + static inline constexpr std::size_t ChunkSize = 32; + struct chunk { + std::array keys = { }; // SOA for better key locality + std::array values = { }; + atomic_unique_ptr next = { }; + }; + std::array buckets = {}; // prime for some minimal QoI + + //-------------------------------------------------------------------------- + // lookup( pobj ) - shared helper for operator[]/erase + // + // Parameters + // pobj the key to look up + // mode if erase, reset key to null and return nullptr + // if find, return a pointer to the value if it exists, or null + // if find_or_insert, return a pointer to the value (inserted if + // not present) or null if allocation was needed and failed + // + // (*) This function requires that the calling code has exclusive access to + // *pobj, and if *pobj is shared has done any necessary synchronization + // to access *pobj (else the calling code already has a data race on + // *pobj). This function uses the knowledge that no other thread can be + // concurrently calling us with this pobj value to perform m_o_relaxed + // loads of .keys and .next, noted with (*) below. + // + // Using m_o_relaxed on loads will likely not be significantly faster + // on modern Intel and ARM architectures, where SC loads are already + // the same or similar speed as relaxed loads. But they should be a + // good performance gain on PPC, older ARM, and any other hardware + // that has inefficient SC loads, so I'll use m_o_relaxed with care + // as I think they can be correct here and they are in the hot path + // of the data structure traversal. + // + enum class lookup_mode { find, find_or_insert, erase }; + auto lookup( + void* pobj, + lookup_mode mode + ) noexcept + -> Value* + { + //auto hash = std::hash{}(pobj) % Buckets; // A + auto hash = (((std::size_t)pobj)>>2) % Buckets; // B + // across the three major C++ implementations I tried, hash B has + // smoother utilization (2% to 5% difference between the most vs + // least popular bucket) than hash A (3.5% to 16% difference) + + assert( 0 <= hash && hash < Buckets ); + if constexpr (debug_instrumentation) { + // m_o_relaxed is enough, inc order doesn't matter for totals + instrument_bucket_access[hash].fetch_add(1 M_O_RELAXED); + } + + // 1. If we find key==pobj, we're done + auto pchunk = &buckets[hash]; + while (pchunk) { + for ( auto i = std::size_t{0}; i < ChunkSize; ++i ) { + // (*) m_o_relaxed is enough, equality means we own the slot + // and so this thread already has exclusive access to *pobj + // and its .values data + if (pchunk->keys[i].load(M_O_RELAXED_NOCOMMA) == pobj) { + if (mode == lookup_mode::erase) { + pchunk->keys[i].store(nullptr M_O_RELAXED); + return nullptr; + } + // Else + return &pchunk->values[i]; + } + } + // (*) m_o_relaxed is enough here, because .next is immutable after + // it is first set to non-null, and if a new chunk(s) was just + // concurrently added by a different thread then that new + // chunk(s) cannot contain an entry for pobj + pchunk = pchunk->next.load(M_O_RELAXED_NOCOMMA); + } + + // 2. Otherwise, if we're not allowed to insert we're done + // but we didn't actually find something so return null + if (mode != lookup_mode::find_or_insert) { + if constexpr (debug_instrumentation) { + if (mode == lookup_mode::erase) { + // m_o_relaxed is enough, inc order doesn't matter for totals + instrument_erase_fail_count.fetch_add(1 M_O_RELAXED); + } + } + return nullptr; + } + + // 3. Otherwise, we need to insert it + // a) Prefer claiming an existing null slot if one exists + pchunk = &buckets[hash]; + while (true) { + auto i = std::size_t{0}; + for ( ; i < ChunkSize; ++i ) { + void* null = nullptr; + if ( + // m_o_relaxed is enough for this first load... + pchunk->keys[i].load(M_O_RELAXED_NOCOMMA) == nullptr + // ... because it's just a best-effort optimization to + // avoid this maybe-unneeded c_e_weak (which is safely SC) + && pchunk->keys[i].compare_exchange_weak( null, pobj ) + ) { + if constexpr (debug_instrumentation) { + // m_o_relaxed is enough, inc order doesn't matter for totals + instrument_insert_count.fetch_add(1 M_O_RELAXED); + } + return &pchunk->values[i]; + } + } + // (*) m_o_relaxed is enough here, because if a new chunk(s) + // was just concurrently added by a different thread then we'll + // just add an extra chunk which is fine + if ( pchunk->next.load(M_O_RELAXED_NOCOMMA) == nullptr ) { + break; + } + pchunk = pchunk->next.load(); + } + + // b) Otherwise, we need to allocate a new chunk for it + // At this point, pchunk points to the last chunk in this bucket + assert (pchunk); + + // Not using make_unique: In principle, if allocation fails we don't + // want to change well-formed program behavior. (In practice, if this + // small allocation ever fails the program is already in deep trouble; + // unless Key or Data are large, a chunk is usually well under 1KB) + auto pnew = std::unique_ptr( new (std::nothrow) chunk{} ); + if (pnew == nullptr) { return nullptr; } + + pnew->keys[0] = pobj; + auto ret = &pnew->values[0]; + while (!pchunk->next.compare_exchange_weak_null(pnew)) { + pchunk = pchunk->next.load(); + assert (pchunk); + } + + if constexpr (debug_instrumentation) { + // m_o_relaxed is enough, inc order doesn't matter for totals + instrument_alloc_count.fetch_add(1 M_O_RELAXED); + } + return ret; + } + + // Debug instrumentation + // + static inline std::atomic instrument_access_count = {}; + static inline std::atomic instrument_insert_count = {}; + static inline std::atomic instrument_alloc_count = {}; + static inline std::atomic instrument_erase_count = {}; + static inline std::atomic instrument_erase_fail_count = {}; + static inline std::array, Buckets> instrument_bucket_access = {}; + + auto debug_report() -> void { + if constexpr (debug_instrumentation) { + std::cout << "Report for extrinsic_storage<" << typeid(Data).name() << ">\n\n" + << " all accesses (incl. inserts) " << print(instrument_access_count .load()) << "\n" + << " inserts " << print(instrument_insert_count .load() + +instrument_alloc_count .load()) << "\n" + << " used existing storage " << print(instrument_insert_count .load()) << "\n" + << " allocated new storage " << print(instrument_alloc_count .load()) << "\n" + << " erases " << print(instrument_erase_count .load()) << "\n" + << " succeeded " << print(instrument_erase_count .load() + -instrument_erase_fail_count .load()) << "\n" + << " failed " << print(instrument_erase_fail_count .load()) << "\n\n"; + + auto empty = std::size_t{0}; + auto tot = 0; + auto min = instrument_bucket_access[0].load(); + auto max = 0; + for (auto const& count : instrument_bucket_access) { + if (count == 0) { ++empty; } + tot += count; + if (count < min) { min = count; } + if (count > max) { max = count; } + } + + auto sizes = std::map{}; + for (auto const& ch : buckets) { + auto size = 0; + for (auto next = ch.next.load(); next; ++size, next = next->next.load()) { ; } + ++sizes[size]; + } + std::cout << " bucket utilization\n" + << " # buckets\n" + << " total " << print(Buckets) << "\n" + << " empty " << print(empty) << "\n" + << " # accesses\n" + << " total " << print(tot) << "\n" + << " to least popular bucket " << print(min) << "\n" + << " to most popular bucket " << print(max) << "\n" + << " # extra allocations\n"; + for (auto [size, count] : sizes | std::views::reverse) { + std::cout << " " << size << " - " << count << " buckets\n"; + } + std::cout << "\n"; + + auto static_space = sizeof(extrinsic_storage); + auto dynamic_space = instrument_alloc_count.load() * sizeof(chunk); + std::cout << " total extrinsic storage used = keys + data + housekeeping + padding (in bytes)\n" + << " static " << print(static_space) << "\n" + << " dynamic " << print(dynamic_space) << "\n" + << " total " << print(static_space + dynamic_space) << "\n" + << " for comparison, intrinsic would have used approx. " + << print((instrument_alloc_count.load()+Buckets) * sizeof(chunk::values)) << "\n\n"; + + std::cout << " sizes (in bytes)\n" + << " sizeof(chunk) " << print(sizeof(chunk)) << "\n" + << " sizeof(chunk.keys) " << print(sizeof(chunk::keys)) << "\n" + << " sizeof(chunk.values) " << print(sizeof(chunk::values)) << "\n" + << " sizeof(chunk.next) " << print(sizeof(chunk::next)) << "\n" + << " wasted chunk.* padding " << print(sizeof(chunk) - sizeof(chunk::keys) - sizeof(chunk::values) - sizeof(chunk::next)) << "\n" + << " sizeof(buckets) " << print(sizeof(buckets)) << "\n" + << " #buckets * sizeof(chunk) " << print(Buckets * sizeof(chunk)) << "\n" + << "\n"; + } + } +}; + +#endif diff --git a/experimental/extrinsic_storage_std_locked.h b/experimental/extrinsic_storage_std_locked.h new file mode 100644 index 000000000..bfbea5533 --- /dev/null +++ b/experimental/extrinsic_storage_std_locked.h @@ -0,0 +1,76 @@ + +// Copyright 2022-2024 Herb Sutter +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +// Part of the Cppfront Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://github.com/hsutter/cppfront/blob/main/LICENSE for license information. + +#ifndef CPP2_EXPERIMENTAL_EXTRINSIC_STORAGE_STD_LOCKED_H +#define CPP2_EXPERIMENTAL_EXTRINSIC_STORAGE_STD_LOCKED_H + +#include +#include +#include +#include + + +//----------------------------------------------------------------------------------- +// Some helpers +// +auto print(std::integral auto val) -> std::string { + auto ret = std::to_string(val % 10); + auto pos = 0; + while ((val /= 10) > 0) { + if ((++pos % 3) == 0) { ret = ',' + ret; } + ret = std::to_string(val % 10) + ret; + } + return ret; +} + + +//----------------------------------------------------------------------------------- +// A "brute-force" locked implementation to measure against +// +// NOTE: For performance comparison only, not recommended +// +template +class extrinsic_storage { + std::mutex mut; + //std::map data; + std::unordered_map data; +public: + //-------------------------------------------------------------------------- + // find_or_insert( pobj ) - returns the data entry for pobj + // + // If pobj does not yet have an entry, creates it + // + auto find_or_insert(void* pobj) -> Data* { + auto _ = std::lock_guard{mut}; + return &data[pobj]; + } + + //-------------------------------------------------------------------------- + // find( pobj ) - returns the data entry for pobj or null if not present + // + auto find(void* pobj) noexcept -> Data* { + auto _ = std::lock_guard{mut}; + if (auto iter = data.find(pobj); + iter != data.end() + ) + { + return &iter->second; + } + // Else + return nullptr; + } + + //-------------------------------------------------------------------------- + // erase( pobj ) - removes the entry for pobj + // + auto erase(void* pobj) noexcept -> void { + auto _ = std::lock_guard{mut}; + data.erase(pobj); + } +}; + +#endif diff --git a/experimental/union_test.cpp b/experimental/union_test.cpp new file mode 100644 index 000000000..9a06626d5 --- /dev/null +++ b/experimental/union_test.cpp @@ -0,0 +1,213 @@ + +// Copyright 2022-2024 Herb Sutter +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +// Part of the Cppfront Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://github.com/hsutter/cppfront/blob/main/LICENSE for license information. + +//#include "extrinsic_storage_std_locked.h" +#include "extrinsic_storage.h" + +#include +#include +#include +#include +#include +#include +#include +#include + + +//------------------------------------------------------------------------------- +// Union instrumentation API for compiler integration +// +// Template parameters +// Tag discriminator tag to store for each object (uintNN_t where +// NN is large enough to hold the #alternatives in the union) +// +// For an object U of union type that +// has a unique address, when Inject a call to this (zero-based alternative #s) +// +// U is created initialized on_set_alternative(&U,0) = the first alternative# is active +// +// U is created uninitialized on_set_alternative(&U,invalid) +// +// U.A = xxx (alt A is assigned to) on_set_alternative(&U,#A) +// +// U or U.A is passed to a function by on_set_alternative(&U,unknown) +// pointer/reference to non-const +// and we don't know the function +// is compiled in this mode +// +// U.A (alt A is otherwise used) on_get_alternative(&U,#A) +// and A is not a common initial +// sequence +// +// U is destroyed / goes out of scope on_destroy(&U) +// +// That's it. Here's an example: +// { +// union Test { int a; double b; }; +// Test t = {42}; union_registry<>::on_set_alternative(&u,0); +// std::cout << t.a; union_registry<>::on_get_alternative(&u,0); +// t.b = 3.14159; union_registry<>::on_set_alternative(&u,1); +// std::cout << t.b; union_registry<>::on_get_alternative(&u,1); +// } union_registry<>::on_destroy(&u); +// +// For all unions with up to 254 alternatives, use union_registry<> +// For all unions with between 255 and 16k-2 alternatives, use union_registry +// If you find a union with >16k-2 alternatives, email me the story and use union_registry +// +template +class union_registry { + static inline auto tags = extrinsic_storage{}; + static inline auto log = std::ofstream{ "union-violations.log" }; +public: + static inline auto invalid = std::numeric_limits::max(); + static inline auto unknown = std::numeric_limits::max()-1; + + static inline auto on_destroy(void* pobj) noexcept -> void { tags.erase(pobj); } + + static inline auto on_set_alternative(void* pobj, uint32_t alt) noexcept -> void { + if (auto p = tags.find_or_insert(pobj)) { *p = alt; } + } + + static inline auto on_get_alternative(void* pobj, uint32_t alt, std::source_location where = std::source_location::current()) -> void { + if (auto active = tags.find(pobj); + active // if we have discriminator info for this union + && *active != alt // and the discriminator not what is expected + && *active != unknown // and is not unknown + ) + { + log << where.file_name() << '(' << where.line() + << "): union type safety violation - active member " << (*active == invalid ? "invalid" : std::to_string(*active)) + << ", attempted to access " << alt << "\n"; + } + } +}; + + +//------------------------------------------------------------------------------- +// Sample union +// +union Union { + char alt0; + int alt1; + long double alt2; +}; + + +//------------------------------------------------------------------------------- +// Multithreaded test harness +// +template +auto test(int threads = 1) -> void +{ + auto fault_inject_counter = std::atomic{9900}; + auto size = 10'000/threads; + + // 1M unions, 10K at a time + auto run = [&] { + for (auto iteration = 0; iteration < 100; ++iteration) + { + auto us = std::vector{}; + us.reserve(size); + for (int i = 0; i < size; ++i) { + us.emplace_back('x'); + if constexpr (SafetyChecks) { union_registry<>::on_set_alternative(&us[i],0); } // 1st access for this union + } + + for (auto& u : us) + { + if (--fault_inject_counter != 0) { // occasionally forget to set .alt1 + u.alt1 = 123; + if constexpr (SafetyChecks) { union_registry<>::on_set_alternative(&u,1); } // 2nd + } + + if constexpr (SafetyChecks) { union_registry<>::on_get_alternative(&u,1); } // 3rd + u.alt1 += 456; + + u.alt2 = 12.345678; + if constexpr (SafetyChecks) { union_registry<>::on_set_alternative(&u,2); } // 4th + + if constexpr (SafetyChecks) { union_registry<>::on_get_alternative(&u,2); } // 5th + u.alt2 += 3.14169265; + + u.alt0 = 'y'; + if constexpr (SafetyChecks) { union_registry<>::on_set_alternative(&u,0); } // 6th + + if constexpr (SafetyChecks) { union_registry<>::on_get_alternative(&u,0); } // 7th + auto _ = u.alt0; + + u.alt2 = 3.1415926535; + if constexpr (SafetyChecks) { union_registry<>::on_set_alternative(&u,2); } // 8th + + if constexpr (SafetyChecks) { union_registry<>::on_get_alternative(&u,2); } // 9th + u.alt2 += 3.14169265; + } + + for (int i = 0; i < size; ++i) { + if constexpr (SafetyChecks) { union_registry<>::on_destroy(&us[i]); } // 10th and last + } + } + }; + + std::vector thds; + for (auto i = 0; i < threads; ++i) { + thds.emplace_back( run ); + } +} + + +class timer { + std::chrono::time_point start; +public: + timer() : start{ std::chrono::high_resolution_clock::now() } { } + auto microseconds() const { return std::chrono::duration_cast(std::chrono::high_resolution_clock::now() - start).count(); } +}; + + +int main() +{ + auto tot_raw = int64_t{0}; + auto tot_chk = int64_t{0}; + + auto stats = std::map{}; + + // Repeat test sequence a few times + for (auto reps = 0; reps < 5; ++reps) + { + // Run "raw" vs "checked" test for 1, 2, 4, 8, 16, 32, 64, and 128 threads + for (auto i = 1; i <= 128; i *= 2) + { + ////std::cout << "# threads: " << i << "\n"; + + // First without checks + auto t = timer{}; + test(i); + auto raw_time = t.microseconds(); + ////std::cout << " raw: " << print(raw_time) << "\n"; + tot_raw += raw_time; + + // Then with checks, via specifying + t = timer{}; + test(i); + auto chk_time = t.microseconds(); + ////std::cout << " checked: " << print(chk_time) << "\n"; + stats[i] += chk_time-raw_time; + tot_chk += chk_time; + } + } + + // Print each #threads timings in an Excel-friendly format + for (auto [threads, timings] : stats) { + if (threads != 1) { std::cout << " "; } + std::cout << timings; + } + std::cout << "\n"; + + std::cout << "totals\n" + << " raw: " << print(tot_raw) << "\n" + << " checked: " << print(tot_chk) << "\n"; + +} diff --git a/gen_build.bat b/gen_build.bat new file mode 100644 index 000000000..cb75c7697 --- /dev/null +++ b/gen_build.bat @@ -0,0 +1,4 @@ +@echo off +cppfront -_gen_build > source\build.info +@echo Build stamp updated to: +type source\build.info diff --git a/include/cpp2ad_stack.h b/include/cpp2ad_stack.h new file mode 100644 index 000000000..cdc13efaa --- /dev/null +++ b/include/cpp2ad_stack.h @@ -0,0 +1,38 @@ +#ifndef CPP2_CPP2AD_STACK_H +#define CPP2_CPP2AD_STACK_H + +#include + +namespace cpp2 { + +struct ad_stack { + + template + static void push(T const& v) { + std::vector& stack = get_stack(); + + stack.push_back(v); + } + + template + static T pop() { + std::vector& stack = get_stack(); + + T v = stack.back(); + stack.pop_back(); + + return v; + } + + private: + + template + static std::vector& get_stack() { + static std::vector stack = {}; + + return stack; + } +}; +} // cpp2 namespace + +#endif // CPP2_CPP2AD_STACK_H \ No newline at end of file diff --git a/include/cpp2regex.h b/include/cpp2regex.h index e19398634..945c1b46d 100644 --- a/include/cpp2regex.h +++ b/include/cpp2regex.h @@ -10,67 +10,70 @@ #line 1 "cpp2regex.h2" -#line 27 "cpp2regex.h2" +#line 20 "cpp2regex.h2" namespace cpp2 { namespace regex { -#line 43 "cpp2regex.h2" +#line 36 "cpp2regex.h2" template class match_group; -#line 53 "cpp2regex.h2" +#line 46 "cpp2regex.h2" template class match_return; -#line 61 "cpp2regex.h2" +#line 54 "cpp2regex.h2" template class match_context; -#line 122 "cpp2regex.h2" +#line 125 "cpp2regex.h2" +template class reverse_match_context; + +#line 194 "cpp2regex.h2" class true_end_func; -#line 130 "cpp2regex.h2" +#line 202 "cpp2regex.h2" class no_reset; -#line 137 "cpp2regex.h2" +#line 209 "cpp2regex.h2" template class on_return; -#line 164 "cpp2regex.h2" +#line 236 "cpp2regex.h2" template class single_class_entry; -#line 173 "cpp2regex.h2" +#line 245 "cpp2regex.h2" template class range_class_entry; -#line 182 "cpp2regex.h2" +#line 254 "cpp2regex.h2" template class combined_class_entry; -#line 191 "cpp2regex.h2" +#line 263 "cpp2regex.h2" template class list_class_entry; -#line 200 "cpp2regex.h2" +#line 272 "cpp2regex.h2" template class named_class_entry; -#line 207 "cpp2regex.h2" +#line 279 "cpp2regex.h2" template class negated_class_entry; -#line 216 "cpp2regex.h2" +#line 288 "cpp2regex.h2" template class shorthand_class_entry; -#line 264 "cpp2regex.h2" +#line 336 "cpp2regex.h2" template class alternative_token_matcher; -#line 342 "cpp2regex.h2" +#line 427 "cpp2regex.h2" template class class_token_matcher; -#line 497 "cpp2regex.h2" +#line 604 "cpp2regex.h2" class range_flags; -#line 506 "cpp2regex.h2" +#line 613 "cpp2regex.h2" template class range_token_matcher; -#line 678 "cpp2regex.h2" -template class regular_expression; +#line 785 "cpp2regex.h2" +template class regular_expression; -#line 761 "cpp2regex.h2" +#line 921 "cpp2regex.h2" } } @@ -79,16 +82,11 @@ template class regular_expression; #line 1 "cpp2regex.h2" -// Copyright (c) Herb Sutter -// SPDX-License-Identifier: CC-BY-NC-ND-4.0 - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. +// Copyright 2022-2026 Herb Sutter +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +// Part of the Cppfront Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://github.com/hsutter/cppfront/blob/main/LICENSE for license information. //=========================================================================== @@ -98,13 +96,11 @@ template class regular_expression; #ifndef CPP2_CPP2REGEX_H #define CPP2_CPP2REGEX_H -template -using matcher_wrapper_type = typename matcher_wrapper::template wrap; -template -using matcher_context_type = typename matcher::context; +template +using matcher_context_type = typename matcher::template context; -#line 27 "cpp2regex.h2" +#line 20 "cpp2regex.h2" namespace cpp2 { namespace regex { @@ -130,7 +126,7 @@ template class match_group public: match_group(auto const& start_, auto const& end_, auto const& matched_); public: match_group(); -#line 49 "cpp2regex.h2" +#line 42 "cpp2regex.h2" }; // Return value for every matcher. @@ -142,7 +138,7 @@ template class match_return public: match_return(auto const& matched_, auto const& pos_); public: match_return(); -#line 57 "cpp2regex.h2" +#line 50 "cpp2regex.h2" }; // Modifiable state during matching. @@ -154,48 +150,123 @@ template class match_context private: std::array,max_groups> groups {}; - public: explicit match_context(Iter const& begin_, Iter const& end_); + public: match_context(Iter const& begin_, Iter const& end_); -#line 73 "cpp2regex.h2" +#line 66 "cpp2regex.h2" public: match_context(match_context const& that); -#line 73 "cpp2regex.h2" +#line 66 "cpp2regex.h2" public: auto operator=(match_context const& that) -> match_context& ; -#line 73 "cpp2regex.h2" +#line 66 "cpp2regex.h2" public: match_context(match_context&& that) noexcept; -#line 73 "cpp2regex.h2" +#line 66 "cpp2regex.h2" public: auto operator=(match_context&& that) noexcept -> match_context& ; + // String end and start positions + // + public: [[nodiscard]] auto get_string_start() const& -> decltype(auto); + public: [[nodiscard]] auto get_string_end() const& -> decltype(auto); + // Getter and setter for groups // public: [[nodiscard]] auto get_group(auto const& group) const& -> decltype(auto); public: [[nodiscard]] auto get_group_end(auto const& group) const& -> int; -#line 85 "cpp2regex.h2" +#line 83 "cpp2regex.h2" public: [[nodiscard]] auto get_group_start(auto const& group) const& -> int; -#line 91 "cpp2regex.h2" +#line 89 "cpp2regex.h2" public: [[nodiscard]] auto get_group_string(auto const& group) const& -> std::string; -#line 98 "cpp2regex.h2" +#line 96 "cpp2regex.h2" public: auto set_group_end(auto const& group, auto const& pos) & -> void; -#line 103 "cpp2regex.h2" +#line 101 "cpp2regex.h2" public: auto set_group_invalid(auto const& group) & -> void; -#line 107 "cpp2regex.h2" +#line 105 "cpp2regex.h2" public: auto set_group_start(auto const& group, auto const& pos) & -> void; -#line 111 "cpp2regex.h2" +#line 109 "cpp2regex.h2" public: [[nodiscard]] auto size() const& -> decltype(auto); // Misc functions // public: [[nodiscard]] auto fail() const& -> decltype(auto); public: [[nodiscard]] auto pass(cpp2::impl::in cur) const& -> decltype(auto); + + public: auto reset() & -> void; + +#line 121 "cpp2regex.h2" }; -#line 120 "cpp2regex.h2" +// Wrapper of context for reverse matches. Implements only the minimal interface for matching. +// +template class reverse_match_context + { + public: using ReverseIter = std::reverse_iterator; + public: match_context* forward_context; + + public: ReverseIter begin; + public: ReverseIter end; + + public: reverse_match_context(auto const& forward_context_); +#line 133 "cpp2regex.h2" + public: auto operator=(auto const& forward_context_) -> reverse_match_context& ; + +#line 139 "cpp2regex.h2" + public: reverse_match_context(reverse_match_context const& that); +#line 139 "cpp2regex.h2" + public: auto operator=(reverse_match_context const& that) -> reverse_match_context& ; +#line 139 "cpp2regex.h2" + public: reverse_match_context(reverse_match_context&& that) noexcept; +#line 139 "cpp2regex.h2" + public: auto operator=(reverse_match_context&& that) noexcept -> reverse_match_context& ; + + // String end and start positions + // + public: [[nodiscard]] auto get_string_start() const& -> decltype(auto); + public: [[nodiscard]] auto get_string_end() const& -> decltype(auto); + + // Getter and setter for groups + // + public: auto set_group_end(auto const& group, auto const& pos) & -> void; + +#line 152 "cpp2regex.h2" + public: auto set_group_invalid(auto const& group) & -> void; + +#line 156 "cpp2regex.h2" + public: auto set_group_start(auto const& group, auto const& pos) & -> void; + +#line 160 "cpp2regex.h2" + // Misc functions + // + public: [[nodiscard]] auto fail() const& -> decltype(auto); + public: [[nodiscard]] auto pass(cpp2::impl::in cur) const& -> decltype(auto); +}; + +// Helpers for creating wrappers of the match context. +// +template [[nodiscard]] auto make_forward_match_context(match_context& ctx) -> decltype(auto); + +#line 172 "cpp2regex.h2" +template [[nodiscard]] auto make_forward_match_context(reverse_match_context& ctx) -> decltype(auto); + +#line 176 "cpp2regex.h2" +template [[nodiscard]] auto make_reverse_match_context(match_context& ctx) -> auto; + +#line 180 "cpp2regex.h2" +template [[nodiscard]] auto make_reverse_match_context(reverse_match_context& ctx) -> decltype(auto); + +#line 184 "cpp2regex.h2" +// Helpers for creating wrappers of the iterators. +// +template [[nodiscard]] auto cpp2_make_forward_iterator(Iter const& pos) -> auto; +template [[nodiscard]] auto cpp2_make_forward_iterator(std::reverse_iterator const& pos) -> auto; +template [[nodiscard]] auto cpp2_make_reverse_iterator(Iter const& pos) -> auto; +template [[nodiscard]] auto cpp2_make_reverse_iterator(std::reverse_iterator const& pos) -> auto; + +#line 192 "cpp2regex.h2" // End function that returns a valid match. // class true_end_func @@ -203,7 +274,7 @@ class true_end_func public: [[nodiscard]] auto operator()(auto const& cur, auto& ctx) const& -> decltype(auto); }; -#line 128 "cpp2regex.h2" +#line 200 "cpp2regex.h2" // Empty group reset function. // class no_reset @@ -211,30 +282,30 @@ class no_reset public: auto operator()([[maybe_unused]] auto& unnamed_param_2) const& -> void; }; -#line 136 "cpp2regex.h2" +#line 208 "cpp2regex.h2" // Evaluate func on destruction of the handle. template class on_return { private: Func func; - public: explicit on_return(Func const& f); -#line 141 "cpp2regex.h2" + public: on_return(Func const& f); +#line 213 "cpp2regex.h2" public: auto operator=(Func const& f) -> on_return& ; -#line 145 "cpp2regex.h2" +#line 217 "cpp2regex.h2" public: ~on_return() noexcept; public: on_return(on_return const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(on_return const&) -> void = delete; -#line 148 "cpp2regex.h2" +#line 220 "cpp2regex.h2" }; -#line 151 "cpp2regex.h2" +#line 223 "cpp2regex.h2" // Helper for auto deduction of the Func type. template [[nodiscard]] auto make_on_return(Func const& func) -> decltype(auto); -#line 155 "cpp2regex.h2" +#line 227 "cpp2regex.h2" //----------------------------------------------------------------------- // // Character classes for regular expressions. @@ -252,10 +323,10 @@ template class single_class_entry public: single_class_entry(single_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(single_class_entry const&) -> void = delete; -#line 168 "cpp2regex.h2" +#line 240 "cpp2regex.h2" }; -#line 171 "cpp2regex.h2" +#line 243 "cpp2regex.h2" // Class syntax: - Example: a-c // template class range_class_entry @@ -266,10 +337,10 @@ template class range_class_entry public: range_class_entry(range_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(range_class_entry const&) -> void = delete; -#line 177 "cpp2regex.h2" +#line 249 "cpp2regex.h2" }; -#line 180 "cpp2regex.h2" +#line 252 "cpp2regex.h2" // Helper for combining two character classes // template class combined_class_entry @@ -280,10 +351,10 @@ template class combined_class_entry public: combined_class_entry(combined_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(combined_class_entry const&) -> void = delete; -#line 186 "cpp2regex.h2" +#line 258 "cpp2regex.h2" }; -#line 189 "cpp2regex.h2" +#line 261 "cpp2regex.h2" // Class syntax: Example: abcd // template class list_class_entry @@ -294,10 +365,10 @@ template class list_class_entry public: list_class_entry(list_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(list_class_entry const&) -> void = delete; -#line 195 "cpp2regex.h2" +#line 267 "cpp2regex.h2" }; -#line 198 "cpp2regex.h2" +#line 270 "cpp2regex.h2" // Class syntax: [: class named_class_entry @@ -308,10 +379,10 @@ template class n public: named_class_entry(named_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(named_class_entry const&) -> void = delete; -#line 204 "cpp2regex.h2" +#line 276 "cpp2regex.h2" }; -#line 207 "cpp2regex.h2" +#line 279 "cpp2regex.h2" template class negated_class_entry : public Inner { @@ -320,10 +391,10 @@ template class negated_class_entry public: negated_class_entry(negated_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(negated_class_entry const&) -> void = delete; -#line 211 "cpp2regex.h2" +#line 283 "cpp2regex.h2" }; -#line 214 "cpp2regex.h2" +#line 286 "cpp2regex.h2" // Short class syntax: \ Example: \w // template class shorthand_class_entry @@ -334,10 +405,10 @@ template class s public: shorthand_class_entry(shorthand_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(shorthand_class_entry const&) -> void = delete; -#line 220 "cpp2regex.h2" +#line 292 "cpp2regex.h2" }; -#line 223 "cpp2regex.h2" +#line 295 "cpp2regex.h2" // Named basic character classes // template using digits_class = named_class_entry>; @@ -374,7 +445,7 @@ template using short_not_space_class = nega template using short_not_vert_space_class = negated_class_entry>>; template using short_not_word_class = negated_class_entry>>; -#line 260 "cpp2regex.h2" +#line 332 "cpp2regex.h2" // Regex syntax: | Example: ab|ba // // Non greedy implementation. First alternative that matches is chosen. @@ -383,22 +454,27 @@ template class alternative_token_matcher { public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& end_func, auto const& tail, auto const& ...functions) -> auto; -#line 270 "cpp2regex.h2" +#line 342 "cpp2regex.h2" private: template [[nodiscard]] static auto match_first(auto const& cur, auto& ctx, auto const& end_func, auto const& tail, auto const& cur_func, auto const& cur_reset, Other const& ...other) -> auto; public: alternative_token_matcher() = default; public: alternative_token_matcher(alternative_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(alternative_token_matcher const&) -> void = delete; -#line 288 "cpp2regex.h2" +#line 360 "cpp2regex.h2" }; -#line 291 "cpp2regex.h2" +#line 363 "cpp2regex.h2" // Regex syntax: . // template [[nodiscard]] auto any_token_matcher(auto& cur, auto& ctx) -> bool; -#line 306 "cpp2regex.h2" +#line 377 "cpp2regex.h2" +// Regex syntax: (?>) Example: a(?>bc|c)c +// +template [[nodiscard]] auto atomic_group_matcher(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> auto; + +#line 391 "cpp2regex.h2" // TODO: Check if vectorization works at some point with this implementation. // char_token_matcher: (inout cur, inout ctx) -> bool = { // if !(std::distance(cur, ctx.end) < tokens..size()) { @@ -432,21 +508,21 @@ template [[nodiscard]] auto any_token_matcher( // return matched; // } -#line 340 "cpp2regex.h2" +#line 425 "cpp2regex.h2" // Regex syntax: [] Example: [abcx-y[:digits:]] // template class class_token_matcher { public: [[nodiscard]] static auto match(auto& cur, auto& ctx) -> bool; -#line 373 "cpp2regex.h2" +#line 458 "cpp2regex.h2" private: template [[nodiscard]] static auto match_any(cpp2::impl::in c) -> bool; public: class_token_matcher() = default; public: class_token_matcher(class_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(class_token_matcher const&) -> void = delete; -#line 386 "cpp2regex.h2" +#line 471 "cpp2regex.h2" // TODO: Implement proper to string // to_string: () -> bstring = { // r: bstring = "["; @@ -458,10 +534,10 @@ template c // return r; // } -#line 397 "cpp2regex.h2" +#line 482 "cpp2regex.h2" }; -#line 400 "cpp2regex.h2" +#line 485 "cpp2regex.h2" // Named short classes // template using named_class_no_new_line = class_token_matcher>; @@ -477,36 +553,43 @@ template usi template using named_class_not_ver_space = class_token_matcher>; template using named_class_not_word = class_token_matcher>; -#line 416 "cpp2regex.h2" +#line 501 "cpp2regex.h2" // Regex syntax: \ Example: \1 // \g{name_or_number} // \k{name_or_number} // \k // \k'name_or_number' // -template [[nodiscard]] auto group_ref_token_matcher(auto& cur, auto& ctx) -> bool; +template [[nodiscard]] auto group_ref_token_matcher(auto& cur, auto& ctx) -> bool; -#line 453 "cpp2regex.h2" +#line 546 "cpp2regex.h2" // Regex syntax: $ Example: aa$ // template [[nodiscard]] auto line_end_token_matcher(auto const& cur, auto& ctx) -> bool; -#line 469 "cpp2regex.h2" +#line 562 "cpp2regex.h2" // Regex syntax: ^ Example: ^aa // template [[nodiscard]] auto line_start_token_matcher(auto const& cur, auto& ctx) -> bool; -#line 478 "cpp2regex.h2" +#line 571 "cpp2regex.h2" // Regex syntax: (?=) or (?!) or (*pla), etc. Example: (?=AA) // // Parsed in group_token. // template [[nodiscard]] auto lookahead_token_matcher(auto const& cur, auto& ctx, auto const& func) -> bool; -#line 493 "cpp2regex.h2" +#line 585 "cpp2regex.h2" +// Regex syntax: (?<=) or (? [[nodiscard]] auto lookbehind_token_matcher(auto const& cur, auto& ctx, auto const& func) -> bool; + +#line 600 "cpp2regex.h2" // TODO: @enum as template parameter currently not working. See issue https://github.com/hsutter/cppfront/issues/1147 -#line 496 "cpp2regex.h2" +#line 603 "cpp2regex.h2" // Options for range matching. class range_flags { public: static const int not_greedy;// Try to take as few as possible. @@ -517,9 +600,9 @@ class range_flags { public: range_flags(range_flags const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(range_flags const&) -> void = delete; }; -#line 502 "cpp2regex.h2" +#line 609 "cpp2regex.h2" -#line 504 "cpp2regex.h2" +#line 611 "cpp2regex.h2" // Regex syntax: {min, max} Example: a{2,4} // template class range_token_matcher @@ -527,42 +610,42 @@ template class range_tok public: template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto; -#line 522 "cpp2regex.h2" +#line 629 "cpp2regex.h2" private: [[nodiscard]] static auto is_below_upper_bound(cpp2::impl::in count) -> bool; -#line 527 "cpp2regex.h2" +#line 634 "cpp2regex.h2" private: [[nodiscard]] static auto is_below_lower_bound(cpp2::impl::in count) -> bool; -#line 532 "cpp2regex.h2" +#line 639 "cpp2regex.h2" private: [[nodiscard]] static auto is_in_range(cpp2::impl::in count) -> bool; -#line 538 "cpp2regex.h2" +#line 645 "cpp2regex.h2" private: template [[nodiscard]] static auto match_min_count(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, int& count_r) -> auto; -#line 554 "cpp2regex.h2" +#line 661 "cpp2regex.h2" private: template [[nodiscard]] static auto match_greedy(cpp2::impl::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return; -#line 584 "cpp2regex.h2" +#line 691 "cpp2regex.h2" private: template [[nodiscard]] static auto match_possessive(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return; -#line 612 "cpp2regex.h2" +#line 719 "cpp2regex.h2" private: template [[nodiscard]] static auto match_not_greedy(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return; public: range_token_matcher() = default; public: range_token_matcher(range_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(range_token_matcher const&) -> void = delete; -#line 638 "cpp2regex.h2" +#line 745 "cpp2regex.h2" }; -#line 641 "cpp2regex.h2" +#line 748 "cpp2regex.h2" // Regex syntax: \b or \B Example: \bword\b // // Matches the start end end of word boundaries. // template [[nodiscard]] auto word_boundary_token_matcher(auto& cur, auto& ctx) -> bool; -#line 670 "cpp2regex.h2" +#line 777 "cpp2regex.h2" //----------------------------------------------------------------------- // // Regular expression implementation. @@ -571,10 +654,9 @@ template [[nodiscard]] auto word_boundary_token_mat // // Regular expression implementation -template class regular_expression +template class regular_expression { - public: template using matcher = matcher_wrapper_type;// TODO: Remove when nested types are allowed: https://github.com/hsutter/cppfront/issues/727 - public: template using context = matcher_context_type>;// TODO: Remove when nested types are allowed: https://github.com/hsutter/cppfront/issues/727 + public: template using context = matcher_context_type;// TODO: Remove when nested types are allowed: https://github.com/hsutter/cppfront/issues/727 public: template class search_return { @@ -582,9 +664,12 @@ template class regular_expression public: context ctx; public: int pos; - public: explicit search_return(cpp2::impl::in matched_, context const& ctx_, Iter const& pos_); + public: search_return(cpp2::impl::in matched_, context const& ctx_, Iter const& pos_); -#line 695 "cpp2regex.h2" +#line 801 "cpp2regex.h2" + public: search_return(Iter const& begin, Iter const& end); + +#line 807 "cpp2regex.h2" public: [[nodiscard]] auto group_number() const& -> decltype(auto); public: [[nodiscard]] auto group(cpp2::impl::in g) const& -> decltype(auto); public: [[nodiscard]] auto group_start(cpp2::impl::in g) const& -> decltype(auto); @@ -594,26 +679,38 @@ template class regular_expression public: [[nodiscard]] auto group_start(cpp2::impl::in> g) const& -> decltype(auto); public: [[nodiscard]] auto group_end(cpp2::impl::in> g) const& -> decltype(auto); + public: auto update(cpp2::impl::in> r) & -> void; + +#line 821 "cpp2regex.h2" private: [[nodiscard]] auto get_group_id(cpp2::impl::in> g) const& -> auto; public: search_return(search_return const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(search_return const&) -> void = delete; -#line 711 "cpp2regex.h2" +#line 828 "cpp2regex.h2" }; + public: [[nodiscard]] auto find_all(auto&& func, cpp2::impl::in> str) const& -> decltype(auto); + public: [[nodiscard]] auto find_all(auto&& func, cpp2::impl::in> str, cpp2::impl::in start) const& -> decltype(auto); + public: [[nodiscard]] auto find_all(auto&& func, cpp2::impl::in> str, cpp2::impl::in start, cpp2::impl::in length) const& -> decltype(auto); + public: template auto find_all(auto const& func, Iter const& start, Iter const& end) const& -> void; + +#line 861 "cpp2regex.h2" public: [[nodiscard]] auto match(cpp2::impl::in> str) const& -> decltype(auto); public: [[nodiscard]] auto match(cpp2::impl::in> str, auto const& start) const& -> decltype(auto); public: [[nodiscard]] auto match(cpp2::impl::in> str, auto const& start, auto const& length) const& -> decltype(auto); public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return; -#line 724 "cpp2regex.h2" +#line 872 "cpp2regex.h2" public: [[nodiscard]] auto search(cpp2::impl::in> str) const& -> decltype(auto); public: [[nodiscard]] auto search(cpp2::impl::in> str, auto const& start) const& -> decltype(auto); public: [[nodiscard]] auto search(cpp2::impl::in> str, auto const& start, auto const& length) const& -> decltype(auto); public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return; -#line 747 "cpp2regex.h2" +#line 882 "cpp2regex.h2" + private: template [[nodiscard]] auto search_with_context(context& ctx, Iter const& start) const& -> match_return; + +#line 907 "cpp2regex.h2" public: [[nodiscard]] auto to_string() const& -> decltype(auto); // Helper functions @@ -624,7 +721,7 @@ template class regular_expression public: auto operator=(regular_expression const&) -> void = delete; -#line 759 "cpp2regex.h2" +#line 919 "cpp2regex.h2" }; } @@ -636,7 +733,7 @@ template class regular_expression #line 1 "cpp2regex.h2" -#line 27 "cpp2regex.h2" +#line 20 "cpp2regex.h2" namespace cpp2 { namespace regex { @@ -651,55 +748,60 @@ template match_return::match_return(auto const& matched_, , pos{ pos_ }{} template match_return::match_return(){} -#line 68 "cpp2regex.h2" +#line 61 "cpp2regex.h2" template match_context::match_context(Iter const& begin_, Iter const& end_) : begin{ begin_ } , end{ end_ }{ -#line 71 "cpp2regex.h2" +#line 64 "cpp2regex.h2" } -#line 73 "cpp2regex.h2" +#line 66 "cpp2regex.h2" template match_context::match_context(match_context const& that) : begin{ that.begin } , end{ that.end } , groups{ that.groups }{} -#line 73 "cpp2regex.h2" +#line 66 "cpp2regex.h2" template auto match_context::operator=(match_context const& that) -> match_context& { begin = that.begin; end = that.end; groups = that.groups; return *this; } -#line 73 "cpp2regex.h2" +#line 66 "cpp2regex.h2" template match_context::match_context(match_context&& that) noexcept : begin{ std::move(that).begin } , end{ std::move(that).end } , groups{ std::move(that).groups }{} -#line 73 "cpp2regex.h2" +#line 66 "cpp2regex.h2" template auto match_context::operator=(match_context&& that) noexcept -> match_context& { begin = std::move(that).begin; end = std::move(that).end; groups = std::move(that).groups; return *this; } -#line 77 "cpp2regex.h2" +#line 70 "cpp2regex.h2" + template [[nodiscard]] auto match_context::get_string_start() const& -> decltype(auto) { return begin; } +#line 71 "cpp2regex.h2" + template [[nodiscard]] auto match_context::get_string_end() const& -> decltype(auto) { return end; } + +#line 75 "cpp2regex.h2" template [[nodiscard]] auto match_context::get_group(auto const& group) const& -> decltype(auto) { return CPP2_ASSERT_IN_BOUNDS(groups, group); } -#line 79 "cpp2regex.h2" +#line 77 "cpp2regex.h2" template [[nodiscard]] auto match_context::get_group_end(auto const& group) const& -> int{ if (cpp2::impl::cmp_greater_eq(group,max_groups) || !(CPP2_ASSERT_IN_BOUNDS(groups, group).matched)) { return 0; } return cpp2::unchecked_narrow(std::distance(begin, CPP2_ASSERT_IN_BOUNDS(groups, group).end)); } -#line 85 "cpp2regex.h2" +#line 83 "cpp2regex.h2" template [[nodiscard]] auto match_context::get_group_start(auto const& group) const& -> int{ if (cpp2::impl::cmp_greater_eq(group,max_groups) || !(CPP2_ASSERT_IN_BOUNDS(groups, group).matched)) { return 0; } return cpp2::unchecked_narrow(std::distance(begin, CPP2_ASSERT_IN_BOUNDS(groups, group).start)); } -#line 91 "cpp2regex.h2" +#line 89 "cpp2regex.h2" template [[nodiscard]] auto match_context::get_group_string(auto const& group) const& -> std::string{ if (cpp2::impl::cmp_greater_eq(group,max_groups) || !(CPP2_ASSERT_IN_BOUNDS(groups, group).matched)) { return ""; @@ -707,97 +809,199 @@ template match_return::match_return(){} return std::string(CPP2_ASSERT_IN_BOUNDS(groups, group).start, CPP2_ASSERT_IN_BOUNDS(groups, group).end); } -#line 98 "cpp2regex.h2" +#line 96 "cpp2regex.h2" template auto match_context::set_group_end(auto const& group, auto const& pos) & -> void{ CPP2_ASSERT_IN_BOUNDS(groups, group).end = pos; CPP2_ASSERT_IN_BOUNDS(groups, group).matched = true; } -#line 103 "cpp2regex.h2" +#line 101 "cpp2regex.h2" template auto match_context::set_group_invalid(auto const& group) & -> void{ CPP2_ASSERT_IN_BOUNDS(groups, group).matched = false; } -#line 107 "cpp2regex.h2" +#line 105 "cpp2regex.h2" template auto match_context::set_group_start(auto const& group, auto const& pos) & -> void{ CPP2_ASSERT_IN_BOUNDS(groups, group).start = pos; } -#line 111 "cpp2regex.h2" +#line 109 "cpp2regex.h2" template [[nodiscard]] auto match_context::size() const& -> decltype(auto) { return max_groups; } -#line 115 "cpp2regex.h2" +#line 113 "cpp2regex.h2" template [[nodiscard]] auto match_context::fail() const& -> decltype(auto) { return match_return(false, end); } -#line 116 "cpp2regex.h2" +#line 114 "cpp2regex.h2" template [[nodiscard]] auto match_context::pass(cpp2::impl::in cur) const& -> decltype(auto) { return match_return(true, cur); } -#line 124 "cpp2regex.h2" +#line 116 "cpp2regex.h2" + template auto match_context::reset() & -> void{ + for ( auto& g : groups ) { + g.matched = false; + } + } + +#line 133 "cpp2regex.h2" + template reverse_match_context::reverse_match_context(auto const& forward_context_) + : forward_context{ forward_context_ } + , begin{ std::make_reverse_iterator((*cpp2::impl::assert_not_null(forward_context)).end) } + , end{ std::make_reverse_iterator((*cpp2::impl::assert_not_null(forward_context)).begin) }{ + +#line 137 "cpp2regex.h2" + } +#line 133 "cpp2regex.h2" + template auto reverse_match_context::operator=(auto const& forward_context_) -> reverse_match_context& { + forward_context = forward_context_; + begin = std::make_reverse_iterator((*cpp2::impl::assert_not_null(forward_context)).end); + end = std::make_reverse_iterator((*cpp2::impl::assert_not_null(forward_context)).begin); + return *this; + +#line 137 "cpp2regex.h2" + } + +#line 139 "cpp2regex.h2" + template reverse_match_context::reverse_match_context(reverse_match_context const& that) + : forward_context{ that.forward_context } + , begin{ that.begin } + , end{ that.end }{} +#line 139 "cpp2regex.h2" + template auto reverse_match_context::operator=(reverse_match_context const& that) -> reverse_match_context& { + forward_context = that.forward_context; + begin = that.begin; + end = that.end; + return *this; } +#line 139 "cpp2regex.h2" + template reverse_match_context::reverse_match_context(reverse_match_context&& that) noexcept + : forward_context{ std::move(that).forward_context } + , begin{ std::move(that).begin } + , end{ std::move(that).end }{} +#line 139 "cpp2regex.h2" + template auto reverse_match_context::operator=(reverse_match_context&& that) noexcept -> reverse_match_context& { + forward_context = std::move(that).forward_context; + begin = std::move(that).begin; + end = std::move(that).end; + return *this; } + +#line 143 "cpp2regex.h2" + template [[nodiscard]] auto reverse_match_context::get_string_start() const& -> decltype(auto) { return end; } +#line 144 "cpp2regex.h2" + template [[nodiscard]] auto reverse_match_context::get_string_end() const& -> decltype(auto) { return begin; } + +#line 148 "cpp2regex.h2" + template auto reverse_match_context::set_group_end(auto const& group, auto const& pos) & -> void{ + (*cpp2::impl::assert_not_null(forward_context)).set_group_end(group, CPP2_UFCS(base)((pos))); + } + +#line 152 "cpp2regex.h2" + template auto reverse_match_context::set_group_invalid(auto const& group) & -> void{ + (*cpp2::impl::assert_not_null(forward_context)).set_group_invalid(group); + } + +#line 156 "cpp2regex.h2" + template auto reverse_match_context::set_group_start(auto const& group, auto const& pos) & -> void{ + (*cpp2::impl::assert_not_null(forward_context)).set_group_start(group, CPP2_UFCS(base)((pos))); + } + +#line 162 "cpp2regex.h2" + template [[nodiscard]] auto reverse_match_context::fail() const& -> decltype(auto) { return match_return(false, end); } +#line 163 "cpp2regex.h2" + template [[nodiscard]] auto reverse_match_context::pass(cpp2::impl::in cur) const& -> decltype(auto) { return match_return(true, cur); } + +#line 168 "cpp2regex.h2" +template [[nodiscard]] auto make_forward_match_context(match_context& ctx) -> decltype(auto){ + return ctx; +} + +#line 172 "cpp2regex.h2" +template [[nodiscard]] auto make_forward_match_context(reverse_match_context& ctx) -> decltype(auto){ + return *cpp2::impl::assert_not_null(ctx.forward_context); +} + +#line 176 "cpp2regex.h2" +template [[nodiscard]] auto make_reverse_match_context(match_context& ctx) -> auto{ + return reverse_match_context(&ctx); +} + +#line 180 "cpp2regex.h2" +template [[nodiscard]] auto make_reverse_match_context(reverse_match_context& ctx) -> decltype(auto){ + return ctx; +} + +#line 186 "cpp2regex.h2" +template [[nodiscard]] auto cpp2_make_forward_iterator(Iter const& pos) -> auto { return pos; } +#line 187 "cpp2regex.h2" +template [[nodiscard]] auto cpp2_make_forward_iterator(std::reverse_iterator const& pos) -> auto { return CPP2_UFCS(base)(pos); } +#line 188 "cpp2regex.h2" +template [[nodiscard]] auto cpp2_make_reverse_iterator(Iter const& pos) -> auto { return std::make_reverse_iterator(pos); } +#line 189 "cpp2regex.h2" +template [[nodiscard]] auto cpp2_make_reverse_iterator(std::reverse_iterator const& pos) -> auto { return pos; } + +#line 196 "cpp2regex.h2" [[nodiscard]] auto true_end_func::operator()(auto const& cur, auto& ctx) const& -> decltype(auto) { return ctx.pass(cur); } -#line 132 "cpp2regex.h2" +#line 204 "cpp2regex.h2" auto no_reset::operator()([[maybe_unused]] auto& unnamed_param_2) const& -> void{} -#line 141 "cpp2regex.h2" +#line 213 "cpp2regex.h2" template on_return::on_return(Func const& f) : func{ f }{ -#line 143 "cpp2regex.h2" +#line 215 "cpp2regex.h2" } -#line 141 "cpp2regex.h2" +#line 213 "cpp2regex.h2" template auto on_return::operator=(Func const& f) -> on_return& { func = f; return *this; -#line 143 "cpp2regex.h2" +#line 215 "cpp2regex.h2" } -#line 145 "cpp2regex.h2" +#line 217 "cpp2regex.h2" template on_return::~on_return() noexcept{ cpp2::move(*this).func(); } -#line 152 "cpp2regex.h2" +#line 224 "cpp2regex.h2" template [[nodiscard]] auto make_on_return(Func const& func) -> decltype(auto) { return on_return(func); } -#line 166 "cpp2regex.h2" +#line 238 "cpp2regex.h2" template [[nodiscard]] auto single_class_entry::includes(cpp2::impl::in c) -> decltype(auto) { return c == C; } -#line 167 "cpp2regex.h2" +#line 239 "cpp2regex.h2" template [[nodiscard]] auto single_class_entry::to_string() -> decltype(auto) { return bstring(1, C); } -#line 175 "cpp2regex.h2" +#line 247 "cpp2regex.h2" template [[nodiscard]] auto range_class_entry::includes(cpp2::impl::in c) -> decltype(auto) { return [_0 = Start, _1 = c, _2 = End]{ return cpp2::impl::cmp_less_eq(_0,_1) && cpp2::impl::cmp_less_eq(_1,_2); }(); } -#line 176 "cpp2regex.h2" +#line 248 "cpp2regex.h2" template [[nodiscard]] auto range_class_entry::to_string() -> decltype(auto) { return "" + cpp2::to_string(Start) + "-" + cpp2::to_string(End) + ""; } -#line 184 "cpp2regex.h2" +#line 256 "cpp2regex.h2" template [[nodiscard]] auto combined_class_entry::includes(cpp2::impl::in c) -> decltype(auto) { return (false || ... || List::includes(c)); } -#line 185 "cpp2regex.h2" +#line 257 "cpp2regex.h2" template [[nodiscard]] auto combined_class_entry::to_string() -> decltype(auto) { return (bstring() + ... + List::to_string()); } -#line 193 "cpp2regex.h2" +#line 265 "cpp2regex.h2" template [[nodiscard]] auto list_class_entry::includes(cpp2::impl::in c) -> decltype(auto) { return (false || ... || (List == c)); } -#line 194 "cpp2regex.h2" +#line 266 "cpp2regex.h2" template [[nodiscard]] auto list_class_entry::to_string() -> decltype(auto) { return (bstring() + ... + List); } -#line 202 "cpp2regex.h2" +#line 274 "cpp2regex.h2" template [[nodiscard]] auto named_class_entry::includes(cpp2::impl::in c) -> decltype(auto) { return Inner::includes(c); } -#line 203 "cpp2regex.h2" +#line 275 "cpp2regex.h2" template [[nodiscard]] auto named_class_entry::to_string() -> decltype(auto) { return "[:" + cpp2::to_string(Name.data()) + ":]"; } -#line 210 "cpp2regex.h2" +#line 282 "cpp2regex.h2" template [[nodiscard]] auto negated_class_entry::includes(cpp2::impl::in c) -> decltype(auto) { return !(Inner::includes(c)); } -#line 218 "cpp2regex.h2" +#line 290 "cpp2regex.h2" template [[nodiscard]] auto shorthand_class_entry::includes(cpp2::impl::in c) -> decltype(auto) { return Inner::includes(c); } -#line 219 "cpp2regex.h2" +#line 291 "cpp2regex.h2" template [[nodiscard]] auto shorthand_class_entry::to_string() -> decltype(auto) { return Name.str(); } -#line 266 "cpp2regex.h2" +#line 338 "cpp2regex.h2" template [[nodiscard]] auto alternative_token_matcher::match(auto const& cur, auto& ctx, auto const& end_func, auto const& tail, auto const& ...functions) -> auto{ return match_first(cur, ctx, end_func, tail, functions...); } -#line 270 "cpp2regex.h2" +#line 342 "cpp2regex.h2" template template [[nodiscard]] auto alternative_token_matcher::match_first(auto const& cur, auto& ctx, auto const& end_func, auto const& tail, auto const& cur_func, auto const& cur_reset, Other const& ...other) -> auto { auto inner_call {[_0 = (tail), _1 = (end_func)](auto const& tail_cur, auto& tail_ctx) -> auto{ @@ -817,7 +1021,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> d } } -#line 293 "cpp2regex.h2" +#line 365 "cpp2regex.h2" template [[nodiscard]] auto any_token_matcher(auto& cur, auto& ctx) -> bool { if ( cur != ctx.end // any char except the end @@ -830,7 +1034,19 @@ template [[nodiscard]] auto any_token_matcher( return false; } -#line 344 "cpp2regex.h2" +#line 379 "cpp2regex.h2" +template [[nodiscard]] auto atomic_group_matcher(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> auto +{ + auto r {inner(cur, ctx, true_end_func())}; + + if (r.matched) { + r = other(r.pos, ctx, end_func); + } + + return r; +} + +#line 429 "cpp2regex.h2" template [[nodiscard]] auto class_token_matcher::match(auto& cur, auto& ctx) -> bool { if constexpr (case_insensitive) @@ -860,7 +1076,7 @@ template [[nodiscard]] auto any_token_matcher( } } -#line 373 "cpp2regex.h2" +#line 458 "cpp2regex.h2" template template [[nodiscard]] auto class_token_matcher::match_any(cpp2::impl::in c) -> bool { bool r {First::includes(c)}; @@ -874,16 +1090,24 @@ template [[nodiscard]] auto any_token_matcher( return r; } -#line 422 "cpp2regex.h2" -template [[nodiscard]] auto group_ref_token_matcher(auto& cur, auto& ctx) -> bool +#line 507 "cpp2regex.h2" +template [[nodiscard]] auto group_ref_token_matcher(auto& cur, auto& ctx) -> bool { auto g {ctx.get_group(group)}; - auto group_pos {cpp2::move(g).start}; + auto group_pos {g.start}; + auto group_end {g.end}; + int group_inc {1}; + if (reverse) { + group_pos = g.end; + group_end = cpp2::move(g).start; + group_inc = -1; + } + for( ; - group_pos != g.end + group_pos != group_end && cur != ctx.end; - (++group_pos, ++cur) ) + (group_pos += group_inc, ++cur) ) { if constexpr (case_insensitive) { if (string_util::safe_tolower(*cpp2::impl::assert_not_null(group_pos)) != string_util::safe_tolower(*cpp2::impl::assert_not_null(cur))) { @@ -897,7 +1121,7 @@ template [[nodiscard]] auto gr } } - if (cpp2::move(group_pos) == cpp2::move(g).end) { + if (cpp2::move(group_pos) == cpp2::move(group_end)) { return true; } else { @@ -905,13 +1129,13 @@ template [[nodiscard]] auto gr } } -#line 455 "cpp2regex.h2" +#line 548 "cpp2regex.h2" template [[nodiscard]] auto line_end_token_matcher(auto const& cur, auto& ctx) -> bool { - if (cur == ctx.end || (match_new_line && *cpp2::impl::assert_not_null(cur) == '\n')) { + if (cur == CPP2_UFCS(get_string_end)(ctx) || (match_new_line && *cpp2::impl::assert_not_null(cur) == '\n')) { return true; } - else {if (match_new_line_before_end && (*cpp2::impl::assert_not_null(cur) == '\n' && (cur + 1) == ctx.end)) {// Special case for new line at end. + else {if (match_new_line_before_end && (*cpp2::impl::assert_not_null(cur) == '\n' && (cur + 1) == CPP2_UFCS(get_string_end)(ctx))) {// Special case for new line at end. return true; } else { @@ -919,17 +1143,17 @@ template [[ }} } -#line 471 "cpp2regex.h2" +#line 564 "cpp2regex.h2" template [[nodiscard]] auto line_start_token_matcher(auto const& cur, auto& ctx) -> bool { - return cur == ctx.begin || // Start of string + return cur == CPP2_UFCS(get_string_start)(ctx) || // Start of string (match_new_line && *cpp2::impl::assert_not_null((cur - 1)) == '\n'); // Start of new line } -#line 482 "cpp2regex.h2" +#line 575 "cpp2regex.h2" template [[nodiscard]] auto lookahead_token_matcher(auto const& cur, auto& ctx, auto const& func) -> bool { - auto r {func(cur, ctx, true_end_func())}; + auto r {func(cpp2_make_forward_iterator(cur), make_forward_match_context(ctx), true_end_func())}; if (!(positive)) { r.matched = !(r.matched); } @@ -937,12 +1161,23 @@ template [[nodiscard]] auto lookahead_token_match return cpp2::move(r).matched; } -#line 498 "cpp2regex.h2" +#line 589 "cpp2regex.h2" +template [[nodiscard]] auto lookbehind_token_matcher(auto const& cur, auto& ctx, auto const& func) -> bool +{ + auto r {func(cpp2_make_reverse_iterator(cur), make_reverse_match_context(ctx), true_end_func())}; + if (!(positive)) { + r.matched = !(r.matched); + } + + return cpp2::move(r).matched; +} + +#line 605 "cpp2regex.h2" inline CPP2_CONSTEXPR int range_flags::not_greedy{ 1 }; inline CPP2_CONSTEXPR int range_flags::greedy{ 2 }; inline CPP2_CONSTEXPR int range_flags::possessive{ 3 }; -#line 509 "cpp2regex.h2" +#line 616 "cpp2regex.h2" template template [[nodiscard]] auto range_token_matcher::match(Iter const& cur, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto { if (range_flags::possessive == kind) { @@ -956,26 +1191,26 @@ template [[nodiscard]] auto lookahead_token_match }} } -#line 522 "cpp2regex.h2" +#line 629 "cpp2regex.h2" template [[nodiscard]] auto range_token_matcher::is_below_upper_bound(cpp2::impl::in count) -> bool{ if (-1 == max_count) {return true; } else {return cpp2::impl::cmp_less(count,max_count); } } -#line 527 "cpp2regex.h2" +#line 634 "cpp2regex.h2" template [[nodiscard]] auto range_token_matcher::is_below_lower_bound(cpp2::impl::in count) -> bool{ if (-1 == min_count) {return false; } else {return cpp2::impl::cmp_less(count,min_count); } } -#line 532 "cpp2regex.h2" +#line 639 "cpp2regex.h2" template [[nodiscard]] auto range_token_matcher::is_in_range(cpp2::impl::in count) -> bool{ if (-1 != min_count && cpp2::impl::cmp_less(count,min_count)) {return false; } if (-1 != max_count && cpp2::impl::cmp_greater(count,max_count)) {return false; } return true; } -#line 538 "cpp2regex.h2" +#line 645 "cpp2regex.h2" template template [[nodiscard]] auto range_token_matcher::match_min_count(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, int& count_r) -> auto { // TODO: count_r as out parameter introduces a performance loss. auto res {ctx.pass(cur)}; @@ -992,7 +1227,7 @@ template [[nodiscard]] auto lookahead_token_match return res; } -#line 554 "cpp2regex.h2" +#line 661 "cpp2regex.h2" template template [[nodiscard]] auto range_token_matcher::match_greedy(cpp2::impl::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return { auto inner_call {[_0 = (count + 1), _1 = (cur), _2 = (inner), _3 = (reset_func), _4 = (end_func), _5 = (other)](auto const& tail_cur, auto& tail_ctx) -> auto{ @@ -1023,7 +1258,7 @@ template [[nodiscard]] auto lookahead_token_match return r; } -#line 584 "cpp2regex.h2" +#line 691 "cpp2regex.h2" template template [[nodiscard]] auto range_token_matcher::match_possessive(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return { auto count {0}; @@ -1052,7 +1287,7 @@ template [[nodiscard]] auto lookahead_token_match return other(cpp2::move(pos), ctx, end_func); } -#line 612 "cpp2regex.h2" +#line 719 "cpp2regex.h2" template template [[nodiscard]] auto range_token_matcher::match_not_greedy(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return { auto count {0}; @@ -1080,20 +1315,20 @@ template [[nodiscard]] auto lookahead_token_match return other(cpp2::move(pos), ctx, end_func); // Upper bound reached. } -#line 645 "cpp2regex.h2" +#line 752 "cpp2regex.h2" template [[nodiscard]] auto word_boundary_token_matcher(auto& cur, auto& ctx) -> bool { word_class words {}; auto is_match {false}; - if (cur == ctx.begin) {// String start + if (cur == ctx.begin) {// Iteration start if (cur != ctx.end) {// No empty string is_match = cpp2::move(words).includes(*cpp2::impl::assert_not_null(cur)); } } - else {if (cur == ctx.end) {// String end + else {if (cur == ctx.end) {// Iteration end is_match = cpp2::move(words).includes(*cpp2::impl::assert_not_null((cur - 1))); } - else { // Middle of string + else { // Middle of iteration is_match = (words.includes(*cpp2::impl::assert_not_null((cur - 1))) && !(words.includes(*cpp2::impl::assert_not_null(cur)))) // End of word: \w\W || (!(words.includes(*cpp2::impl::assert_not_null((cur - 1)))) && words.includes(*cpp2::impl::assert_not_null(cur)));// Start of word: \W\w @@ -1105,70 +1340,127 @@ template [[nodiscard]] auto word_boundary_token_mat return is_match; } -#line 689 "cpp2regex.h2" - template template regular_expression::search_return::search_return(cpp2::impl::in matched_, context const& ctx_, Iter const& pos_) +#line 795 "cpp2regex.h2" + template template regular_expression::search_return::search_return(cpp2::impl::in matched_, context const& ctx_, Iter const& pos_) : matched{ matched_ } , ctx{ ctx_ } , pos{ cpp2::unchecked_narrow(std::distance(ctx_.begin, pos_)) }{ -#line 693 "cpp2regex.h2" +#line 799 "cpp2regex.h2" } -#line 695 "cpp2regex.h2" - template template [[nodiscard]] auto regular_expression::search_return::group_number() const& -> decltype(auto) { return ctx.size(); } -#line 696 "cpp2regex.h2" - template template [[nodiscard]] auto regular_expression::search_return::group(cpp2::impl::in g) const& -> decltype(auto) { return ctx.get_group_string(g); } -#line 697 "cpp2regex.h2" - template template [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::impl::in g) const& -> decltype(auto) { return ctx.get_group_start(g); } -#line 698 "cpp2regex.h2" - template template [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::impl::in g) const& -> decltype(auto) { return ctx.get_group_end(g); } - -#line 700 "cpp2regex.h2" - template template [[nodiscard]] auto regular_expression::search_return::group(cpp2::impl::in> g) const& -> decltype(auto) { return group(get_group_id(g)); } -#line 701 "cpp2regex.h2" - template template [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::impl::in> g) const& -> decltype(auto) { return group_start(get_group_id(g)); } -#line 702 "cpp2regex.h2" - template template [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::impl::in> g) const& -> decltype(auto) { return group_end(get_group_id(g)); } - -#line 704 "cpp2regex.h2" - template template [[nodiscard]] auto regular_expression::search_return::get_group_id(cpp2::impl::in> g) const& -> auto{ - auto group_id {matcher::get_named_group_index(g)}; +#line 801 "cpp2regex.h2" + template template regular_expression::search_return::search_return(Iter const& begin, Iter const& end) + : matched{ false } + , ctx{ begin, end } + , pos{ 0 }{ + +#line 805 "cpp2regex.h2" + } + +#line 807 "cpp2regex.h2" + template template [[nodiscard]] auto regular_expression::search_return::group_number() const& -> decltype(auto) { return ctx.size(); } +#line 808 "cpp2regex.h2" + template template [[nodiscard]] auto regular_expression::search_return::group(cpp2::impl::in g) const& -> decltype(auto) { return ctx.get_group_string(g); } +#line 809 "cpp2regex.h2" + template template [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::impl::in g) const& -> decltype(auto) { return ctx.get_group_start(g); } +#line 810 "cpp2regex.h2" + template template [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::impl::in g) const& -> decltype(auto) { return ctx.get_group_end(g); } + +#line 812 "cpp2regex.h2" + template template [[nodiscard]] auto regular_expression::search_return::group(cpp2::impl::in> g) const& -> decltype(auto) { return group(get_group_id(g)); } +#line 813 "cpp2regex.h2" + template template [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::impl::in> g) const& -> decltype(auto) { return group_start(get_group_id(g)); } +#line 814 "cpp2regex.h2" + template template [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::impl::in> g) const& -> decltype(auto) { return group_end(get_group_id(g)); } + +#line 816 "cpp2regex.h2" + template template auto regular_expression::search_return::update(cpp2::impl::in> r) & -> void{ + matched = r.matched; + pos = cpp2::unchecked_narrow(std::distance(ctx.begin, r.pos)); + } + +#line 821 "cpp2regex.h2" + template template [[nodiscard]] auto regular_expression::search_return::get_group_id(cpp2::impl::in> g) const& -> auto{ + auto group_id {matcher::get_named_group_index(g)}; if (-1 == group_id) { // TODO: Throw error. } return group_id; } -#line 713 "cpp2regex.h2" - template [[nodiscard]] auto regular_expression::match(cpp2::impl::in> str) const& -> decltype(auto) { return match(str.begin(), str.end()); } -#line 714 "cpp2regex.h2" - template [[nodiscard]] auto regular_expression::match(cpp2::impl::in> str, auto const& start) const& -> decltype(auto) { return match(get_iter(str, start), str.end()); } -#line 715 "cpp2regex.h2" - template [[nodiscard]] auto regular_expression::match(cpp2::impl::in> str, auto const& start, auto const& length) const& -> decltype(auto) { return match(get_iter(str, start), get_iter(str, start + length)); } -#line 716 "cpp2regex.h2" - template template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return +#line 830 "cpp2regex.h2" + template [[nodiscard]] auto regular_expression::find_all(auto&& func, cpp2::impl::in> str) const& -> decltype(auto) { return find_all(CPP2_FORWARD(func), str.begin(), str.end()); } +#line 831 "cpp2regex.h2" + template [[nodiscard]] auto regular_expression::find_all(auto&& func, cpp2::impl::in> str, cpp2::impl::in start) const& -> decltype(auto) { return find_all(CPP2_FORWARD(func), get_iter(str, start), str.end()); } +#line 832 "cpp2regex.h2" + template [[nodiscard]] auto regular_expression::find_all(auto&& func, cpp2::impl::in> str, cpp2::impl::in start, cpp2::impl::in length) const& -> decltype(auto) { return find_all(CPP2_FORWARD(func), get_iter(str, start), get_iter(str, start + length)); } +#line 833 "cpp2regex.h2" + template template auto regular_expression::find_all(auto const& func, Iter const& start, Iter const& end) const& -> void + { + auto sr {search_return(start, end)}; + auto cont {true}; + auto cur {start}; + + while( cont ) { + auto r {search_with_context(sr.ctx, cur)}; + cont = r.matched; // First update the continue so that the user can override it. + + if (r.matched) { + sr.update(cpp2::move(r)); + cont = func(sr); + } + + if (cont) { + // Prevent infinity loop for zero length match. + cont = 0 != sr.ctx.get_group_end(0) - sr.ctx.get_group_start(0); + } + + // Check now if to continue, user may override + if (cont) { + cur = start + sr.ctx.get_group_end(0); + CPP2_UFCS(reset)(sr.ctx); + } + } + } + +#line 861 "cpp2regex.h2" + template [[nodiscard]] auto regular_expression::match(cpp2::impl::in> str) const& -> decltype(auto) { return match(str.begin(), str.end()); } +#line 862 "cpp2regex.h2" + template [[nodiscard]] auto regular_expression::match(cpp2::impl::in> str, auto const& start) const& -> decltype(auto) { return match(get_iter(str, start), str.end()); } +#line 863 "cpp2regex.h2" + template [[nodiscard]] auto regular_expression::match(cpp2::impl::in> str, auto const& start, auto const& length) const& -> decltype(auto) { return match(get_iter(str, start), get_iter(str, start + length)); } +#line 864 "cpp2regex.h2" + template template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return { context ctx {start, end}; - auto r {matcher::entry(start, ctx)}; + auto r {matcher::entry(start, ctx)}; return search_return(r.matched && r.pos == end, cpp2::move(ctx), r.pos); } -#line 724 "cpp2regex.h2" - template [[nodiscard]] auto regular_expression::search(cpp2::impl::in> str) const& -> decltype(auto) { return search(str.begin(), str.end()); } -#line 725 "cpp2regex.h2" - template [[nodiscard]] auto regular_expression::search(cpp2::impl::in> str, auto const& start) const& -> decltype(auto) { return search(get_iter(str, start), str.end()); } -#line 726 "cpp2regex.h2" - template [[nodiscard]] auto regular_expression::search(cpp2::impl::in> str, auto const& start, auto const& length) const& -> decltype(auto) { return search(get_iter(str, start), get_iter(str, start + length)); } -#line 727 "cpp2regex.h2" - template template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return +#line 872 "cpp2regex.h2" + template [[nodiscard]] auto regular_expression::search(cpp2::impl::in> str) const& -> decltype(auto) { return search(str.begin(), str.end()); } +#line 873 "cpp2regex.h2" + template [[nodiscard]] auto regular_expression::search(cpp2::impl::in> str, auto const& start) const& -> decltype(auto) { return search(get_iter(str, start), str.end()); } +#line 874 "cpp2regex.h2" + template [[nodiscard]] auto regular_expression::search(cpp2::impl::in> str, auto const& start, auto const& length) const& -> decltype(auto) { return search(get_iter(str, start), get_iter(str, start + length)); } +#line 875 "cpp2regex.h2" + template template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return { context ctx {start, end}; + auto r {search_with_context(ctx, start)}; + return search_return(r.matched, cpp2::move(ctx), cpp2::move(r).pos); + } + +#line 882 "cpp2regex.h2" + template template [[nodiscard]] auto regular_expression::search_with_context(context& ctx, Iter const& start) const& -> match_return + { auto r {ctx.fail()}; auto cur {start}; for( ; true; (++cur) ) { - r = matcher::entry(cur, ctx); + r = matcher::entry(cur, ctx); if (r.matched) { break; } @@ -1176,16 +1468,20 @@ template [[nodiscard]] auto word_boundary_token_mat if (cur == ctx.end) { break; } + + if (matcher::is_start_match()) { + break; // Always break with \G option. + } } - return search_return(r.matched, cpp2::move(ctx), cpp2::move(r).pos); + return r; } -#line 747 "cpp2regex.h2" - template [[nodiscard]] auto regular_expression::to_string() const& -> decltype(auto) { return matcher_wrapper::to_string(); } +#line 907 "cpp2regex.h2" + template [[nodiscard]] auto regular_expression::to_string() const& -> decltype(auto) { return matcher::to_string(); } -#line 751 "cpp2regex.h2" - template [[nodiscard]] auto regular_expression::get_iter(cpp2::impl::in> str, auto const& pos) -> auto{ +#line 911 "cpp2regex.h2" + template [[nodiscard]] auto regular_expression::get_iter(cpp2::impl::in> str, auto const& pos) -> auto{ if (cpp2::impl::cmp_less(pos,str.size())) { return str.begin() + pos; } @@ -1194,7 +1490,7 @@ template [[nodiscard]] auto word_boundary_token_mat } } -#line 761 "cpp2regex.h2" +#line 921 "cpp2regex.h2" } } diff --git a/include/cpp2regex.h2 b/include/cpp2regex.h2 index 41d699903..1b66692dc 100644 --- a/include/cpp2regex.h2 +++ b/include/cpp2regex.h2 @@ -1,14 +1,9 @@ -// Copyright (c) Herb Sutter -// SPDX-License-Identifier: CC-BY-NC-ND-4.0 - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. +// Copyright 2022-2026 Herb Sutter +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +// Part of the Cppfront Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://github.com/hsutter/cppfront/blob/main/LICENSE for license information. //=========================================================================== @@ -18,11 +13,9 @@ #ifndef CPP2_CPP2REGEX_H #define CPP2_CPP2REGEX_H -template -using matcher_wrapper_type = typename matcher_wrapper::template wrap; -template -using matcher_context_type = typename matcher::context; +template +using matcher_context_type = typename matcher::template context; cpp2: namespace = { @@ -72,6 +65,11 @@ match_context: type = operator=: (out this, that) = {} + // String end and start positions + // + get_string_start: (in this) = begin; + get_string_end: (in this) = end; + // Getter and setter for groups // get_group: (in this, group) = groups[group]; @@ -114,8 +112,82 @@ match_context: type = // fail: (in this) = match_return(false, end); pass: (in this, cur: Iter) = match_return(true, cur); + + reset: (inout this) = { + for groups do (inout g) { + g.matched = false; + } + } +} + +// Wrapper of context for reverse matches. Implements only the minimal interface for matching. +// +reverse_match_context: type = +{ + public ReverseIter : type == std::reverse_iterator; + public forward_context : *match_context; + + public begin : ReverseIter; + public end : ReverseIter; + + operator=: (out this, forward_context_) = { + forward_context = forward_context_; + begin = std::make_reverse_iterator(forward_context*.end); + end = std::make_reverse_iterator(forward_context*.begin); + } + + operator=: (out this, that) = {} + + // String end and start positions + // + get_string_start: (in this) = end; + get_string_end: (in this) = begin; + + // Getter and setter for groups + // + set_group_end: (inout this, group, pos) = { + forward_context*..set_group_end(group, (pos).base()); + } + + set_group_invalid: (inout this, group) = { + forward_context*..set_group_invalid(group); + } + + set_group_start: (inout this, group, pos) = { + forward_context*..set_group_start(group, (pos).base()); + } + + // Misc functions + // + fail: (in this) = match_return(false, end); + pass: (in this, cur: ReverseIter) = match_return(true, cur); +} + +// Helpers for creating wrappers of the match context. +// +make_forward_match_context: (inout ctx: match_context) -> forward _ = { + return ctx; +} + +make_forward_match_context: (inout ctx: reverse_match_context) -> forward _ = { + return ctx.forward_context*; } +make_reverse_match_context: (inout ctx: match_context) -> _ = { + return reverse_match_context(ctx&); +} + +make_reverse_match_context: (inout ctx: reverse_match_context) -> forward _ = { + return ctx; +} + +// Helpers for creating wrappers of the iterators. +// +cpp2_make_forward_iterator: (pos: Iter) -> _ = pos; +cpp2_make_forward_iterator: (pos: std::reverse_iterator) -> _ = pos.base(); +cpp2_make_reverse_iterator: (pos: Iter) -> _ = std::make_reverse_iterator(pos); +cpp2_make_reverse_iterator: (pos: std::reverse_iterator) -> _ = pos; + // End function that returns a valid match. // @@ -302,6 +374,19 @@ any_token_matcher: (inout cur, inout ctx) -> bool = return false; } +// Regex syntax: (?>) Example: a(?>bc|c)c +// +atomic_group_matcher: (cur: Iter, inout ctx, inner, end_func, other) -> _ = +{ + r := inner(cur, ctx, true_end_func()); + + if r.matched { + r = other(r.pos, ctx, end_func); + } + + return r; +} + // TODO: Check if vectorization works at some point with this implementation. // char_token_matcher: (inout cur, inout ctx) -> bool = { @@ -419,15 +504,23 @@ named_class_not_word : type == class_token_ // \k // \k'name_or_number' // -group_ref_token_matcher: (inout cur, inout ctx) -> bool = +group_ref_token_matcher: (inout cur, inout ctx) -> bool = { g := ctx..get_group(group); group_pos := g.start; + group_end := g.end; + group_inc : int = 1; + if reverse { + group_pos = g.end; + group_end = g.start; + group_inc = -1; + } + while - group_pos != g.end + group_pos != group_end && cur != ctx.end - next (group_pos++, cur++) + next (group_pos += group_inc, cur++) { if constexpr case_insensitive { if string_util::safe_tolower(group_pos*) != string_util::safe_tolower(cur*) { @@ -441,7 +534,7 @@ group_ref_token_matcher: (inout cur, } } - if group_pos == g.end { + if group_pos == group_end { return true; } else { @@ -452,12 +545,12 @@ group_ref_token_matcher: (inout cur, // Regex syntax: $ Example: aa$ // -line_end_token_matcher: (cur, inout ctx) -> bool = +line_end_token_matcher: (cur, inout ctx) -> bool = { - if cur == ctx.end || (match_new_line && cur* == '\n') { + if cur == ctx.get_string_end() || (match_new_line && cur* == '\n') { return true; } - else if match_new_line_before_end && (cur* == '\n' && (cur + 1) == ctx.end) { // Special case for new line at end. + else if match_new_line_before_end && (cur* == '\n' && (cur + 1) == ctx.get_string_end()) { // Special case for new line at end. return true; } else { @@ -468,9 +561,9 @@ line_end_token_matcher: (cur, inout ctx) -> bool = +line_start_token_matcher: (cur, inout ctx) -> bool = { - return cur == ctx.begin || // Start of string + return cur == ctx.get_string_start() || // Start of string (match_new_line && (cur - 1)* == '\n'); // Start of new line } @@ -479,9 +572,23 @@ line_start_token_matcher: (cur, inout ctx) -> bool // // Parsed in group_token. // -lookahead_token_matcher: (cur, inout ctx, func) -> bool = +lookahead_token_matcher: (cur, inout ctx, func) -> bool = +{ + r := func(cpp2_make_forward_iterator(cur), make_forward_match_context(ctx), true_end_func()); + if !positive { + r.matched = !r.matched; + } + + return r.matched; +} + +// Regex syntax: (?<=) or (? (cur, inout ctx, func) -> bool = { - r := func(cur, ctx, true_end_func()); + r := func(cpp2_make_reverse_iterator(cur), make_reverse_match_context(ctx), true_end_func()); if !positive { r.matched = !r.matched; } @@ -503,10 +610,10 @@ range_flags: type = { // Regex syntax: {min, max} Example: a{2,4} // -range_token_matcher: type = +range_token_matcher: type = { - match: (cur: Iter, inout ctx, inner, reset_func, end_func, tail) -> _ = + match: (cur: Iter, inout ctx, inner, reset_func, end_func, tail) -> _ = { if range_flags::possessive == kind { return match_possessive(cur, ctx, inner, end_func, tail); @@ -646,15 +753,15 @@ word_boundary_token_matcher: (inout cur, inout ctx) -> boo { words : word_class = (); is_match := false; - if cur == ctx.begin { // String start + if cur == ctx.begin { // Iteration start if cur != ctx.end { // No empty string is_match = words..includes(cur*); } } - else if cur == ctx.end { // String end + else if cur == ctx.end { // Iteration end is_match = words..includes((cur - 1)*); } - else { // Middle of string + else { // Middle of iteration is_match = (words..includes((cur - 1)*) && !words..includes(cur*)) // End of word: \w\W || (!words..includes((cur - 1)*) && words..includes(cur*)); // Start of word: \W\w @@ -675,10 +782,9 @@ word_boundary_token_matcher: (inout cur, inout ctx) -> boo // // Regular expression implementation -regular_expression: type = +regular_expression: type = { - matcher: type == matcher_wrapper_type; // TODO: Remove when nested types are allowed: https://github.com/hsutter/cppfront/issues/727 - context: type == matcher_context_type>; // TODO: Remove when nested types are allowed: https://github.com/hsutter/cppfront/issues/727 + context: type == matcher_context_type; // TODO: Remove when nested types are allowed: https://github.com/hsutter/cppfront/issues/727 search_return: type = { @@ -692,6 +798,12 @@ regular_expression: type = pos = unchecked_narrow(std::distance(ctx_.begin, pos_)); } + operator=:(out this, begin: Iter, end: Iter) = { + matched = false; + ctx = (begin, end); + pos = 0; + } + group_number: (this) = ctx..size(); group: (this, g: int) = ctx..get_group_string(g); group_start: (this, g: int) = ctx..get_group_start(g); @@ -701,8 +813,13 @@ regular_expression: type = group_start: (this, g: bstring) = group_start(get_group_id(g)); group_end: (this, g: bstring) = group_end(get_group_id(g)); + update: (inout this, r: match_return) = { + matched = r.matched; + pos = unchecked_narrow(std::distance(ctx.begin, r.pos)); + } + private get_group_id: (this, g: bstring) -> _ = { - group_id := matcher::get_named_group_index(g); + group_id := matcher::get_named_group_index(g); if -1 == group_id { // TODO: Throw error. } @@ -710,6 +827,37 @@ regular_expression: type = } } + find_all: (in this, forward func, str: bview) = find_all(func, str..begin(), str..end()); + find_all: (in this, forward func, str: bview, start: int) = find_all(func, get_iter(str, start), str..end()); + find_all: (in this, forward func, str: bview, start: int, length : int) = find_all(func, get_iter(str, start), get_iter(str, start + length)); + find_all: (in this, func, start: Iter, end: Iter) = + { + sr := search_return(start, end); + cont := true; + cur := start; + + while cont { + r := search_with_context(sr.ctx, cur); + cont = r.matched; // First update the continue so that the user can override it. + + if r.matched { + sr..update(r); + cont = func(sr); + } + + if cont { + // Prevent infinity loop for zero length match. + cont = 0 != sr.ctx..get_group_end(0) - sr.ctx..get_group_start(0); + } + + // Check now if to continue, user may override + if cont { + cur = start + sr.ctx..get_group_end(0); + sr.ctx.reset(); + } + } + } + match: (in this, str: bview) = match(str..begin(), str..end()); match: (in this, str: bview, start) = match(get_iter(str, start), str..end()); match: (in this, str: bview, start, length) = match(get_iter(str, start), get_iter(str, start + length)); @@ -717,21 +865,27 @@ regular_expression: type = { ctx: context = (start, end); - r := matcher::entry(start, ctx); + r := matcher::entry(start, ctx); return search_return(r.matched && r.pos == end, ctx, r.pos); } search: (in this, str: bview) = search(str..begin(), str..end()); search: (in this, str: bview, start) = search(get_iter(str, start), str..end()); search: (in this, str: bview, start, length) = search(get_iter(str, start), get_iter(str, start + length)); - search: (in this, start: Iter, end: Iter) -> search_return = + search: (in this, start: Iter, end: Iter) -> search_return = { ctx: context = (start, end); + r := search_with_context(ctx, start); + return search_return(r.matched, ctx, r.pos); + } + + private search_with_context: (in this, inout ctx: context, start: Iter) -> match_return = + { r := ctx..fail(); cur:= start; while true next (cur++) { - r = matcher::entry(cur, ctx); + r = matcher::entry(cur, ctx); if r.matched { break; } @@ -739,12 +893,18 @@ regular_expression: type = if cur == ctx.end { break; } + + if matcher::is_start_match() { + break; // Always break with \G option. + } } - return search_return(r.matched, ctx, r.pos); + return r; } - to_string: (in this) = matcher_wrapper::to_string(); + + + to_string: (in this) = matcher::to_string(); // Helper functions // diff --git a/include/cpp2taylor.h b/include/cpp2taylor.h new file mode 100644 index 000000000..34ab94f52 --- /dev/null +++ b/include/cpp2taylor.h @@ -0,0 +1,521 @@ + +#ifndef CPP2TAYLOR_H_CPP2 +#define CPP2TAYLOR_H_CPP2 + + +//=== Cpp2 type declarations ==================================================== + + +#include "cpp2util.h" + +#line 1 "cpp2taylor.h2" + +#line 4 "cpp2taylor.h2" +namespace cpp2 { + +template class taylor; + + +#line 257 "cpp2taylor.h2" +} + + +//=== Cpp2 type definitions and function declarations =========================== + +#line 1 "cpp2taylor.h2" +#ifndef CPP2_CPP2TAYLOR_H +#define CPP2_CPP2TAYLOR_H + +#line 4 "cpp2taylor.h2" +namespace cpp2 { + +template class taylor { + public: std::array v {}; + + public: explicit taylor(); + public: taylor(R const& d1); +#line 10 "cpp2taylor.h2" + public: auto operator=(R const& d1) -> taylor& ; + +#line 14 "cpp2taylor.h2" + public: taylor(taylor const& that); +#line 14 "cpp2taylor.h2" + public: auto operator=(taylor const& that) -> taylor& ; +#line 14 "cpp2taylor.h2" + public: taylor(taylor&& that) noexcept; +#line 14 "cpp2taylor.h2" + public: auto operator=(taylor&& that) noexcept -> taylor& ; + + public: taylor(std::initializer_list const& l); +#line 16 "cpp2taylor.h2" + public: auto operator=(std::initializer_list const& l) -> taylor& ; + +#line 23 "cpp2taylor.h2" + // C++ interface + + public: [[nodiscard]] auto operator[](cpp2::impl::in k) const& -> R; + +#line 35 "cpp2taylor.h2" + public: auto set(cpp2::impl::in k, cpp2::impl::in value) & -> void; + +#line 45 "cpp2taylor.h2" + // C++2 interface / AD interface + + public: [[nodiscard]] auto get(cpp2::impl::in i, cpp2::impl::in v0) const& -> R; + +#line 58 "cpp2taylor.h2" + // Overload for reverse AD. + public: auto operator+=(cpp2::impl::in o) & -> auto&&; + +#line 64 "cpp2taylor.h2" + // Overload for reverse AD. + public: auto operator-=(cpp2::impl::in o) & -> auto&&; + +#line 70 "cpp2taylor.h2" + // Overload for simple handling of connected adds. + public: [[nodiscard]] auto operator+(cpp2::impl::in o) const& -> taylor; + +#line 75 "cpp2taylor.h2" + // Overload for simple handling of connected minuses. + public: [[nodiscard]] auto operator-(cpp2::impl::in o) const& -> taylor; + +#line 80 "cpp2taylor.h2" + // Overload for simple handling of prefix +. + public: [[nodiscard]] auto operator+() const& -> taylor; + +#line 85 "cpp2taylor.h2" + // Overload for simple handling of prefix -. + public: [[nodiscard]] auto operator-() const& -> taylor; + +#line 97 "cpp2taylor.h2" + public: [[nodiscard]] auto add(cpp2::impl::in o, cpp2::impl::in v0, cpp2::impl::in o0) const& -> taylor; + +#line 108 "cpp2taylor.h2" + public: [[nodiscard]] auto sub(cpp2::impl::in o, cpp2::impl::in v0, cpp2::impl::in o0) const& -> taylor; + +#line 119 "cpp2taylor.h2" + public: template [[nodiscard]] auto mul(taylor const& o, cpp2::impl::in v0, cpp2::impl::in o0) const& -> taylor; + +#line 133 "cpp2taylor.h2" + public: [[nodiscard]] auto div(cpp2::impl::in o, cpp2::impl::in v0, cpp2::impl::in o0) const& -> taylor; + +#line 151 "cpp2taylor.h2" + public: [[nodiscard]] auto sqrt(cpp2::impl::in v0) const& -> taylor; + +#line 170 "cpp2taylor.h2" + public: [[nodiscard]] auto log(cpp2::impl::in v0) const& -> taylor; + +#line 189 "cpp2taylor.h2" + public: [[nodiscard]] auto exp(cpp2::impl::in v0) const& -> taylor; + +#line 208 "cpp2taylor.h2" + public: static auto comp_sin_cos(taylor& s, taylor& c, cpp2::impl::in u, cpp2::impl::in u0) -> void; + +#line 225 "cpp2taylor.h2" + public: [[nodiscard]] auto sin(cpp2::impl::in v0) const& -> taylor; + +#line 235 "cpp2taylor.h2" + public: [[nodiscard]] auto cos(cpp2::impl::in v0) const& -> taylor; + +#line 244 "cpp2taylor.h2" +}; + +template [[nodiscard]] auto to_string(taylor const& o) -> std::string; + +#line 257 "cpp2taylor.h2" +} // cpp2 namespace + +#endif // CPP2_CPP2TAYLOR_H + + +//=== Cpp2 function definitions ================================================= + +#line 1 "cpp2taylor.h2" + +#line 4 "cpp2taylor.h2" +namespace cpp2 { + +#line 9 "cpp2taylor.h2" + template taylor::taylor(){} +#line 10 "cpp2taylor.h2" + template taylor::taylor(R const& d1) + : v{ }{ + +#line 12 "cpp2taylor.h2" + CPP2_ASSERT_IN_BOUNDS_LITERAL(v, 0) = d1; + } +#line 10 "cpp2taylor.h2" + template auto taylor::operator=(R const& d1) -> taylor& { + v = {}; + +#line 12 "cpp2taylor.h2" + CPP2_ASSERT_IN_BOUNDS_LITERAL(v, 0) = d1; + return *this; +#line 13 "cpp2taylor.h2" + } +#line 14 "cpp2taylor.h2" + template taylor::taylor(taylor const& that) + : v{ that.v }{} +#line 14 "cpp2taylor.h2" + template auto taylor::operator=(taylor const& that) -> taylor& { + v = that.v; + return *this; } +#line 14 "cpp2taylor.h2" + template taylor::taylor(taylor&& that) noexcept + : v{ std::move(that).v }{} +#line 14 "cpp2taylor.h2" + template auto taylor::operator=(taylor&& that) noexcept -> taylor& { + v = std::move(that).v; + return *this; } + +#line 16 "cpp2taylor.h2" + template taylor::taylor(std::initializer_list const& l){ +{ +auto i{1}; + +#line 18 "cpp2taylor.h2" + for ( auto const& cur : l ) { + set(i, cur); + } +} +#line 21 "cpp2taylor.h2" + } +#line 16 "cpp2taylor.h2" + template auto taylor::operator=(std::initializer_list const& l) -> taylor& { + v = {}; +{ +auto i{1}; + +#line 18 "cpp2taylor.h2" + for ( auto const& cur : l ) { + set(i, cur); + } +} + return *this; +#line 21 "cpp2taylor.h2" + } + +#line 25 "cpp2taylor.h2" + template [[nodiscard]] auto taylor::operator[](cpp2::impl::in k) const& -> R{ + if (cpp2::cpp2_default.is_active() && !([_0 = 1, _1 = k, _2 = dim]{ return cpp2::impl::cmp_less_eq(_0,_1) && cpp2::impl::cmp_less_eq(_1,_2); }()) ) { cpp2::cpp2_default.report_violation(""); } + R r {CPP2_ASSERT_IN_BOUNDS(v, k - 1)}; +{ +auto i{2}; + +#line 29 "cpp2taylor.h2" + for( ; cpp2::impl::cmp_less_eq(i,k); i += 1 ) { + r *= i; + } +} +#line 32 "cpp2taylor.h2" + return r; + } + +#line 35 "cpp2taylor.h2" + template auto taylor::set(cpp2::impl::in k, cpp2::impl::in value) & -> void{ + if (cpp2::cpp2_default.is_active() && !([_0 = 1, _1 = k, _2 = dim]{ return cpp2::impl::cmp_less_eq(_0,_1) && cpp2::impl::cmp_less_eq(_1,_2); }()) ) { cpp2::cpp2_default.report_violation(""); } + CPP2_ASSERT_IN_BOUNDS(v, k - 1) = value; +{ +auto i{2}; + +#line 40 "cpp2taylor.h2" + for( ; cpp2::impl::cmp_less_eq(i,k); i += 1 ) { + CPP2_ASSERT_IN_BOUNDS(v, k - 1) /= CPP2_ASSERT_NOT_ZERO(CPP2_TYPEOF(CPP2_ASSERT_IN_BOUNDS(v, k - 1)),i); + } +} +#line 43 "cpp2taylor.h2" + } + +#line 47 "cpp2taylor.h2" + template [[nodiscard]] auto taylor::get(cpp2::impl::in i, cpp2::impl::in v0) const& -> R{ + if (i == 0) { + return v0; + } + else {if (cpp2::impl::cmp_greater(i,dim)) { + return 0.0; + }} + + return CPP2_ASSERT_IN_BOUNDS(v, i - 1); + } + +#line 59 "cpp2taylor.h2" + template auto taylor::operator+=(cpp2::impl::in o) & -> auto&&{ + (*this) = (*this) + o; + return (*this); + } + +#line 65 "cpp2taylor.h2" + template auto taylor::operator-=(cpp2::impl::in o) & -> auto&&{ + (*this) = (*this) - o; + return (*this); + } + +#line 71 "cpp2taylor.h2" + template [[nodiscard]] auto taylor::operator+(cpp2::impl::in o) const& -> taylor{ + return add(o, 0.0, 0.0); // Primal values are not required. + } + +#line 76 "cpp2taylor.h2" + template [[nodiscard]] auto taylor::operator-(cpp2::impl::in o) const& -> taylor{ + return sub(o, 0.0, 0.0); // Primal values are not required. + } + +#line 81 "cpp2taylor.h2" + template [[nodiscard]] auto taylor::operator+() const& -> taylor{ + return (*this); + } + +#line 86 "cpp2taylor.h2" + template [[nodiscard]] auto taylor::operator-() const& -> taylor{ + taylor r {}; +{ +auto k{1}; + +#line 90 "cpp2taylor.h2" + for( ; cpp2::impl::cmp_less_eq(k,dim); k += 1 ) { + CPP2_ASSERT_IN_BOUNDS(r.v, k - 1) = -CPP2_ASSERT_IN_BOUNDS(v, k - 1); + } +} + +#line 94 "cpp2taylor.h2" + return r; + } + +#line 97 "cpp2taylor.h2" + template [[nodiscard]] auto taylor::add(cpp2::impl::in o, cpp2::impl::in v0, cpp2::impl::in o0) const& -> taylor{ + taylor r {}; +{ +auto k{1}; + +#line 101 "cpp2taylor.h2" + for( ; cpp2::impl::cmp_less_eq(k,dim); k += 1 ) { + CPP2_ASSERT_IN_BOUNDS(r.v, k - 1) = get(k, v0) + CPP2_UFCS(get)(o, k, o0); + } +} + +#line 105 "cpp2taylor.h2" + return r; + } + +#line 108 "cpp2taylor.h2" + template [[nodiscard]] auto taylor::sub(cpp2::impl::in o, cpp2::impl::in v0, cpp2::impl::in o0) const& -> taylor{ + taylor r {}; +{ +auto k{1}; + +#line 112 "cpp2taylor.h2" + for( ; cpp2::impl::cmp_less_eq(k,dim); k += 1 ) { + CPP2_ASSERT_IN_BOUNDS(r.v, k - 1) = get(k, v0) - CPP2_UFCS(get)(o, k, o0); + } +} + +#line 116 "cpp2taylor.h2" + return r; + } + +#line 119 "cpp2taylor.h2" + template template [[nodiscard]] auto taylor::mul(taylor const& o, cpp2::impl::in v0, cpp2::impl::in o0) const& -> taylor{ + int constexpr dim_r{ std::max(dim, dim_o) }; + taylor r {}; +{ +auto k{1}; + +#line 124 "cpp2taylor.h2" + for( ; cpp2::impl::cmp_less_eq(k,dim_r); k += 1 ) { +{ +auto j{0}; + +#line 126 "cpp2taylor.h2" + for( ; cpp2::impl::cmp_less_eq(j,k); j += 1 ) { + CPP2_ASSERT_IN_BOUNDS(r.v, k - 1) += get(j, v0) * o.get(k - j, o0); + } +} +#line 129 "cpp2taylor.h2" + } +} +#line 130 "cpp2taylor.h2" + return r; + } + +#line 133 "cpp2taylor.h2" + template [[nodiscard]] auto taylor::div(cpp2::impl::in o, cpp2::impl::in v0, cpp2::impl::in o0) const& -> taylor{ + taylor r {}; + R r0 {v0 / CPP2_ASSERT_NOT_ZERO(CPP2_TYPEOF(v0),o0)}; + + R factor {1.0 / CPP2_ASSERT_NOT_ZERO(CPP2_TYPEOF(1.0),o0)}; +{ +auto k{1}; + +#line 140 "cpp2taylor.h2" + for( ; cpp2::impl::cmp_less_eq(k,dim); k += 1 ) { + CPP2_ASSERT_IN_BOUNDS(r.v, k - 1) = get(k, v0); +{ +auto j{0}; + +#line 143 "cpp2taylor.h2" + for( ; cpp2::impl::cmp_less(j,k); j += 1 ) { + CPP2_ASSERT_IN_BOUNDS(r.v, k - 1) -= CPP2_UFCS(get)(r, j, r0) * o.get(k - j, o0); + } +} +#line 146 "cpp2taylor.h2" + CPP2_ASSERT_IN_BOUNDS(r.v, k - 1) *= factor; + } +} +#line 148 "cpp2taylor.h2" + return r; + } + +#line 151 "cpp2taylor.h2" + template [[nodiscard]] auto taylor::sqrt(cpp2::impl::in v0) const& -> taylor{ + taylor r {}; + R r0 {std::sqrt(v0)}; + + R factor {0.5 / CPP2_ASSERT_NOT_ZERO(CPP2_TYPEOF(0.5),r0)}; +{ +auto k{1}; + +#line 158 "cpp2taylor.h2" + for( ; cpp2::impl::cmp_less_eq(k,dim); k += 1 ) { + CPP2_ASSERT_IN_BOUNDS(r.v, k - 1) = get(k, v0); +{ +auto j{1}; + +#line 161 "cpp2taylor.h2" + for( ; cpp2::impl::cmp_less(j,k); j += 1 ) { + CPP2_ASSERT_IN_BOUNDS(r.v, k - 1) -= r.get(j, r0) * r.get(k - j, r0); + } +} +#line 164 "cpp2taylor.h2" + CPP2_ASSERT_IN_BOUNDS(r.v, k - 1) *= factor; + } +} + +#line 167 "cpp2taylor.h2" + return r; + } + +#line 170 "cpp2taylor.h2" + template [[nodiscard]] auto taylor::log(cpp2::impl::in v0) const& -> taylor{ + taylor r {}; + R r0 {std::log(v0)}; + + R factor {1.0 / CPP2_ASSERT_NOT_ZERO(CPP2_TYPEOF(1.0),v0)}; +{ +auto k{1}; + +#line 177 "cpp2taylor.h2" + for( ; cpp2::impl::cmp_less_eq(k,dim); k += 1 ) { + CPP2_ASSERT_IN_BOUNDS(r.v, k - 1) = k * get(k, v0); +{ +auto j{1}; + +#line 180 "cpp2taylor.h2" + for( ; cpp2::impl::cmp_less(j,k); j += 1 ) { + CPP2_ASSERT_IN_BOUNDS(r.v, k - 1) -= j * get(k - j, v0) * r.get(j, r0); + } +} +#line 183 "cpp2taylor.h2" + CPP2_ASSERT_IN_BOUNDS(r.v, k - 1) *= factor / CPP2_ASSERT_NOT_ZERO(CPP2_TYPEOF(factor),k); + } +} + +#line 186 "cpp2taylor.h2" + return r; + } + +#line 189 "cpp2taylor.h2" + template [[nodiscard]] auto taylor::exp(cpp2::impl::in v0) const& -> taylor{ + taylor r {}; + R r0 {std::exp(v0)}; + + R factor {1.0 / CPP2_ASSERT_NOT_ZERO(CPP2_TYPEOF(1.0),v0)}; +{ +auto k{1}; + +#line 196 "cpp2taylor.h2" + for( ; cpp2::impl::cmp_less_eq(k,dim); k += 1 ) { +{ +auto j{1}; + +#line 198 "cpp2taylor.h2" + for( ; cpp2::impl::cmp_less_eq(j,k); j += 1 ) { + CPP2_ASSERT_IN_BOUNDS(r.v, k - 1) += j * r.get(k - j, r0) * get(j, v0); + } +} +#line 201 "cpp2taylor.h2" + CPP2_ASSERT_IN_BOUNDS(r.v, k - 1) /= CPP2_ASSERT_NOT_ZERO(CPP2_TYPEOF(CPP2_ASSERT_IN_BOUNDS(r.v, k - 1)),k); + } +} + +#line 204 "cpp2taylor.h2" + return r; + } + +#line 208 "cpp2taylor.h2" + template auto taylor::comp_sin_cos(taylor& s, taylor& c, cpp2::impl::in u, cpp2::impl::in u0) -> void{ + R s0 {std::sin(u0)}; + R c0 {std::cos(u0)}; +{ +auto k{1}; + +#line 213 "cpp2taylor.h2" + for( ; cpp2::impl::cmp_less_eq(k,dim); k += 1 ) { +{ +auto j{1}; + +#line 215 "cpp2taylor.h2" + for( ; cpp2::impl::cmp_less_eq(j,k); j += 1 ) { + CPP2_ASSERT_IN_BOUNDS(s.v, k - 1) += j * u.get(j, u0) * c.get(k - j, c0); + CPP2_ASSERT_IN_BOUNDS(c.v, k - 1) -= j * u.get(j, u0) * s.get(k - j, s0); + } +} +#line 219 "cpp2taylor.h2" + CPP2_ASSERT_IN_BOUNDS(s.v, k - 1) /= CPP2_ASSERT_NOT_ZERO(CPP2_TYPEOF(CPP2_ASSERT_IN_BOUNDS(s.v, k - 1)),k); + CPP2_ASSERT_IN_BOUNDS(c.v, k - 1) /= CPP2_ASSERT_NOT_ZERO(CPP2_TYPEOF(CPP2_ASSERT_IN_BOUNDS(c.v, k - 1)),k); + } +} +#line 222 "cpp2taylor.h2" + } + +#line 225 "cpp2taylor.h2" + template [[nodiscard]] auto taylor::sin(cpp2::impl::in v0) const& -> taylor{ + taylor t {}; + taylor r {}; + + comp_sin_cos(r, t, (*this), v0); + static_cast(cpp2::move(t)); + + return r; + } + +#line 235 "cpp2taylor.h2" + template [[nodiscard]] auto taylor::cos(cpp2::impl::in v0) const& -> taylor{ + taylor t {}; + taylor r {}; + + comp_sin_cos(t, r, (*this), v0); + static_cast(cpp2::move(t)); + + return r; + } + +#line 246 "cpp2taylor.h2" +template [[nodiscard]] auto to_string(taylor const& o) -> std::string{ + std::string r {"("}; +{ +auto i{1}; + +#line 249 "cpp2taylor.h2" + for( ; cpp2::impl::cmp_less_eq(i,order); i += 1 ) { + r += " " + cpp2::to_string(CPP2_ASSERT_IN_BOUNDS(o, i)) + ""; + } +} +#line 252 "cpp2taylor.h2" + r += " )"; + + return r; +} + +} + +#endif diff --git a/include/cpp2taylor.h2 b/include/cpp2taylor.h2 new file mode 100644 index 000000000..cf7f79efe --- /dev/null +++ b/include/cpp2taylor.h2 @@ -0,0 +1,259 @@ +#ifndef CPP2_CPP2TAYLOR_H +#define CPP2_CPP2TAYLOR_H + +cpp2: namespace = { + +taylor: type = { + public v : std::array = (); + + operator=:(out this) = {} + operator=:(out this, d1: R) = { + v = (); + v[0] = d1; + } + operator=:(out this, that) = {} + + operator=:(out this, l: std::initializer_list) = { + (copy i := 1) + for l do (cur) { + set(i, cur); + } + } + + // C++ interface + + operator[]: (this, k: int) -> R = { + assert(1 <= k <= dim); + r: R = v[k - 1]; + (copy i := 2) + while i <= k next i += 1 { + r *= i; + } + return r; + } + + set: (inout this, k: int, value: R) = { + assert(1 <= k <= dim); + v[k - 1] = value; + + (copy i := 2) + while i <= k next i += 1 { + v[k - 1] /= i; + } + } + + // C++2 interface / AD interface + + get: (this, i: int, v0: R) -> R = { + if i == 0 { + return v0; + } + else if i > dim { + return 0.0; + } + + return v[i - 1]; + } + + // Overload for reverse AD. + operator+=: (inout this, o: taylor) -> forward_ref _ = { + this = this + o; + return this; + } + + // Overload for reverse AD. + operator-=: (inout this, o: taylor) -> forward_ref _ = { + this = this - o; + return this; + } + + // Overload for simple handling of connected adds. + operator+: (this, o: taylor) -> taylor = { + return add(o, 0.0, 0.0); // Primal values are not required. + } + + // Overload for simple handling of connected minuses. + operator-: (this, o: taylor) -> taylor = { + return sub(o, 0.0, 0.0); // Primal values are not required. + } + + // Overload for simple handling of prefix +. + operator+: (this) -> taylor = { + return this; + } + + // Overload for simple handling of prefix -. + operator-: (this) -> taylor = { + r: taylor = (); + + (copy k:= 1) + while k <= dim next k += 1 { + r.v[k - 1] = -v[k - 1]; + } + + return r; + } + + add: (this, o: taylor, v0: R, o0: R) -> taylor = { + r: taylor = (); + + (copy k:= 1) + while k <= dim next k += 1 { + r.v[k - 1] = get(k, v0) + o.get(k, o0); + } + + return r; + } + + sub: (this, o: taylor, v0: R, o0: R) -> taylor = { + r: taylor = (); + + (copy k:= 1) + while k <= dim next k += 1 { + r.v[k - 1] = get(k, v0) - o.get(k, o0); + } + + return r; + } + + mul: (this, in_ref o: taylor, v0: R, o0: R) -> taylor = { + dim_r : int == std::max(dim, dim_o); + r: taylor = (); + + (copy k:= 1) + while k <= dim_r next k += 1 { + (copy j := 0) + while j <= k next j += 1 { + r..v[k - 1] += get(j, v0) * o..get(k - j, o0); + } + } + return r; + } + + div: (this, o: taylor, v0: R, o0: R) -> taylor = { + r: taylor = (); + r0: R = v0 / o0; + + factor : R = 1.0 / o0; + + (copy k:= 1) + while k <= dim next k += 1 { + r..v[k - 1] = get(k, v0); + (copy j := 0) + while j < k next j += 1 { + r..v[k - 1] -= r.get(j, r0) * o..get(k - j, o0); + } + r..v[k - 1] *= factor; + } + return r; + } + + sqrt: (this, v0: R) -> taylor = { + r: taylor = (); + r0: R = std::sqrt(v0); + + factor : R = 0.5 / r0; + + (copy k:= 1) + while k <= dim next k += 1 { + r..v[k - 1] = get(k, v0); + (copy j := 1) + while j < k next j += 1 { + r..v[k - 1] -= r..get(j, r0) * r..get(k - j, r0); + } + r..v[k - 1] *= factor; + } + + return r; + } + + log: (this, v0: R) -> taylor = { + r: taylor = (); + r0: R = std::log(v0); + + factor : R = 1.0 / v0; + + (copy k:= 1) + while k <= dim next k += 1 { + r..v[k - 1] =k * get(k, v0); + (copy j := 1) + while j < k next j += 1 { + r..v[k - 1] -= j * get(k - j, v0) * r..get(j, r0); + } + r..v[k - 1] *= factor / k; + } + + return r; + } + + exp: (this, v0: R) -> taylor = { + r: taylor = (); + r0: R = std::exp(v0); + + factor : R = 1.0 / v0; + + (copy k:= 1) + while k <= dim next k += 1 { + (copy j := 1) + while j <= k next j += 1 { + r..v[k - 1] += j * r..get(k - j, r0) * get(j, v0); + } + r..v[k - 1] /= k; + } + + return r; + } + + + comp_sin_cos: (inout s: taylor, inout c: taylor, u: taylor, u0: R) = { + s0: R = std::sin(u0); + c0: R = std::cos(u0); + + (copy k:= 1) + while k <= dim next k += 1 { + (copy j := 1) + while j <= k next j += 1 { + s..v[k - 1] += j * u..get(j, u0) * c..get(k - j, c0); + c..v[k - 1] -= j * u..get(j, u0) * s..get(k - j, s0); + } + s..v[k - 1] /= k; + c..v[k - 1] /= k; + } + } + + + sin: (this, v0: R) -> taylor = { + t: taylor = (); + r: taylor = (); + + comp_sin_cos(r, t, this, v0); + _ = t; + + return r; + } + + cos: (this, v0: R) -> taylor = { + t: taylor = (); + r: taylor = (); + + comp_sin_cos(t, r, this, v0); + _ = t; + + return r; + } +} + +to_string: (o: taylor) -> std::string = { + r : std::string = "("; + (copy i := 1) + while i <= order next i += 1 { + r += " (o[i])$"; + } + r += " )"; + + return r; +} + +} // cpp2 namespace + +#endif // CPP2_CPP2TAYLOR_H \ No newline at end of file diff --git a/include/cpp2util.h b/include/cpp2util.h index ebedeb5fb..21764dd81 100644 --- a/include/cpp2util.h +++ b/include/cpp2util.h @@ -1,14 +1,9 @@ -// Copyright (c) Herb Sutter -// SPDX-License-Identifier: CC-BY-NC-ND-4.0 - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. +// Copyright 2022-2026 Herb Sutter +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +// Part of the Cppfront Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://github.com/hsutter/cppfront/blob/main/LICENSE for license information. //=========================================================================== @@ -63,6 +58,7 @@ // to the 'include std' path #if defined(CPP2_IMPORT_STD) && defined(__cpp_lib_modules) import std.compat; + #include // If 'include std' was requested, include all standard headers. // This list tracks the current draft standard, so as of this // writing includes draft C++26 headers like . @@ -259,6 +255,7 @@ #endif #include #include + #include #include #include #include @@ -304,6 +301,12 @@ #include #endif +// Required for pure Cpp2 tests to pass on MSVC +// #include causes C2995 of math tempaltes +#ifndef EXIT_FAILURE + #define EXIT_FAILURE 1 +#endif + // cpp2util.h uses signed integer types for indices and container sizes // so disable clang signed-to-unsigned conversion warnings in this header. #ifdef __clang__ @@ -375,9 +378,51 @@ constexpr auto gcc_clang_msvc_min_versions( #define CPP2_CONSTEXPR constexpr #endif -namespace cpp2 { + +// Workaround . +#define CPP2_FORCE_INLINE_LAMBDA_CLANG /* empty */ + +#if defined(_MSC_VER) && !defined(__clang_major__) + #define CPP2_FORCE_INLINE __forceinline + #define CPP2_FORCE_INLINE_LAMBDA [[msvc::forceinline]] + #define CPP2_LAMBDA_NO_DISCARD +#else + #define CPP2_FORCE_INLINE __attribute__((always_inline)) + #if defined(__clang__) + #define CPP2_FORCE_INLINE_LAMBDA /* empty */ + #undef CPP2_FORCE_INLINE_LAMBDA_CLANG + #define CPP2_FORCE_INLINE_LAMBDA_CLANG __attribute__((always_inline)) + #else + #define CPP2_FORCE_INLINE_LAMBDA __attribute__((always_inline)) + #endif + + #if defined(__clang_major__) + // Also check __cplusplus, only to satisfy Clang -pedantic-errors + #if __cplusplus >= 202302L && (__clang_major__ > 13 || (__clang_major__ == 13 && __clang_minor__ >= 2)) + #define CPP2_LAMBDA_NO_DISCARD [[nodiscard]] + #else + #define CPP2_LAMBDA_NO_DISCARD + #endif + #elif defined(__GNUC__) + #if __GNUC__ >= 9 + #define CPP2_LAMBDA_NO_DISCARD [[nodiscard]] + #else + #define CPP2_LAMBDA_NO_DISCARD + #endif + #if ((__GNUC__ * 100) + __GNUC_MINOR__) < 1003 + // GCC 10.2 doesn't support this feature (10.3 is fine) + #undef CPP2_FORCE_INLINE_LAMBDA + #define CPP2_FORCE_INLINE_LAMBDA + #endif + #else + #define CPP2_LAMBDA_NO_DISCARD + #endif +#endif + +namespace cpp2 { + //----------------------------------------------------------------------- // // Convenience names for fundamental types @@ -414,6 +459,144 @@ using _schar = signed char; // normally use i8 instead using _uchar = unsigned char; // normally use u8 instead +//----------------------------------------------------------------------- +// +// An implementation of GSL's narrow_cast with a clearly 'unchecked' name +// +//----------------------------------------------------------------------- +// +namespace impl { + +template< typename To, typename From > +constexpr auto is_narrowing_v = + // [dcl.init.list] 7.1 + (std::is_floating_point_v && std::is_integral_v) || + // [dcl.init.list] 7.2 + (std::is_floating_point_v && std::is_floating_point_v && sizeof(From) > sizeof(To)) || // NOLINT(misc-redundant-expression) + // [dcl.init.list] 7.3 + (std::is_integral_v && std::is_floating_point_v) || + (std::is_enum_v && std::is_floating_point_v) || + // [dcl.init.list] 7.4 + (std::is_integral_v && std::is_integral_v && sizeof(From) > sizeof(To)) || // NOLINT(misc-redundant-expression) + (std::is_enum_v && std::is_integral_v && sizeof(From) > sizeof(To)) || + // [dcl.init.list] 7.5 + (std::is_pointer_v && std::is_same_v) + ; + +} + + +template +constexpr auto unchecked_narrow( X x ) noexcept + -> decltype(auto) + requires ( + impl::is_narrowing_v + || ( + std::is_arithmetic_v + && std::is_arithmetic_v + ) + ) +{ + return static_cast(x); +} + + +template +constexpr auto unchecked_cast( X&& x ) noexcept + -> decltype(auto) +{ + return static_cast(CPP2_FORWARD(x)); +} + + +//----------------------------------------------------------------------- +// +// contract_group +// +//----------------------------------------------------------------------- +// + +#ifdef CPP2_USE_SOURCE_LOCATION + #define CPP2_SOURCE_LOCATION_PARAM , [[maybe_unused]] std::source_location where + #define CPP2_SOURCE_LOCATION_PARAM_WITH_DEFAULT , [[maybe_unused]] std::source_location where = std::source_location::current() + #define CPP2_SOURCE_LOCATION_PARAM_SOLO [[maybe_unused]] std::source_location where + #define CPP2_SOURCE_LOCATION_ARG , where + #define CPP2_SOURCE_LOCATION_VALUE (cpp2::to_string(where.file_name()) + "(" + cpp2::to_string(where.line()) + ") " + where.function_name()) +#else + #define CPP2_SOURCE_LOCATION_PARAM + #define CPP2_SOURCE_LOCATION_PARAM_WITH_DEFAULT + #define CPP2_SOURCE_LOCATION_PARAM_SOLO + #define CPP2_SOURCE_LOCATION_ARG + #define CPP2_SOURCE_LOCATION_VALUE std::string("") +#endif + +// For C++23: make this std::string_view and drop the macro +// Before C++23 std::string_view was not guaranteed to be trivially copyable, +// and so in will pass it by const& and really it should be by value +#define CPP2_MESSAGE_PARAM char const* +#define CPP2_CONTRACT_MSG cpp2::message_to_cstr_adapter + +inline auto message_to_cstr_adapter( CPP2_MESSAGE_PARAM msg ) -> CPP2_MESSAGE_PARAM { return msg ? msg : ""; } +inline auto message_to_cstr_adapter( std::string const& msg ) -> CPP2_MESSAGE_PARAM { return msg.c_str(); } + +class contract_group { +public: + using handler = void (*)(CPP2_MESSAGE_PARAM msg CPP2_SOURCE_LOCATION_PARAM); + + constexpr contract_group (handler h = {}) : reporter{h} { } + constexpr auto set_handler(handler h = {}) { reporter = h; } + constexpr auto is_active () const -> bool { return reporter != handler{}; } + + constexpr auto enforce(bool b, CPP2_MESSAGE_PARAM msg = "" CPP2_SOURCE_LOCATION_PARAM_WITH_DEFAULT) + -> void { if (!b) report_violation(msg CPP2_SOURCE_LOCATION_ARG); } + constexpr auto report_violation(CPP2_MESSAGE_PARAM msg = "" CPP2_SOURCE_LOCATION_PARAM_WITH_DEFAULT) + -> void { if (reporter) reporter(msg CPP2_SOURCE_LOCATION_ARG); } +private: + handler reporter; +}; + +[[noreturn]] inline auto report_and_terminate(std::string_view group, CPP2_MESSAGE_PARAM msg = "" CPP2_SOURCE_LOCATION_PARAM_WITH_DEFAULT) noexcept -> void { + std::cerr +#ifdef CPP2_USE_SOURCE_LOCATION + << where.file_name() << "(" + << where.line() << ") " + << where.function_name() << ": " +#endif + << group << " violation"; + if (msg && msg[0] != '\0') { + std::cerr << ": " << msg; + } + std::cerr << "\n"; + std::exit(EXIT_FAILURE); +} + +auto inline cpp2_default = contract_group( + [](CPP2_MESSAGE_PARAM msg CPP2_SOURCE_LOCATION_PARAM)noexcept { + report_and_terminate("Contract", msg CPP2_SOURCE_LOCATION_ARG); + } +); +auto inline bounds_safety = contract_group( + [](CPP2_MESSAGE_PARAM msg CPP2_SOURCE_LOCATION_PARAM)noexcept { + report_and_terminate("Bounds safety", msg CPP2_SOURCE_LOCATION_ARG); + } +); +auto inline null_safety = contract_group( + [](CPP2_MESSAGE_PARAM msg CPP2_SOURCE_LOCATION_PARAM)noexcept { + report_and_terminate("Null safety", msg CPP2_SOURCE_LOCATION_ARG); + } +); +auto inline type_safety = contract_group( + [](CPP2_MESSAGE_PARAM msg CPP2_SOURCE_LOCATION_PARAM)noexcept { + report_and_terminate("Type safety", msg CPP2_SOURCE_LOCATION_ARG); + } +); +auto inline testing = contract_group( + [](CPP2_MESSAGE_PARAM msg CPP2_SOURCE_LOCATION_PARAM)noexcept { + report_and_terminate("Testing", msg CPP2_SOURCE_LOCATION_ARG); + } +); + + //----------------------------------------------------------------------- // // String utilities @@ -520,6 +703,7 @@ constexpr bool is_escaped(std::string_view s) { } inline bool string_to_int(std::string const& s, int& v, int base = 10) { +#ifndef CPP2_NO_EXCEPTIONS try { v = stoi(s, nullptr, base); return true; @@ -532,6 +716,32 @@ inline bool string_to_int(std::string const& s, int& v, int base = 10) { { return false; } +#else + errno = 0; + char* end = nullptr; + + auto const num = std::strtol(s.c_str(), &end, base); + + cpp2_default.enforce(end != nullptr); + if ( + end == s.c_str() + || *end != '\0' + ) + { + return false; // invalid argument + } + if ( + errno == ERANGE + || num < std::numeric_limits::min() + || num > std::numeric_limits::max() + ) + { + return false; // out of range + } + + v = unchecked_narrow(num); + return true; +#endif } template @@ -885,95 +1095,10 @@ template } -//----------------------------------------------------------------------- -// -// contract_group -// -//----------------------------------------------------------------------- -// - -#ifdef CPP2_USE_SOURCE_LOCATION - #define CPP2_SOURCE_LOCATION_PARAM , [[maybe_unused]] std::source_location where - #define CPP2_SOURCE_LOCATION_PARAM_WITH_DEFAULT , [[maybe_unused]] std::source_location where = std::source_location::current() - #define CPP2_SOURCE_LOCATION_PARAM_SOLO [[maybe_unused]] std::source_location where - #define CPP2_SOURCE_LOCATION_ARG , where - #define CPP2_SOURCE_LOCATION_VALUE (cpp2::to_string(where.file_name()) + "(" + cpp2::to_string(where.line()) + ") " + where.function_name()) -#else - #define CPP2_SOURCE_LOCATION_PARAM - #define CPP2_SOURCE_LOCATION_PARAM_WITH_DEFAULT - #define CPP2_SOURCE_LOCATION_PARAM_SOLO - #define CPP2_SOURCE_LOCATION_ARG - #define CPP2_SOURCE_LOCATION_VALUE std::string("") -#endif - -// For C++23: make this std::string_view and drop the macro -// Before C++23 std::string_view was not guaranteed to be trivially copyable, -// and so in will pass it by const& and really it should be by value -#define CPP2_MESSAGE_PARAM char const* -#define CPP2_CONTRACT_MSG cpp2::message_to_cstr_adapter - -inline auto message_to_cstr_adapter( CPP2_MESSAGE_PARAM msg ) -> CPP2_MESSAGE_PARAM { return msg ? msg : ""; } -inline auto message_to_cstr_adapter( std::string const& msg ) -> CPP2_MESSAGE_PARAM { return msg.c_str(); } - -class contract_group { -public: - using handler = void (*)(CPP2_MESSAGE_PARAM msg CPP2_SOURCE_LOCATION_PARAM); - - constexpr contract_group (handler h = {}) : reporter{h} { } - constexpr auto set_handler(handler h = {}) { reporter = h; } - constexpr auto is_active () const -> bool { return reporter != handler{}; } - - constexpr auto enforce(bool b, CPP2_MESSAGE_PARAM msg = "" CPP2_SOURCE_LOCATION_PARAM_WITH_DEFAULT) - -> void { if (!b) report_violation(msg CPP2_SOURCE_LOCATION_ARG); } - constexpr auto report_violation(CPP2_MESSAGE_PARAM msg = "" CPP2_SOURCE_LOCATION_PARAM_WITH_DEFAULT) - -> void { if (reporter) reporter(msg CPP2_SOURCE_LOCATION_ARG); } -private: - handler reporter; -}; - -[[noreturn]] inline auto report_and_terminate(std::string_view group, CPP2_MESSAGE_PARAM msg = "" CPP2_SOURCE_LOCATION_PARAM_WITH_DEFAULT) noexcept -> void { - std::cerr -#ifdef CPP2_USE_SOURCE_LOCATION - << where.file_name() << "(" - << where.line() << ") " - << where.function_name() << ": " -#endif - << group << " violation"; - if (msg && msg[0] != '\0') { - std::cerr << ": " << msg; - } - std::cerr << "\n"; - std::terminate(); -} - -auto inline cpp2_default = contract_group( - [](CPP2_MESSAGE_PARAM msg CPP2_SOURCE_LOCATION_PARAM)noexcept { - report_and_terminate("Contract", msg CPP2_SOURCE_LOCATION_ARG); - } -); -auto inline bounds_safety = contract_group( - [](CPP2_MESSAGE_PARAM msg CPP2_SOURCE_LOCATION_PARAM)noexcept { - report_and_terminate("Bounds safety", msg CPP2_SOURCE_LOCATION_ARG); - } -); -auto inline null_safety = contract_group( - [](CPP2_MESSAGE_PARAM msg CPP2_SOURCE_LOCATION_PARAM)noexcept { - report_and_terminate("Null safety", msg CPP2_SOURCE_LOCATION_ARG); - } -); -auto inline type_safety = contract_group( - [](CPP2_MESSAGE_PARAM msg CPP2_SOURCE_LOCATION_PARAM)noexcept { - report_and_terminate("Type safety", msg CPP2_SOURCE_LOCATION_ARG); - } -); -auto inline testing = contract_group( - [](CPP2_MESSAGE_PARAM msg CPP2_SOURCE_LOCATION_PARAM)noexcept { - report_and_terminate("Testing", msg CPP2_SOURCE_LOCATION_ARG); - } -); +namespace impl { +template struct dependent_false : std::false_type {}; -namespace impl { //----------------------------------------------------------------------- // @@ -1209,7 +1334,7 @@ constexpr auto type_name() -> std::string_view { err += std::string{" and the message \""} + msg + "\""; } type_safety.report_violation( err.c_str() ); - std::terminate(); + std::exit(EXIT_FAILURE); #else throw CPP2_FORWARD(x); #endif @@ -1365,7 +1490,7 @@ class deferred_init { public: constexpr deferred_init() noexcept { } constexpr ~deferred_init() noexcept { destroy(); } - constexpr auto value() noexcept -> T& { cpp2_default.enforce(init); return t(); } + constexpr auto value() noexcept -> T& { cpp2_default.enforce(init); return t(); } constexpr auto construct(auto&& ...args) -> void { cpp2_default.enforce(!init); new (&data) T{CPP2_FORWARD(args)...}; init = true; } }; @@ -1433,166 +1558,21 @@ class out { dt->construct(CPP2_FORWARD(args)...); called_construct() = true; } - } - } - - constexpr auto value() noexcept -> T& { - if (has_t) { - cpp2_default.enforce( t ); - return *t; - } - else { - cpp2_default.enforce( dt ); - return dt->value(); - } - } -}; - - -// Stabilize line numbers for UFCS code that we know will generate -// errors for some compilers, to keep regression test outputs cleaner -#line 1999 - -//----------------------------------------------------------------------- -// -// CPP2_UFCS: Variadic macro generating a variadic lambda, oh my... -// -//----------------------------------------------------------------------- -// -// Workaround . -#define CPP2_FORCE_INLINE_LAMBDA_CLANG /* empty */ - -#if defined(_MSC_VER) && !defined(__clang_major__) - #define CPP2_FORCE_INLINE __forceinline - #define CPP2_FORCE_INLINE_LAMBDA [[msvc::forceinline]] - #define CPP2_LAMBDA_NO_DISCARD -#else - #define CPP2_FORCE_INLINE __attribute__((always_inline)) - #if defined(__clang__) - #define CPP2_FORCE_INLINE_LAMBDA /* empty */ - #undef CPP2_FORCE_INLINE_LAMBDA_CLANG - #define CPP2_FORCE_INLINE_LAMBDA_CLANG __attribute__((always_inline)) - #else - #define CPP2_FORCE_INLINE_LAMBDA __attribute__((always_inline)) - #endif - - #if defined(__clang_major__) - // Also check __cplusplus, only to satisfy Clang -pedantic-errors - #if __cplusplus >= 202302L && (__clang_major__ > 13 || (__clang_major__ == 13 && __clang_minor__ >= 2)) - #define CPP2_LAMBDA_NO_DISCARD [[nodiscard]] - #else - #define CPP2_LAMBDA_NO_DISCARD - #endif - #elif defined(__GNUC__) - #if __GNUC__ >= 9 - #define CPP2_LAMBDA_NO_DISCARD [[nodiscard]] - #else - #define CPP2_LAMBDA_NO_DISCARD - #endif - #if ((__GNUC__ * 100) + __GNUC_MINOR__) < 1003 - // GCC 10.2 doesn't support this feature (10.3 is fine) - #undef CPP2_FORCE_INLINE_LAMBDA - #define CPP2_FORCE_INLINE_LAMBDA - #endif - #else - #define CPP2_LAMBDA_NO_DISCARD - #endif -#endif - -#define CPP2_UFCS_EMPTY(...) -#define CPP2_UFCS_IDENTITY(...) __VA_ARGS__ -#define CPP2_UFCS_REMPARENS(...) __VA_ARGS__ - -// Ideally, the expression `CPP2_UFCS_IS_NOTHROW` expands to -// is in the _noexcept-specifier_ of the UFCS lambda, but without 'std::declval'. -// To workaround [GCC bug 101043](https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101043), -// we instead make it a template parameter of the UFCS lambda. -// But using a template parameter, Clang also ICEs on an application. -// So we use these `NOTHROW` macros to fall back to the ideal for when not using GCC. -#define CPP2_UFCS_IS_NOTHROW(MVFWD,QUALID,TEMPKW,...) \ - requires { requires requires { std::declval().CPP2_UFCS_REMPARENS QUALID TEMPKW __VA_ARGS__(std::declval()...); }; \ - requires noexcept(std::declval().CPP2_UFCS_REMPARENS QUALID TEMPKW __VA_ARGS__(std::declval()...)); } \ -|| requires { requires !requires { std::declval().CPP2_UFCS_REMPARENS QUALID TEMPKW __VA_ARGS__(std::declval()...); }; \ - requires noexcept(MVFWD(CPP2_UFCS_REMPARENS QUALID __VA_ARGS__)(std::declval(), std::declval()...)); } -#define CPP2_UFCS_IS_NOTHROW_PARAM(...) /*empty*/ -#define CPP2_UFCS_IS_NOTHROW_ARG(MVFWD,QUALID,TEMPKW,...) CPP2_UFCS_IS_NOTHROW(MVFWD,QUALID,TEMPKW,__VA_ARGS__) -#if defined(__GNUC__) && !defined(__clang__) - #undef CPP2_UFCS_IS_NOTHROW_PARAM - #undef CPP2_UFCS_IS_NOTHROW_ARG - #define CPP2_UFCS_IS_NOTHROW_PARAM(MVFWD,QUALID,TEMPKW,...) , bool IsNothrow = CPP2_UFCS_IS_NOTHROW(MVFWD,QUALID,TEMPKW,__VA_ARGS__) - #define CPP2_UFCS_IS_NOTHROW_ARG(...) IsNothrow - #if __GNUC__ < 11 - #undef CPP2_UFCS_IS_NOTHROW_PARAM - #undef CPP2_UFCS_IS_NOTHROW_ARG - #define CPP2_UFCS_IS_NOTHROW_PARAM(...) /*empty*/ - #define CPP2_UFCS_IS_NOTHROW_ARG(...) false // GCC 10 UFCS is always potentially-throwing. - #endif -#endif - -// Ideally, the expression `CPP2_UFCS_CONSTRAINT_ARG` expands to -// is in the _requires-clause_ of the UFCS lambda. -// To workaround an MSVC bug within a member function 'F' where UFCS is also for 'F' -// (), -// we instead make it a template parameter of the UFCS lambda. -// But using a template parameter, Clang also ICEs and GCC rejects a local 'F'. -// Also, Clang rejects the SFINAE test case when using 'std::declval'. -// So we use these `CONSTRAINT` macros to fall back to the ideal for when not using MSVC. -#define CPP2_UFCS_CONSTRAINT_PARAM(...) /*empty*/ -#define CPP2_UFCS_CONSTRAINT_ARG(MVFWD,QUALID,TEMPKW,...) \ - requires { CPP2_FORWARD(obj).CPP2_UFCS_REMPARENS QUALID TEMPKW __VA_ARGS__(CPP2_FORWARD(params)...); } \ -|| requires { MVFWD(CPP2_UFCS_REMPARENS QUALID __VA_ARGS__)(CPP2_FORWARD(obj), CPP2_FORWARD(params)...); } -#if defined(_MSC_VER) - #undef CPP2_UFCS_CONSTRAINT_PARAM - #undef CPP2_UFCS_CONSTRAINT_ARG - #define CPP2_UFCS_CONSTRAINT_PARAM(MVFWD,QUALID,TEMPKW,...) , bool IsViable = \ - requires { std::declval().CPP2_UFCS_REMPARENS QUALID TEMPKW __VA_ARGS__(std::declval()...); } \ -|| requires { MVFWD(CPP2_UFCS_REMPARENS QUALID __VA_ARGS__)(std::declval(), std::declval()...); } - #define CPP2_UFCS_CONSTRAINT_ARG(...) IsViable -#endif - -template struct dependent_false : std::false_type {}; + } + } -#define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \ -[LAMBDADEFCAPT]< \ - typename Obj, typename... Params \ - CPP2_UFCS_IS_NOTHROW_PARAM(MVFWD,QUALID,TEMPKW,__VA_ARGS__) \ - CPP2_UFCS_CONSTRAINT_PARAM(MVFWD,QUALID,TEMPKW,__VA_ARGS__) \ - > \ - CPP2_LAMBDA_NO_DISCARD (Obj&& obj, Params&& ...params) CPP2_FORCE_INLINE_LAMBDA_CLANG \ - noexcept(CPP2_UFCS_IS_NOTHROW_ARG(MVFWD,QUALID,TEMPKW,__VA_ARGS__)) CPP2_FORCE_INLINE_LAMBDA -> decltype(auto) \ - SFINAE( requires CPP2_UFCS_CONSTRAINT_ARG(MVFWD,QUALID,TEMPKW,__VA_ARGS__) ) \ - { \ - if constexpr (requires{ CPP2_FORWARD(obj).CPP2_UFCS_REMPARENS QUALID TEMPKW __VA_ARGS__(CPP2_FORWARD(params)...); }) { \ - return CPP2_FORWARD(obj).CPP2_UFCS_REMPARENS QUALID TEMPKW __VA_ARGS__(CPP2_FORWARD(params)...); \ - } \ - else if constexpr (requires{ MVFWD(CPP2_UFCS_REMPARENS QUALID __VA_ARGS__)(CPP2_FORWARD(obj), CPP2_FORWARD(params)...); }) { \ - return MVFWD(CPP2_UFCS_REMPARENS QUALID __VA_ARGS__)(CPP2_FORWARD(obj), CPP2_FORWARD(params)...); \ - } \ - else if constexpr (requires{ obj.CPP2_UFCS_REMPARENS QUALID TEMPKW __VA_ARGS__(CPP2_FORWARD(params)...); }) { \ - static_assert( cpp2::impl::dependent_false::value, "error: implicit discard of an object's modified value is not allowed - this function call modifies 'obj', but 'obj' is never used again in the function so the new value is never used - if that's what you intended, add another line '_ = obj;' afterward to explicitly discard the new value of the object" ); \ - CPP2_FORWARD(obj).CPP2_UFCS_REMPARENS QUALID TEMPKW __VA_ARGS__(CPP2_FORWARD(params)...); \ - MVFWD(CPP2_UFCS_REMPARENS QUALID __VA_ARGS__)(CPP2_FORWARD(obj), CPP2_FORWARD(params)...); \ - } \ - else if constexpr (requires{ MVFWD(CPP2_UFCS_REMPARENS QUALID __VA_ARGS__)(obj, CPP2_FORWARD(params)...); }) { \ - static_assert( cpp2::impl::dependent_false::value, "error: implicit discard of an object's modified value is not allowed - this function call modifies 'obj', but 'obj' is never used again in the function so the new value is never used - if that's what you intended, add another line '_ = obj;' afterward to explicitly discard the new value of the object" ); \ - CPP2_FORWARD(obj).CPP2_UFCS_REMPARENS QUALID TEMPKW __VA_ARGS__(CPP2_FORWARD(params)...); \ - MVFWD(CPP2_UFCS_REMPARENS QUALID __VA_ARGS__)(CPP2_FORWARD(obj), CPP2_FORWARD(params)...); \ - } \ - else { \ - static_assert( cpp2::impl::dependent_false::value, "this function call syntax tries 'obj.func(...)', then 'func(obj,...);', but both failed - if this function call is passing a local variable that will be modified by the function, but that variable is never used again in the function so the new value is never used, that's likely the problem - if that's what you intended, add another line '_ = obj;' afterward to explicitly discard the new value of the object" ); \ - CPP2_FORWARD(obj).CPP2_UFCS_REMPARENS QUALID TEMPKW __VA_ARGS__(CPP2_FORWARD(params)...); \ - MVFWD(CPP2_UFCS_REMPARENS QUALID __VA_ARGS__)(CPP2_FORWARD(obj), CPP2_FORWARD(params)...); \ - } \ - } + constexpr auto value() noexcept -> T& { + if (has_t) { + cpp2_default.enforce( t ); + return *t; + } + else { + cpp2_default.enforce( dt ); + return dt->value(); + } + } +}; -#define CPP2_UFCS(...) CPP2_UFCS_(&,CPP2_UFCS_EMPTY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__) -#define CPP2_UFCS_MOVE(...) CPP2_UFCS_(&,CPP2_UFCS_EMPTY,std::move,(),,__VA_ARGS__) -#define CPP2_UFCS_FORWARD(...) CPP2_UFCS_(&,CPP2_UFCS_EMPTY,CPP2_FORWARD,(),,__VA_ARGS__) -#define CPP2_UFCS_TEMPLATE(...) CPP2_UFCS_(&,CPP2_UFCS_EMPTY,CPP2_UFCS_IDENTITY,(),template,__VA_ARGS__) -#define CPP2_UFCS_QUALIFIED_TEMPLATE(QUALID,...) CPP2_UFCS_(&,CPP2_UFCS_EMPTY,CPP2_UFCS_IDENTITY,QUALID,template,__VA_ARGS__) -#define CPP2_UFCS_NONLOCAL(...) CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__) -#define CPP2_UFCS_TEMPLATE_NONLOCAL(...) CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),template,__VA_ARGS__) -#define CPP2_UFCS_QUALIFIED_TEMPLATE_NONLOCAL(QUALID,...) CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,QUALID,template,__VA_ARGS__) } // impl @@ -1867,22 +1847,6 @@ constexpr auto is( X const& x, bool (*value)(X const&) ) -> bool { // The 'as' cast functions are so use that order here // If it's confusing, we can switch this to -template< typename To, typename From > -constexpr auto is_narrowing_v = - // [dcl.init.list] 7.1 - (std::is_floating_point_v && std::is_integral_v) || - // [dcl.init.list] 7.2 - (std::is_floating_point_v && std::is_floating_point_v && sizeof(From) > sizeof(To)) || // NOLINT(misc-redundant-expression) - // [dcl.init.list] 7.3 - (std::is_integral_v && std::is_floating_point_v) || - (std::is_enum_v && std::is_floating_point_v) || - // [dcl.init.list] 7.4 - (std::is_integral_v && std::is_integral_v && sizeof(From) > sizeof(To)) || // NOLINT(misc-redundant-expression) - (std::is_enum_v && std::is_integral_v && sizeof(From) > sizeof(To)) || - // [dcl.init.list] 7.5 - (std::is_pointer_v && std::is_same_v) - ; - template< typename To, typename From > constexpr auto is_unsafe_pointer_conversion_v = std::is_pointer_v @@ -2144,10 +2108,8 @@ constexpr auto is( X const& x ) -> bool { if (!x.has_value()) { return std::same_as; } - if constexpr (requires { static_cast(*x);}) { - return true; - } - return false; + return std::same_as + || std::derived_from, std::remove_pointer_t>; } // is Value @@ -2183,6 +2145,93 @@ constexpr auto as( X&& x ) -> decltype(auto) { } + +//------------------------------------------------------------------------------------------------------------- +// std::expected is and as +// +#ifdef __cpp_lib_expected + +// is Type +// +template + requires std::is_same_v> +constexpr auto is(X const& x) -> bool +{ + return x.has_value(); +} + +template + requires std::is_same_v +constexpr auto is(std::expected const& x) -> bool +{ + return !x.has_value(); +} + +// is std::unexpected Type +// +template + requires ( + std::is_same_v> + && std::is_same_v> + ) +constexpr auto is(X const& x) -> bool +{ + return !x.has_value(); +} + + +// is Value +// +template +constexpr auto is(std::expected const& x, auto&& value) -> bool +{ + // Predicate case + if constexpr (requires{ bool{ value(x) }; }) { + return value(x); + } + else if constexpr (std::is_function_v || requires{ &value.operator(); }) { + return false; + } + + // Value case + else if constexpr (requires{ bool{ x.value() == value }; }) { + return x.has_value() && x.value() == value; + } + else { + return false; + } +} + + +// as +// +template + requires std::is_same_v> +constexpr auto as(X const& x) -> decltype(auto) +{ + return x.value(); +} + +// as std::unexpected +// +template + requires ( + std::is_same_v> + && std::is_same_v> + ) +constexpr auto as(X const& x) -> decltype(auto) +{ + // It's UB to call `error` if `has_value` is true. + if (x.has_value()) { + Throw( + std::runtime_error("Cannot cast 'expected' to 'unexpected' because it has a value"), + "Cannot cast 'expected' to 'unexpected' because it has a value"); + } + + return std::unexpected(x.error()); +} +#endif + } // impl @@ -2288,35 +2337,6 @@ class finally_presuccess }; -//----------------------------------------------------------------------- -// -// An implementation of GSL's narrow_cast with a clearly 'unchecked' name -// -//----------------------------------------------------------------------- -// -template -constexpr auto unchecked_narrow( X x ) noexcept - -> decltype(auto) - requires ( - impl::is_narrowing_v - || ( - std::is_arithmetic_v - && std::is_arithmetic_v - ) - ) -{ - return static_cast(x); -} - - -template -constexpr auto unchecked_cast( X&& x ) noexcept - -> decltype(auto) -{ - return static_cast(CPP2_FORWARD(x)); -} - - //----------------------------------------------------------------------- // // args: see main() arguments as a container of string_views @@ -2433,9 +2453,9 @@ class range if (include_last) { if constexpr (std::integral) { if (last == std::numeric_limits::max()) { - throw std::runtime_error( + impl::Throw( std::runtime_error( "range with last == numeric_limits::max() will overflow" - ); + ), "range with last == numeric_limits::max() will overflow"); } } ++last; @@ -2958,10 +2978,111 @@ constexpr auto as_() -> decltype(auto) using cpp2::cpp2_new; -// Stabilize line numbers for "compatibility" static assertions that we know -// will fire for some compilers, to keep regression test outputs cleaner +// Stabilize line numbers for "compatibility" static assertions +// and UFCS error output to keep regression test outputs cleaner #line 9999 +//----------------------------------------------------------------------- +// +// CPP2_UFCS: Variadic macro generating a variadic lambda, oh my... +// +//----------------------------------------------------------------------- +// + +#define CPP2_UFCS_EMPTY(...) +#define CPP2_UFCS_IDENTITY(...) __VA_ARGS__ +#define CPP2_UFCS_REMPARENS(...) __VA_ARGS__ + +// Ideally, the expression `CPP2_UFCS_IS_NOTHROW` expands to +// is in the _noexcept-specifier_ of the UFCS lambda, but without 'std::declval'. +// To workaround [GCC bug 101043](https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101043), +// we instead make it a template parameter of the UFCS lambda. +// But using a template parameter, Clang also ICEs on an application. +// So we use these `NOTHROW` macros to fall back to the ideal for when not using GCC. +#define CPP2_UFCS_IS_NOTHROW(MVFWD,QUALID,TEMPKW,...) \ + requires { requires requires { std::declval().CPP2_UFCS_REMPARENS QUALID TEMPKW __VA_ARGS__(std::declval()...); }; \ + requires noexcept(std::declval().CPP2_UFCS_REMPARENS QUALID TEMPKW __VA_ARGS__(std::declval()...)); } \ +|| requires { requires !requires { std::declval().CPP2_UFCS_REMPARENS QUALID TEMPKW __VA_ARGS__(std::declval()...); }; \ + requires noexcept(MVFWD(CPP2_UFCS_REMPARENS QUALID __VA_ARGS__)(std::declval(), std::declval()...)); } +#define CPP2_UFCS_IS_NOTHROW_PARAM(...) /*empty*/ +#define CPP2_UFCS_IS_NOTHROW_ARG(MVFWD,QUALID,TEMPKW,...) CPP2_UFCS_IS_NOTHROW(MVFWD,QUALID,TEMPKW,__VA_ARGS__) +#if defined(__GNUC__) && !defined(__clang__) + #undef CPP2_UFCS_IS_NOTHROW_PARAM + #undef CPP2_UFCS_IS_NOTHROW_ARG + #define CPP2_UFCS_IS_NOTHROW_PARAM(MVFWD,QUALID,TEMPKW,...) , bool IsNothrow = CPP2_UFCS_IS_NOTHROW(MVFWD,QUALID,TEMPKW,__VA_ARGS__) + #define CPP2_UFCS_IS_NOTHROW_ARG(...) IsNothrow + #if __GNUC__ < 11 + #undef CPP2_UFCS_IS_NOTHROW_PARAM + #undef CPP2_UFCS_IS_NOTHROW_ARG + #define CPP2_UFCS_IS_NOTHROW_PARAM(...) /*empty*/ + #define CPP2_UFCS_IS_NOTHROW_ARG(...) false // GCC 10 UFCS is always potentially-throwing. + #endif +#endif + +// Ideally, the expression `CPP2_UFCS_CONSTRAINT_ARG` expands to +// is in the _requires-clause_ of the UFCS lambda. +// To workaround an MSVC bug within a member function 'F' where UFCS is also for 'F' +// (), +// we instead make it a template parameter of the UFCS lambda. +// But using a template parameter, Clang also ICEs and GCC rejects a local 'F'. +// Also, Clang rejects the SFINAE test case when using 'std::declval'. +// So we use these `CONSTRAINT` macros to fall back to the ideal for when not using MSVC. +#define CPP2_UFCS_CONSTRAINT_PARAM(...) /*empty*/ +#define CPP2_UFCS_CONSTRAINT_ARG(MVFWD,QUALID,TEMPKW,...) \ + requires { CPP2_FORWARD(obj).CPP2_UFCS_REMPARENS QUALID TEMPKW __VA_ARGS__(CPP2_FORWARD(params)...); } \ +|| requires { MVFWD(CPP2_UFCS_REMPARENS QUALID __VA_ARGS__)(CPP2_FORWARD(obj), CPP2_FORWARD(params)...); } +#if defined(_MSC_VER) + #undef CPP2_UFCS_CONSTRAINT_PARAM + #undef CPP2_UFCS_CONSTRAINT_ARG + #define CPP2_UFCS_CONSTRAINT_PARAM(MVFWD,QUALID,TEMPKW,...) , bool IsViable = \ + requires { std::declval().CPP2_UFCS_REMPARENS QUALID TEMPKW __VA_ARGS__(std::declval()...); } \ +|| requires { MVFWD(CPP2_UFCS_REMPARENS QUALID __VA_ARGS__)(std::declval(), std::declval()...); } + #define CPP2_UFCS_CONSTRAINT_ARG(...) IsViable +#endif + +#define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \ +[LAMBDADEFCAPT]< \ + typename Obj, typename... Params \ + CPP2_UFCS_IS_NOTHROW_PARAM(MVFWD,QUALID,TEMPKW,__VA_ARGS__) \ + CPP2_UFCS_CONSTRAINT_PARAM(MVFWD,QUALID,TEMPKW,__VA_ARGS__) \ + > \ + CPP2_LAMBDA_NO_DISCARD (Obj&& obj, Params&& ...params) CPP2_FORCE_INLINE_LAMBDA_CLANG \ + noexcept(CPP2_UFCS_IS_NOTHROW_ARG(MVFWD,QUALID,TEMPKW,__VA_ARGS__)) CPP2_FORCE_INLINE_LAMBDA -> decltype(auto) \ + SFINAE( requires CPP2_UFCS_CONSTRAINT_ARG(MVFWD,QUALID,TEMPKW,__VA_ARGS__) ) \ + { \ + if constexpr (requires{ CPP2_FORWARD(obj).CPP2_UFCS_REMPARENS QUALID TEMPKW __VA_ARGS__(CPP2_FORWARD(params)...); }) { \ + return CPP2_FORWARD(obj).CPP2_UFCS_REMPARENS QUALID TEMPKW __VA_ARGS__(CPP2_FORWARD(params)...); \ + } \ + else if constexpr (requires{ MVFWD(CPP2_UFCS_REMPARENS QUALID __VA_ARGS__)(CPP2_FORWARD(obj), CPP2_FORWARD(params)...); }) { \ + return MVFWD(CPP2_UFCS_REMPARENS QUALID __VA_ARGS__)(CPP2_FORWARD(obj), CPP2_FORWARD(params)...); \ + } \ + else if constexpr (requires{ obj.CPP2_UFCS_REMPARENS QUALID TEMPKW __VA_ARGS__(CPP2_FORWARD(params)...); }) { \ + static_assert( cpp2::impl::dependent_false::value, "error: implicit discard of an object's modified value is not allowed - this function call modifies 'obj', but 'obj' is never used again in the function so the new value is never used - if that's what you intended, add another line '_ = obj;' afterward to explicitly discard the new value of the object" ); \ + CPP2_FORWARD(obj).CPP2_UFCS_REMPARENS QUALID TEMPKW __VA_ARGS__(CPP2_FORWARD(params)...); \ + MVFWD(CPP2_UFCS_REMPARENS QUALID __VA_ARGS__)(CPP2_FORWARD(obj), CPP2_FORWARD(params)...); \ + } \ + else if constexpr (requires{ MVFWD(CPP2_UFCS_REMPARENS QUALID __VA_ARGS__)(obj, CPP2_FORWARD(params)...); }) { \ + static_assert( cpp2::impl::dependent_false::value, "error: implicit discard of an object's modified value is not allowed - this function call modifies 'obj', but 'obj' is never used again in the function so the new value is never used - if that's what you intended, add another line '_ = obj;' afterward to explicitly discard the new value of the object" ); \ + CPP2_FORWARD(obj).CPP2_UFCS_REMPARENS QUALID TEMPKW __VA_ARGS__(CPP2_FORWARD(params)...); \ + MVFWD(CPP2_UFCS_REMPARENS QUALID __VA_ARGS__)(CPP2_FORWARD(obj), CPP2_FORWARD(params)...); \ + } \ + else { \ + static_assert( cpp2::impl::dependent_false::value, "this function call syntax tries 'obj.func(...)', then 'func(obj,...);', but both failed - if this function call is passing a local variable that will be modified by the function, but that variable is never used again in the function so the new value is never used, that's likely the problem - if that's what you intended, add another line '_ = obj;' afterward to explicitly discard the new value of the object" ); \ + CPP2_FORWARD(obj).CPP2_UFCS_REMPARENS QUALID TEMPKW __VA_ARGS__(CPP2_FORWARD(params)...); \ + MVFWD(CPP2_UFCS_REMPARENS QUALID __VA_ARGS__)(CPP2_FORWARD(obj), CPP2_FORWARD(params)...); \ + } \ + } + +#define CPP2_UFCS(...) CPP2_UFCS_(&,CPP2_UFCS_EMPTY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__) +#define CPP2_UFCS_MOVE(...) CPP2_UFCS_(&,CPP2_UFCS_EMPTY,std::move,(),,__VA_ARGS__) +#define CPP2_UFCS_FORWARD(...) CPP2_UFCS_(&,CPP2_UFCS_EMPTY,CPP2_FORWARD,(),,__VA_ARGS__) +#define CPP2_UFCS_TEMPLATE(...) CPP2_UFCS_(&,CPP2_UFCS_EMPTY,CPP2_UFCS_IDENTITY,(),template,__VA_ARGS__) +#define CPP2_UFCS_QUALIFIED_TEMPLATE(QUALID,...) CPP2_UFCS_(&,CPP2_UFCS_EMPTY,CPP2_UFCS_IDENTITY,QUALID,template,__VA_ARGS__) +#define CPP2_UFCS_NONLOCAL(...) CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__) +#define CPP2_UFCS_TEMPLATE_NONLOCAL(...) CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),template,__VA_ARGS__) +#define CPP2_UFCS_QUALIFIED_TEMPLATE_NONLOCAL(QUALID,...) CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,QUALID,template,__VA_ARGS__) + + // GCC 10 doesn't support 'requires' in forward declarations in some cases // Workaround: Disable the requires clause where that gets reasonable behavior // Diagnostic: static_assert the other cases that can't be worked around diff --git a/regression-tests/mixed-autodiff-taylor.cpp2 b/regression-tests/mixed-autodiff-taylor.cpp2 new file mode 100644 index 000000000..17aa3fccb --- /dev/null +++ b/regression-tests/mixed-autodiff-taylor.cpp2 @@ -0,0 +1,87 @@ +#include + +order : int == 6; +taylor: type == cpp2::taylor; + +test_add: (x0: double, x: taylor) -> (y0: double, y: taylor) = { + y = x.add(x, x0, x0); + y0 = x0 + x0; +} + +test_sub: (x0: double, x: taylor) -> (y0: double, y: taylor) = { + y0 = 0.0; + y = taylor(); + + y = y.sub(x, y0, x0); + y0 = y0 - x0; +} + +test_mul: (x0: double, x: taylor) -> (y0: double, y: taylor) = { + y0 = x0; + y = x; + + (copy i:=0) + while i < 6 next i += 1 { + y = y..mul(x, y0, x0); + y0 *= x0; + } +} + +test_div: (x0: double, x: taylor) -> (y0: double, y: taylor) = { + y0 = 1.0; + y = taylor(); + + y = y.div(x, y0, x0); + y0 /= x0; +} + +test_sqrt: (x0: double, x: taylor) -> (y0: double, y: taylor) = { + y0 = sqrt(x0); + y = x.sqrt(x0); +} + +test_log: (x0: double, x: taylor) -> (y0: double, y: taylor) = { + y0 = log(x0); + y = x.log(x0); +} + +test_exp: (x0: double, x: taylor) -> (y0: double, y: taylor) = { + y0 = exp(x0); + y = x.exp(x0); +} + +test_sin: (x0: double, x: taylor) -> (y0: double, y: taylor) = { + y0 = sin(x0); + y = x.sin(x0); +} + +test_cos: (x0: double, x: taylor) -> (y0: double, y: taylor) = { + y0 = cos(x0); + y = x.cos(x0); +} + +write_output: (func: std::string, x: double, x_d: taylor, ret) = { + _ = x; + _ = x_d; + std::cout << "(func)$ = (ret.y0)$" << std::endl; + (copy i:=1) + while i <= order next i += 1 { + std::cout << "(func)$ diff order (i)$ = (ret.y[i])$" << std::endl; + } +} + +main: () = { + + x: double = 2.0; + x_d: taylor = (1.0); + + write_output("x + x", x, x_d, test_add(x, x_d)); + write_output("0 - x", x, x_d, test_sub(x, x_d)); + write_output("x^7", x, x_d, test_mul(x, x_d)); + write_output("1/x", x, x_d, test_div(x, x_d)); + write_output("sqrt(x)", x, x_d, test_sqrt(x, x_d)); + write_output("log(x)", x, x_d, test_log(x, x_d)); + write_output("exp(x)", x, x_d, test_exp(x, x_d)); + write_output("sin(x)", x, x_d, test_sin(x, x_d)); + write_output("cos(x)", x, x_d, test_cos(x, x_d)); +} diff --git a/regression-tests/mixed-bugfix-for-double-pound-else-error.cpp2 b/regression-tests/mixed-bugfix-for-double-pound-else-error.cpp2 new file mode 100644 index 000000000..5d825c172 --- /dev/null +++ b/regression-tests/mixed-bugfix-for-double-pound-else-error.cpp2 @@ -0,0 +1,2 @@ +#else +#else diff --git a/regression-tests/mixed-bugfix-for-ufcs-non-local.cpp2 b/regression-tests/mixed-bugfix-for-ufcs-non-local.cpp2 index 04334d9a2..fb898ee94 100644 --- a/regression-tests/mixed-bugfix-for-ufcs-non-local.cpp2 +++ b/regression-tests/mixed-bugfix-for-ufcs-non-local.cpp2 @@ -38,7 +38,8 @@ d: _ == t(); // Fails on Clang 12 (lambda in unevaluated context). u: @struct type = { b: bool == o.f(); - c: bool == :(forward x: decltype(o.f())) = x;(true); // Fails on Clang 12 (lambda in unevaluated context). + // UFCS used in the decltype in the line below causes all compilers to report error/crash + c: bool == :(forward x: decltype(f(o))) = x;(true); // Fails on Clang 12 (lambda in unevaluated context). g: (s, sz) pre(s.sz() != 0) = { } } diff --git a/regression-tests/pure2-autodiff-higher-order.cpp2 b/regression-tests/pure2-autodiff-higher-order.cpp2 new file mode 100644 index 000000000..cfa25c6bc --- /dev/null +++ b/regression-tests/pure2-autodiff-higher-order.cpp2 @@ -0,0 +1,245 @@ +ad_order : int == 6; +ad_type : type == cpp2::taylor; + +ad_name: namespace = { + +func_outer: (x: double, y: double) -> (ret: double) = { + ret = x + y; +} + +type_outer: type = { + public a: double = 0.0; + + add: (this, b: double) -> double = { + return a + b; + } +} + +ad_test: @autodiff<"order=6"> @print type = { + + add_1: (x: double, y: double) -> (r: double) = { + r = x + y; + } + + add_2: (x: double, y: double) -> (r: double) = { + r = x + y + x; + } + + sub_1: (x: double, y: double) -> (r: double) = { + r = x - y; + } + + sub_2: (x: double, y: double) -> (r: double) = { + r = x - y - x; + } + + add_sub_2: (x: double, y: double) -> (r: double) = { + r = x + y - x; + } + + mul_1: (x: double, y: double) -> (r: double) = { + r = x * y; + } + + mul_2: (x: double, y: double) -> (r: double) = { + r = x * y * x; + } + + div_1: (x: double, y: double) -> (r: double) = { + r = x / y; + } + + div_2: (x: double, y: double) -> (r: double) = { + r = x / y / y; + } + + mul_div_2: (x: double, y: double) -> (r: double) = { + r = x * y / x; + } + + mul_add: (x: double, y: double) -> (r: double) = { + r = x * (x + y); + } + + add_mul: (x: double, y: double) -> (r: double) = { + r = x + x * y; + } + + prefix_add: (x: double, y: double) -> (r: double) = { + r = +x + y; + } + + prefix_sub: (x: double, y: double) -> (r: double) = { + r = -x + y; + } + + func: (x: double, y: double) -> (ret: double) = { + ret = x + y; + } + + func_call: (x: double, y: double) -> (r: double) = { + r = x * func(x, y); + } + + func_outer_call: (x: double, y: double) -> (r: double) = { + r = x * func_outer(x, y); + } + + sin_call: (x: double, y: double) -> (r: double) = { + r = sin(x - y); + } + + if_branch: (x: double, y: double) -> (r: double) = { + r = x; + + if x < 0.0 { + r = y; + } + } + + if_else_branch: (x: double, y: double) -> (r: double) = { + if x < 0.0 { + r = y; + } + else { + r = x; + } + } + + direct_return: (x: double, y: double) -> double = { + return x + y; + } + + intermediate_var: (x: double, y: double) -> (r: double) = { + t: double = x + y; + + r = t; + } + + intermediate_passive_var: (x: double, y: double) -> (r: double) = { + i: int = (); // TODO: Handle as passive when type information on call side is available. + r = x + y; + i = 2; + + _ = i; + } + + intermediate_untyped: (x: double, y: double) -> (r: double) = { + t := 0.0; + t = x + y; + + r = t; + } + + intermediate_default_init: (x: double, y: double) -> (r: double) = { + t: double = (); + t = x + y; + + r = t; + } + + intermediate_no_init: (x: double, y: double) -> (r: double) = { + t: double; + t = x + y; + + r = t; + } + + while_loop: (x: double, y: double) -> (r: double) = { + i: int = 0; + + r = x; + while i < 2 next (i += 1) { + r = r + y ; + } + } + + do_while_loop: (x: double, y: double) -> (r: double) = { + i: int = 0; + + r = x; + do { + r = r + y ; + } + next (i += 1) + while i < 2; + } + + for_loop: (x: double, y: double) -> (r: double) = { + v: std::vector = (); + + v.push_back(x); + v.push_back(y); + + r = 0.0; + for v + do (t) + { + r = r + t; + } + } + + type_outer_use: (x: double, y: double) -> (r: double) = { + t : type_outer = (); + t.a = x; + + r = t.a + y; + } + + type_outer_call: (x: double, y: double) -> (r: double) = { + t : type_outer = (); + t.a = x; + + r = t.add(y); + } +} +} + +write_output: (func: std::string, x: double, x_d: ad_type, y: double, y_d: ad_type, ret) = { + std::cout << "diff((func)$) at (x = (x)$, x_d = (x_d)$, y = (y)$, y_d = (y_d)$):" << std::endl; + std::cout << " r = (ret.r)$" << std::endl; + (copy i:=1) + while i <= ad_order next i += 1 { + std::cout << " d(i)$ = (ret.r_d[i])$" << std::endl; + } +} + +main: () = { + + + x: double = 2.0; + x_d: ad_type = 1.0; + y: double = 3.0; + y_d: ad_type = 2.0; + + write_output("x + y", x, x_d, y, y_d, ad_name::ad_test::add_1_d(x, x_d, y, y_d)); + write_output("x + y + x", x, x_d, y, y_d, ad_name::ad_test::add_2_d(x, x_d, y, y_d)); + write_output("x - y", x, x_d, y, y_d, ad_name::ad_test::sub_1_d(x, x_d, y, y_d)); + write_output("x - y - x", x, x_d, y, y_d, ad_name::ad_test::sub_2_d(x, x_d, y, y_d)); + write_output("x + y - x", x, x_d, y, y_d, ad_name::ad_test::add_sub_2_d(x, x_d, y, y_d)); + write_output("x * y", x, x_d, y, y_d, ad_name::ad_test::mul_1_d(x, x_d, y, y_d)); + write_output("x * y * x", x, x_d, y, y_d, ad_name::ad_test::mul_2_d(x, x_d, y, y_d)); + write_output("x / y", x, x_d, y, y_d, ad_name::ad_test::div_1_d(x, x_d, y, y_d)); + write_output("x / y / y", x, x_d, y, y_d, ad_name::ad_test::div_2_d(x, x_d, y, y_d)); + write_output("x * y / x", x, x_d, y, y_d, ad_name::ad_test::mul_div_2_d(x, x_d, y, y_d)); + write_output("x * (x + y)", x, x_d, y, y_d, ad_name::ad_test::mul_add_d(x, x_d, y, y_d)); + write_output("x + x * y", x, x_d, y, y_d, ad_name::ad_test::add_mul_d(x, x_d, y, y_d)); + write_output("+x + y)", x, x_d, y, y_d, ad_name::ad_test::prefix_add_d(x, x_d, y, y_d)); + write_output("-x + y)", x, x_d, y, y_d, ad_name::ad_test::prefix_sub_d(x, x_d, y, y_d)); + write_output("x * func(x, y)", x, x_d, y, y_d, ad_name::ad_test::func_call_d(x, x_d, y, y_d)); + write_output("x * func_outer(x, y)", x, x_d, y, y_d, ad_name::ad_test::func_outer_call_d(x, x_d, y, y_d)); + write_output("sin(x - y)", x, x_d, y, y_d, ad_name::ad_test::sin_call_d(x, x_d, y, y_d)); + write_output("if branch", x, x_d, y, y_d, ad_name::ad_test::if_branch_d(x, x_d, y, y_d)); + write_output("if else branch", x, x_d, y, y_d, ad_name::ad_test::if_else_branch_d(x, x_d, y, y_d)); + write_output("direct return", x, x_d, y, y_d, ad_name::ad_test::direct_return_d(x, x_d, y, y_d)); + write_output("intermediate var", x, x_d, y, y_d, ad_name::ad_test::intermediate_var_d(x, x_d, y, y_d)); + write_output("intermediate passive var", x, x_d, y, y_d, ad_name::ad_test::intermediate_passive_var_d(x, x_d, y, y_d)); + write_output("intermediate untyped", x, x_d, y, y_d, ad_name::ad_test::intermediate_untyped_d(x, x_d, y, y_d)); + write_output("intermediate default init", x, x_d, y, y_d, ad_name::ad_test::intermediate_default_init_d(x, x_d, y, y_d)); + write_output("intermediate no init", x, x_d, y, y_d, ad_name::ad_test::intermediate_no_init_d(x, x_d, y, y_d)); + write_output("while loop", x, x_d, y, y_d, ad_name::ad_test::while_loop_d(x, x_d, y, y_d)); + write_output("do while loop", x, x_d, y, y_d, ad_name::ad_test::do_while_loop_d(x, x_d, y, y_d)); + write_output("for loop", x, x_d, y, y_d, ad_name::ad_test::for_loop_d(x, x_d, y, y_d)); + write_output("tye_outer.a + y", x, x_d, y, y_d, ad_name::ad_test::type_outer_use_d(x, x_d, y, y_d)); + write_output("type_outer.add(y)", x, x_d, y, y_d, ad_name::ad_test::type_outer_call_d(x, x_d, y, y_d)); +} diff --git a/regression-tests/pure2-autodiff.cpp2 b/regression-tests/pure2-autodiff.cpp2 new file mode 100644 index 000000000..7438068d5 --- /dev/null +++ b/regression-tests/pure2-autodiff.cpp2 @@ -0,0 +1,361 @@ +ad_name: namespace = { + +func_outer: (x: double, y: double) -> (ret: double) = { + ret = x + y; +} + +type_outer: type = { + public a: double = 0.0; + + add: (this, b: double) -> double = { + return a + b; + } +} + +ad_test: @autodiff @print type = { + + add_1: (x: double, y: double) -> (r: double) = { + r = x + y; + } + + add_2: (x: double, y: double) -> (r: double) = { + r = x + y + x; + } + + sub_1: (x: double, y: double) -> (r: double) = { + r = x - y; + } + + sub_2: (x: double, y: double) -> (r: double) = { + r = x - y - x; + } + + add_sub_2: (x: double, y: double) -> (r: double) = { + r = x + y - x; + } + + mul_1: (x: double, y: double) -> (r: double) = { + r = x * y; + } + + mul_2: (x: double, y: double) -> (r: double) = { + r = x * y * x; + } + + div_1: (x: double, y: double) -> (r: double) = { + r = x / y; + } + + div_2: (x: double, y: double) -> (r: double) = { + r = x / y / y; + } + + mul_div_2: (x: double, y: double) -> (r: double) = { + r = x * y / x; + } + + mul_add: (x: double, y: double) -> (r: double) = { + r = x * (x + y); + } + + add_mul: (x: double, y: double) -> (r: double) = { + r = x + x * y; + } + + prefix_add: (x: double, y: double) -> (r: double) = { + r = +x + y; + } + + prefix_sub: (x: double, y: double) -> (r: double) = { + r = -x + y; + } + + func: (x: double, y: double) -> (ret: double) = { + ret = x + y; + } + + func_call: (x: double, y: double) -> (r: double) = { + r = x * func(x, y); + } + + func_outer_call: (x: double, y: double) -> (r: double) = { + r = x * func_outer(x, y); + } + + sin_call: (x: double, y: double) -> (r: double) = { + r = sin(x - y); + } + + if_branch: (x: double, y: double) -> (r: double) = { + r = x; + + if x < 0.0 { + r = y; + } + } + + if_else_branch: (x: double, y: double) -> (r: double) = { + if x < 0.0 { + r = y; + } + else { + r = x; + } + } + + direct_return: (x: double, y: double) -> double = { + return x + y; + } + + intermediate_var: (x: double, y: double) -> (r: double) = { + t: double = x + y; + + r = t; + } + + intermediate_passive_var: (x: double, y: double) -> (r: double) = { + i: int = (); + r = x + y; + i = 2; + + _ = i; + } + + intermediate_untyped: (x: double, y: double) -> (r: double) = { + t := 0.0; + t = x + y; + + r = t; + } + + intermediate_default_init: (x: double, y: double) -> (r: double) = { + t: double = (); + t = x + y; + + r = t; + } + + intermediate_no_init: (x: double, y: double) -> (r: double) = { + t: double; + t = x + y; + + r = t; + } + + while_loop: (x: double, y: double) -> (r: double) = { + r = x; + + (copy i: int = 0, copy t: double = 0.0) + while i < 2 next (i += 1) { + t = y; + r = r + t; + } + } + + do_while_loop: (x: double, y: double) -> (r: double) = { + r = x; + + (copy i: = 0) + do { + r = r + y ; + } + next (i += 1) + while i < 2; + } + + for_loop: (x: double, y: double) -> (r: double) = { + v: std::vector = (); + + v.push_back(x); + v.push_back(y); + + r = 0.0; + for v + do (t) + { + r = r + t; + } + } + + type_outer_use: (x: double, y: double) -> (r: double) = { + t : type_outer = (); + t.a = x; + + r = t.a + y; + } + + type_outer_call: (x: double, y: double) -> (r: double) = { + t : type_outer = (); + t.a = x; + + r = t.add(y); + } +} + +ad_test_reverse: @autodiff<"reverse"> @print type = { + + add_1: (x: double, y: double) -> (r: double) = { + r = x + y; + } + + add_2: (x: double, y: double) -> (r: double) = { + r = x + y + x; + } + + sub_1: (x: double, y: double) -> (r: double) = { + r = x - y; + } + + sub_2: (x: double, y: double) -> (r: double) = { + r = x - y - x; + } + + add_sub_2: (x: double, y: double) -> (r: double) = { + r = x + y - x; + } + + mul_1: (x: double, y: double) -> (r: double) = { + r = x * y; + } + + mul_2: (x: double, y: double) -> (r: double) = { + r = x * y * x; + } + + div_1: (x: double, y: double) -> (r: double) = { + r = x / y; + } + + div_2: (x: double, y: double) -> (r: double) = { + r = x / y / y; + } + + mul_div_2: (x: double, y: double) -> (r: double) = { + r = x * y / x; + } + + mul_add: (x: double, y: double) -> (r: double) = { + r = x * (x + y); + } + + add_mul: (x: double, y: double) -> (r: double) = { + r = x + x * y; + } + + sin_call: (x: double, y: double) -> (r: double) = { + r = sin(x - y); + } + + func: (x: double, y: double) -> (ret: double) = { + ret = x + y; + } + + func_call: (x: double, y: double) -> (r: double) = { + r = x * func(x, y); + } + + func_outer_call: (x: double, y: double) -> (r: double) = { + r = x * func_outer(x, y); + } +} +} + +ad_test_twice: @autodiff @autodiff<"suffix=_d2"> @print type = { + mul_1: (x: double) -> (r: double) = { + r = x * x; + } +} + +write_output: (func: std::string, x: double, x_d: double, y: double, y_d: double, ret) = { + std::cout << "diff((func)$) at (x = (x)$, x_d = (x_d)$, y = (y)$, y_d = (y_d)$) = (r = (ret.r)$, r_d = (ret.r_d)$)" << std::endl; +} + +write_output_reverse: (func: std::string, x: double, inout x_b: double, y: double, inout y_b: double, inout r_b: double, ret) = { + r_b = 1.0; + std::cout << "diff((func)$) at (x = (x)$, y = (y)$, r_b = (r_b)$) = (r = (ret)$, x_b = (x_b)$, y_b = (y_b)$)" << std::endl; + x_b = 0.0; + y_b = 0.0; +} + +ad_test_2: @autodiff<"order=2"> @print type = { + f: (x: double) -> (y: double) = { + if x < -3 + { + y = x * x; + } + else if x < 3 + { + y = x + sin(x) + 10; + } + else + { + y = sin(x) * x*x; + } + } +} + +main: () = { + + x: double = 2.0; + x_d: double = 1.0; + y: double = 3.0; + y_d: double = 2.0; + + write_output("x + y", x, x_d, y, y_d, ad_name::ad_test::add_1_d(x, x_d, y, y_d)); + write_output("x + y + x", x, x_d, y, y_d, ad_name::ad_test::add_2_d(x, x_d, y, y_d)); + write_output("x - y", x, x_d, y, y_d, ad_name::ad_test::sub_1_d(x, x_d, y, y_d)); + write_output("x - y - x", x, x_d, y, y_d, ad_name::ad_test::sub_2_d(x, x_d, y, y_d)); + write_output("x + y - x", x, x_d, y, y_d, ad_name::ad_test::add_sub_2_d(x, x_d, y, y_d)); + write_output("x * y", x, x_d, y, y_d, ad_name::ad_test::mul_1_d(x, x_d, y, y_d)); + write_output("x * y * x", x, x_d, y, y_d, ad_name::ad_test::mul_2_d(x, x_d, y, y_d)); + write_output("x / y", x, x_d, y, y_d, ad_name::ad_test::div_1_d(x, x_d, y, y_d)); + write_output("x / y / y", x, x_d, y, y_d, ad_name::ad_test::div_2_d(x, x_d, y, y_d)); + write_output("x * y / x", x, x_d, y, y_d, ad_name::ad_test::mul_div_2_d(x, x_d, y, y_d)); + write_output("x * (x + y)", x, x_d, y, y_d, ad_name::ad_test::mul_add_d(x, x_d, y, y_d)); + write_output("x + x * y", x, x_d, y, y_d, ad_name::ad_test::add_mul_d(x, x_d, y, y_d)); + write_output("+x + y)", x, x_d, y, y_d, ad_name::ad_test::prefix_add_d(x, x_d, y, y_d)); + write_output("-x + y)", x, x_d, y, y_d, ad_name::ad_test::prefix_sub_d(x, x_d, y, y_d)); + write_output("x * func(x, y)", x, x_d, y, y_d, ad_name::ad_test::func_call_d(x, x_d, y, y_d)); + write_output("x * func_outer(x, y)", x, x_d, y, y_d, ad_name::ad_test::func_outer_call_d(x, x_d, y, y_d)); + write_output("sin(x - y)", x, x_d, y, y_d, ad_name::ad_test::sin_call_d(x, x_d, y, y_d)); + write_output("if branch", x, x_d, y, y_d, ad_name::ad_test::if_branch_d(x, x_d, y, y_d)); + write_output("if else branch", x, x_d, y, y_d, ad_name::ad_test::if_else_branch_d(x, x_d, y, y_d)); + write_output("direct return", x, x_d, y, y_d, ad_name::ad_test::direct_return_d(x, x_d, y, y_d)); + write_output("intermediate var", x, x_d, y, y_d, ad_name::ad_test::intermediate_var_d(x, x_d, y, y_d)); + write_output("intermediate passive var", x, x_d, y, y_d, ad_name::ad_test::intermediate_passive_var_d(x, x_d, y, y_d)); + write_output("intermediate untyped", x, x_d, y, y_d, ad_name::ad_test::intermediate_untyped_d(x, x_d, y, y_d)); + write_output("intermediate default init", x, x_d, y, y_d, ad_name::ad_test::intermediate_default_init_d(x, x_d, y, y_d)); + write_output("intermediate no init", x, x_d, y, y_d, ad_name::ad_test::intermediate_no_init_d(x, x_d, y, y_d)); + write_output("while loop", x, x_d, y, y_d, ad_name::ad_test::while_loop_d(x, x_d, y, y_d)); + write_output("do while loop", x, x_d, y, y_d, ad_name::ad_test::do_while_loop_d(x, x_d, y, y_d)); + write_output("for loop", x, x_d, y, y_d, ad_name::ad_test::for_loop_d(x, x_d, y, y_d)); + write_output("tye_outer.a + y", x, x_d, y, y_d, ad_name::ad_test::type_outer_use_d(x, x_d, y, y_d)); + write_output("type_outer.add(y)", x, x_d, y, y_d, ad_name::ad_test::type_outer_call_d(x, x_d, y, y_d)); + + x_b: double = 0.0; + y_b: double = 0.0; + w_b: double = 1.0; + + write_output_reverse("x + y", x, x_b, y, y_b, w_b, ad_name::ad_test_reverse::add_1_b(x, x_b, y, y_b, w_b)); + write_output_reverse("x + y + x", x, x_b, y, y_b, w_b, ad_name::ad_test_reverse::add_2_b(x, x_b, y, y_b, w_b)); + write_output_reverse("x - y", x, x_b, y, y_b, w_b, ad_name::ad_test_reverse::sub_1_b(x, x_b, y, y_b, w_b)); + write_output_reverse("x - y - x", x, x_b, y, y_b, w_b, ad_name::ad_test_reverse::sub_2_b(x, x_b, y, y_b, w_b)); + write_output_reverse("x + y - x", x, x_b, y, y_b, w_b, ad_name::ad_test_reverse::add_sub_2_b(x, x_b, y, y_b, w_b)); + write_output_reverse("x * y", x, x_b, y, y_b, w_b, ad_name::ad_test_reverse::mul_1_b(x, x_b, y, y_b, w_b)); + write_output_reverse("x * y * x", x, x_b, y, y_b, w_b, ad_name::ad_test_reverse::mul_2_b(x, x_b, y, y_b, w_b)); + write_output_reverse("x / y", x, x_b, y, y_b, w_b, ad_name::ad_test_reverse::div_1_b(x, x_b, y, y_b, w_b)); + write_output_reverse("x / y / y", x, x_b, y, y_b, w_b, ad_name::ad_test_reverse::div_2_b(x, x_b, y, y_b, w_b)); + write_output_reverse("x * y / x", x, x_b, y, y_b, w_b, ad_name::ad_test_reverse::mul_div_2_b(x, x_b, y, y_b, w_b)); + write_output_reverse("x * (x + y)", x, x_b, y, y_b, w_b, ad_name::ad_test_reverse::mul_add_b(x, x_b, y, y_b, w_b)); + write_output_reverse("x + x * y", x, x_b, y, y_b, w_b, ad_name::ad_test_reverse::add_mul_b(x, x_b, y, y_b, w_b)); + write_output_reverse("sin(x-y)", x, x_b, y, y_b, w_b, ad_name::ad_test_reverse::sin_call_b(x, x_b, y, y_b, w_b)); + write_output_reverse("x * func(x-y)", x, x_b, y, y_b, w_b, ad_name::ad_test_reverse::func_call_b(x, x_b, y, y_b, w_b)); + write_output_reverse("x * func_outer(x-y)", x, x_b, y, y_b, w_b, ad_name::ad_test_reverse::func_outer_call_b(x, x_b, y, y_b, w_b)); + + _ = x_b; + _ = y_b; + _ = w_b; + + r_twice := ad_test_twice::mul_1_d_d2(x, x_d, x_d, 0.0); + std::cout << "2nd order diff of x*x at (x)$ = (r_twice.r_d_d2)$" << std::endl; +} diff --git a/regression-tests/pure2-bugfix-for-assert-capture-error.cpp2 b/regression-tests/pure2-bugfix-for-assert-capture-error.cpp2 new file mode 100644 index 000000000..c35b2d24f --- /dev/null +++ b/regression-tests/pure2-bugfix-for-assert-capture-error.cpp2 @@ -0,0 +1,3 @@ +crash_10: (foo: i32) = { + assert( 10LL as i32 == foo$); +} diff --git a/regression-tests/pure2-bugfix-for-bad-capture-error.cpp2 b/regression-tests/pure2-bugfix-for-bad-capture-error.cpp2 new file mode 100644 index 000000000..c35b2d24f --- /dev/null +++ b/regression-tests/pure2-bugfix-for-bad-capture-error.cpp2 @@ -0,0 +1,3 @@ +crash_10: (foo: i32) = { + assert( 10LL as i32 == foo$); +} diff --git a/regression-tests/pure2-bugfix-for-bad-decltype-error.cpp2 b/regression-tests/pure2-bugfix-for-bad-decltype-error.cpp2 new file mode 100644 index 000000000..2b860c447 --- /dev/null +++ b/regression-tests/pure2-bugfix-for-bad-decltype-error.cpp2 @@ -0,0 +1,4 @@ +crash_89: () = { + f := new(0); + _ = f is decltype.f); +} diff --git a/regression-tests/pure2-bugfix-for-bad-parameter-error.cpp2 b/regression-tests/pure2-bugfix-for-bad-parameter-error.cpp2 new file mode 100644 index 000000000..68198c544 --- /dev/null +++ b/regression-tests/pure2-bugfix-for-bad-parameter-error.cpp2 @@ -0,0 +1 @@ +print: (inout out: std::ostream=args: T) requires true = {} diff --git a/regression-tests/pure2-bugfix-for-bad-using-error.cpp2 b/regression-tests/pure2-bugfix-for-bad-using-error.cpp2 new file mode 100644 index 000000000..1878b6fde --- /dev/null +++ b/regression-tests/pure2-bugfix-for-bad-using-error.cpp2 @@ -0,0 +1,3 @@ +main: () = { + using +} diff --git a/regression-tests/pure2-bugfix-for-functions-before-superclasses-error.cpp2 b/regression-tests/pure2-bugfix-for-functions-before-superclasses-error.cpp2 new file mode 100644 index 000000000..e368600ba --- /dev/null +++ b/regression-tests/pure2-bugfix-for-functions-before-superclasses-error.cpp2 @@ -0,0 +1,8 @@ +crash_m0b: type = { +} + +crash_m0c: type = { + name: i32; + get_name: (this) -> i32 = { return name; } + this: crash_m0b; +} diff --git a/regression-tests/pure2-bugfix-for-invalid-alias-error.cpp2 b/regression-tests/pure2-bugfix-for-invalid-alias-error.cpp2 new file mode 100644 index 000000000..352efff49 --- /dev/null +++ b/regression-tests/pure2-bugfix-for-invalid-alias-error.cpp2 @@ -0,0 +1,3 @@ +outer: type = { + x: requires true == 42; +} diff --git a/regression-tests/pure2-bugfix-for-late-comments.cpp2 b/regression-tests/pure2-bugfix-for-late-comments.cpp2 new file mode 100644 index 000000000..97235edde --- /dev/null +++ b/regression-tests/pure2-bugfix-for-late-comments.cpp2 @@ -0,0 +1,11 @@ + +main: () -> int = { + x := crash_m0(); + _ = x; +} + +crash_m0: type = { + operator-: (this, _) -> int = 0;/* Comment starts here +And continues here +*/ +} diff --git a/regression-tests/pure2-bugfix-for-naked-unsigned-char-error.cpp2 b/regression-tests/pure2-bugfix-for-naked-unsigned-char-error.cpp2 new file mode 100644 index 000000000..1458076d2 --- /dev/null +++ b/regression-tests/pure2-bugfix-for-naked-unsigned-char-error.cpp2 @@ -0,0 +1,3 @@ +main: () = { + e: unsigned char +} diff --git a/regression-tests/pure2-bugfix-for-namespace-error.cpp2 b/regression-tests/pure2-bugfix-for-namespace-error.cpp2 new file mode 100644 index 000000000..ef4efc8f4 --- /dev/null +++ b/regression-tests/pure2-bugfix-for-namespace-error.cpp2 @@ -0,0 +1,9 @@ +crash_96: @print type = { + namespace_alias: namespace = type_alias: type == array; +} + +crash_96a: @print type = { + test: () = { + namespace_alias: namespace = type_alias: type == array; + } +} diff --git a/regression-tests/pure2-bugfix-for-out-this-nonconstructor-error.cpp2 b/regression-tests/pure2-bugfix-for-out-this-nonconstructor-error.cpp2 new file mode 100644 index 000000000..6831e3675 --- /dev/null +++ b/regression-tests/pure2-bugfix-for-out-this-nonconstructor-error.cpp2 @@ -0,0 +1,4 @@ + +Machine: @polymorphic_base type = { + operator%: (out this, _: std::string) = {} +} diff --git a/regression-tests/pure2-expected-is-as.cpp2 b/regression-tests/pure2-expected-is-as.cpp2 new file mode 100644 index 000000000..d144b2770 --- /dev/null +++ b/regression-tests/pure2-expected-is-as.cpp2 @@ -0,0 +1,90 @@ +// `std::expected` requires C++23 so a dedicated test file is needed +// since only MSVC supports it at time of writing, and there's no #ifdef +// or `static if` support in Cpp2 (yet?). + +main: () -> int = { + + ex1: std::expected = (123); + ex2: std::expected = std::unexpected(-1); + ex3: std::expected = ("Expect the unexpected"); + + if ex1 is int { + std::cout << "ex1 is int\n"; + } + + if ex1 is bool { + std::cout << "BUG - ex1 is not a bool\n"; + return -1; + } + + if ex1 is void { + std::cout << "BUG - ex1 is not 'empty'\n"; + return -1; + } + + if ex1 is std::unexpected { + std::cout << "BUG - ex1 is not unexpected\n"; + return -1; + } + + if ex1 is 123 { + std::cout << "ex1 is 123\n"; + } + + if ex1 is 100 { + std::cout << "BUG - ex1's value is not 100\n"; + return -1; + } + + val1:= ex1 as int; + std::cout << "ex1 as int = " << val1 << "\n"; + + if ex2 is int { + std::cout << "BUG - ex2 is not an int\n"; + return -1; + } + + if ex2 is bool { + std::cout << "BUG - ex2 is not a bool\n"; + return -1; + } + + if ex2 is 123 { + std::cout << "BUG - ex2 does not have a value\n"; + return -1; + } + + if ex2 is std::unexpected { + std::cout << "ex2 is unexpected and error is: " << ex2.error() << "\n"; + } + + if ex2 is void { + std::cout << "ex2 is 'empty' aka unexpected and error is: " << ex2.error() << "\n"; + } + + ex2_err:= ex2 as std::unexpected; + std::cout << "ex2 as std::unexpected and error = " << ex2_err.error() << "\n"; + + test_inspect(ex1, "expected with value"); + test_inspect(ex2, "expected with unexpected"); + test_inspect(ex3, "expected with value"); + + return 0; +} + +test_inspect: ( x: _, msg: _ ) = { + + unwrap:= :(unexp: std::unexpected) -> _ = { + return unexp.error(); + }; + + std::cout + << "\n" << msg << "\n ..." + << inspect x -> std::string { + is int = "integer " + std::to_string(x as int); + is std::unexpected = "unexpected " + std::to_string(unwrap(x as std::unexpected)); + is std::string = "string " + x as std::string; + is _ = " no match"; + } + << "\n"; +} \ No newline at end of file diff --git a/regression-tests/pure2-function-body-reflection.cpp2 b/regression-tests/pure2-function-body-reflection.cpp2 new file mode 100644 index 000000000..50ace27f3 --- /dev/null +++ b/regression-tests/pure2-function-body-reflection.cpp2 @@ -0,0 +1,92 @@ + +ns: namespace = { + +// This function will be visible as a namespace member while reflecting on ns::test +sample_function_before_type: () = { } + +test: @sample_traverser type = +{ + one_liner: (a: double, b: double, c: double) = (a + c) * b; + + return_list: () + -> (r: double, s: float, t: std::string) + = { + r = 42.0; + s = 2.71828f; + t = "e times pi"; + } + + branches: (a: double, b: double, c: double) + -> (r: double = 3.14159) + = { + if true { + r = r + a; + } + + if a * b > c { + r += sin(b); + } + else { + r = c; + } + } + + binary_ops: (inout a: double, b: double, c: double) + = { + a -= b * c + (1 << 2); + test: bool = a <= b < c && true || false; + x := 1 & 2; + y := 3 ^ 4; + z := 5 | 6; + } + + prefix: () -> int + = { + a := -1; + b := +2; + + (local := a-b) + if !true { + return local; + } + return a+b; + } + + postfix: (inout a: double) + = { + ptr := a&; + ptr*++--; + } + + qualified_ids: () -> _ + = { + v : std::vector = (1, 2, 3); + return v.ssize(); + } + + loops: () + = { + v: std::vector = (1, 2, 3); + + (copy index := 1) + for v + do (value) + { + std::cout << "(index)$ (value)$\n"; + } + + i := 0; + while i < 3 next i += 1 { std::cout << i << "\n"; } + + do { std::cout << "plugh\n"; } while false; + } +} + +// This function will not be visible as a namespace member while reflecting on ns::test +sample_function_after_type: () = { } + +} + +main: () = { + std::cout << "calling generated function ns::add_1... ns::add_1(42) returned (ns::add_1(42))$\n"; +} diff --git a/regression-tests/pure2-initialization-safety-with-else-if.cpp2 b/regression-tests/pure2-initialization-safety-with-else-if.cpp2 index f35a61cd2..d630f3ccc 100644 --- a/regression-tests/pure2-initialization-safety-with-else-if.cpp2 +++ b/regression-tests/pure2-initialization-safety-with-else-if.cpp2 @@ -24,6 +24,14 @@ main: (args) = { std::cout << p* << std::endl; } +ad_test: type = { + intermediate_default_no_init: (x: double, y: double) -> (r: double) = { + t: double; + t = x + y; + + r = t; // OK, after t but it's a return value + } +} ok: () = { i: int; diff --git a/regression-tests/pure2-print.cpp2 b/regression-tests/pure2-print.cpp2 index 6b80d9cb7..ea959a528 100644 --- a/regression-tests/pure2-print.cpp2 +++ b/regression-tests/pure2-print.cpp2 @@ -102,6 +102,23 @@ outer: @print type = { y: (_: type_of(0)) = { } + ff: (_: int) = { } + + try_catch: () = + { + fptr := ff&; + try { + fptr(-666); + } catch (i: int) { + std::cout << "oh look, a thrown int: " << i << std::endl; + } + try { + ff(-42); + } catch (_) { + std::cout << "oh look, another exception" << std::endl; + } + } + } main: () = { diff --git a/regression-tests/pure2-regex-general.cpp2 b/regression-tests/pure2-regex-general.cpp2 new file mode 100644 index 000000000..4eaa95f7a --- /dev/null +++ b/regression-tests/pure2-regex-general.cpp2 @@ -0,0 +1,32 @@ +general_regex_test: @regex type = { + regex_01 := R"(AA)"; + regex_02 := R"((?=aa))"; + run: (this) = { + std::cout << "Running tests_01_char_matcher:"<< std::endl; + + std::cout << "Not full match fails: " << regex_01.match("AAaa").matched << std::endl; + std::cout << "Full match is ok: " << regex_01.match("AA").matched << std::endl; + std::cout << "Search finds at position 1: " << regex_01.search("aAAaa").group_start(0) << std::endl; + std::cout << "Search finds at position 3: " << regex_01.search("aaaAAaa").group_start(0) << std::endl; + + count := 0; + func := :(r) -> bool == { + count&$* += 1; + std::cout << "Find all finds at position: " << r.group_start(0) << std::endl; + return true; + }; + + str : std::string = "aAAaAAaAAa"; + regex_01..find_all(func, str); + std::cout << "Find all found 3 matched: " << count << std::endl; + + count = 0; + str = "bbaabb"; + regex_02..find_all(func, str); + std::cout << "Find all found 1 match: " << count << std::endl; + } +} + +main: () = { + general_regex_test().run(); +} diff --git a/regression-tests/pure2-regex_01_char_matcher.cpp2 b/regression-tests/pure2-regex_01_char_matcher.cpp2 index 1c3a37664..048336147 100644 --- a/regression-tests/pure2-regex_01_char_matcher.cpp2 +++ b/regression-tests/pure2-regex_01_char_matcher.cpp2 @@ -94,6 +94,7 @@ create_result: (resultExpr: std::string, r) -> std::string = { } result += std::to_string(pos); } + next++; } else { std::cerr << "Not implemented"; diff --git a/regression-tests/pure2-regex_02_ranges.cpp2 b/regression-tests/pure2-regex_02_ranges.cpp2 index 8f71810b0..7124c08ba 100644 --- a/regression-tests/pure2-regex_02_ranges.cpp2 +++ b/regression-tests/pure2-regex_02_ranges.cpp2 @@ -94,6 +94,7 @@ create_result: (resultExpr: std::string, r) -> std::string = { } result += std::to_string(pos); } + next++; } else { std::cerr << "Not implemented"; diff --git a/regression-tests/pure2-regex_03_wildcard.cpp2 b/regression-tests/pure2-regex_03_wildcard.cpp2 index 62688e469..a48ed941a 100644 --- a/regression-tests/pure2-regex_03_wildcard.cpp2 +++ b/regression-tests/pure2-regex_03_wildcard.cpp2 @@ -94,6 +94,7 @@ create_result: (resultExpr: std::string, r) -> std::string = { } result += std::to_string(pos); } + next++; } else { std::cerr << "Not implemented"; diff --git a/regression-tests/pure2-regex_04_start_end.cpp2 b/regression-tests/pure2-regex_04_start_end.cpp2 index 87a4c8fb9..63754c23f 100644 --- a/regression-tests/pure2-regex_04_start_end.cpp2 +++ b/regression-tests/pure2-regex_04_start_end.cpp2 @@ -94,6 +94,7 @@ create_result: (resultExpr: std::string, r) -> std::string = { } result += std::to_string(pos); } + next++; } else { std::cerr << "Not implemented"; @@ -172,6 +173,7 @@ test_tests_04_start_end: @regex type = { regex_07 := R"(^)"; regex_08 := R"($)"; regex_09 := R"($b)"; + regex_10 := R"(\GX.*X)"; run: (this) = { std::cout << "Running tests_04_start_end:"<< std::endl; test(regex_01, "01", R"(^abc$)", "abc", "y", R"($&)", "abc"); @@ -183,6 +185,7 @@ test_tests_04_start_end: @regex type = { test(regex_07, "07", R"(^)", "abc", "y", R"($&)", ""); test(regex_08, "08", R"($)", "abc", "y", R"($&)", ""); test(regex_09, "09", R"($b)", "b", "n", R"(-)", "-"); + test(regex_10, "10", R"(\GX.*X)", "aaaXbX", "n", R"(-)", "-"); std::cout << std::endl; } } diff --git a/regression-tests/pure2-regex_05_classes.cpp2 b/regression-tests/pure2-regex_05_classes.cpp2 index 4e9926da5..4e6ebb838 100644 --- a/regression-tests/pure2-regex_05_classes.cpp2 +++ b/regression-tests/pure2-regex_05_classes.cpp2 @@ -94,6 +94,7 @@ create_result: (resultExpr: std::string, r) -> std::string = { } result += std::to_string(pos); } + next++; } else { std::cerr << "Not implemented"; diff --git a/regression-tests/pure2-regex_06_boundaries.cpp2 b/regression-tests/pure2-regex_06_boundaries.cpp2 index 5b96fca36..75110c40e 100644 --- a/regression-tests/pure2-regex_06_boundaries.cpp2 +++ b/regression-tests/pure2-regex_06_boundaries.cpp2 @@ -94,6 +94,7 @@ create_result: (resultExpr: std::string, r) -> std::string = { } result += std::to_string(pos); } + next++; } else { std::cerr << "Not implemented"; diff --git a/regression-tests/pure2-regex_07_short_classes.cpp2 b/regression-tests/pure2-regex_07_short_classes.cpp2 index 3723d7f77..5bd9774d9 100644 --- a/regression-tests/pure2-regex_07_short_classes.cpp2 +++ b/regression-tests/pure2-regex_07_short_classes.cpp2 @@ -94,6 +94,7 @@ create_result: (resultExpr: std::string, r) -> std::string = { } result += std::to_string(pos); } + next++; } else { std::cerr << "Not implemented"; diff --git a/regression-tests/pure2-regex_08_alternatives.cpp2 b/regression-tests/pure2-regex_08_alternatives.cpp2 index 892d8715e..23e413a57 100644 --- a/regression-tests/pure2-regex_08_alternatives.cpp2 +++ b/regression-tests/pure2-regex_08_alternatives.cpp2 @@ -94,6 +94,7 @@ create_result: (resultExpr: std::string, r) -> std::string = { } result += std::to_string(pos); } + next++; } else { std::cerr << "Not implemented"; diff --git a/regression-tests/pure2-regex_09_groups.cpp2 b/regression-tests/pure2-regex_09_groups.cpp2 index c3949e3a2..2c7836ff6 100644 --- a/regression-tests/pure2-regex_09_groups.cpp2 +++ b/regression-tests/pure2-regex_09_groups.cpp2 @@ -94,6 +94,7 @@ create_result: (resultExpr: std::string, r) -> std::string = { } result += std::to_string(pos); } + next++; } else { std::cerr << "Not implemented"; diff --git a/regression-tests/pure2-regex_10_escapes.cpp2 b/regression-tests/pure2-regex_10_escapes.cpp2 index 72b3ff77a..be0cb3557 100644 --- a/regression-tests/pure2-regex_10_escapes.cpp2 +++ b/regression-tests/pure2-regex_10_escapes.cpp2 @@ -94,6 +94,7 @@ create_result: (resultExpr: std::string, r) -> std::string = { } result += std::to_string(pos); } + next++; } else { std::cerr << "Not implemented"; diff --git a/regression-tests/pure2-regex_11_group_references.cpp2 b/regression-tests/pure2-regex_11_group_references.cpp2 index 1301bf15c..46cf13323 100644 --- a/regression-tests/pure2-regex_11_group_references.cpp2 +++ b/regression-tests/pure2-regex_11_group_references.cpp2 @@ -94,6 +94,7 @@ create_result: (resultExpr: std::string, r) -> std::string = { } result += std::to_string(pos); } + next++; } else { std::cerr << "Not implemented"; diff --git a/regression-tests/pure2-regex_12_case_insensitive.cpp2 b/regression-tests/pure2-regex_12_case_insensitive.cpp2 index bfec41f3b..dc14f2bfb 100644 --- a/regression-tests/pure2-regex_12_case_insensitive.cpp2 +++ b/regression-tests/pure2-regex_12_case_insensitive.cpp2 @@ -94,6 +94,7 @@ create_result: (resultExpr: std::string, r) -> std::string = { } result += std::to_string(pos); } + next++; } else { std::cerr << "Not implemented"; diff --git a/regression-tests/pure2-regex_13_possessive_modifier.cpp2 b/regression-tests/pure2-regex_13_possessive_modifier.cpp2 index 0f014327c..ad683ef05 100644 --- a/regression-tests/pure2-regex_13_possessive_modifier.cpp2 +++ b/regression-tests/pure2-regex_13_possessive_modifier.cpp2 @@ -94,6 +94,7 @@ create_result: (resultExpr: std::string, r) -> std::string = { } result += std::to_string(pos); } + next++; } else { std::cerr << "Not implemented"; diff --git a/regression-tests/pure2-regex_14_multiline_modifier.cpp2 b/regression-tests/pure2-regex_14_multiline_modifier.cpp2 index c6d205ca1..24a9ec610 100644 --- a/regression-tests/pure2-regex_14_multiline_modifier.cpp2 +++ b/regression-tests/pure2-regex_14_multiline_modifier.cpp2 @@ -94,6 +94,7 @@ create_result: (resultExpr: std::string, r) -> std::string = { } result += std::to_string(pos); } + next++; } else { std::cerr << "Not implemented"; diff --git a/regression-tests/pure2-regex_15_group_modifiers.cpp2 b/regression-tests/pure2-regex_15_group_modifiers.cpp2 index 1d2aa9090..4816874c7 100644 --- a/regression-tests/pure2-regex_15_group_modifiers.cpp2 +++ b/regression-tests/pure2-regex_15_group_modifiers.cpp2 @@ -94,6 +94,7 @@ create_result: (resultExpr: std::string, r) -> std::string = { } result += std::to_string(pos); } + next++; } else { std::cerr << "Not implemented"; diff --git a/regression-tests/pure2-regex_16_perl_syntax_modifier.cpp2 b/regression-tests/pure2-regex_16_perl_syntax_modifier.cpp2 index c15831704..35e14e2c7 100644 --- a/regression-tests/pure2-regex_16_perl_syntax_modifier.cpp2 +++ b/regression-tests/pure2-regex_16_perl_syntax_modifier.cpp2 @@ -94,6 +94,7 @@ create_result: (resultExpr: std::string, r) -> std::string = { } result += std::to_string(pos); } + next++; } else { std::cerr << "Not implemented"; diff --git a/regression-tests/pure2-regex_17_comments.cpp2 b/regression-tests/pure2-regex_17_comments.cpp2 index 5d42ce3d5..9a31848bf 100644 --- a/regression-tests/pure2-regex_17_comments.cpp2 +++ b/regression-tests/pure2-regex_17_comments.cpp2 @@ -94,6 +94,7 @@ create_result: (resultExpr: std::string, r) -> std::string = { } result += std::to_string(pos); } + next++; } else { std::cerr << "Not implemented"; diff --git a/regression-tests/pure2-regex_18_branch_reset.cpp2 b/regression-tests/pure2-regex_18_branch_reset.cpp2 index 6f3dcdf01..3260bacae 100644 --- a/regression-tests/pure2-regex_18_branch_reset.cpp2 +++ b/regression-tests/pure2-regex_18_branch_reset.cpp2 @@ -94,6 +94,7 @@ create_result: (resultExpr: std::string, r) -> std::string = { } result += std::to_string(pos); } + next++; } else { std::cerr << "Not implemented"; diff --git a/regression-tests/pure2-regex_19_lookahead.cpp2 b/regression-tests/pure2-regex_19_lookahead.cpp2 index c5b399f37..bfa9786bb 100644 --- a/regression-tests/pure2-regex_19_lookahead.cpp2 +++ b/regression-tests/pure2-regex_19_lookahead.cpp2 @@ -94,6 +94,7 @@ create_result: (resultExpr: std::string, r) -> std::string = { } result += std::to_string(pos); } + next++; } else { std::cerr << "Not implemented"; @@ -191,6 +192,14 @@ test_tests_19_lookahead: @regex type = { regex_26 := R"(^(a*?)(?!(aa|aaaa)*$)(?=a\z))"; regex_27 := R"(a(?!b(?!c))(..))"; regex_28 := R"(a(?!b(?=a))(..))"; + regex_29 := R"((?=foo))"; + regex_30 := R"((?=foo))"; + regex_31 := R"(.*(?=foo))"; + regex_32 := R"((?=.*P)P)"; + regex_33 := R"(X(?=foo)f)"; + regex_34 := R"(X(?=foo))"; + regex_35 := R"((?=XY*foo))"; + regex_36 := R"(^(?=XY*foo))"; regex_37 := R"(X(\w+)(?=\s)|X(\w+))"; regex_38 := R"(^a*(?=b)b)"; regex_39 := R"('(?!\A)x'm)"; @@ -208,6 +217,8 @@ test_tests_19_lookahead: @regex type = { regex_51 := R"(((?s)b.)c(?!\N))"; regex_52 := R"('(b.)c(?!\N)'s)"; regex_53 := R"(a*(?!))"; + regex_54 := R"((?)foo)"; + regex_55 := R"((?ABC)foo)"; run: (this) = { std::cout << "Running tests_19_lookahead:"<< std::endl; test(regex_01, "01", R"(a(?!b).)", "abad", "y", R"($&)", "ad"); @@ -238,6 +249,14 @@ test_tests_19_lookahead: @regex type = { test(regex_26, "26", R"(^(a*?)(?!(aa|aaaa)*$)(?=a\z))", "aaaaaaaa", "y", R"($1)", "aaaaaaa"); test(regex_27, "27", R"(a(?!b(?!c))(..))", "abababc", "y", R"($1)", "bc"); test(regex_28, "28", R"(a(?!b(?=a))(..))", "abababc", "y", R"($1)", "bc"); + test(regex_29, "29", R"((?=foo))", "foo", "y", R"(@+)", "0"); + test(regex_30, "30", R"((?=foo))", "XfooY", "y", R"(@+)", "1"); + test(regex_31, "31", R"(.*(?=foo))", "XfooY", "y", R"(@+)", "1"); + test(regex_32, "32", R"((?=.*P)P)", "aP", "y", R"(@+)", "2"); + test(regex_33, "33", R"(X(?=foo)f)", "..XfooY..", "y", R"(@+)", "4"); + test(regex_34, "34", R"(X(?=foo))", "..XfooY..", "y", R"(@+)", "3"); + test(regex_35, "35", R"((?=XY*foo))", "Xfoo", "y", R"(@+)", "0"); + test(regex_36, "36", R"(^(?=XY*foo))", "Xfoo", "y", R"(@+)", "0"); test(regex_37, "37", R"(X(\w+)(?=\s)|X(\w+))", "Xab", "y", R"([$1-$2])", "[-ab]"); test(regex_38, "38", R"(^a*(?=b)b)", "ab", "y", R"($&)", "ab"); test(regex_39, "39", R"('(?!\A)x'm)", "a\nxb\n", "y", R"(-)", "-"); @@ -255,6 +274,8 @@ test_tests_19_lookahead: @regex type = { test(regex_51, "51", R"(((?s)b.)c(?!\N))", "a\nb\nc\n", "y", R"($1:$&)", "b\n:b\nc"); test(regex_52, "52", R"('(b.)c(?!\N)'s)", "a\nb\nc\n", "y", R"($1:$&)", "b\n:b\nc"); test(regex_53, "53", R"(a*(?!))", "aaaab", "n", R"(-)", "-"); + test(regex_54, "54", R"((?)foo)", "bar>ABCfoo", "y", R"($&)", "foo"); + test(regex_55, "55", R"((?ABC)foo)", "bar>ABCfoo", "y", R"($&)", "ABCfoo"); std::cout << std::endl; } } diff --git a/regression-tests/pure2-regex_20_lookbehind.cpp2 b/regression-tests/pure2-regex_20_lookbehind.cpp2 new file mode 100644 index 000000000..75ad0ade5 --- /dev/null +++ b/regression-tests/pure2-regex_20_lookbehind.cpp2 @@ -0,0 +1,286 @@ +create_result: (resultExpr: std::string, r) -> std::string = { + result: std::string = ""; + + get_next := :(iter) -> _ = { + start := std::distance(resultExpr&$*.cbegin(), iter); + firstDollar := resultExpr&$*.find("$", start); + firstAt := resultExpr&$*.find("@", start); + + end := std::min(firstDollar, firstAt); + if end != std::string::npos { + return resultExpr&$*.cbegin() + end; + } + else { + return resultExpr&$*.cend(); + } + }; + extract_group_and_advance := :(inout iter) -> _ = { + start := iter; + + while std::isdigit(iter*) next iter++ {} + + return std::stoi(std::string(start, iter)); + }; + extract_until := :(inout iter, to: char) -> _ = { + start := iter; + + while (to != iter*) next iter++ {} // TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication) + + return std::string(start, iter); + }; + + iter := resultExpr.begin(); + + while iter != resultExpr.end() { + next := get_next(iter); + + if next != iter { + result += std::string(iter, next); + } + if next != resultExpr.end() { + if next* == '$' { + next++; + + if next* == '&' { + next++; + result += r.group(0); + } + else if next* == '-' || next* == '+' { + is_start := next* == '-'; + next++; + if next* == '{' { + next++; // Skip { + group := extract_until(next, '}'); + next++; // Skip } + result += r.group(group); + } + else if next* == '[' { + next++; // Skip [ + group := extract_group_and_advance(next); + next++; // Skip ] + + if is_start { + result += std::to_string(r.group_start(group)); + } + else { + result += std::to_string(r.group_end(group)); + } + } + else { + // Return max group + result += r.group(r.group_number() - 1); + } + } + else if std::isdigit(next*) { + group := extract_group_and_advance(next); + result += r.group(group); + } + else { + std::cerr << "Not implemented"; + } + } + else if next* == '@' { + next++; + + if next* == '-' || next* == '+' { + i := 0; + while i < cpp2::unchecked_narrow(r.group_number()) next i++ { + pos := 0; + if next* == '-' { + pos = r.group_start(i); + } + else { + pos = r.group_end(i); + } + result += std::to_string(pos); + } + next++; + } + else { + std::cerr << "Not implemented"; + } + } + else { + std::cerr << "Not implemented."; + } + } + iter = next; + } + + return result; +} + +sanitize: (copy str: std::string) -> std::string = +{ + str = cpp2::string_util::replace_all(str, "\a", "\\a"); + str = cpp2::string_util::replace_all(str, "\f", "\\f"); + str = cpp2::string_util::replace_all(str, "\x1b", "\\e"); + str = cpp2::string_util::replace_all(str, "\n", "\\n"); + str = cpp2::string_util::replace_all(str, "\r", "\\r"); + str = cpp2::string_util::replace_all(str, "\t", "\\t"); + + return str; +} + +test: (regex: M, id: std::string, regex_str: std::string, str: std::string, kind: std::string, resultExpr: std::string, + resultExpected: std::string) = { + + warning: std::string = ""; + if regex.to_string() != regex_str { + warning = "Warning: Parsed regex does not match."; + } + + status: std::string = "OK"; + + r := regex.search(str); + + if "y" == kind || "yM" == kind || "yS" == kind || "yB" == kind { + if !r.matched { + status = "Failure: Regex should apply."; + } + else { + // Have a match check the result + + result := create_result(resultExpr, r); + + if result != resultExpected { + status = "Failure: Result is wrong. (is: (sanitize(result))$)"; + } + } + } + else if "n" == kind { + if r.matched { + status = "Failure: Regex should not apply. Result is '(r.group(0))$'"; + } + } else { + status = "Unknown kind '(kind)$'"; + } + + if !warning.empty() { + warning += " "; + } + std::cout << "(id)$_(kind)$: (status)$ (warning)$regex: (regex_str)$ parsed_regex: (regex.to_string())$ str: (sanitize(str))$ result_expr: (resultExpr)$ expected_results (sanitize(resultExpected))$" << std::endl; +} + + +test_tests_20_lookbehind: @regex type = { + regex_01 := R"((?<=a)b)"; + regex_02 := R"((?<=af?)b)"; + regex_03 := R"((?<=a)b)"; + regex_04 := R"((?<=a(?:fo)?)b)"; + regex_05 := R"((?<=a)b)"; + regex_06 := R"((?<=a(?:foo)?)b)"; + regex_07 := R"((?)foo)"; + regex_50 := R"((?)foo)"; + regex_51 := R"((?<=bar>ABC)foo)"; + regex_52 := R"((?ABC)foo)"; + regex_53 := R"((?<=abcd(?<=(aaaabcd))))"; + regex_54 := R"((?=xy(?<=(aaxy))))"; + regex_55 := R"((?=xy(?<=(aaxyz?))))"; + regex_56 := R"((?<=(?=(aaxy))aa))"; + run: (this) = { + std::cout << "Running tests_20_lookbehind:"<< std::endl; + test(regex_01, "01", R"((?<=a)b)", "ab", "y", R"($&)", "b"); + test(regex_02, "02", R"((?<=af?)b)", "ab", "y", R"($&)", "b"); + test(regex_03, "03", R"((?<=a)b)", "cb", "n", R"(-)", "-"); + test(regex_04, "04", R"((?<=a(?:fo)?)b)", "cb", "n", R"(-)", "-"); + test(regex_05, "05", R"((?<=a)b)", "b", "n", R"(-)", "-"); + test(regex_06, "06", R"((?<=a(?:foo)?)b)", "b", "n", R"(-)", "-"); + test(regex_07, "07", R"((?)foo)", "bar>foo", "y", R"($&)", "foo"); + test(regex_50, "50", R"((?)foo)", "bar>foo", "n", R"(-)", "-"); + test(regex_51, "51", R"((?<=bar>ABC)foo)", "bar>ABCfoo", "y", R"($&)", "foo"); + test(regex_52, "52", R"((?ABC)foo)", "bar>ABCfoo", "n", R"(-)", "-"); + test(regex_53, "53", R"((?<=abcd(?<=(aaaabcd))))", "..aaaabcd..", "y", R"($1)", "aaaabcd"); + test(regex_54, "54", R"((?=xy(?<=(aaxy))))", "..aaxy..", "y", R"($1)", "aaxy"); + test(regex_55, "55", R"((?=xy(?<=(aaxyz?))))", "..aaxy..", "y", R"($1)", "aaxy"); + test(regex_56, "56", R"((?<=(?=(aaxy))aa))", "..aaxy..", "y", R"($1)", "aaxy"); + std::cout << std::endl; + } +} +main: () = { + test_tests_20_lookbehind().run(); +} diff --git a/regression-tests/pure2-regex_21_atomic_patterns.cpp2 b/regression-tests/pure2-regex_21_atomic_patterns.cpp2 new file mode 100644 index 000000000..98e98799a --- /dev/null +++ b/regression-tests/pure2-regex_21_atomic_patterns.cpp2 @@ -0,0 +1,186 @@ +create_result: (resultExpr: std::string, r) -> std::string = { + result: std::string = ""; + + get_next := :(iter) -> _ = { + start := std::distance(resultExpr&$*.cbegin(), iter); + firstDollar := resultExpr&$*.find("$", start); + firstAt := resultExpr&$*.find("@", start); + + end := std::min(firstDollar, firstAt); + if end != std::string::npos { + return resultExpr&$*.cbegin() + end; + } + else { + return resultExpr&$*.cend(); + } + }; + extract_group_and_advance := :(inout iter) -> _ = { + start := iter; + + while std::isdigit(iter*) next iter++ {} + + return std::stoi(std::string(start, iter)); + }; + extract_until := :(inout iter, to: char) -> _ = { + start := iter; + + while (to != iter*) next iter++ {} // TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication) + + return std::string(start, iter); + }; + + iter := resultExpr.begin(); + + while iter != resultExpr.end() { + next := get_next(iter); + + if next != iter { + result += std::string(iter, next); + } + if next != resultExpr.end() { + if next* == '$' { + next++; + + if next* == '&' { + next++; + result += r.group(0); + } + else if next* == '-' || next* == '+' { + is_start := next* == '-'; + next++; + if next* == '{' { + next++; // Skip { + group := extract_until(next, '}'); + next++; // Skip } + result += r.group(group); + } + else if next* == '[' { + next++; // Skip [ + group := extract_group_and_advance(next); + next++; // Skip ] + + if is_start { + result += std::to_string(r.group_start(group)); + } + else { + result += std::to_string(r.group_end(group)); + } + } + else { + // Return max group + result += r.group(r.group_number() - 1); + } + } + else if std::isdigit(next*) { + group := extract_group_and_advance(next); + result += r.group(group); + } + else { + std::cerr << "Not implemented"; + } + } + else if next* == '@' { + next++; + + if next* == '-' || next* == '+' { + i := 0; + while i < cpp2::unchecked_narrow(r.group_number()) next i++ { + pos := 0; + if next* == '-' { + pos = r.group_start(i); + } + else { + pos = r.group_end(i); + } + result += std::to_string(pos); + } + next++; + } + else { + std::cerr << "Not implemented"; + } + } + else { + std::cerr << "Not implemented."; + } + } + iter = next; + } + + return result; +} + +sanitize: (copy str: std::string) -> std::string = +{ + str = cpp2::string_util::replace_all(str, "\a", "\\a"); + str = cpp2::string_util::replace_all(str, "\f", "\\f"); + str = cpp2::string_util::replace_all(str, "\x1b", "\\e"); + str = cpp2::string_util::replace_all(str, "\n", "\\n"); + str = cpp2::string_util::replace_all(str, "\r", "\\r"); + str = cpp2::string_util::replace_all(str, "\t", "\\t"); + + return str; +} + +test: (regex: M, id: std::string, regex_str: std::string, str: std::string, kind: std::string, resultExpr: std::string, + resultExpected: std::string) = { + + warning: std::string = ""; + if regex.to_string() != regex_str { + warning = "Warning: Parsed regex does not match."; + } + + status: std::string = "OK"; + + r := regex.search(str); + + if "y" == kind || "yM" == kind || "yS" == kind || "yB" == kind { + if !r.matched { + status = "Failure: Regex should apply."; + } + else { + // Have a match check the result + + result := create_result(resultExpr, r); + + if result != resultExpected { + status = "Failure: Result is wrong. (is: (sanitize(result))$)"; + } + } + } + else if "n" == kind { + if r.matched { + status = "Failure: Regex should not apply. Result is '(r.group(0))$'"; + } + } else { + status = "Unknown kind '(kind)$'"; + } + + if !warning.empty() { + warning += " "; + } + std::cout << "(id)$_(kind)$: (status)$ (warning)$regex: (regex_str)$ parsed_regex: (regex.to_string())$ str: (sanitize(str))$ result_expr: (resultExpr)$ expected_results (sanitize(resultExpected))$" << std::endl; +} + + +test_tests_21_atomic_patterns: @regex type = { + regex_01 := R"((?>a+)b)"; + regex_02 := R"(((?>a+)b))"; + regex_03 := R"((?>(a+))b)"; + regex_04 := R"(((?>[^()]+)|\([^()]*\))+)"; + regex_05 := R"(round\(((?>[^()]+))\))"; + regex_06 := R"(^((?>(?:aa)?b)?))"; + run: (this) = { + std::cout << "Running tests_21_atomic_patterns:"<< std::endl; + test(regex_01, "01", R"((?>a+)b)", "aaab", "y", R"(-)", "-"); + test(regex_02, "02", R"(((?>a+)b))", "aaab", "y", R"($1)", "aaab"); + test(regex_03, "03", R"((?>(a+))b)", "aaab", "y", R"($1)", "aaa"); + test(regex_04, "04", R"(((?>[^()]+)|\([^()]*\))+)", "((abc(ade)ufh()()x", "y", R"($&)", "abc(ade)ufh()()x"); + test(regex_05, "05", R"(round\(((?>[^()]+))\))", "_I(round(xs * sz),1)", "y", R"($1)", "xs * sz"); + test(regex_06, "06", R"(^((?>(?:aa)?b)?))", "aab", "y", R"($1)", "aab"); + std::cout << std::endl; + } +} +main: () = { + test_tests_21_atomic_patterns().run(); +} diff --git a/regression-tests/pure2-singleton-and-static.cpp2 b/regression-tests/pure2-singleton-and-static.cpp2 new file mode 100644 index 000000000..01bef62cc --- /dev/null +++ b/regression-tests/pure2-singleton-and-static.cpp2 @@ -0,0 +1,9 @@ + +test: @singleton type = { + value: int = 42; + print: (this) = { std::cout << "(value)$\n"; } +} + +main: () = { + test::instance().print(); +} diff --git a/regression-tests/pure2-try-catch.cpp2 b/regression-tests/pure2-try-catch.cpp2 new file mode 100644 index 000000000..b1a1d0d1d --- /dev/null +++ b/regression-tests/pure2-try-catch.cpp2 @@ -0,0 +1,24 @@ +throwing_pred: (_: int) -> bool += { + throw(42); + return false; +} + +f: (x: int) + pre( throwing_pred(x), "a throwing predicate failed, oh my" ) += { } + +main: () = +{ + fptr := f&; + try { + fptr(-666); + } catch (i: int) { + std::cout << "oh look, a thrown int: " << i << std::endl; + } + try { + f(-42); + } catch (_) { + std::cout << "oh look, another exception" << std::endl; + } +} diff --git a/regression-tests/pure2-type-safety-1.cpp2 b/regression-tests/pure2-type-safety-1.cpp2 index 11734de99..68b8b9fba 100644 --- a/regression-tests/pure2-type-safety-1.cpp2 +++ b/regression-tests/pure2-type-safety-1.cpp2 @@ -19,6 +19,14 @@ main: () -> int = test_generic(v, "variant"); test_generic(a, "any"); test_generic(o, "optional"); + + oi: std::optional = 5; + std::cout << "optional is: "; + test_1365(oi); + od: std::optional<*D> = nullptr; + std::cout << "\noptional<*D> is: "; + test_1365(od); + std::cout << "\n"; } test_generic: ( x, msg ) = { @@ -28,6 +36,30 @@ test_generic: ( x, msg ) = { ::print( msgx + " is int? ", x is int ); } +B: type = { } +D: type = { this: B; } + +test_1365: (o) = { + if o is int { + std::cout << "int "; + } + if o is bool { + std::cout << "bool "; + } + if o is float { + std::cout << "float "; + } + if o is *B { + std::cout << "*B "; + } + if o is *D { + std::cout << "*D "; + } + if o is std::string { + std::cout << "std::string "; + } +} + print: ( msg: std::string, b: bool ) = { bmsg: * const char; if b { bmsg = "true"; } diff --git a/regression-tests/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp2 b/regression-tests/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp2 index 3ffce7e77..d9b32e8e7 100644 --- a/regression-tests/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp2 +++ b/regression-tests/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp2 @@ -55,9 +55,9 @@ main: () = { z.print(" mv-construct ", " <- "); x.print("", "\n"); - z = y; - z.print(" cp-assign ", " <- "); - y.print("", "\n"); + // z = y; + // z.print(" cp-assign ", " <- "); + // y.print("", "\n"); z = (move y); z.print(" mv-assign ", " <- "); diff --git a/regression-tests/run-tests.sh b/regression-tests/run-tests.sh index b4cfc8787..d64ed3949 100644 --- a/regression-tests/run-tests.sh +++ b/regression-tests/run-tests.sh @@ -135,28 +135,11 @@ if [ -z "$label" ]; then usage fi -tests=$(ls | grep ".cpp2$") -if [[ -n "$chosen_tests" ]]; then - for test in $chosen_tests; do - if ! [[ -f "$test" ]]; then - echo "Requested test ($test) not found" - exit 1 - fi - done - echo "Performing tests:" - for test in $chosen_tests; do - echo " $test" - done - echo - tests="$chosen_tests" -else - printf "Performing all regression tests\n\n" -fi - -expected_results_dir="test-results" - ################ # Get the directory with the exec outputs and compilation command +# We also allow each compiler configuration to specify any test files(s) to exclude from running. +expected_results_dir="test-results" +exclude_test_filter="" if [[ "$cxx_compiler" == *"cl.exe"* ]]; then compiler_cmd="cl.exe -nologo -std:${cxx_std} -MD -EHsc -I ..\..\..\include -Fe:" exec_out_dir="$expected_results_dir/msvc-2022-${cxx_std}" @@ -171,17 +154,16 @@ else compiler_version=$("$cxx_compiler" --version) - if [[ "$compiler_version" == *"Apple clang version 14.0"* || - "$compiler_version" == *"Homebrew clang version 15.0"* ]]; then - exec_out_dir="$expected_results_dir/apple-clang-14" - elif [[ "$compiler_version" == *"Apple clang version 15.0"* ]]; then + if [[ "$compiler_version" == *"Apple clang version 15.0"* ]]; then exec_out_dir="$expected_results_dir/apple-clang-15" + elif [[ "$compiler_version" == *"Apple clang version 17.0"* ]]; then + exec_out_dir="$expected_results_dir/apple-clang-17" elif [[ "$compiler_version" == *"clang version 12.0"* ]]; then exec_out_dir="$expected_results_dir/clang-12" elif [[ "$compiler_version" == *"clang version 15.0"* ]]; then exec_out_dir="$expected_results_dir/clang-15" - elif [[ "$compiler_version" == *"clang version 18.1"* ]]; then - exec_out_dir="$expected_results_dir/clang-18" + elif [[ "$compiler_version" == *"clang version 19.1"* ]]; then + exec_out_dir="$expected_results_dir/clang-19" elif [[ "$compiler_version" == *"g++-10"* ]]; then exec_out_dir="$expected_results_dir/gcc-10" elif [[ "$compiler_version" == *"g++-12"* || @@ -227,8 +209,9 @@ else printf "\ncompiler_cmd: $compiler_cmd\n\n" fi +printf "Full compiler version for '$cxx_compiler':\n$compiler_version\n\n" + if [[ -d "$exec_out_dir" ]]; then - printf "Full compiler version for '$cxx_compiler':\n$compiler_version\n\n" printf "Directory with reference compilation/execution files to use:\n$exec_out_dir\n\n" else @@ -236,6 +219,30 @@ else exit 2 fi +################ +# Get the list of .cpp2 test files +if [[ -n "$exclude_test_filter" ]]; then + tests=$(ls | grep ".cpp2$" | grep -v $exclude_test_filter) +else + tests=$(ls | grep ".cpp2$") +fi +if [[ -n "$chosen_tests" ]]; then + for test in $chosen_tests; do + if ! [[ -f "$test" ]]; then + echo "Requested test ($test) not found" + exit 1 + fi + done + echo "Performing tests:" + for test in $chosen_tests; do + echo " $test" + done + echo + tests="$chosen_tests" +else + printf "Performing all regression tests\n\n" +fi + ################ cppfront_cmd="cppfront.exe" echo "Building cppfront" @@ -275,7 +282,8 @@ for test_file in $tests; do # Using naming convention to discriminate pure Cpp2 code if [[ $test_name == "pure2"* ]]; then descr="pure Cpp2 code" - opt="-p" + # NB the -include-std option is added temporarily until modules are more stable + opt="-p -include-std" fi echo " Testing $descr: $test_name.cpp2" diff --git a/regression-tests/test-results/apple-clang-14-c++2b/clang-version.output b/regression-tests/test-results/apple-clang-14-c++2b/clang-version.output deleted file mode 100644 index dc40a26a0..000000000 --- a/regression-tests/test-results/apple-clang-14-c++2b/clang-version.output +++ /dev/null @@ -1,4 +0,0 @@ -Apple clang version 14.0.3 (clang-1403.0.22.14.1) -Target: arm64-apple-darwin23.2.0 -Thread model: posix -InstalledDir: /Library/Developer/CommandLineTools-14/usr/bin diff --git a/regression-tests/test-results/apple-clang-14-c++2b/mixed-bounds-check.cpp.execution b/regression-tests/test-results/apple-clang-14-c++2b/mixed-bounds-check.cpp.execution deleted file mode 100644 index 8474b9159..000000000 --- a/regression-tests/test-results/apple-clang-14-c++2b/mixed-bounds-check.cpp.execution +++ /dev/null @@ -1 +0,0 @@ -Bounds safety violation: out of bounds access attempt detected - attempted access at index 5, [min,max] range is [0,4] diff --git a/regression-tests/test-results/apple-clang-14-c++2b/mixed-bounds-safety-with-assert.cpp.execution b/regression-tests/test-results/apple-clang-14-c++2b/mixed-bounds-safety-with-assert.cpp.execution deleted file mode 100644 index 776dc1460..000000000 --- a/regression-tests/test-results/apple-clang-14-c++2b/mixed-bounds-safety-with-assert.cpp.execution +++ /dev/null @@ -1 +0,0 @@ -Bounds safety violation diff --git a/regression-tests/test-results/apple-clang-14-c++2b/mixed-initialization-safety-3-contract-violation.cpp.execution b/regression-tests/test-results/apple-clang-14-c++2b/mixed-initialization-safety-3-contract-violation.cpp.execution deleted file mode 100644 index e16104fe5..000000000 --- a/regression-tests/test-results/apple-clang-14-c++2b/mixed-initialization-safety-3-contract-violation.cpp.execution +++ /dev/null @@ -1 +0,0 @@ -Contract violation: fill: value must contain at least count elements diff --git a/regression-tests/test-results/apple-clang-14-c++2b/mixed-lifetime-safety-and-null-contracts.cpp.execution b/regression-tests/test-results/apple-clang-14-c++2b/mixed-lifetime-safety-and-null-contracts.cpp.execution deleted file mode 100644 index f4dd62312..000000000 --- a/regression-tests/test-results/apple-clang-14-c++2b/mixed-lifetime-safety-and-null-contracts.cpp.execution +++ /dev/null @@ -1 +0,0 @@ -sending error to my framework... [dynamic null dereference attempt detected] diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-assert-expected-not-null.cpp.output b/regression-tests/test-results/apple-clang-14-c++2b/pure2-assert-expected-not-null.cpp.output deleted file mode 100644 index 94d006323..000000000 --- a/regression-tests/test-results/apple-clang-14-c++2b/pure2-assert-expected-not-null.cpp.output +++ /dev/null @@ -1,19 +0,0 @@ -pure2-assert-expected-not-null.cpp2:7:10: error: no member named 'expected' in namespace 'std' - std::expected ex {4}; - ~~~~~^ -pure2-assert-expected-not-null.cpp2:7:22: error: expected '(' for function-style cast or type construction - std::expected ex {4}; - ~~~^ -pure2-assert-expected-not-null.cpp2:9:193: error: use of undeclared identifier 'ex' - return *cpp2::impl::assert_not_null(cpp2::move(up)) + *cpp2::impl::assert_not_null(cpp2::move(sp)) + *cpp2::impl::assert_not_null(cpp2::move(op)) + *cpp2::impl::assert_not_null(cpp2::move(ex)); - ^ -pure2-assert-expected-not-null.cpp2:14:10: error: no member named 'expected' in namespace 'std' - std::expected ex {std::unexpected(false)}; - ~~~~~^ -pure2-assert-expected-not-null.cpp2:14:22: error: expected '(' for function-style cast or type construction - std::expected ex {std::unexpected(false)}; - ~~~^ -pure2-assert-expected-not-null.cpp2:15:52: error: use of undeclared identifier 'ex' - return *cpp2::impl::assert_not_null(cpp2::move(ex)); - ^ -6 errors generated. diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-assert-optional-not-null.cpp.execution b/regression-tests/test-results/apple-clang-14-c++2b/pure2-assert-optional-not-null.cpp.execution deleted file mode 100644 index c6aeba0fd..000000000 --- a/regression-tests/test-results/apple-clang-14-c++2b/pure2-assert-optional-not-null.cpp.execution +++ /dev/null @@ -1 +0,0 @@ -Null safety violation: std::optional does not contain a value diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-assert-shared-ptr-not-null.cpp.execution b/regression-tests/test-results/apple-clang-14-c++2b/pure2-assert-shared-ptr-not-null.cpp.execution deleted file mode 100644 index 85aafbe6a..000000000 --- a/regression-tests/test-results/apple-clang-14-c++2b/pure2-assert-shared-ptr-not-null.cpp.execution +++ /dev/null @@ -1 +0,0 @@ -Null safety violation: std::shared_ptr is empty diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-assert-unique-ptr-not-null.cpp.execution b/regression-tests/test-results/apple-clang-14-c++2b/pure2-assert-unique-ptr-not-null.cpp.execution deleted file mode 100644 index af633d171..000000000 --- a/regression-tests/test-results/apple-clang-14-c++2b/pure2-assert-unique-ptr-not-null.cpp.execution +++ /dev/null @@ -1 +0,0 @@ -Null safety violation: std::unique_ptr is empty diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-default-arguments.cpp.output b/regression-tests/test-results/apple-clang-14-c++2b/pure2-default-arguments.cpp.output deleted file mode 100644 index 4812dc94c..000000000 --- a/regression-tests/test-results/apple-clang-14-c++2b/pure2-default-arguments.cpp.output +++ /dev/null @@ -1,4 +0,0 @@ -pure2-default-arguments.cpp2:6:61: error: no member named 'source_location' in namespace 'std' - char const* fn = CPP2_UFCS_NONLOCAL(function_name)(std::source_location::current()) - ~~~~~^ -1 error generated. diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-last-use.cpp.output b/regression-tests/test-results/apple-clang-14-c++2b/pure2-last-use.cpp.output deleted file mode 100644 index 6b03c3909..000000000 --- a/regression-tests/test-results/apple-clang-14-c++2b/pure2-last-use.cpp.output +++ /dev/null @@ -1,74 +0,0 @@ -pure2-last-use.cpp2:273:36: error: expected variable name or 'this' in lambda capture list - public: std::add_pointer_t unnamed_param_1)> g; - ^ -pure2-last-use.cpp2:329:2: error: expected '>' -}; - ^ -pure2-last-use.cpp2:273:30: note: to match this '<' - public: std::add_pointer_t unnamed_param_1)> g; - ^ -pure2-last-use.cpp2:344:16: error: no template named 'move_only_function' in namespace 'std' - public: std::move_only_function b; - ~~~~~^ -pure2-last-use.cpp2:348:161: error: no member named 'move_only_function' in namespace 'std' -CPP2_REQUIRES_ (std::is_convertible_v>&> && std::is_convertible_v>&> && std::is_convertible_v>&>) ; - ~~~~~^ -../../../include/cpp2util.h:10008:43: note: expanded from macro 'CPP2_REQUIRES_' - #define CPP2_REQUIRES_(...) requires (__VA_ARGS__) - ^~~~~~~~~~~ -pure2-last-use.cpp2:348:188: error: expected expression -CPP2_REQUIRES_ (std::is_convertible_v>&> && std::is_convertible_v>&> && std::is_convertible_v>&>) ; - ^ -pure2-last-use.cpp2:348:193: error: use of address-of-label extension outside of a function body -CPP2_REQUIRES_ (std::is_convertible_v>&> && std::is_convertible_v>&> && std::is_convertible_v>&>) ; - ^ -pure2-last-use.cpp2:773:69: error: no template named 'move_only_function' in namespace 'std' -auto issue_888_1([[maybe_unused]] std::string unnamed_param_1, std::move_only_function unnamed_param_1)> size) -> void; - ~~~~~^ -pure2-last-use.cpp2:773:93: error: expected variable name or 'this' in lambda capture list -auto issue_888_1([[maybe_unused]] std::string unnamed_param_1, std::move_only_function unnamed_param_1)> size) -> void; - ^ -pure2-last-use.cpp2:773:156: error: expected unqualified-id -auto issue_888_1([[maybe_unused]] std::string unnamed_param_1, std::move_only_function unnamed_param_1)> size) -> void; - ^ -pure2-last-use.cpp2:773:160: error: expected '>' -auto issue_888_1([[maybe_unused]] std::string unnamed_param_1, std::move_only_function unnamed_param_1)> size) -> void; - ^ -pure2-last-use.cpp2:773:87: note: to match this '<' -auto issue_888_1([[maybe_unused]] std::string unnamed_param_1, std::move_only_function unnamed_param_1)> size) -> void; - ^ -pure2-last-use.cpp2:773:160: error: expected ')' -auto issue_888_1([[maybe_unused]] std::string unnamed_param_1, std::move_only_function unnamed_param_1)> size) -> void; - ^ -pure2-last-use.cpp2:773:17: note: to match this '(' -auto issue_888_1([[maybe_unused]] std::string unnamed_param_1, std::move_only_function unnamed_param_1)> size) -> void; - ^ -pure2-last-use.cpp2:271:7: error: missing '}' at end of definition of 'issue_857_4' -class issue_857_4 { - ^ -pure2-last-use.cpp2:905:1: note: still within definition of 'issue_857_4' here -namespace captures { -^ -pure2-last-use.cpp2:279:272: error: no member named 'move_only_function' in namespace 'std' -requires (std::is_convertible_v>&> && std::is_convertible_v in_)>>&> && std::is_convertible_v>&> && std::is_convertible_v in_)>>&>) - ~~~~~^ -pure2-last-use.cpp2:279:299: error: expected expression -requires (std::is_convertible_v>&> && std::is_convertible_v in_)>>&> && std::is_convertible_v>&> && std::is_convertible_v in_)>>&>) - ^ -pure2-last-use.cpp2:279:304: error: use of address-of-label extension outside of a function body -requires (std::is_convertible_v>&> && std::is_convertible_v in_)>>&> && std::is_convertible_v>&> && std::is_convertible_v in_)>>&>) - ^ -pure2-last-use.cpp2:278:14: error: out-of-line definition of 'issue_857_4' does not match any declaration in 'issue_857_4' -issue_857_4::issue_857_4(auto&& f_, auto&& g_, auto&& mf_, auto&& mg_) - ^~~~~~~~~~~ -pure2-last-use.cpp2:281:272: error: member initializer 'g' does not name a non-static data member or base class - , g{ CPP2_FORWARD(g_) } - ^~~~~~~~~~~~~~~~~~~~~ -pure2-last-use.cpp2:282:272: error: member initializer 'mf' does not name a non-static data member or base class - , mf{ CPP2_FORWARD(mf_) } - ^~~~~~~~~~~~~~~~~~~~~~~ -pure2-last-use.cpp2:283:272: error: member initializer 'mg' does not name a non-static data member or base class - , mg{ CPP2_FORWARD(mg_) }{} - ^~~~~~~~~~~~~~~~~~~~~~~ -fatal error: too many errors emitted, stopping now [-ferror-limit=] -20 errors generated. diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-range-operators.cpp.execution b/regression-tests/test-results/apple-clang-14-c++2b/pure2-range-operators.cpp.execution deleted file mode 100644 index 100e0a464..000000000 --- a/regression-tests/test-results/apple-clang-14-c++2b/pure2-range-operators.cpp.execution +++ /dev/null @@ -1,46 +0,0 @@ -We have some alpabetical animals: - Aardvark - Baboon - Cat - Dolphin - Elephant - Flicker - Grue - Wumpus - -And from indexes 1..=5 they are: - 1 Baboon - 2 Cat - 3 Dolphin - 4 Elephant - 5 Flicker - -And test the range when mixing signed & unsigned types: - 0 Aardvark - 1 Baboon - 2 Cat - 3 Dolphin - 4 Elephant - 5 Flicker - 6 Grue - 7 Wumpus - -Make sure non-random-access iterators work: - Hokey - Pokey - -Make sure .sum works: -210 -190 - -Make sure .contains works: -false -true -true -true -false -false -true -true -false -false diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-repeated-call.cpp.execution b/regression-tests/test-results/apple-clang-14-c++2b/pure2-repeated-call.cpp.execution deleted file mode 100644 index f70d7bba4..000000000 --- a/regression-tests/test-results/apple-clang-14-c++2b/pure2-repeated-call.cpp.execution +++ /dev/null @@ -1 +0,0 @@ -42 \ No newline at end of file diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-type-and-namespace-aliases.cpp.output b/regression-tests/test-results/apple-clang-14-c++2b/pure2-type-and-namespace-aliases.cpp.output deleted file mode 100644 index 99c308c8e..000000000 --- a/regression-tests/test-results/apple-clang-14-c++2b/pure2-type-and-namespace-aliases.cpp.output +++ /dev/null @@ -1,26 +0,0 @@ -pure2-type-and-namespace-aliases.cpp2:3:61: error: no member named 'pmr' in namespace 'std' - template using pmr_vec = std::vector>; - ~~~~~^ -pure2-type-and-namespace-aliases.cpp2:3:88: error: 'T' does not refer to a value - template using pmr_vec = std::vector>; - ^ -pure2-type-and-namespace-aliases.cpp2:3:23: note: declared here - template using pmr_vec = std::vector>; - ^ -pure2-type-and-namespace-aliases.cpp2:3:91: error: expected ';' after alias declaration - template using pmr_vec = std::vector>; - ^ - ; -pure2-type-and-namespace-aliases.cpp2:18:9: error: no member named 'pmr_vec' in namespace 'N' - N1::pmr_vec v {"xyzzy", "plugh"}; - ~~~~^ -pure2-type-and-namespace-aliases.cpp2:18:29: error: expected '(' for function-style cast or type construction - N1::pmr_vec v {"xyzzy", "plugh"}; - ~~~~~~~~~~~~^ -pure2-type-and-namespace-aliases.cpp2:18:31: error: use of undeclared identifier 'v' - N1::pmr_vec v {"xyzzy", "plugh"}; - ^ -pure2-type-and-namespace-aliases.cpp2:20:27: error: use of undeclared identifier 'v' -auto const& v2{cpp2::move(v)}; - ^ -7 errors generated. diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-type-safety-1.cpp.execution b/regression-tests/test-results/apple-clang-14-c++2b/pure2-type-safety-1.cpp.execution deleted file mode 100644 index d1aa6265a..000000000 --- a/regression-tests/test-results/apple-clang-14-c++2b/pure2-type-safety-1.cpp.execution +++ /dev/null @@ -1,9 +0,0 @@ - double is int? false - variant is int? false - any is int? false - optional is int? false - - int is int? true - variant is int? true - any is int? true - optional is int? true diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-variadics.cpp.execution b/regression-tests/test-results/apple-clang-14-c++2b/pure2-variadics.cpp.execution deleted file mode 100644 index f4791e7ae..000000000 --- a/regression-tests/test-results/apple-clang-14-c++2b/pure2-variadics.cpp.execution +++ /dev/null @@ -1,7 +0,0 @@ -xyz -plu -abr -3.14word-1500 -first all() returned false -second all() returned true -sum of (1, 2, 3, 100) is: 106 diff --git a/regression-tests/test-results/apple-clang-14-c++2b/run-tests-apple-clang.sh b/regression-tests/test-results/apple-clang-14-c++2b/run-tests-apple-clang.sh deleted file mode 100644 index 076c55fb7..000000000 --- a/regression-tests/test-results/apple-clang-14-c++2b/run-tests-apple-clang.sh +++ /dev/null @@ -1,24 +0,0 @@ -# This is intended to be run in the /test-results/apple-clang-14 subdirectory -# in a macOS shell with clang++ installed -# -cp ../*.cpp . -rm -f *.output *.execution -count=0 -exe_count=0 -clang++ --version > clang-version.output 2>&1 -for f in *.cpp -do - printf "Starting apple clang++ %s\n" "$f" - clang++ -I../../../include -std=c++2b -pthread -o test.exe $f > $f.output 2>&1 - rm -f $f - let count=count+1 - if test -f "test.exe"; then - let exe_count=exe_count+1 - printf " Starting executable\n" - ./test.exe > $f.execution 2>&1 - rm -f test.exe - fi -done -rm -f *.obj *.exp *.lib -printf "\nDone: %s .cpp tests compiled\n" "$count" -printf "\n %s .cpp executables generated and run\n" "$exe_count" diff --git a/regression-tests/test-results/apple-clang-15-c++2b/mixed-autodiff-taylor.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/mixed-autodiff-taylor.cpp.execution new file mode 100644 index 000000000..0a486b06f --- /dev/null +++ b/regression-tests/test-results/apple-clang-15-c++2b/mixed-autodiff-taylor.cpp.execution @@ -0,0 +1,63 @@ +x + x = 4.000000 +x + x diff order 1 = 2.000000 +x + x diff order 2 = 0.000000 +x + x diff order 3 = 0.000000 +x + x diff order 4 = 0.000000 +x + x diff order 5 = 0.000000 +x + x diff order 6 = 0.000000 +0 - x = -2.000000 +0 - x diff order 1 = -1.000000 +0 - x diff order 2 = 0.000000 +0 - x diff order 3 = 0.000000 +0 - x diff order 4 = 0.000000 +0 - x diff order 5 = 0.000000 +0 - x diff order 6 = 0.000000 +x^7 = 128.000000 +x^7 diff order 1 = 448.000000 +x^7 diff order 2 = 1344.000000 +x^7 diff order 3 = 3360.000000 +x^7 diff order 4 = 6720.000000 +x^7 diff order 5 = 10080.000000 +x^7 diff order 6 = 10080.000000 +1/x = 0.500000 +1/x diff order 1 = -0.250000 +1/x diff order 2 = 0.250000 +1/x diff order 3 = -0.375000 +1/x diff order 4 = 0.750000 +1/x diff order 5 = -1.875000 +1/x diff order 6 = 5.625000 +sqrt(x) = 1.414214 +sqrt(x) diff order 1 = 0.353553 +sqrt(x) diff order 2 = -0.088388 +sqrt(x) diff order 3 = 0.066291 +sqrt(x) diff order 4 = -0.082864 +sqrt(x) diff order 5 = 0.145012 +sqrt(x) diff order 6 = -0.326277 +log(x) = 0.693147 +log(x) diff order 1 = 0.500000 +log(x) diff order 2 = -0.250000 +log(x) diff order 3 = 0.250000 +log(x) diff order 4 = -0.375000 +log(x) diff order 5 = 0.750000 +log(x) diff order 6 = -1.875000 +exp(x) = 7.389056 +exp(x) diff order 1 = 7.389056 +exp(x) diff order 2 = 7.389056 +exp(x) diff order 3 = 7.389056 +exp(x) diff order 4 = 7.389056 +exp(x) diff order 5 = 7.389056 +exp(x) diff order 6 = 7.389056 +sin(x) = 0.909297 +sin(x) diff order 1 = -0.416147 +sin(x) diff order 2 = -0.909297 +sin(x) diff order 3 = 0.416147 +sin(x) diff order 4 = 0.909297 +sin(x) diff order 5 = -0.416147 +sin(x) diff order 6 = -0.909297 +cos(x) = -0.416147 +cos(x) diff order 1 = -0.909297 +cos(x) diff order 2 = 0.416147 +cos(x) diff order 3 = 0.909297 +cos(x) diff order 4 = -0.416147 +cos(x) diff order 5 = -0.909297 +cos(x) diff order 6 = 0.416147 diff --git a/regression-tests/test-results/apple-clang-15-c++2b/mixed-bounds-check.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/mixed-bounds-check.cpp.execution index 91a25ada8..f070a5bf5 100644 --- a/regression-tests/test-results/apple-clang-15-c++2b/mixed-bounds-check.cpp.execution +++ b/regression-tests/test-results/apple-clang-15-c++2b/mixed-bounds-check.cpp.execution @@ -1 +1 @@ -../../../include/cpp2util.h(1108) decltype(auto) cpp2::impl::assert_in_bounds(auto &&, std::source_location) [arg = 5, x:auto = std::vector]: Bounds safety violation: out of bounds access attempt detected - attempted access at index 5, [min,max] range is [0,4] +../../../include/cpp2util.h(1241) decltype(auto) cpp2::impl::assert_in_bounds(auto &&, std::source_location) [arg = 5, x:auto = std::vector]: Bounds safety violation: out of bounds access attempt detected - attempted access at index 5, [min,max] range is [0,4] diff --git a/regression-tests/test-results/apple-clang-15-c++2b/mixed-bounds-safety-with-assert.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/mixed-bounds-safety-with-assert.cpp.execution index 638ccfecc..5b15e6b71 100644 --- a/regression-tests/test-results/apple-clang-15-c++2b/mixed-bounds-safety-with-assert.cpp.execution +++ b/regression-tests/test-results/apple-clang-15-c++2b/mixed-bounds-safety-with-assert.cpp.execution @@ -1 +1 @@ -../../../include/cpp2util.h(920) : Bounds safety violation +../../../include/cpp2util.h(552) : Bounds safety violation diff --git a/regression-tests/test-results/apple-clang-15-c++2b/mixed-initialization-safety-3-contract-violation.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/mixed-initialization-safety-3-contract-violation.cpp.execution index 2e659ac3e..9509646ac 100644 --- a/regression-tests/test-results/apple-clang-15-c++2b/mixed-initialization-safety-3-contract-violation.cpp.execution +++ b/regression-tests/test-results/apple-clang-15-c++2b/mixed-initialization-safety-3-contract-violation.cpp.execution @@ -1 +1 @@ -../../../include/cpp2util.h(920) : Contract violation: fill: value must contain at least count elements +../../../include/cpp2util.h(552) : Contract violation: fill: value must contain at least count elements diff --git a/regression-tests/test-results/apple-clang-15-c++2b/mixed-lifetime-safety-and-null-contracts.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/mixed-lifetime-safety-and-null-contracts.cpp.execution index c848bf98a..d427d11db 100644 --- a/regression-tests/test-results/apple-clang-15-c++2b/mixed-lifetime-safety-and-null-contracts.cpp.execution +++ b/regression-tests/test-results/apple-clang-15-c++2b/mixed-lifetime-safety-and-null-contracts.cpp.execution @@ -1,2 +1,2 @@ sending error to my framework... [dynamic null dereference attempt detected] -from source location: ../../../include/cpp2util.h(999) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = int *&] +from source location: ../../../include/cpp2util.h(1132) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = int *&] diff --git a/regression-tests/test-results/apple-clang-15-c++2b/mixed-parameter-passing.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/mixed-parameter-passing.cpp.execution new file mode 100644 index 000000000..256f7e186 --- /dev/null +++ b/regression-tests/test-results/apple-clang-15-c++2b/mixed-parameter-passing.cpp.execution @@ -0,0 +1,2 @@ +123 +0 diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-expected-not-null.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-expected-not-null.cpp.execution index 58bf51d65..de5632b3d 100644 --- a/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-expected-not-null.cpp.execution +++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-expected-not-null.cpp.execution @@ -1 +1 @@ -../../../include/cpp2util.h(999) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::expected]: Null safety violation: std::expected has an unexpected value +../../../include/cpp2util.h(1132) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::expected]: Null safety violation: std::expected has an unexpected value diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-optional-not-null.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-optional-not-null.cpp.execution index 8ed66e3a3..ae535f70c 100644 --- a/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-optional-not-null.cpp.execution +++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-optional-not-null.cpp.execution @@ -1 +1 @@ -../../../include/cpp2util.h(999) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::optional]: Null safety violation: std::optional does not contain a value +../../../include/cpp2util.h(1132) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::optional]: Null safety violation: std::optional does not contain a value diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-shared-ptr-not-null.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-shared-ptr-not-null.cpp.execution index 092ef8093..2040bb090 100644 --- a/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-shared-ptr-not-null.cpp.execution +++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-shared-ptr-not-null.cpp.execution @@ -1 +1 @@ -../../../include/cpp2util.h(999) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::shared_ptr]: Null safety violation: std::shared_ptr is empty +../../../include/cpp2util.h(1132) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::shared_ptr]: Null safety violation: std::shared_ptr is empty diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-unique-ptr-not-null.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-unique-ptr-not-null.cpp.execution index acc10a1c1..6ef773f34 100644 --- a/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-unique-ptr-not-null.cpp.execution +++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-unique-ptr-not-null.cpp.execution @@ -1 +1 @@ -../../../include/cpp2util.h(999) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::unique_ptr]: Null safety violation: std::unique_ptr is empty +../../../include/cpp2util.h(1132) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::unique_ptr]: Null safety violation: std::unique_ptr is empty diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-autodiff-higher-order.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-autodiff-higher-order.cpp.execution new file mode 100644 index 000000000..84a5f58de --- /dev/null +++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-autodiff-higher-order.cpp.execution @@ -0,0 +1,240 @@ +diff(x + y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x + y + x) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 7.000000 + d1 = 4.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x - y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = -1.000000 + d1 = -1.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x - y - x) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = -3.000000 + d1 = -2.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x + y - x) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 3.000000 + d1 = 2.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x * y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 6.000000 + d1 = 7.000000 + d2 = 4.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x * y * x) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 12.000000 + d1 = 20.000000 + d2 = 22.000000 + d3 = 12.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x / y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 0.666667 + d1 = -0.111111 + d2 = 0.148148 + d3 = -0.296296 + d4 = 0.790123 + d5 = -2.633745 + d6 = 10.534979 +diff(x / y / y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 0.222222 + d1 = -0.185185 + d2 = 0.296296 + d3 = -0.691358 + d4 = 2.106996 + d5 = -7.901235 + d6 = 35.116598 +diff(x * y / x) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 3.000000 + d1 = 2.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x * (x + y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 10.000000 + d1 = 11.000000 + d2 = 6.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x + x * y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 8.000000 + d1 = 8.000000 + d2 = 4.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(+x + y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(-x + y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 1.000000 + d1 = 1.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x * func(x, y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 10.000000 + d1 = 11.000000 + d2 = 6.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x * func_outer(x, y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 10.000000 + d1 = 11.000000 + d2 = 6.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(sin(x - y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = -0.841471 + d1 = -0.540302 + d2 = 0.841471 + d3 = 0.540302 + d4 = -0.841471 + d5 = -0.540302 + d6 = 0.841471 +diff(if branch) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 2.000000 + d1 = 1.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(if else branch) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 2.000000 + d1 = 1.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(direct return) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(intermediate var) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(intermediate passive var) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(intermediate untyped) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(intermediate default init) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(intermediate no init) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(while loop) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 8.000000 + d1 = 5.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(do while loop) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 8.000000 + d1 = 5.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(for loop) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(tye_outer.a + y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(type_outer.add(y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-autodiff.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-autodiff.cpp.execution new file mode 100644 index 000000000..863bd6bd5 --- /dev/null +++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-autodiff.cpp.execution @@ -0,0 +1,46 @@ +diff(x + y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(x + y + x) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 7.000000, r_d = 4.000000) +diff(x - y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = -1.000000, r_d = -1.000000) +diff(x - y - x) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = -3.000000, r_d = -2.000000) +diff(x + y - x) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 3.000000, r_d = 2.000000) +diff(x * y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 6.000000, r_d = 7.000000) +diff(x * y * x) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 12.000000, r_d = 20.000000) +diff(x / y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 0.666667, r_d = -0.111111) +diff(x / y / y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 0.222222, r_d = -0.185185) +diff(x * y / x) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 3.000000, r_d = 2.000000) +diff(x * (x + y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 10.000000, r_d = 11.000000) +diff(x + x * y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 8.000000, r_d = 8.000000) +diff(+x + y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(-x + y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 1.000000, r_d = 1.000000) +diff(x * func(x, y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 10.000000, r_d = 11.000000) +diff(x * func_outer(x, y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 10.000000, r_d = 11.000000) +diff(sin(x - y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = -0.841471, r_d = -0.540302) +diff(if branch) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 2.000000, r_d = 1.000000) +diff(if else branch) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 2.000000, r_d = 1.000000) +diff(direct return) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(intermediate var) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(intermediate passive var) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(intermediate untyped) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(intermediate default init) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(intermediate no init) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(while loop) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 8.000000, r_d = 5.000000) +diff(do while loop) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 8.000000, r_d = 5.000000) +diff(for loop) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(tye_outer.a + y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(type_outer.add(y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(x + y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 5.000000, x_b = 1.000000, y_b = 1.000000) +diff(x + y + x) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 7.000000, x_b = 2.000000, y_b = 1.000000) +diff(x - y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = -1.000000, x_b = 1.000000, y_b = -1.000000) +diff(x - y - x) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = -3.000000, x_b = 0.000000, y_b = -1.000000) +diff(x + y - x) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 3.000000, x_b = 0.000000, y_b = 1.000000) +diff(x * y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 6.000000, x_b = 3.000000, y_b = 2.000000) +diff(x * y * x) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 12.000000, x_b = 12.000000, y_b = 4.000000) +diff(x / y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 0.666667, x_b = 0.333333, y_b = -0.222222) +diff(x / y / y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 0.222222, x_b = 0.111111, y_b = -0.148148) +diff(x * y / x) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 3.000000, x_b = 0.000000, y_b = 1.000000) +diff(x * (x + y)) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 10.000000, x_b = 7.000000, y_b = 2.000000) +diff(x + x * y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 8.000000, x_b = 4.000000, y_b = 2.000000) +diff(sin(x-y)) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = -0.841471, x_b = 0.540302, y_b = -0.540302) +diff(x * func(x-y)) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 10.000000, x_b = 7.000000, y_b = 2.000000) +diff(x * func_outer(x-y)) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 10.000000, x_b = 7.000000, y_b = 2.000000) +2nd order diff of x*x at 2.000000 = 2.000000 diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-expected-is-as.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-expected-is-as.cpp.execution new file mode 100644 index 000000000..5483d6cd7 --- /dev/null +++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-expected-is-as.cpp.execution @@ -0,0 +1,15 @@ +ex1 is int +ex1 is 123 +ex1 as int = 123 +ex2 is unexpected and error is: -1 +ex2 is 'empty' aka unexpected and error is: -1 +ex2 as std::unexpected and error = -1 + +expected with value + ...integer 123 + +expected with unexpected + ...unexpected -1 + +expected with value + ...string Expect the unexpected diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-function-body-reflection.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-function-body-reflection.cpp.execution new file mode 100644 index 000000000..d2076f3f7 --- /dev/null +++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-function-body-reflection.cpp.execution @@ -0,0 +1 @@ +calling generated function ns::add_1... ns::add_1(42) returned 43 diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-function-single-expression-body-default-return.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-function-single-expression-body-default-return.cpp.execution new file mode 100644 index 000000000..30f4cb910 --- /dev/null +++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-function-single-expression-body-default-return.cpp.execution @@ -0,0 +1 @@ +hi ho hum \ No newline at end of file diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-hashable.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-hashable.cpp.execution new file mode 100644 index 000000000..cb627d7a9 --- /dev/null +++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-hashable.cpp.execution @@ -0,0 +1 @@ +12145505332166550543 \ No newline at end of file diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-last-use.cpp.output b/regression-tests/test-results/apple-clang-15-c++2b/pure2-last-use.cpp.output index 6b03c3909..7c1f06cdb 100644 --- a/regression-tests/test-results/apple-clang-15-c++2b/pure2-last-use.cpp.output +++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-last-use.cpp.output @@ -13,7 +13,7 @@ pure2-last-use.cpp2:344:16: error: no template named 'move_only_function' in nam pure2-last-use.cpp2:348:161: error: no member named 'move_only_function' in namespace 'std' CPP2_REQUIRES_ (std::is_convertible_v>&> && std::is_convertible_v>&> && std::is_convertible_v>&>) ; ~~~~~^ -../../../include/cpp2util.h:10008:43: note: expanded from macro 'CPP2_REQUIRES_' +../../../include/cpp2util.h:10109:43: note: expanded from macro 'CPP2_REQUIRES_' #define CPP2_REQUIRES_(...) requires (__VA_ARGS__) ^~~~~~~~~~~ pure2-last-use.cpp2:348:188: error: expected expression @@ -49,26 +49,31 @@ class issue_857_4 { pure2-last-use.cpp2:905:1: note: still within definition of 'issue_857_4' here namespace captures { ^ -pure2-last-use.cpp2:279:272: error: no member named 'move_only_function' in namespace 'std' -requires (std::is_convertible_v>&> && std::is_convertible_v in_)>>&> && std::is_convertible_v>&> && std::is_convertible_v in_)>>&>) - ~~~~~^ -pure2-last-use.cpp2:279:299: error: expected expression -requires (std::is_convertible_v>&> && std::is_convertible_v in_)>>&> && std::is_convertible_v>&> && std::is_convertible_v in_)>>&>) - ^ -pure2-last-use.cpp2:279:304: error: use of address-of-label extension outside of a function body -requires (std::is_convertible_v>&> && std::is_convertible_v in_)>>&> && std::is_convertible_v>&> && std::is_convertible_v in_)>>&>) - ^ -pure2-last-use.cpp2:278:14: error: out-of-line definition of 'issue_857_4' does not match any declaration in 'issue_857_4' -issue_857_4::issue_857_4(auto&& f_, auto&& g_, auto&& mf_, auto&& mg_) - ^~~~~~~~~~~ -pure2-last-use.cpp2:281:272: error: member initializer 'g' does not name a non-static data member or base class - , g{ CPP2_FORWARD(g_) } - ^~~~~~~~~~~~~~~~~~~~~ -pure2-last-use.cpp2:282:272: error: member initializer 'mf' does not name a non-static data member or base class - , mf{ CPP2_FORWARD(mf_) } - ^~~~~~~~~~~~~~~~~~~~~~~ -pure2-last-use.cpp2:283:272: error: member initializer 'mg' does not name a non-static data member or base class - , mg{ CPP2_FORWARD(mg_) }{} - ^~~~~~~~~~~~~~~~~~~~~~~ -fatal error: too many errors emitted, stopping now [-ferror-limit=] -20 errors generated. +pure2-last-use.cpp2:279:179: error: expected variable name or 'this' in lambda capture list +requires (std::is_convertible_v>&> && std::is_convertible_v unnamed_param_1)>>&> && std::is_convertible_v>&> && std::is_convertible_v unnamed_param_1)>>&>) + ^ +pure2-last-use.cpp2:1044:2: error: expected '>' +} + ^ +pure2-last-use.cpp2:279:173: note: to match this '<' +requires (std::is_convertible_v>&> && std::is_convertible_v unnamed_param_1)>>&> && std::is_convertible_v>&> && std::is_convertible_v unnamed_param_1)>>&>) + ^ +pure2-last-use.cpp2:1045:1: error: type name requires a specifier or qualifier +^ +pure2-last-use.cpp2:1044:2: error: expected '>' +} + ^ +pure2-last-use.cpp2:279:154: note: to match this '<' +requires (std::is_convertible_v>&> && std::is_convertible_v unnamed_param_1)>>&> && std::is_convertible_v>&> && std::is_convertible_v unnamed_param_1)>>&>) + ^ +pure2-last-use.cpp2:1045:1: error: type name requires a specifier or qualifier +^ +pure2-last-use.cpp2:1044:2: error: expected '>' +} + ^ +pure2-last-use.cpp2:279:120: note: to match this '<' +requires (std::is_convertible_v>&> && std::is_convertible_v unnamed_param_1)>>&> && std::is_convertible_v>&> && std::is_convertible_v unnamed_param_1)>>&>) + ^ +pure2-last-use.cpp2:1045:1: error: expected function body after function declarator +^ +19 errors generated. diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex-general.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex-general.cpp.execution new file mode 100644 index 000000000..c44d08490 --- /dev/null +++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex-general.cpp.execution @@ -0,0 +1,11 @@ +Running tests_01_char_matcher: +Not full match fails: 0 +Full match is ok: 1 +Search finds at position 1: 1 +Search finds at position 3: 3 +Find all finds at position: 1 +Find all finds at position: 4 +Find all finds at position: 7 +Find all found 3 matched: 3 +Find all finds at position: 2 +Find all found 1 match: 1 diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_04_start_end.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_04_start_end.cpp.execution index 6fef36434..a1e2b9b63 100644 --- a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_04_start_end.cpp.execution +++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_04_start_end.cpp.execution @@ -8,4 +8,5 @@ Running tests_04_start_end: 07_y: OK regex: ^ parsed_regex: ^ str: abc result_expr: $& expected_results 08_y: OK regex: $ parsed_regex: $ str: abc result_expr: $& expected_results 09_n: OK regex: $b parsed_regex: $b str: b result_expr: - expected_results - +10_n: OK regex: \GX.*X parsed_regex: \GX.*X str: aaaXbX result_expr: - expected_results - diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_19_lookahead.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_19_lookahead.cpp.execution index d4c65d951..0f723eb77 100644 --- a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_19_lookahead.cpp.execution +++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_19_lookahead.cpp.execution @@ -27,6 +27,14 @@ Running tests_19_lookahead: 26_y: OK regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) parsed_regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) str: aaaaaaaa result_expr: $1 expected_results aaaaaaa 27_y: OK regex: a(?!b(?!c))(..) parsed_regex: a(?!b(?!c))(..) str: abababc result_expr: $1 expected_results bc 28_y: OK regex: a(?!b(?=a))(..) parsed_regex: a(?!b(?=a))(..) str: abababc result_expr: $1 expected_results bc +29_y: OK regex: (?=foo) parsed_regex: (?=foo) str: foo result_expr: @+ expected_results 0 +30_y: OK regex: (?=foo) parsed_regex: (?=foo) str: XfooY result_expr: @+ expected_results 1 +31_y: OK regex: .*(?=foo) parsed_regex: .*(?=foo) str: XfooY result_expr: @+ expected_results 1 +32_y: OK regex: (?=.*P)P parsed_regex: (?=.*P)P str: aP result_expr: @+ expected_results 2 +33_y: OK regex: X(?=foo)f parsed_regex: X(?=foo)f str: ..XfooY.. result_expr: @+ expected_results 4 +34_y: OK regex: X(?=foo) parsed_regex: X(?=foo) str: ..XfooY.. result_expr: @+ expected_results 3 +35_y: OK regex: (?=XY*foo) parsed_regex: (?=XY*foo) str: Xfoo result_expr: @+ expected_results 0 +36_y: OK regex: ^(?=XY*foo) parsed_regex: ^(?=XY*foo) str: Xfoo result_expr: @+ expected_results 0 37_y: OK regex: X(\w+)(?=\s)|X(\w+) parsed_regex: X(\w+)(?=\s)|X(\w+) str: Xab result_expr: [$1-$2] expected_results [-ab] 38_y: OK regex: ^a*(?=b)b parsed_regex: ^a*(?=b)b str: ab result_expr: $& expected_results ab 39_y: OK regex: '(?!\A)x'm parsed_regex: '(?!\A)x'm str: a\nxb\n result_expr: - expected_results - @@ -44,4 +52,6 @@ Running tests_19_lookahead: 51_y: OK regex: ((?s)b.)c(?!\N) parsed_regex: ((?s)b.)c(?!\N) str: a\nb\nc\n result_expr: $1:$& expected_results b\n:b\nc 52_y: OK regex: '(b.)c(?!\N)'s parsed_regex: '(b.)c(?!\N)'s str: a\nb\nc\n result_expr: $1:$& expected_results b\n:b\nc 53_n: OK regex: a*(?!) parsed_regex: a*(?!) str: aaaab result_expr: - expected_results - +54_y: OK regex: (?)foo parsed_regex: (?)foo str: bar>ABCfoo result_expr: $& expected_results foo +55_y: OK regex: (?ABC)foo parsed_regex: (?ABC)foo str: bar>ABCfoo result_expr: $& expected_results ABCfoo diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_20_lookbehind.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_20_lookbehind.cpp.execution new file mode 100644 index 000000000..cd61d4f56 --- /dev/null +++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_20_lookbehind.cpp.execution @@ -0,0 +1,58 @@ +Running tests_20_lookbehind: +01_y: OK regex: (?<=a)b parsed_regex: (?<=a)b str: ab result_expr: $& expected_results b +02_y: OK regex: (?<=af?)b parsed_regex: (?<=af?)b str: ab result_expr: $& expected_results b +03_n: OK regex: (?<=a)b parsed_regex: (?<=a)b str: cb result_expr: - expected_results - +04_n: OK regex: (?<=a(?:fo)?)b parsed_regex: (?<=a(?:fo)?)b str: cb result_expr: - expected_results - +05_n: OK regex: (?<=a)b parsed_regex: (?<=a)b str: b result_expr: - expected_results - +06_n: OK regex: (?<=a(?:foo)?)b parsed_regex: (?<=a(?:foo)?)b str: b result_expr: - expected_results - +07_y: OK regex: (?)foo parsed_regex: (?<=bar>)foo str: bar>foo result_expr: $& expected_results foo +50_n: OK regex: (?)foo parsed_regex: (?)foo str: bar>foo result_expr: - expected_results - +51_y: OK regex: (?<=bar>ABC)foo parsed_regex: (?<=bar>ABC)foo str: bar>ABCfoo result_expr: $& expected_results foo +52_n: OK regex: (?ABC)foo parsed_regex: (?ABC)foo str: bar>ABCfoo result_expr: - expected_results - +53_y: OK regex: (?<=abcd(?<=(aaaabcd))) parsed_regex: (?<=abcd(?<=(aaaabcd))) str: ..aaaabcd.. result_expr: $1 expected_results aaaabcd +54_y: OK regex: (?=xy(?<=(aaxy))) parsed_regex: (?=xy(?<=(aaxy))) str: ..aaxy.. result_expr: $1 expected_results aaxy +55_y: OK regex: (?=xy(?<=(aaxyz?))) parsed_regex: (?=xy(?<=(aaxyz?))) str: ..aaxy.. result_expr: $1 expected_results aaxy +56_y: OK regex: (?<=(?=(aaxy))aa) parsed_regex: (?<=(?=(aaxy))aa) str: ..aaxy.. result_expr: $1 expected_results aaxy + diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_21_atomic_patterns.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_21_atomic_patterns.cpp.execution new file mode 100644 index 000000000..4812cfbb8 --- /dev/null +++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_21_atomic_patterns.cpp.execution @@ -0,0 +1,8 @@ +Running tests_21_atomic_patterns: +01_y: OK regex: (?>a+)b parsed_regex: (?>a+)b str: aaab result_expr: - expected_results - +02_y: OK regex: ((?>a+)b) parsed_regex: ((?>a+)b) str: aaab result_expr: $1 expected_results aaab +03_y: OK regex: (?>(a+))b parsed_regex: (?>(a+))b str: aaab result_expr: $1 expected_results aaa +04_y: OK regex: ((?>[^()]+)|\([^()]*\))+ parsed_regex: ((?>[^()]+)|\([^()]*\))+ str: ((abc(ade)ufh()()x result_expr: $& expected_results abc(ade)ufh()()x +05_y: OK regex: round\(((?>[^()]+))\) parsed_regex: round\(((?>[^()]+))\) str: _I(round(xs * sz),1) result_expr: $1 expected_results xs * sz +06_y: OK regex: ^((?>(?:aa)?b)?) parsed_regex: ^((?>(?:aa)?b)?) str: aab result_expr: $1 expected_results aab + diff --git a/regression-tests/test-results/clang-18-c++20/pure2-repeated-call.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-singleton-and-static.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-repeated-call.cpp.execution rename to regression-tests/test-results/apple-clang-15-c++2b/pure2-singleton-and-static.cpp.execution diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-try-catch.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-try-catch.cpp.execution new file mode 100644 index 000000000..c37cb6b5f --- /dev/null +++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-try-catch.cpp.execution @@ -0,0 +1,2 @@ +oh look, a thrown int: 42 +oh look, another exception diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-type-safety-1.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-type-safety-1.cpp.execution index d1aa6265a..df9d257d3 100644 --- a/regression-tests/test-results/apple-clang-15-c++2b/pure2-type-safety-1.cpp.execution +++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-type-safety-1.cpp.execution @@ -7,3 +7,5 @@ variant is int? true any is int? true optional is int? true +optional is: int +optional<*D> is: *B *D diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp.execution index 541b2a0d9..371e06b05 100644 --- a/regression-tests/test-results/apple-clang-15-c++2b/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp.execution +++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp.execution @@ -4,5 +4,4 @@ ctor - from string construct [ Henry | 123 Ford Dr. ] ctor - from string assign [ Clara | 123 Ford Dr. ] ctor - copy (GENERAL) cp-construct [ Clara | 123 Ford Dr. ] <- [ Clara | 123 Ford Dr. ] ctor - move mv-construct [ Clara(CM) | 123 Ford Dr. ] <- [ | ] -ctor - copy (GENERAL) cp-assign [ Clara | 123 Ford Dr. ] <- [ Clara | 123 Ford Dr. ] assign - move mv-assign [ Clara | 123 Ford Dr. ] <- [ | ] diff --git a/regression-tests/test-results/apple-clang-15-c++2b/run-tests-apple-clang.sh b/regression-tests/test-results/apple-clang-15-c++2b/run-tests-apple-clang.sh deleted file mode 100644 index e162c9005..000000000 --- a/regression-tests/test-results/apple-clang-15-c++2b/run-tests-apple-clang.sh +++ /dev/null @@ -1,24 +0,0 @@ -# This is intended to be run in the /test-results/apple-clang-15 subdirectory -# in a macOS shell with clang++ installed -# -cp ../*.cpp . -rm -f *.output *.execution -count=0 -exe_count=0 -clang++ --version > clang-version.output 2>&1 -for f in *.cpp -do - printf "Starting apple clang++ %s\n" "$f" - clang++ -I../../../include -std=c++2b -pthread -o test.exe $f > $f.output 2>&1 - rm -f $f - let count=count+1 - if test -f "test.exe"; then - let exe_count=exe_count+1 - printf " Starting executable\n" - ./test.exe > $f.execution 2>&1 - rm -f test.exe - fi -done -rm -f *.obj *.exp *.lib -printf "\nDone: %s .cpp tests compiled\n" "$count" -printf "\n %s .cpp executables generated and run\n" "$exe_count" diff --git a/regression-tests/test-results/clang-12-c++20/mixed-autodiff-taylor.cpp.execution b/regression-tests/test-results/clang-12-c++20/mixed-autodiff-taylor.cpp.execution new file mode 100644 index 000000000..0a486b06f --- /dev/null +++ b/regression-tests/test-results/clang-12-c++20/mixed-autodiff-taylor.cpp.execution @@ -0,0 +1,63 @@ +x + x = 4.000000 +x + x diff order 1 = 2.000000 +x + x diff order 2 = 0.000000 +x + x diff order 3 = 0.000000 +x + x diff order 4 = 0.000000 +x + x diff order 5 = 0.000000 +x + x diff order 6 = 0.000000 +0 - x = -2.000000 +0 - x diff order 1 = -1.000000 +0 - x diff order 2 = 0.000000 +0 - x diff order 3 = 0.000000 +0 - x diff order 4 = 0.000000 +0 - x diff order 5 = 0.000000 +0 - x diff order 6 = 0.000000 +x^7 = 128.000000 +x^7 diff order 1 = 448.000000 +x^7 diff order 2 = 1344.000000 +x^7 diff order 3 = 3360.000000 +x^7 diff order 4 = 6720.000000 +x^7 diff order 5 = 10080.000000 +x^7 diff order 6 = 10080.000000 +1/x = 0.500000 +1/x diff order 1 = -0.250000 +1/x diff order 2 = 0.250000 +1/x diff order 3 = -0.375000 +1/x diff order 4 = 0.750000 +1/x diff order 5 = -1.875000 +1/x diff order 6 = 5.625000 +sqrt(x) = 1.414214 +sqrt(x) diff order 1 = 0.353553 +sqrt(x) diff order 2 = -0.088388 +sqrt(x) diff order 3 = 0.066291 +sqrt(x) diff order 4 = -0.082864 +sqrt(x) diff order 5 = 0.145012 +sqrt(x) diff order 6 = -0.326277 +log(x) = 0.693147 +log(x) diff order 1 = 0.500000 +log(x) diff order 2 = -0.250000 +log(x) diff order 3 = 0.250000 +log(x) diff order 4 = -0.375000 +log(x) diff order 5 = 0.750000 +log(x) diff order 6 = -1.875000 +exp(x) = 7.389056 +exp(x) diff order 1 = 7.389056 +exp(x) diff order 2 = 7.389056 +exp(x) diff order 3 = 7.389056 +exp(x) diff order 4 = 7.389056 +exp(x) diff order 5 = 7.389056 +exp(x) diff order 6 = 7.389056 +sin(x) = 0.909297 +sin(x) diff order 1 = -0.416147 +sin(x) diff order 2 = -0.909297 +sin(x) diff order 3 = 0.416147 +sin(x) diff order 4 = 0.909297 +sin(x) diff order 5 = -0.416147 +sin(x) diff order 6 = -0.909297 +cos(x) = -0.416147 +cos(x) diff order 1 = -0.909297 +cos(x) diff order 2 = 0.416147 +cos(x) diff order 3 = 0.909297 +cos(x) diff order 4 = -0.416147 +cos(x) diff order 5 = -0.909297 +cos(x) diff order 6 = 0.416147 diff --git a/regression-tests/test-results/clang-12-c++20/mixed-bugfix-for-ufcs-non-local.cpp.output b/regression-tests/test-results/clang-12-c++20/mixed-bugfix-for-ufcs-non-local.cpp.output index 4e10e98ae..93df8807a 100644 --- a/regression-tests/test-results/clang-12-c++20/mixed-bugfix-for-ufcs-non-local.cpp.output +++ b/regression-tests/test-results/clang-12-c++20/mixed-bugfix-for-ufcs-non-local.cpp.output @@ -1,134 +1,109 @@ mixed-bugfix-for-ufcs-non-local.cpp2:13:12: error: a lambda expression cannot appear in this context template UnnamedTypeParam1_1> bool inline constexpr v0{ false };// Fails on GCC ([GCC109781][]) and Clang 12 (a lambda expression cannot appear in this context) ^ -../../../include/cpp2util.h:2137:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL' +../../../include/cpp2util.h:10096:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL' #define CPP2_UFCS_NONLOCAL(...) CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__) ^ -../../../include/cpp2util.h:2099:66: note: expanded from macro 'CPP2_UFCS_' +../../../include/cpp2util.h:10058:66: note: expanded from macro 'CPP2_UFCS_' #define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \ ^ mixed-bugfix-for-ufcs-non-local.cpp2:15:3: error: a lambda expression cannot appear in this context t inline constexpr v1{ t() };// Fails on Clang 12 (lambda in unevaluated context). ^ -../../../include/cpp2util.h:2137:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL' +../../../include/cpp2util.h:10096:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL' #define CPP2_UFCS_NONLOCAL(...) CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__) ^ -../../../include/cpp2util.h:2099:66: note: expanded from macro 'CPP2_UFCS_' +../../../include/cpp2util.h:10058:66: note: expanded from macro 'CPP2_UFCS_' #define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \ ^ mixed-bugfix-for-ufcs-non-local.cpp2:21:12: error: a lambda expression cannot appear in this context template UnnamedTypeParam1_2> auto g() -> void; ^ -../../../include/cpp2util.h:2137:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL' +../../../include/cpp2util.h:10096:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL' #define CPP2_UFCS_NONLOCAL(...) CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__) ^ -../../../include/cpp2util.h:2099:66: note: expanded from macro 'CPP2_UFCS_' +../../../include/cpp2util.h:10058:66: note: expanded from macro 'CPP2_UFCS_' #define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \ ^ mixed-bugfix-for-ufcs-non-local.cpp2:23:42: error: a lambda expression cannot appear in this context auto g([[maybe_unused]] cpp2::impl::in> unnamed_param_1) -> void; ^ -../../../include/cpp2util.h:2137:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL' +../../../include/cpp2util.h:10096:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL' #define CPP2_UFCS_NONLOCAL(...) CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__) ^ -../../../include/cpp2util.h:2099:66: note: expanded from macro 'CPP2_UFCS_' +../../../include/cpp2util.h:10058:66: note: expanded from macro 'CPP2_UFCS_' #define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \ ^ mixed-bugfix-for-ufcs-non-local.cpp2:27:29: error: a lambda expression cannot appear in this context [[nodiscard]] auto h() -> t; ^ -../../../include/cpp2util.h:2137:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL' +../../../include/cpp2util.h:10096:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL' #define CPP2_UFCS_NONLOCAL(...) CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__) ^ -../../../include/cpp2util.h:2099:66: note: expanded from macro 'CPP2_UFCS_' +../../../include/cpp2util.h:10058:66: note: expanded from macro 'CPP2_UFCS_' #define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \ ^ mixed-bugfix-for-ufcs-non-local.cpp2:31:12: error: a lambda expression cannot appear in this context template UnnamedTypeParam1_3> using a = bool;// Fails on GCC ([GCC109781][]) and Clang 12 (a lambda expression cannot appear in this context) ^ -../../../include/cpp2util.h:2137:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL' +../../../include/cpp2util.h:10096:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL' #define CPP2_UFCS_NONLOCAL(...) CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__) ^ -../../../include/cpp2util.h:2099:66: note: expanded from macro 'CPP2_UFCS_' +../../../include/cpp2util.h:10058:66: note: expanded from macro 'CPP2_UFCS_' #define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \ ^ mixed-bugfix-for-ufcs-non-local.cpp2:33:12: error: a lambda expression cannot appear in this context template UnnamedTypeParam1_4> auto inline constexpr b{ false };// Fails on GCC ([GCC109781][]). ^ -../../../include/cpp2util.h:2137:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL' +../../../include/cpp2util.h:10096:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL' #define CPP2_UFCS_NONLOCAL(...) CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__) ^ -../../../include/cpp2util.h:2099:66: note: expanded from macro 'CPP2_UFCS_' +../../../include/cpp2util.h:10058:66: note: expanded from macro 'CPP2_UFCS_' #define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \ ^ mixed-bugfix-for-ufcs-non-local.cpp2:35:13: error: a lambda expression cannot appear in this context using c = t;// Fails on Clang 12 (lambda in unevaluated context) and Clang 12 (a lambda expression cannot appear in this context) ^ -../../../include/cpp2util.h:2137:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL' +../../../include/cpp2util.h:10096:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL' #define CPP2_UFCS_NONLOCAL(...) CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__) ^ -../../../include/cpp2util.h:2099:66: note: expanded from macro 'CPP2_UFCS_' +../../../include/cpp2util.h:10058:66: note: expanded from macro 'CPP2_UFCS_' #define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \ ^ mixed-bugfix-for-ufcs-non-local.cpp2:37:28: error: a lambda expression cannot appear in this context auto inline constexpr d{ t() };// Fails on Clang 12 (lambda in unevaluated context). ^ -../../../include/cpp2util.h:2137:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL' +../../../include/cpp2util.h:10096:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL' #define CPP2_UFCS_NONLOCAL(...) CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__) ^ -../../../include/cpp2util.h:2099:66: note: expanded from macro 'CPP2_UFCS_' +../../../include/cpp2util.h:10058:66: note: expanded from macro 'CPP2_UFCS_' #define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \ ^ mixed-bugfix-for-ufcs-non-local.cpp2:21:12: error: a lambda expression cannot appear in this context template UnnamedTypeParam1_2> auto g() -> void{}// Fails on GCC ([GCC109781][]) and Clang 12 (a lambda expression cannot appear in this context) ^ -../../../include/cpp2util.h:2137:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL' +../../../include/cpp2util.h:10096:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL' #define CPP2_UFCS_NONLOCAL(...) CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__) ^ -../../../include/cpp2util.h:2099:66: note: expanded from macro 'CPP2_UFCS_' +../../../include/cpp2util.h:10058:66: note: expanded from macro 'CPP2_UFCS_' #define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \ ^ mixed-bugfix-for-ufcs-non-local.cpp2:23:42: error: a lambda expression cannot appear in this context auto g([[maybe_unused]] cpp2::impl::in> unnamed_param_1) -> void{}// Fails on Clang 12 (lambda in unevaluated context). ^ -../../../include/cpp2util.h:2137:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL' +../../../include/cpp2util.h:10096:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL' #define CPP2_UFCS_NONLOCAL(...) CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__) ^ -../../../include/cpp2util.h:2099:66: note: expanded from macro 'CPP2_UFCS_' +../../../include/cpp2util.h:10058:66: note: expanded from macro 'CPP2_UFCS_' #define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \ ^ mixed-bugfix-for-ufcs-non-local.cpp2:27:29: error: a lambda expression cannot appear in this context [[nodiscard]] auto h() -> t { return o; }// Fails on Clang 12 (lambda in unevaluated context). ^ -../../../include/cpp2util.h:2137:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL' +../../../include/cpp2util.h:10096:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL' #define CPP2_UFCS_NONLOCAL(...) CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__) ^ -../../../include/cpp2util.h:2099:66: note: expanded from macro 'CPP2_UFCS_' +../../../include/cpp2util.h:10058:66: note: expanded from macro 'CPP2_UFCS_' #define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \ ^ -mixed-bugfix-for-ufcs-non-local.cpp2:42:77: error: no matching function for call to object of type 'ns::u::(lambda at mixed-bugfix-for-ufcs-non-local.cpp2:42:77)' - requires (std::is_convertible_v&>) { return CPP2_FORWARD(x); }(true) }; - ^~~~~~~~~~~~~~~~~~~~~ -../../../include/cpp2util.h:2137:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL' -#define CPP2_UFCS_NONLOCAL(...) CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__) - ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -../../../include/cpp2util.h:2099:66: note: expanded from macro 'CPP2_UFCS_' -#define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \ - ^ -mixed-bugfix-for-ufcs-non-local.cpp2:42:77: note: candidate template ignored: couldn't infer template argument 'Obj' -../../../include/cpp2util.h:2137:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL' -#define CPP2_UFCS_NONLOCAL(...) CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__) - ^ -../../../include/cpp2util.h:2099:66: note: expanded from macro 'CPP2_UFCS_' -#define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \ - ^ -mixed-bugfix-for-ufcs-non-local.cpp2:42:77: error: lambda expression in an unevaluated operand - requires (std::is_convertible_v&>) { return CPP2_FORWARD(x); }(true) }; - ^ -../../../include/cpp2util.h:2137:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL' -#define CPP2_UFCS_NONLOCAL(...) CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__) - ^ -../../../include/cpp2util.h:2099:66: note: expanded from macro 'CPP2_UFCS_' -#define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \ - ^ -14 errors generated. +12 errors generated. diff --git a/regression-tests/test-results/clang-12-c++20/pure2-autodiff-higher-order.cpp.execution b/regression-tests/test-results/clang-12-c++20/pure2-autodiff-higher-order.cpp.execution new file mode 100644 index 000000000..84a5f58de --- /dev/null +++ b/regression-tests/test-results/clang-12-c++20/pure2-autodiff-higher-order.cpp.execution @@ -0,0 +1,240 @@ +diff(x + y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x + y + x) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 7.000000 + d1 = 4.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x - y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = -1.000000 + d1 = -1.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x - y - x) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = -3.000000 + d1 = -2.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x + y - x) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 3.000000 + d1 = 2.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x * y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 6.000000 + d1 = 7.000000 + d2 = 4.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x * y * x) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 12.000000 + d1 = 20.000000 + d2 = 22.000000 + d3 = 12.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x / y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 0.666667 + d1 = -0.111111 + d2 = 0.148148 + d3 = -0.296296 + d4 = 0.790123 + d5 = -2.633745 + d6 = 10.534979 +diff(x / y / y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 0.222222 + d1 = -0.185185 + d2 = 0.296296 + d3 = -0.691358 + d4 = 2.106996 + d5 = -7.901235 + d6 = 35.116598 +diff(x * y / x) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 3.000000 + d1 = 2.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x * (x + y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 10.000000 + d1 = 11.000000 + d2 = 6.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x + x * y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 8.000000 + d1 = 8.000000 + d2 = 4.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(+x + y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(-x + y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 1.000000 + d1 = 1.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x * func(x, y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 10.000000 + d1 = 11.000000 + d2 = 6.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x * func_outer(x, y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 10.000000 + d1 = 11.000000 + d2 = 6.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(sin(x - y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = -0.841471 + d1 = -0.540302 + d2 = 0.841471 + d3 = 0.540302 + d4 = -0.841471 + d5 = -0.540302 + d6 = 0.841471 +diff(if branch) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 2.000000 + d1 = 1.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(if else branch) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 2.000000 + d1 = 1.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(direct return) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(intermediate var) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(intermediate passive var) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(intermediate untyped) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(intermediate default init) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(intermediate no init) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(while loop) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 8.000000 + d1 = 5.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(do while loop) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 8.000000 + d1 = 5.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(for loop) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(tye_outer.a + y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(type_outer.add(y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 diff --git a/regression-tests/test-results/clang-12-c++20/pure2-autodiff.cpp.execution b/regression-tests/test-results/clang-12-c++20/pure2-autodiff.cpp.execution new file mode 100644 index 000000000..863bd6bd5 --- /dev/null +++ b/regression-tests/test-results/clang-12-c++20/pure2-autodiff.cpp.execution @@ -0,0 +1,46 @@ +diff(x + y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(x + y + x) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 7.000000, r_d = 4.000000) +diff(x - y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = -1.000000, r_d = -1.000000) +diff(x - y - x) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = -3.000000, r_d = -2.000000) +diff(x + y - x) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 3.000000, r_d = 2.000000) +diff(x * y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 6.000000, r_d = 7.000000) +diff(x * y * x) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 12.000000, r_d = 20.000000) +diff(x / y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 0.666667, r_d = -0.111111) +diff(x / y / y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 0.222222, r_d = -0.185185) +diff(x * y / x) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 3.000000, r_d = 2.000000) +diff(x * (x + y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 10.000000, r_d = 11.000000) +diff(x + x * y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 8.000000, r_d = 8.000000) +diff(+x + y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(-x + y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 1.000000, r_d = 1.000000) +diff(x * func(x, y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 10.000000, r_d = 11.000000) +diff(x * func_outer(x, y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 10.000000, r_d = 11.000000) +diff(sin(x - y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = -0.841471, r_d = -0.540302) +diff(if branch) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 2.000000, r_d = 1.000000) +diff(if else branch) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 2.000000, r_d = 1.000000) +diff(direct return) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(intermediate var) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(intermediate passive var) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(intermediate untyped) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(intermediate default init) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(intermediate no init) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(while loop) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 8.000000, r_d = 5.000000) +diff(do while loop) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 8.000000, r_d = 5.000000) +diff(for loop) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(tye_outer.a + y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(type_outer.add(y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(x + y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 5.000000, x_b = 1.000000, y_b = 1.000000) +diff(x + y + x) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 7.000000, x_b = 2.000000, y_b = 1.000000) +diff(x - y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = -1.000000, x_b = 1.000000, y_b = -1.000000) +diff(x - y - x) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = -3.000000, x_b = 0.000000, y_b = -1.000000) +diff(x + y - x) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 3.000000, x_b = 0.000000, y_b = 1.000000) +diff(x * y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 6.000000, x_b = 3.000000, y_b = 2.000000) +diff(x * y * x) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 12.000000, x_b = 12.000000, y_b = 4.000000) +diff(x / y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 0.666667, x_b = 0.333333, y_b = -0.222222) +diff(x / y / y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 0.222222, x_b = 0.111111, y_b = -0.148148) +diff(x * y / x) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 3.000000, x_b = 0.000000, y_b = 1.000000) +diff(x * (x + y)) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 10.000000, x_b = 7.000000, y_b = 2.000000) +diff(x + x * y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 8.000000, x_b = 4.000000, y_b = 2.000000) +diff(sin(x-y)) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = -0.841471, x_b = 0.540302, y_b = -0.540302) +diff(x * func(x-y)) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 10.000000, x_b = 7.000000, y_b = 2.000000) +diff(x * func_outer(x-y)) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 10.000000, x_b = 7.000000, y_b = 2.000000) +2nd order diff of x*x at 2.000000 = 2.000000 diff --git a/regression-tests/test-results/clang-12-c++20/pure2-bugfix-for-ufcs-noexcept.cpp.output b/regression-tests/test-results/clang-12-c++20/pure2-bugfix-for-ufcs-noexcept.cpp.output index a859e400b..19fd3f3bf 100644 --- a/regression-tests/test-results/clang-12-c++20/pure2-bugfix-for-ufcs-noexcept.cpp.output +++ b/regression-tests/test-results/clang-12-c++20/pure2-bugfix-for-ufcs-noexcept.cpp.output @@ -1,10 +1,10 @@ pure2-bugfix-for-ufcs-noexcept.cpp2:5:26: error: lambda expression in an unevaluated operand static_assert(noexcept(CPP2_UFCS(swap)(t(), t())));// Fails on Clang 12 (lambda in unevaluated context) and GCC 10 (static assertion failed) ^ -../../../include/cpp2util.h:2132:59: note: expanded from macro 'CPP2_UFCS' +../../../include/cpp2util.h:10091:59: note: expanded from macro 'CPP2_UFCS' #define CPP2_UFCS(...) CPP2_UFCS_(&,CPP2_UFCS_EMPTY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__) ^ -../../../include/cpp2util.h:2099:66: note: expanded from macro 'CPP2_UFCS_' +../../../include/cpp2util.h:10058:66: note: expanded from macro 'CPP2_UFCS_' #define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \ ^ 1 error generated. diff --git a/regression-tests/test-results/clang-12-c++20/pure2-bugfix-for-ufcs-sfinae.cpp.output b/regression-tests/test-results/clang-12-c++20/pure2-bugfix-for-ufcs-sfinae.cpp.output index 71e5b2b90..ce6220ac1 100644 --- a/regression-tests/test-results/clang-12-c++20/pure2-bugfix-for-ufcs-sfinae.cpp.output +++ b/regression-tests/test-results/clang-12-c++20/pure2-bugfix-for-ufcs-sfinae.cpp.output @@ -1,19 +1,19 @@ pure2-bugfix-for-ufcs-sfinae.cpp2:1:78: error: lambda expression in an unevaluated operand template [[nodiscard]] auto f() -> std::type_identity_t; ^ -../../../include/cpp2util.h:2137:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL' +../../../include/cpp2util.h:10096:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL' #define CPP2_UFCS_NONLOCAL(...) CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__) ^ -../../../include/cpp2util.h:2099:66: note: expanded from macro 'CPP2_UFCS_' +../../../include/cpp2util.h:10058:66: note: expanded from macro 'CPP2_UFCS_' #define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \ ^ pure2-bugfix-for-ufcs-sfinae.cpp2:1:78: error: lambda expression in an unevaluated operand template [[nodiscard]] auto f() -> std::type_identity_t{}// Fails on Clang 12 (lambda in unevaluated context). ^ -../../../include/cpp2util.h:2137:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL' +../../../include/cpp2util.h:10096:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL' #define CPP2_UFCS_NONLOCAL(...) CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__) ^ -../../../include/cpp2util.h:2099:66: note: expanded from macro 'CPP2_UFCS_' +../../../include/cpp2util.h:10058:66: note: expanded from macro 'CPP2_UFCS_' #define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \ ^ 2 errors generated. diff --git a/regression-tests/test-results/clang-12-c++20/pure2-default-arguments.cpp.output b/regression-tests/test-results/clang-12-c++20/pure2-default-arguments.cpp.output index 4812dc94c..ed71fc601 100644 --- a/regression-tests/test-results/clang-12-c++20/pure2-default-arguments.cpp.output +++ b/regression-tests/test-results/clang-12-c++20/pure2-default-arguments.cpp.output @@ -1,4 +1,4 @@ -pure2-default-arguments.cpp2:6:61: error: no member named 'source_location' in namespace 'std' - char const* fn = CPP2_UFCS_NONLOCAL(function_name)(std::source_location::current()) - ~~~~~^ +pure2-default-arguments.cpp2:6:77: error: no member named 'source_location' in namespace 'std' + cpp2::impl::in fn = CPP2_UFCS_NONLOCAL(function_name)(std::source_location::current()) + ~~~~~^ 1 error generated. diff --git a/regression-tests/test-results/clang-12-c++20/pure2-expected-is-as.cpp.output b/regression-tests/test-results/clang-12-c++20/pure2-expected-is-as.cpp.output new file mode 100644 index 000000000..80a3c22f7 --- /dev/null +++ b/regression-tests/test-results/clang-12-c++20/pure2-expected-is-as.cpp.output @@ -0,0 +1,169 @@ +pure2-expected-is-as.cpp2:7:22: error: expected '(' for function-style cast or type construction + std::expected ex1 {123}; + ~~~^ +pure2-expected-is-as.cpp2:7:10: error: no member named 'expected' in namespace 'std'; did you mean 'unexpected'? + std::expected ex1 {123}; + ~~~~~^~~~~~~~ + unexpected +/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/exception:92:8: note: 'unexpected' declared here + void unexpected() __attribute__ ((__noreturn__)); + ^ +pure2-expected-is-as.cpp2:8:22: error: expected '(' for function-style cast or type construction + std::expected ex2 {std::unexpected(-1)}; + ~~~^ +pure2-expected-is-as.cpp2:8:10: error: no member named 'expected' in namespace 'std'; did you mean 'unexpected'? + std::expected ex2 {std::unexpected(-1)}; + ~~~~~^~~~~~~~ + unexpected +/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/exception:92:8: note: 'unexpected' declared here + void unexpected() __attribute__ ((__noreturn__)); + ^ +pure2-expected-is-as.cpp2:9:30: error: expected '(' for function-style cast or type construction + std::expected ex3 {"Expect the unexpected"}; + ~~~~~~~~~~~^ +pure2-expected-is-as.cpp2:9:10: error: no member named 'expected' in namespace 'std'; did you mean 'unexpected'? + std::expected ex3 {"Expect the unexpected"}; + ~~~~~^~~~~~~~ + unexpected +/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/exception:92:8: note: 'unexpected' declared here + void unexpected() __attribute__ ((__noreturn__)); + ^ +pure2-expected-is-as.cpp2:11:29: error: use of undeclared identifier 'ex1'; did you mean 'exp'? + if (cpp2::impl::is(ex1)) { + ^~~ + exp +/usr/include/x86_64-linux-gnu/bits/mathcalls.h:95:17: note: 'exp' declared here +__MATHCALL_VEC (exp,, (_Mdouble_ __x)); + ^ +pure2-expected-is-as.cpp2:15:30: error: use of undeclared identifier 'ex1'; did you mean 'exp'? + if (cpp2::impl::is(ex1)) { + ^~~ + exp +/usr/include/x86_64-linux-gnu/bits/mathcalls.h:95:17: note: 'exp' declared here +__MATHCALL_VEC (exp,, (_Mdouble_ __x)); + ^ +pure2-expected-is-as.cpp2:20:30: error: use of undeclared identifier 'ex1'; did you mean 'exp'? + if (cpp2::impl::is(ex1)) { + ^~~ + exp +/usr/include/x86_64-linux-gnu/bits/mathcalls.h:95:17: note: 'exp' declared here +__MATHCALL_VEC (exp,, (_Mdouble_ __x)); + ^ +pure2-expected-is-as.cpp2:25:29: error: 'unexpected' does not name a template but is followed by template arguments + if (cpp2::impl::is>(ex1)) { + ^ ~~~~~ +/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/exception:92:8: note: non-template declaration found by name lookup + void unexpected() __attribute__ ((__noreturn__)); + ^ +pure2-expected-is-as.cpp2:25:46: error: use of undeclared identifier 'ex1'; did you mean 'exp'? + if (cpp2::impl::is>(ex1)) { + ^~~ + exp +/usr/include/x86_64-linux-gnu/bits/mathcalls.h:95:17: note: 'exp' declared here +__MATHCALL_VEC (exp,, (_Mdouble_ __x)); + ^ +pure2-expected-is-as.cpp2:30:24: error: use of undeclared identifier 'ex1'; did you mean 'exp'? + if (cpp2::impl::is(ex1, 123)) { + ^~~ + exp +/usr/include/x86_64-linux-gnu/bits/mathcalls.h:95:17: note: 'exp' declared here +__MATHCALL_VEC (exp,, (_Mdouble_ __x)); + ^ +pure2-expected-is-as.cpp2:34:24: error: use of undeclared identifier 'ex1'; did you mean 'exp'? + if (cpp2::impl::is(ex1, 100)) { + ^~~ + exp +/usr/include/x86_64-linux-gnu/bits/mathcalls.h:95:17: note: 'exp' declared here +__MATHCALL_VEC (exp,, (_Mdouble_ __x)); + ^ +In file included from pure2-expected-is-as.cpp:7: +../../../include/cpp2util.h:475:72: error: invalid application of 'sizeof' to a function type + (std::is_floating_point_v && std::is_floating_point_v && sizeof(From) > sizeof(To)) || // NOLINT(misc-redundant-expression) + ^~~~~~~~~~~~ +../../../include/cpp2util.h:2929:19: note: in instantiation of variable template specialization 'cpp2::impl::is_narrowing_v' requested here + if constexpr (is_narrowing_v) { + ^ +pure2-expected-is-as.cpp2:39:28: note: in instantiation of function template specialization 'cpp2::impl::as_' requested here + auto val1 {cpp2::impl::as_(ex1)}; + ^ +In file included from pure2-expected-is-as.cpp:7: +../../../include/cpp2util.h:2949:12: error: no matching function for call to 'as' + return as(CPP2_FORWARD(x)); + ^~~~~ +pure2-expected-is-as.cpp2:39:28: note: in instantiation of function template specialization 'cpp2::impl::as_' requested here + auto val1 {cpp2::impl::as_(ex1)}; + ^ +../../../include/cpp2util.h:1907:16: note: candidate template ignored: constraints not satisfied [with C = int, x:auto = double (&)(double) noexcept] +constexpr auto as(auto&& x CPP2_SOURCE_LOCATION_PARAM_WITH_DEFAULT_AS) -> decltype(auto) + ^ +../../../include/cpp2util.h:1913:18: note: because 'std::is_scalar_v >' evaluated to false + (std::is_scalar_v && !std::is_enum_v) + ^ +../../../include/cpp2util.h:1914:17: note: and 'std::is_floating_point_v >' evaluated to false + || std::is_floating_point_v + ^ +../../../include/cpp2util.h:1915:17: note: and 'std::is_base_of_v >' evaluated to false + || std::is_base_of_v + ^ +../../../include/cpp2util.h:1916:17: note: and 'std::is_base_of_v, int>' evaluated to false + || std::is_base_of_v + ^ +../../../include/cpp2util.h:1917:30: note: and 'C({std::forward(x)})' would be invalid: cannot initialize a value of type 'int' with an lvalue of type 'double (double) noexcept' + || requires { C{CPP2_FORWARD(x)}; } + ^ +../../../include/cpp2util.h:333:37: note: expanded from macro 'CPP2_FORWARD' +#define CPP2_FORWARD(x) std::forward(x) + ^ +../../../include/cpp2util.h:2046:6: note: candidate template ignored: constraints not satisfied [with C = int, X = double (&)(double) noexcept] +auto as(X&& x CPP2_SOURCE_LOCATION_PARAM_WITH_DEFAULT_AS) -> decltype(auto) + ^ +../../../include/cpp2util.h:2045:23: note: because 'specialization_of_template' evaluated to false +template< typename C, specialization_of_template X > + ^ +../../../include/cpp2util.h:897:7: note: because 'specialization_of_template_helper(std::forward(x))' would be invalid: no matching function for call to 'specialization_of_template_helper' + { specialization_of_template_helper(std::forward(x)) } -> std::same_as; + ^ +../../../include/cpp2util.h:2093:16: note: candidate template ignored: constraints not satisfied [with T = int, X = double (&)(double) noexcept] +constexpr auto as( X && x ) -> decltype(auto) { + ^ +../../../include/cpp2util.h:2092:22: note: because 'same_type_as' evaluated to false +template X> + ^ +../../../include/cpp2util.h:927:29: note: because 'std::same_as, std::remove_cvref_t >' evaluated to false +concept same_type_as = std::same_as, std::remove_cvref_t>; + ^ +/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/concepts:63:19: note: because '__detail::__same_as' evaluated to false + = __detail::__same_as<_Tp, _Up> && __detail::__same_as<_Up, _Tp>; + ^ +/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/concepts:57:27: note: because 'std::is_same_v' evaluated to false + concept __same_as = std::is_same_v<_Tp, _Up>; + ^ +../../../include/cpp2util.h:2136:16: note: candidate template ignored: constraints not satisfied [with T = int, X = double (&)(double) noexcept] +constexpr auto as( X&& x ) -> decltype(auto) { + ^ +../../../include/cpp2util.h:2135:22: note: because 'specialization_of_template' evaluated to false +template X> + ^ +../../../include/cpp2util.h:897:7: note: because 'specialization_of_template_helper(std::forward(x))' would be invalid: no matching function for call to 'specialization_of_template_helper' + { specialization_of_template_helper(std::forward(x)) } -> std::same_as; + ^ +../../../include/cpp2util.h:1882:16: note: candidate function template not viable: requires 0 arguments, but 1 was provided +constexpr auto as() -> auto + ^ +../../../include/cpp2util.h:1893:16: note: candidate function template not viable: requires 0 arguments, but 1 was provided +constexpr auto as() -> auto + ^ +pure2-expected-is-as.cpp2:39:37: error: use of undeclared identifier 'ex1' + auto val1 {cpp2::impl::as_(ex1)}; + ^ +pure2-expected-is-as.cpp2:42:29: error: use of undeclared identifier 'ex2' + if (cpp2::impl::is(ex2)) { + ^ +pure2-expected-is-as.cpp2:47:30: error: use of undeclared identifier 'ex2' + if (cpp2::impl::is(ex2)) { + ^ +pure2-expected-is-as.cpp2:52:24: error: use of undeclared identifier 'ex2' + if (cpp2::impl::is(ex2, 123)) { + ^ +fatal error: too many errors emitted, stopping now [-ferror-limit=] +20 errors generated. diff --git a/regression-tests/test-results/clang-12-c++20/pure2-function-body-reflection.cpp.execution b/regression-tests/test-results/clang-12-c++20/pure2-function-body-reflection.cpp.execution new file mode 100644 index 000000000..d2076f3f7 --- /dev/null +++ b/regression-tests/test-results/clang-12-c++20/pure2-function-body-reflection.cpp.execution @@ -0,0 +1 @@ +calling generated function ns::add_1... ns::add_1(42) returned 43 diff --git a/regression-tests/test-results/clang-12-c++20/pure2-last-use.cpp.output b/regression-tests/test-results/clang-12-c++20/pure2-last-use.cpp.output index 6b03c3909..e663bb1dc 100644 --- a/regression-tests/test-results/clang-12-c++20/pure2-last-use.cpp.output +++ b/regression-tests/test-results/clang-12-c++20/pure2-last-use.cpp.output @@ -13,7 +13,7 @@ pure2-last-use.cpp2:344:16: error: no template named 'move_only_function' in nam pure2-last-use.cpp2:348:161: error: no member named 'move_only_function' in namespace 'std' CPP2_REQUIRES_ (std::is_convertible_v>&> && std::is_convertible_v>&> && std::is_convertible_v>&>) ; ~~~~~^ -../../../include/cpp2util.h:10008:43: note: expanded from macro 'CPP2_REQUIRES_' +../../../include/cpp2util.h:10109:43: note: expanded from macro 'CPP2_REQUIRES_' #define CPP2_REQUIRES_(...) requires (__VA_ARGS__) ^~~~~~~~~~~ pure2-last-use.cpp2:348:188: error: expected expression @@ -49,26 +49,31 @@ class issue_857_4 { pure2-last-use.cpp2:905:1: note: still within definition of 'issue_857_4' here namespace captures { ^ -pure2-last-use.cpp2:279:272: error: no member named 'move_only_function' in namespace 'std' -requires (std::is_convertible_v>&> && std::is_convertible_v in_)>>&> && std::is_convertible_v>&> && std::is_convertible_v in_)>>&>) - ~~~~~^ -pure2-last-use.cpp2:279:299: error: expected expression -requires (std::is_convertible_v>&> && std::is_convertible_v in_)>>&> && std::is_convertible_v>&> && std::is_convertible_v in_)>>&>) - ^ -pure2-last-use.cpp2:279:304: error: use of address-of-label extension outside of a function body -requires (std::is_convertible_v>&> && std::is_convertible_v in_)>>&> && std::is_convertible_v>&> && std::is_convertible_v in_)>>&>) - ^ -pure2-last-use.cpp2:278:14: error: out-of-line definition of 'issue_857_4' does not match any declaration in 'issue_857_4' -issue_857_4::issue_857_4(auto&& f_, auto&& g_, auto&& mf_, auto&& mg_) - ^~~~~~~~~~~ -pure2-last-use.cpp2:281:272: error: member initializer 'g' does not name a non-static data member or base class - , g{ CPP2_FORWARD(g_) } - ^~~~~~~~~~~~~~~~~~~~~ -pure2-last-use.cpp2:282:272: error: member initializer 'mf' does not name a non-static data member or base class - , mf{ CPP2_FORWARD(mf_) } - ^~~~~~~~~~~~~~~~~~~~~~~ -pure2-last-use.cpp2:283:272: error: member initializer 'mg' does not name a non-static data member or base class - , mg{ CPP2_FORWARD(mg_) }{} - ^~~~~~~~~~~~~~~~~~~~~~~ -fatal error: too many errors emitted, stopping now [-ferror-limit=] -20 errors generated. +pure2-last-use.cpp2:279:179: error: expected variable name or 'this' in lambda capture list +requires (std::is_convertible_v>&> && std::is_convertible_v unnamed_param_1)>>&> && std::is_convertible_v>&> && std::is_convertible_v unnamed_param_1)>>&>) + ^ +pure2-last-use.cpp2:1044:2: error: expected '>' +} + ^ +pure2-last-use.cpp2:279:173: note: to match this '<' +requires (std::is_convertible_v>&> && std::is_convertible_v unnamed_param_1)>>&> && std::is_convertible_v>&> && std::is_convertible_v unnamed_param_1)>>&>) + ^ +pure2-last-use.cpp2:1045:1: error: expected a type +^ +pure2-last-use.cpp2:1044:2: error: expected '>' +} + ^ +pure2-last-use.cpp2:279:154: note: to match this '<' +requires (std::is_convertible_v>&> && std::is_convertible_v unnamed_param_1)>>&> && std::is_convertible_v>&> && std::is_convertible_v unnamed_param_1)>>&>) + ^ +pure2-last-use.cpp2:1045:1: error: expected a type +^ +pure2-last-use.cpp2:1044:2: error: expected '>' +} + ^ +pure2-last-use.cpp2:279:120: note: to match this '<' +requires (std::is_convertible_v>&> && std::is_convertible_v unnamed_param_1)>>&> && std::is_convertible_v>&> && std::is_convertible_v unnamed_param_1)>>&>) + ^ +pure2-last-use.cpp2:1045:1: error: expected function body after function declarator +^ +19 errors generated. diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex-general.cpp.execution b/regression-tests/test-results/clang-12-c++20/pure2-regex-general.cpp.execution new file mode 100644 index 000000000..c44d08490 --- /dev/null +++ b/regression-tests/test-results/clang-12-c++20/pure2-regex-general.cpp.execution @@ -0,0 +1,11 @@ +Running tests_01_char_matcher: +Not full match fails: 0 +Full match is ok: 1 +Search finds at position 1: 1 +Search finds at position 3: 3 +Find all finds at position: 1 +Find all finds at position: 4 +Find all finds at position: 7 +Find all found 3 matched: 3 +Find all finds at position: 2 +Find all found 1 match: 1 diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_04_start_end.cpp.execution b/regression-tests/test-results/clang-12-c++20/pure2-regex_04_start_end.cpp.execution index 6fef36434..a1e2b9b63 100644 --- a/regression-tests/test-results/clang-12-c++20/pure2-regex_04_start_end.cpp.execution +++ b/regression-tests/test-results/clang-12-c++20/pure2-regex_04_start_end.cpp.execution @@ -8,4 +8,5 @@ Running tests_04_start_end: 07_y: OK regex: ^ parsed_regex: ^ str: abc result_expr: $& expected_results 08_y: OK regex: $ parsed_regex: $ str: abc result_expr: $& expected_results 09_n: OK regex: $b parsed_regex: $b str: b result_expr: - expected_results - +10_n: OK regex: \GX.*X parsed_regex: \GX.*X str: aaaXbX result_expr: - expected_results - diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_19_lookahead.cpp.execution b/regression-tests/test-results/clang-12-c++20/pure2-regex_19_lookahead.cpp.execution index d4c65d951..0f723eb77 100644 --- a/regression-tests/test-results/clang-12-c++20/pure2-regex_19_lookahead.cpp.execution +++ b/regression-tests/test-results/clang-12-c++20/pure2-regex_19_lookahead.cpp.execution @@ -27,6 +27,14 @@ Running tests_19_lookahead: 26_y: OK regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) parsed_regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) str: aaaaaaaa result_expr: $1 expected_results aaaaaaa 27_y: OK regex: a(?!b(?!c))(..) parsed_regex: a(?!b(?!c))(..) str: abababc result_expr: $1 expected_results bc 28_y: OK regex: a(?!b(?=a))(..) parsed_regex: a(?!b(?=a))(..) str: abababc result_expr: $1 expected_results bc +29_y: OK regex: (?=foo) parsed_regex: (?=foo) str: foo result_expr: @+ expected_results 0 +30_y: OK regex: (?=foo) parsed_regex: (?=foo) str: XfooY result_expr: @+ expected_results 1 +31_y: OK regex: .*(?=foo) parsed_regex: .*(?=foo) str: XfooY result_expr: @+ expected_results 1 +32_y: OK regex: (?=.*P)P parsed_regex: (?=.*P)P str: aP result_expr: @+ expected_results 2 +33_y: OK regex: X(?=foo)f parsed_regex: X(?=foo)f str: ..XfooY.. result_expr: @+ expected_results 4 +34_y: OK regex: X(?=foo) parsed_regex: X(?=foo) str: ..XfooY.. result_expr: @+ expected_results 3 +35_y: OK regex: (?=XY*foo) parsed_regex: (?=XY*foo) str: Xfoo result_expr: @+ expected_results 0 +36_y: OK regex: ^(?=XY*foo) parsed_regex: ^(?=XY*foo) str: Xfoo result_expr: @+ expected_results 0 37_y: OK regex: X(\w+)(?=\s)|X(\w+) parsed_regex: X(\w+)(?=\s)|X(\w+) str: Xab result_expr: [$1-$2] expected_results [-ab] 38_y: OK regex: ^a*(?=b)b parsed_regex: ^a*(?=b)b str: ab result_expr: $& expected_results ab 39_y: OK regex: '(?!\A)x'm parsed_regex: '(?!\A)x'm str: a\nxb\n result_expr: - expected_results - @@ -44,4 +52,6 @@ Running tests_19_lookahead: 51_y: OK regex: ((?s)b.)c(?!\N) parsed_regex: ((?s)b.)c(?!\N) str: a\nb\nc\n result_expr: $1:$& expected_results b\n:b\nc 52_y: OK regex: '(b.)c(?!\N)'s parsed_regex: '(b.)c(?!\N)'s str: a\nb\nc\n result_expr: $1:$& expected_results b\n:b\nc 53_n: OK regex: a*(?!) parsed_regex: a*(?!) str: aaaab result_expr: - expected_results - +54_y: OK regex: (?)foo parsed_regex: (?)foo str: bar>ABCfoo result_expr: $& expected_results foo +55_y: OK regex: (?ABC)foo parsed_regex: (?ABC)foo str: bar>ABCfoo result_expr: $& expected_results ABCfoo diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_20_lookbehind.cpp.execution b/regression-tests/test-results/clang-12-c++20/pure2-regex_20_lookbehind.cpp.execution new file mode 100644 index 000000000..cd61d4f56 --- /dev/null +++ b/regression-tests/test-results/clang-12-c++20/pure2-regex_20_lookbehind.cpp.execution @@ -0,0 +1,58 @@ +Running tests_20_lookbehind: +01_y: OK regex: (?<=a)b parsed_regex: (?<=a)b str: ab result_expr: $& expected_results b +02_y: OK regex: (?<=af?)b parsed_regex: (?<=af?)b str: ab result_expr: $& expected_results b +03_n: OK regex: (?<=a)b parsed_regex: (?<=a)b str: cb result_expr: - expected_results - +04_n: OK regex: (?<=a(?:fo)?)b parsed_regex: (?<=a(?:fo)?)b str: cb result_expr: - expected_results - +05_n: OK regex: (?<=a)b parsed_regex: (?<=a)b str: b result_expr: - expected_results - +06_n: OK regex: (?<=a(?:foo)?)b parsed_regex: (?<=a(?:foo)?)b str: b result_expr: - expected_results - +07_y: OK regex: (?)foo parsed_regex: (?<=bar>)foo str: bar>foo result_expr: $& expected_results foo +50_n: OK regex: (?)foo parsed_regex: (?)foo str: bar>foo result_expr: - expected_results - +51_y: OK regex: (?<=bar>ABC)foo parsed_regex: (?<=bar>ABC)foo str: bar>ABCfoo result_expr: $& expected_results foo +52_n: OK regex: (?ABC)foo parsed_regex: (?ABC)foo str: bar>ABCfoo result_expr: - expected_results - +53_y: OK regex: (?<=abcd(?<=(aaaabcd))) parsed_regex: (?<=abcd(?<=(aaaabcd))) str: ..aaaabcd.. result_expr: $1 expected_results aaaabcd +54_y: OK regex: (?=xy(?<=(aaxy))) parsed_regex: (?=xy(?<=(aaxy))) str: ..aaxy.. result_expr: $1 expected_results aaxy +55_y: OK regex: (?=xy(?<=(aaxyz?))) parsed_regex: (?=xy(?<=(aaxyz?))) str: ..aaxy.. result_expr: $1 expected_results aaxy +56_y: OK regex: (?<=(?=(aaxy))aa) parsed_regex: (?<=(?=(aaxy))aa) str: ..aaxy.. result_expr: $1 expected_results aaxy + diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_21_atomic_patterns.cpp.execution b/regression-tests/test-results/clang-12-c++20/pure2-regex_21_atomic_patterns.cpp.execution new file mode 100644 index 000000000..4812cfbb8 --- /dev/null +++ b/regression-tests/test-results/clang-12-c++20/pure2-regex_21_atomic_patterns.cpp.execution @@ -0,0 +1,8 @@ +Running tests_21_atomic_patterns: +01_y: OK regex: (?>a+)b parsed_regex: (?>a+)b str: aaab result_expr: - expected_results - +02_y: OK regex: ((?>a+)b) parsed_regex: ((?>a+)b) str: aaab result_expr: $1 expected_results aaab +03_y: OK regex: (?>(a+))b parsed_regex: (?>(a+))b str: aaab result_expr: $1 expected_results aaa +04_y: OK regex: ((?>[^()]+)|\([^()]*\))+ parsed_regex: ((?>[^()]+)|\([^()]*\))+ str: ((abc(ade)ufh()()x result_expr: $& expected_results abc(ade)ufh()()x +05_y: OK regex: round\(((?>[^()]+))\) parsed_regex: round\(((?>[^()]+))\) str: _I(round(xs * sz),1) result_expr: $1 expected_results xs * sz +06_y: OK regex: ^((?>(?:aa)?b)?) parsed_regex: ^((?>(?:aa)?b)?) str: aab result_expr: $1 expected_results aab + diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-repeated-call.cpp.execution b/regression-tests/test-results/clang-12-c++20/pure2-singleton-and-static.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++23-libcpp/pure2-repeated-call.cpp.execution rename to regression-tests/test-results/clang-12-c++20/pure2-singleton-and-static.cpp.execution diff --git a/regression-tests/test-results/clang-12-c++20/pure2-try-catch.cpp.execution b/regression-tests/test-results/clang-12-c++20/pure2-try-catch.cpp.execution new file mode 100644 index 000000000..c37cb6b5f --- /dev/null +++ b/regression-tests/test-results/clang-12-c++20/pure2-try-catch.cpp.execution @@ -0,0 +1,2 @@ +oh look, a thrown int: 42 +oh look, another exception diff --git a/regression-tests/test-results/clang-12-c++20/pure2-type-safety-1.cpp.execution b/regression-tests/test-results/clang-12-c++20/pure2-type-safety-1.cpp.execution index d1aa6265a..df9d257d3 100644 --- a/regression-tests/test-results/clang-12-c++20/pure2-type-safety-1.cpp.execution +++ b/regression-tests/test-results/clang-12-c++20/pure2-type-safety-1.cpp.execution @@ -7,3 +7,5 @@ variant is int? true any is int? true optional is int? true +optional is: int +optional<*D> is: *B *D diff --git a/regression-tests/test-results/clang-12-c++20/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp.execution b/regression-tests/test-results/clang-12-c++20/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp.execution index 541b2a0d9..371e06b05 100644 --- a/regression-tests/test-results/clang-12-c++20/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp.execution +++ b/regression-tests/test-results/clang-12-c++20/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp.execution @@ -4,5 +4,4 @@ ctor - from string construct [ Henry | 123 Ford Dr. ] ctor - from string assign [ Clara | 123 Ford Dr. ] ctor - copy (GENERAL) cp-construct [ Clara | 123 Ford Dr. ] <- [ Clara | 123 Ford Dr. ] ctor - move mv-construct [ Clara(CM) | 123 Ford Dr. ] <- [ | ] -ctor - copy (GENERAL) cp-assign [ Clara | 123 Ford Dr. ] <- [ Clara | 123 Ford Dr. ] assign - move mv-assign [ Clara | 123 Ford Dr. ] <- [ | ] diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/mixed-autodiff-taylor.cpp.execution b/regression-tests/test-results/clang-15-c++20-libcpp/mixed-autodiff-taylor.cpp.execution new file mode 100644 index 000000000..0a486b06f --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20-libcpp/mixed-autodiff-taylor.cpp.execution @@ -0,0 +1,63 @@ +x + x = 4.000000 +x + x diff order 1 = 2.000000 +x + x diff order 2 = 0.000000 +x + x diff order 3 = 0.000000 +x + x diff order 4 = 0.000000 +x + x diff order 5 = 0.000000 +x + x diff order 6 = 0.000000 +0 - x = -2.000000 +0 - x diff order 1 = -1.000000 +0 - x diff order 2 = 0.000000 +0 - x diff order 3 = 0.000000 +0 - x diff order 4 = 0.000000 +0 - x diff order 5 = 0.000000 +0 - x diff order 6 = 0.000000 +x^7 = 128.000000 +x^7 diff order 1 = 448.000000 +x^7 diff order 2 = 1344.000000 +x^7 diff order 3 = 3360.000000 +x^7 diff order 4 = 6720.000000 +x^7 diff order 5 = 10080.000000 +x^7 diff order 6 = 10080.000000 +1/x = 0.500000 +1/x diff order 1 = -0.250000 +1/x diff order 2 = 0.250000 +1/x diff order 3 = -0.375000 +1/x diff order 4 = 0.750000 +1/x diff order 5 = -1.875000 +1/x diff order 6 = 5.625000 +sqrt(x) = 1.414214 +sqrt(x) diff order 1 = 0.353553 +sqrt(x) diff order 2 = -0.088388 +sqrt(x) diff order 3 = 0.066291 +sqrt(x) diff order 4 = -0.082864 +sqrt(x) diff order 5 = 0.145012 +sqrt(x) diff order 6 = -0.326277 +log(x) = 0.693147 +log(x) diff order 1 = 0.500000 +log(x) diff order 2 = -0.250000 +log(x) diff order 3 = 0.250000 +log(x) diff order 4 = -0.375000 +log(x) diff order 5 = 0.750000 +log(x) diff order 6 = -1.875000 +exp(x) = 7.389056 +exp(x) diff order 1 = 7.389056 +exp(x) diff order 2 = 7.389056 +exp(x) diff order 3 = 7.389056 +exp(x) diff order 4 = 7.389056 +exp(x) diff order 5 = 7.389056 +exp(x) diff order 6 = 7.389056 +sin(x) = 0.909297 +sin(x) diff order 1 = -0.416147 +sin(x) diff order 2 = -0.909297 +sin(x) diff order 3 = 0.416147 +sin(x) diff order 4 = 0.909297 +sin(x) diff order 5 = -0.416147 +sin(x) diff order 6 = -0.909297 +cos(x) = -0.416147 +cos(x) diff order 1 = -0.909297 +cos(x) diff order 2 = 0.416147 +cos(x) diff order 3 = 0.909297 +cos(x) diff order 4 = -0.416147 +cos(x) diff order 5 = -0.909297 +cos(x) diff order 6 = 0.416147 diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/mixed-function-expression-with-pointer-capture.cpp.output b/regression-tests/test-results/clang-15-c++20-libcpp/mixed-function-expression-with-pointer-capture.cpp.output index e498f2c95..35de1d1de 100644 --- a/regression-tests/test-results/clang-15-c++20-libcpp/mixed-function-expression-with-pointer-capture.cpp.output +++ b/regression-tests/test-results/clang-15-c++20-libcpp/mixed-function-expression-with-pointer-capture.cpp.output @@ -1,5 +1,5 @@ mixed-function-expression-with-pointer-capture.cpp2:13:18: error: no member named 'for_each' in namespace 'std::ranges' - std::ranges::for_each(vec, [_0 = (&y)](auto const& x) mutable -> void { + std::ranges::for_each(vec, [_0 = (&y)](auto const& x) mutable -> decltype(auto) { ~~~~~~~~~~~~~^ mixed-function-expression-with-pointer-capture.cpp2:18:18: error: no member named 'for_each' in namespace 'std::ranges' std::ranges::for_each(vec, cpp2::move(callback)); diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/mixed-parameter-passing.cpp.execution b/regression-tests/test-results/clang-15-c++20-libcpp/mixed-parameter-passing.cpp.execution new file mode 100644 index 000000000..256f7e186 --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20-libcpp/mixed-parameter-passing.cpp.execution @@ -0,0 +1,2 @@ +123 +0 diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-autodiff-higher-order.cpp.execution b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-autodiff-higher-order.cpp.execution new file mode 100644 index 000000000..84a5f58de --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-autodiff-higher-order.cpp.execution @@ -0,0 +1,240 @@ +diff(x + y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x + y + x) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 7.000000 + d1 = 4.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x - y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = -1.000000 + d1 = -1.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x - y - x) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = -3.000000 + d1 = -2.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x + y - x) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 3.000000 + d1 = 2.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x * y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 6.000000 + d1 = 7.000000 + d2 = 4.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x * y * x) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 12.000000 + d1 = 20.000000 + d2 = 22.000000 + d3 = 12.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x / y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 0.666667 + d1 = -0.111111 + d2 = 0.148148 + d3 = -0.296296 + d4 = 0.790123 + d5 = -2.633745 + d6 = 10.534979 +diff(x / y / y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 0.222222 + d1 = -0.185185 + d2 = 0.296296 + d3 = -0.691358 + d4 = 2.106996 + d5 = -7.901235 + d6 = 35.116598 +diff(x * y / x) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 3.000000 + d1 = 2.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x * (x + y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 10.000000 + d1 = 11.000000 + d2 = 6.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x + x * y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 8.000000 + d1 = 8.000000 + d2 = 4.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(+x + y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(-x + y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 1.000000 + d1 = 1.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x * func(x, y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 10.000000 + d1 = 11.000000 + d2 = 6.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x * func_outer(x, y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 10.000000 + d1 = 11.000000 + d2 = 6.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(sin(x - y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = -0.841471 + d1 = -0.540302 + d2 = 0.841471 + d3 = 0.540302 + d4 = -0.841471 + d5 = -0.540302 + d6 = 0.841471 +diff(if branch) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 2.000000 + d1 = 1.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(if else branch) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 2.000000 + d1 = 1.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(direct return) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(intermediate var) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(intermediate passive var) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(intermediate untyped) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(intermediate default init) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(intermediate no init) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(while loop) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 8.000000 + d1 = 5.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(do while loop) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 8.000000 + d1 = 5.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(for loop) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(tye_outer.a + y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(type_outer.add(y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-autodiff.cpp.execution b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-autodiff.cpp.execution new file mode 100644 index 000000000..863bd6bd5 --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-autodiff.cpp.execution @@ -0,0 +1,46 @@ +diff(x + y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(x + y + x) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 7.000000, r_d = 4.000000) +diff(x - y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = -1.000000, r_d = -1.000000) +diff(x - y - x) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = -3.000000, r_d = -2.000000) +diff(x + y - x) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 3.000000, r_d = 2.000000) +diff(x * y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 6.000000, r_d = 7.000000) +diff(x * y * x) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 12.000000, r_d = 20.000000) +diff(x / y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 0.666667, r_d = -0.111111) +diff(x / y / y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 0.222222, r_d = -0.185185) +diff(x * y / x) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 3.000000, r_d = 2.000000) +diff(x * (x + y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 10.000000, r_d = 11.000000) +diff(x + x * y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 8.000000, r_d = 8.000000) +diff(+x + y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(-x + y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 1.000000, r_d = 1.000000) +diff(x * func(x, y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 10.000000, r_d = 11.000000) +diff(x * func_outer(x, y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 10.000000, r_d = 11.000000) +diff(sin(x - y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = -0.841471, r_d = -0.540302) +diff(if branch) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 2.000000, r_d = 1.000000) +diff(if else branch) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 2.000000, r_d = 1.000000) +diff(direct return) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(intermediate var) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(intermediate passive var) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(intermediate untyped) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(intermediate default init) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(intermediate no init) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(while loop) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 8.000000, r_d = 5.000000) +diff(do while loop) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 8.000000, r_d = 5.000000) +diff(for loop) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(tye_outer.a + y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(type_outer.add(y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(x + y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 5.000000, x_b = 1.000000, y_b = 1.000000) +diff(x + y + x) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 7.000000, x_b = 2.000000, y_b = 1.000000) +diff(x - y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = -1.000000, x_b = 1.000000, y_b = -1.000000) +diff(x - y - x) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = -3.000000, x_b = 0.000000, y_b = -1.000000) +diff(x + y - x) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 3.000000, x_b = 0.000000, y_b = 1.000000) +diff(x * y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 6.000000, x_b = 3.000000, y_b = 2.000000) +diff(x * y * x) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 12.000000, x_b = 12.000000, y_b = 4.000000) +diff(x / y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 0.666667, x_b = 0.333333, y_b = -0.222222) +diff(x / y / y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 0.222222, x_b = 0.111111, y_b = -0.148148) +diff(x * y / x) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 3.000000, x_b = 0.000000, y_b = 1.000000) +diff(x * (x + y)) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 10.000000, x_b = 7.000000, y_b = 2.000000) +diff(x + x * y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 8.000000, x_b = 4.000000, y_b = 2.000000) +diff(sin(x-y)) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = -0.841471, x_b = 0.540302, y_b = -0.540302) +diff(x * func(x-y)) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 10.000000, x_b = 7.000000, y_b = 2.000000) +diff(x * func_outer(x-y)) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 10.000000, x_b = 7.000000, y_b = 2.000000) +2nd order diff of x*x at 2.000000 = 2.000000 diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-default-arguments.cpp.output b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-default-arguments.cpp.output index 4812dc94c..ed71fc601 100644 --- a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-default-arguments.cpp.output +++ b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-default-arguments.cpp.output @@ -1,4 +1,4 @@ -pure2-default-arguments.cpp2:6:61: error: no member named 'source_location' in namespace 'std' - char const* fn = CPP2_UFCS_NONLOCAL(function_name)(std::source_location::current()) - ~~~~~^ +pure2-default-arguments.cpp2:6:77: error: no member named 'source_location' in namespace 'std' + cpp2::impl::in fn = CPP2_UFCS_NONLOCAL(function_name)(std::source_location::current()) + ~~~~~^ 1 error generated. diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-expected-is-as.cpp.output b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-expected-is-as.cpp.output new file mode 100644 index 000000000..657d2b8ed --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-expected-is-as.cpp.output @@ -0,0 +1,63 @@ +pure2-expected-is-as.cpp2:7:10: error: no member named 'expected' in namespace 'std' + std::expected ex1 {123}; + ~~~~~^ +pure2-expected-is-as.cpp2:7:22: error: expected '(' for function-style cast or type construction + std::expected ex1 {123}; + ~~~^ +pure2-expected-is-as.cpp2:8:10: error: no member named 'expected' in namespace 'std' + std::expected ex2 {std::unexpected(-1)}; + ~~~~~^ +pure2-expected-is-as.cpp2:8:22: error: expected '(' for function-style cast or type construction + std::expected ex2 {std::unexpected(-1)}; + ~~~^ +pure2-expected-is-as.cpp2:9:10: error: no member named 'expected' in namespace 'std' + std::expected ex3 {"Expect the unexpected"}; + ~~~~~^ +pure2-expected-is-as.cpp2:9:30: error: expected '(' for function-style cast or type construction + std::expected ex3 {"Expect the unexpected"}; + ~~~~~~~~~~~^ +pure2-expected-is-as.cpp2:11:29: error: use of undeclared identifier 'ex1' + if (cpp2::impl::is(ex1)) { + ^ +pure2-expected-is-as.cpp2:15:30: error: use of undeclared identifier 'ex1' + if (cpp2::impl::is(ex1)) { + ^ +pure2-expected-is-as.cpp2:20:30: error: use of undeclared identifier 'ex1' + if (cpp2::impl::is(ex1)) { + ^ +pure2-expected-is-as.cpp2:25:29: error: no member named 'unexpected' in namespace 'std' + if (cpp2::impl::is>(ex1)) { + ~~~~~^ +pure2-expected-is-as.cpp2:25:43: error: expected '(' for function-style cast or type construction + if (cpp2::impl::is>(ex1)) { + ~~~^ +pure2-expected-is-as.cpp2:25:46: error: use of undeclared identifier 'ex1'; did you mean 'exp'? + if (cpp2::impl::is>(ex1)) { + ^~~ + exp +/usr/lib/llvm-15/bin/../include/c++/v1/math.h:895:1: note: 'exp' declared here +exp(_A1 __lcpp_x) _NOEXCEPT {return ::exp((double)__lcpp_x);} +^ +pure2-expected-is-as.cpp2:30:24: error: use of undeclared identifier 'ex1' + if (cpp2::impl::is(ex1, 123)) { + ^ +pure2-expected-is-as.cpp2:34:24: error: use of undeclared identifier 'ex1' + if (cpp2::impl::is(ex1, 100)) { + ^ +pure2-expected-is-as.cpp2:39:37: error: use of undeclared identifier 'ex1' + auto val1 {cpp2::impl::as_(ex1)}; + ^ +pure2-expected-is-as.cpp2:42:29: error: use of undeclared identifier 'ex2' + if (cpp2::impl::is(ex2)) { + ^ +pure2-expected-is-as.cpp2:47:30: error: use of undeclared identifier 'ex2' + if (cpp2::impl::is(ex2)) { + ^ +pure2-expected-is-as.cpp2:52:24: error: use of undeclared identifier 'ex2' + if (cpp2::impl::is(ex2, 123)) { + ^ +pure2-expected-is-as.cpp2:57:29: error: no member named 'unexpected' in namespace 'std' + if (cpp2::impl::is>(ex2)) { + ~~~~~^ +fatal error: too many errors emitted, stopping now [-ferror-limit=] +20 errors generated. diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-function-body-reflection.cpp.execution b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-function-body-reflection.cpp.execution new file mode 100644 index 000000000..d2076f3f7 --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-function-body-reflection.cpp.execution @@ -0,0 +1 @@ +calling generated function ns::add_1... ns::add_1(42) returned 43 diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-function-single-expression-body-default-return.cpp.execution b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-function-single-expression-body-default-return.cpp.execution new file mode 100644 index 000000000..30f4cb910 --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-function-single-expression-body-default-return.cpp.execution @@ -0,0 +1 @@ +hi ho hum \ No newline at end of file diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-hashable.cpp.execution b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-hashable.cpp.execution new file mode 100644 index 000000000..cb627d7a9 --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-hashable.cpp.execution @@ -0,0 +1 @@ +12145505332166550543 \ No newline at end of file diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-last-use.cpp.output b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-last-use.cpp.output index 6b03c3909..e663bb1dc 100644 --- a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-last-use.cpp.output +++ b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-last-use.cpp.output @@ -13,7 +13,7 @@ pure2-last-use.cpp2:344:16: error: no template named 'move_only_function' in nam pure2-last-use.cpp2:348:161: error: no member named 'move_only_function' in namespace 'std' CPP2_REQUIRES_ (std::is_convertible_v>&> && std::is_convertible_v>&> && std::is_convertible_v>&>) ; ~~~~~^ -../../../include/cpp2util.h:10008:43: note: expanded from macro 'CPP2_REQUIRES_' +../../../include/cpp2util.h:10109:43: note: expanded from macro 'CPP2_REQUIRES_' #define CPP2_REQUIRES_(...) requires (__VA_ARGS__) ^~~~~~~~~~~ pure2-last-use.cpp2:348:188: error: expected expression @@ -49,26 +49,31 @@ class issue_857_4 { pure2-last-use.cpp2:905:1: note: still within definition of 'issue_857_4' here namespace captures { ^ -pure2-last-use.cpp2:279:272: error: no member named 'move_only_function' in namespace 'std' -requires (std::is_convertible_v>&> && std::is_convertible_v in_)>>&> && std::is_convertible_v>&> && std::is_convertible_v in_)>>&>) - ~~~~~^ -pure2-last-use.cpp2:279:299: error: expected expression -requires (std::is_convertible_v>&> && std::is_convertible_v in_)>>&> && std::is_convertible_v>&> && std::is_convertible_v in_)>>&>) - ^ -pure2-last-use.cpp2:279:304: error: use of address-of-label extension outside of a function body -requires (std::is_convertible_v>&> && std::is_convertible_v in_)>>&> && std::is_convertible_v>&> && std::is_convertible_v in_)>>&>) - ^ -pure2-last-use.cpp2:278:14: error: out-of-line definition of 'issue_857_4' does not match any declaration in 'issue_857_4' -issue_857_4::issue_857_4(auto&& f_, auto&& g_, auto&& mf_, auto&& mg_) - ^~~~~~~~~~~ -pure2-last-use.cpp2:281:272: error: member initializer 'g' does not name a non-static data member or base class - , g{ CPP2_FORWARD(g_) } - ^~~~~~~~~~~~~~~~~~~~~ -pure2-last-use.cpp2:282:272: error: member initializer 'mf' does not name a non-static data member or base class - , mf{ CPP2_FORWARD(mf_) } - ^~~~~~~~~~~~~~~~~~~~~~~ -pure2-last-use.cpp2:283:272: error: member initializer 'mg' does not name a non-static data member or base class - , mg{ CPP2_FORWARD(mg_) }{} - ^~~~~~~~~~~~~~~~~~~~~~~ -fatal error: too many errors emitted, stopping now [-ferror-limit=] -20 errors generated. +pure2-last-use.cpp2:279:179: error: expected variable name or 'this' in lambda capture list +requires (std::is_convertible_v>&> && std::is_convertible_v unnamed_param_1)>>&> && std::is_convertible_v>&> && std::is_convertible_v unnamed_param_1)>>&>) + ^ +pure2-last-use.cpp2:1044:2: error: expected '>' +} + ^ +pure2-last-use.cpp2:279:173: note: to match this '<' +requires (std::is_convertible_v>&> && std::is_convertible_v unnamed_param_1)>>&> && std::is_convertible_v>&> && std::is_convertible_v unnamed_param_1)>>&>) + ^ +pure2-last-use.cpp2:1045:1: error: expected a type +^ +pure2-last-use.cpp2:1044:2: error: expected '>' +} + ^ +pure2-last-use.cpp2:279:154: note: to match this '<' +requires (std::is_convertible_v>&> && std::is_convertible_v unnamed_param_1)>>&> && std::is_convertible_v>&> && std::is_convertible_v unnamed_param_1)>>&>) + ^ +pure2-last-use.cpp2:1045:1: error: expected a type +^ +pure2-last-use.cpp2:1044:2: error: expected '>' +} + ^ +pure2-last-use.cpp2:279:120: note: to match this '<' +requires (std::is_convertible_v>&> && std::is_convertible_v unnamed_param_1)>>&> && std::is_convertible_v>&> && std::is_convertible_v unnamed_param_1)>>&>) + ^ +pure2-last-use.cpp2:1045:1: error: expected function body after function declarator +^ +19 errors generated. diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex-general.cpp.execution b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex-general.cpp.execution new file mode 100644 index 000000000..c44d08490 --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex-general.cpp.execution @@ -0,0 +1,11 @@ +Running tests_01_char_matcher: +Not full match fails: 0 +Full match is ok: 1 +Search finds at position 1: 1 +Search finds at position 3: 3 +Find all finds at position: 1 +Find all finds at position: 4 +Find all finds at position: 7 +Find all found 3 matched: 3 +Find all finds at position: 2 +Find all found 1 match: 1 diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_04_start_end.cpp.execution b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_04_start_end.cpp.execution index 6fef36434..a1e2b9b63 100644 --- a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_04_start_end.cpp.execution +++ b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_04_start_end.cpp.execution @@ -8,4 +8,5 @@ Running tests_04_start_end: 07_y: OK regex: ^ parsed_regex: ^ str: abc result_expr: $& expected_results 08_y: OK regex: $ parsed_regex: $ str: abc result_expr: $& expected_results 09_n: OK regex: $b parsed_regex: $b str: b result_expr: - expected_results - +10_n: OK regex: \GX.*X parsed_regex: \GX.*X str: aaaXbX result_expr: - expected_results - diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_19_lookahead.cpp.execution b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_19_lookahead.cpp.execution index d4c65d951..0f723eb77 100644 --- a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_19_lookahead.cpp.execution +++ b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_19_lookahead.cpp.execution @@ -27,6 +27,14 @@ Running tests_19_lookahead: 26_y: OK regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) parsed_regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) str: aaaaaaaa result_expr: $1 expected_results aaaaaaa 27_y: OK regex: a(?!b(?!c))(..) parsed_regex: a(?!b(?!c))(..) str: abababc result_expr: $1 expected_results bc 28_y: OK regex: a(?!b(?=a))(..) parsed_regex: a(?!b(?=a))(..) str: abababc result_expr: $1 expected_results bc +29_y: OK regex: (?=foo) parsed_regex: (?=foo) str: foo result_expr: @+ expected_results 0 +30_y: OK regex: (?=foo) parsed_regex: (?=foo) str: XfooY result_expr: @+ expected_results 1 +31_y: OK regex: .*(?=foo) parsed_regex: .*(?=foo) str: XfooY result_expr: @+ expected_results 1 +32_y: OK regex: (?=.*P)P parsed_regex: (?=.*P)P str: aP result_expr: @+ expected_results 2 +33_y: OK regex: X(?=foo)f parsed_regex: X(?=foo)f str: ..XfooY.. result_expr: @+ expected_results 4 +34_y: OK regex: X(?=foo) parsed_regex: X(?=foo) str: ..XfooY.. result_expr: @+ expected_results 3 +35_y: OK regex: (?=XY*foo) parsed_regex: (?=XY*foo) str: Xfoo result_expr: @+ expected_results 0 +36_y: OK regex: ^(?=XY*foo) parsed_regex: ^(?=XY*foo) str: Xfoo result_expr: @+ expected_results 0 37_y: OK regex: X(\w+)(?=\s)|X(\w+) parsed_regex: X(\w+)(?=\s)|X(\w+) str: Xab result_expr: [$1-$2] expected_results [-ab] 38_y: OK regex: ^a*(?=b)b parsed_regex: ^a*(?=b)b str: ab result_expr: $& expected_results ab 39_y: OK regex: '(?!\A)x'm parsed_regex: '(?!\A)x'm str: a\nxb\n result_expr: - expected_results - @@ -44,4 +52,6 @@ Running tests_19_lookahead: 51_y: OK regex: ((?s)b.)c(?!\N) parsed_regex: ((?s)b.)c(?!\N) str: a\nb\nc\n result_expr: $1:$& expected_results b\n:b\nc 52_y: OK regex: '(b.)c(?!\N)'s parsed_regex: '(b.)c(?!\N)'s str: a\nb\nc\n result_expr: $1:$& expected_results b\n:b\nc 53_n: OK regex: a*(?!) parsed_regex: a*(?!) str: aaaab result_expr: - expected_results - +54_y: OK regex: (?)foo parsed_regex: (?)foo str: bar>ABCfoo result_expr: $& expected_results foo +55_y: OK regex: (?ABC)foo parsed_regex: (?ABC)foo str: bar>ABCfoo result_expr: $& expected_results ABCfoo diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_20_lookbehind.cpp.execution b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_20_lookbehind.cpp.execution new file mode 100644 index 000000000..cd61d4f56 --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_20_lookbehind.cpp.execution @@ -0,0 +1,58 @@ +Running tests_20_lookbehind: +01_y: OK regex: (?<=a)b parsed_regex: (?<=a)b str: ab result_expr: $& expected_results b +02_y: OK regex: (?<=af?)b parsed_regex: (?<=af?)b str: ab result_expr: $& expected_results b +03_n: OK regex: (?<=a)b parsed_regex: (?<=a)b str: cb result_expr: - expected_results - +04_n: OK regex: (?<=a(?:fo)?)b parsed_regex: (?<=a(?:fo)?)b str: cb result_expr: - expected_results - +05_n: OK regex: (?<=a)b parsed_regex: (?<=a)b str: b result_expr: - expected_results - +06_n: OK regex: (?<=a(?:foo)?)b parsed_regex: (?<=a(?:foo)?)b str: b result_expr: - expected_results - +07_y: OK regex: (?)foo parsed_regex: (?<=bar>)foo str: bar>foo result_expr: $& expected_results foo +50_n: OK regex: (?)foo parsed_regex: (?)foo str: bar>foo result_expr: - expected_results - +51_y: OK regex: (?<=bar>ABC)foo parsed_regex: (?<=bar>ABC)foo str: bar>ABCfoo result_expr: $& expected_results foo +52_n: OK regex: (?ABC)foo parsed_regex: (?ABC)foo str: bar>ABCfoo result_expr: - expected_results - +53_y: OK regex: (?<=abcd(?<=(aaaabcd))) parsed_regex: (?<=abcd(?<=(aaaabcd))) str: ..aaaabcd.. result_expr: $1 expected_results aaaabcd +54_y: OK regex: (?=xy(?<=(aaxy))) parsed_regex: (?=xy(?<=(aaxy))) str: ..aaxy.. result_expr: $1 expected_results aaxy +55_y: OK regex: (?=xy(?<=(aaxyz?))) parsed_regex: (?=xy(?<=(aaxyz?))) str: ..aaxy.. result_expr: $1 expected_results aaxy +56_y: OK regex: (?<=(?=(aaxy))aa) parsed_regex: (?<=(?=(aaxy))aa) str: ..aaxy.. result_expr: $1 expected_results aaxy + diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_21_atomic_patterns.cpp.execution b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_21_atomic_patterns.cpp.execution new file mode 100644 index 000000000..4812cfbb8 --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_21_atomic_patterns.cpp.execution @@ -0,0 +1,8 @@ +Running tests_21_atomic_patterns: +01_y: OK regex: (?>a+)b parsed_regex: (?>a+)b str: aaab result_expr: - expected_results - +02_y: OK regex: ((?>a+)b) parsed_regex: ((?>a+)b) str: aaab result_expr: $1 expected_results aaab +03_y: OK regex: (?>(a+))b parsed_regex: (?>(a+))b str: aaab result_expr: $1 expected_results aaa +04_y: OK regex: ((?>[^()]+)|\([^()]*\))+ parsed_regex: ((?>[^()]+)|\([^()]*\))+ str: ((abc(ade)ufh()()x result_expr: $& expected_results abc(ade)ufh()()x +05_y: OK regex: round\(((?>[^()]+))\) parsed_regex: round\(((?>[^()]+))\) str: _I(round(xs * sz),1) result_expr: $1 expected_results xs * sz +06_y: OK regex: ^((?>(?:aa)?b)?) parsed_regex: ^((?>(?:aa)?b)?) str: aab result_expr: $1 expected_results aab + diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-forward-return.cpp.execution b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-singleton-and-static.cpp.execution similarity index 60% rename from regression-tests/test-results/clang-18-c++23-libcpp/pure2-forward-return.cpp.execution rename to regression-tests/test-results/clang-15-c++20-libcpp/pure2-singleton-and-static.cpp.execution index f259f2362..d81cc0710 100644 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-forward-return.cpp.execution +++ b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-singleton-and-static.cpp.execution @@ -1,2 +1 @@ -4 42 diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-try-catch.cpp.execution b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-try-catch.cpp.execution new file mode 100644 index 000000000..c37cb6b5f --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-try-catch.cpp.execution @@ -0,0 +1,2 @@ +oh look, a thrown int: 42 +oh look, another exception diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-type-safety-1.cpp.execution b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-type-safety-1.cpp.execution index d1aa6265a..df9d257d3 100644 --- a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-type-safety-1.cpp.execution +++ b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-type-safety-1.cpp.execution @@ -7,3 +7,5 @@ variant is int? true any is int? true optional is int? true +optional is: int +optional<*D> is: *B *D diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp.execution b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp.execution index 541b2a0d9..371e06b05 100644 --- a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp.execution +++ b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp.execution @@ -4,5 +4,4 @@ ctor - from string construct [ Henry | 123 Ford Dr. ] ctor - from string assign [ Clara | 123 Ford Dr. ] ctor - copy (GENERAL) cp-construct [ Clara | 123 Ford Dr. ] <- [ Clara | 123 Ford Dr. ] ctor - move mv-construct [ Clara(CM) | 123 Ford Dr. ] <- [ | ] -ctor - copy (GENERAL) cp-assign [ Clara | 123 Ford Dr. ] <- [ Clara | 123 Ford Dr. ] assign - move mv-assign [ Clara | 123 Ford Dr. ] <- [ | ] diff --git a/regression-tests/test-results/clang-15-c++20/mixed-autodiff-taylor.cpp.execution b/regression-tests/test-results/clang-15-c++20/mixed-autodiff-taylor.cpp.execution new file mode 100644 index 000000000..0a486b06f --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20/mixed-autodiff-taylor.cpp.execution @@ -0,0 +1,63 @@ +x + x = 4.000000 +x + x diff order 1 = 2.000000 +x + x diff order 2 = 0.000000 +x + x diff order 3 = 0.000000 +x + x diff order 4 = 0.000000 +x + x diff order 5 = 0.000000 +x + x diff order 6 = 0.000000 +0 - x = -2.000000 +0 - x diff order 1 = -1.000000 +0 - x diff order 2 = 0.000000 +0 - x diff order 3 = 0.000000 +0 - x diff order 4 = 0.000000 +0 - x diff order 5 = 0.000000 +0 - x diff order 6 = 0.000000 +x^7 = 128.000000 +x^7 diff order 1 = 448.000000 +x^7 diff order 2 = 1344.000000 +x^7 diff order 3 = 3360.000000 +x^7 diff order 4 = 6720.000000 +x^7 diff order 5 = 10080.000000 +x^7 diff order 6 = 10080.000000 +1/x = 0.500000 +1/x diff order 1 = -0.250000 +1/x diff order 2 = 0.250000 +1/x diff order 3 = -0.375000 +1/x diff order 4 = 0.750000 +1/x diff order 5 = -1.875000 +1/x diff order 6 = 5.625000 +sqrt(x) = 1.414214 +sqrt(x) diff order 1 = 0.353553 +sqrt(x) diff order 2 = -0.088388 +sqrt(x) diff order 3 = 0.066291 +sqrt(x) diff order 4 = -0.082864 +sqrt(x) diff order 5 = 0.145012 +sqrt(x) diff order 6 = -0.326277 +log(x) = 0.693147 +log(x) diff order 1 = 0.500000 +log(x) diff order 2 = -0.250000 +log(x) diff order 3 = 0.250000 +log(x) diff order 4 = -0.375000 +log(x) diff order 5 = 0.750000 +log(x) diff order 6 = -1.875000 +exp(x) = 7.389056 +exp(x) diff order 1 = 7.389056 +exp(x) diff order 2 = 7.389056 +exp(x) diff order 3 = 7.389056 +exp(x) diff order 4 = 7.389056 +exp(x) diff order 5 = 7.389056 +exp(x) diff order 6 = 7.389056 +sin(x) = 0.909297 +sin(x) diff order 1 = -0.416147 +sin(x) diff order 2 = -0.909297 +sin(x) diff order 3 = 0.416147 +sin(x) diff order 4 = 0.909297 +sin(x) diff order 5 = -0.416147 +sin(x) diff order 6 = -0.909297 +cos(x) = -0.416147 +cos(x) diff order 1 = -0.909297 +cos(x) diff order 2 = 0.416147 +cos(x) diff order 3 = 0.909297 +cos(x) diff order 4 = -0.416147 +cos(x) diff order 5 = -0.909297 +cos(x) diff order 6 = 0.416147 diff --git a/regression-tests/test-results/clang-15-c++20/mixed-bounds-check.cpp.execution b/regression-tests/test-results/clang-15-c++20/mixed-bounds-check.cpp.execution index 91a25ada8..f070a5bf5 100644 --- a/regression-tests/test-results/clang-15-c++20/mixed-bounds-check.cpp.execution +++ b/regression-tests/test-results/clang-15-c++20/mixed-bounds-check.cpp.execution @@ -1 +1 @@ -../../../include/cpp2util.h(1108) decltype(auto) cpp2::impl::assert_in_bounds(auto &&, std::source_location) [arg = 5, x:auto = std::vector]: Bounds safety violation: out of bounds access attempt detected - attempted access at index 5, [min,max] range is [0,4] +../../../include/cpp2util.h(1241) decltype(auto) cpp2::impl::assert_in_bounds(auto &&, std::source_location) [arg = 5, x:auto = std::vector]: Bounds safety violation: out of bounds access attempt detected - attempted access at index 5, [min,max] range is [0,4] diff --git a/regression-tests/test-results/clang-15-c++20/mixed-bounds-safety-with-assert.cpp.execution b/regression-tests/test-results/clang-15-c++20/mixed-bounds-safety-with-assert.cpp.execution index 638ccfecc..5b15e6b71 100644 --- a/regression-tests/test-results/clang-15-c++20/mixed-bounds-safety-with-assert.cpp.execution +++ b/regression-tests/test-results/clang-15-c++20/mixed-bounds-safety-with-assert.cpp.execution @@ -1 +1 @@ -../../../include/cpp2util.h(920) : Bounds safety violation +../../../include/cpp2util.h(552) : Bounds safety violation diff --git a/regression-tests/test-results/clang-15-c++20/mixed-initialization-safety-3-contract-violation.cpp.execution b/regression-tests/test-results/clang-15-c++20/mixed-initialization-safety-3-contract-violation.cpp.execution index 2e659ac3e..9509646ac 100644 --- a/regression-tests/test-results/clang-15-c++20/mixed-initialization-safety-3-contract-violation.cpp.execution +++ b/regression-tests/test-results/clang-15-c++20/mixed-initialization-safety-3-contract-violation.cpp.execution @@ -1 +1 @@ -../../../include/cpp2util.h(920) : Contract violation: fill: value must contain at least count elements +../../../include/cpp2util.h(552) : Contract violation: fill: value must contain at least count elements diff --git a/regression-tests/test-results/clang-15-c++20/mixed-lifetime-safety-and-null-contracts.cpp.execution b/regression-tests/test-results/clang-15-c++20/mixed-lifetime-safety-and-null-contracts.cpp.execution index c848bf98a..d427d11db 100644 --- a/regression-tests/test-results/clang-15-c++20/mixed-lifetime-safety-and-null-contracts.cpp.execution +++ b/regression-tests/test-results/clang-15-c++20/mixed-lifetime-safety-and-null-contracts.cpp.execution @@ -1,2 +1,2 @@ sending error to my framework... [dynamic null dereference attempt detected] -from source location: ../../../include/cpp2util.h(999) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = int *&] +from source location: ../../../include/cpp2util.h(1132) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = int *&] diff --git a/regression-tests/test-results/clang-15-c++20/mixed-parameter-passing.cpp.execution b/regression-tests/test-results/clang-15-c++20/mixed-parameter-passing.cpp.execution new file mode 100644 index 000000000..256f7e186 --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20/mixed-parameter-passing.cpp.execution @@ -0,0 +1,2 @@ +123 +0 diff --git a/regression-tests/test-results/clang-15-c++20/pure2-assert-optional-not-null.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-assert-optional-not-null.cpp.execution index 8ed66e3a3..ae535f70c 100644 --- a/regression-tests/test-results/clang-15-c++20/pure2-assert-optional-not-null.cpp.execution +++ b/regression-tests/test-results/clang-15-c++20/pure2-assert-optional-not-null.cpp.execution @@ -1 +1 @@ -../../../include/cpp2util.h(999) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::optional]: Null safety violation: std::optional does not contain a value +../../../include/cpp2util.h(1132) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::optional]: Null safety violation: std::optional does not contain a value diff --git a/regression-tests/test-results/clang-15-c++20/pure2-assert-shared-ptr-not-null.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-assert-shared-ptr-not-null.cpp.execution index 092ef8093..2040bb090 100644 --- a/regression-tests/test-results/clang-15-c++20/pure2-assert-shared-ptr-not-null.cpp.execution +++ b/regression-tests/test-results/clang-15-c++20/pure2-assert-shared-ptr-not-null.cpp.execution @@ -1 +1 @@ -../../../include/cpp2util.h(999) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::shared_ptr]: Null safety violation: std::shared_ptr is empty +../../../include/cpp2util.h(1132) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::shared_ptr]: Null safety violation: std::shared_ptr is empty diff --git a/regression-tests/test-results/clang-15-c++20/pure2-assert-unique-ptr-not-null.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-assert-unique-ptr-not-null.cpp.execution index acc10a1c1..6ef773f34 100644 --- a/regression-tests/test-results/clang-15-c++20/pure2-assert-unique-ptr-not-null.cpp.execution +++ b/regression-tests/test-results/clang-15-c++20/pure2-assert-unique-ptr-not-null.cpp.execution @@ -1 +1 @@ -../../../include/cpp2util.h(999) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::unique_ptr]: Null safety violation: std::unique_ptr is empty +../../../include/cpp2util.h(1132) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::unique_ptr]: Null safety violation: std::unique_ptr is empty diff --git a/regression-tests/test-results/clang-15-c++20/pure2-autodiff-higher-order.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-autodiff-higher-order.cpp.execution new file mode 100644 index 000000000..84a5f58de --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20/pure2-autodiff-higher-order.cpp.execution @@ -0,0 +1,240 @@ +diff(x + y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x + y + x) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 7.000000 + d1 = 4.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x - y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = -1.000000 + d1 = -1.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x - y - x) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = -3.000000 + d1 = -2.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x + y - x) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 3.000000 + d1 = 2.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x * y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 6.000000 + d1 = 7.000000 + d2 = 4.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x * y * x) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 12.000000 + d1 = 20.000000 + d2 = 22.000000 + d3 = 12.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x / y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 0.666667 + d1 = -0.111111 + d2 = 0.148148 + d3 = -0.296296 + d4 = 0.790123 + d5 = -2.633745 + d6 = 10.534979 +diff(x / y / y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 0.222222 + d1 = -0.185185 + d2 = 0.296296 + d3 = -0.691358 + d4 = 2.106996 + d5 = -7.901235 + d6 = 35.116598 +diff(x * y / x) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 3.000000 + d1 = 2.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x * (x + y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 10.000000 + d1 = 11.000000 + d2 = 6.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x + x * y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 8.000000 + d1 = 8.000000 + d2 = 4.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(+x + y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(-x + y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 1.000000 + d1 = 1.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x * func(x, y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 10.000000 + d1 = 11.000000 + d2 = 6.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x * func_outer(x, y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 10.000000 + d1 = 11.000000 + d2 = 6.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(sin(x - y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = -0.841471 + d1 = -0.540302 + d2 = 0.841471 + d3 = 0.540302 + d4 = -0.841471 + d5 = -0.540302 + d6 = 0.841471 +diff(if branch) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 2.000000 + d1 = 1.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(if else branch) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 2.000000 + d1 = 1.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(direct return) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(intermediate var) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(intermediate passive var) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(intermediate untyped) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(intermediate default init) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(intermediate no init) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(while loop) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 8.000000 + d1 = 5.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(do while loop) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 8.000000 + d1 = 5.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(for loop) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(tye_outer.a + y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(type_outer.add(y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 diff --git a/regression-tests/test-results/clang-15-c++20/pure2-autodiff.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-autodiff.cpp.execution new file mode 100644 index 000000000..863bd6bd5 --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20/pure2-autodiff.cpp.execution @@ -0,0 +1,46 @@ +diff(x + y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(x + y + x) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 7.000000, r_d = 4.000000) +diff(x - y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = -1.000000, r_d = -1.000000) +diff(x - y - x) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = -3.000000, r_d = -2.000000) +diff(x + y - x) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 3.000000, r_d = 2.000000) +diff(x * y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 6.000000, r_d = 7.000000) +diff(x * y * x) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 12.000000, r_d = 20.000000) +diff(x / y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 0.666667, r_d = -0.111111) +diff(x / y / y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 0.222222, r_d = -0.185185) +diff(x * y / x) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 3.000000, r_d = 2.000000) +diff(x * (x + y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 10.000000, r_d = 11.000000) +diff(x + x * y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 8.000000, r_d = 8.000000) +diff(+x + y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(-x + y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 1.000000, r_d = 1.000000) +diff(x * func(x, y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 10.000000, r_d = 11.000000) +diff(x * func_outer(x, y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 10.000000, r_d = 11.000000) +diff(sin(x - y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = -0.841471, r_d = -0.540302) +diff(if branch) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 2.000000, r_d = 1.000000) +diff(if else branch) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 2.000000, r_d = 1.000000) +diff(direct return) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(intermediate var) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(intermediate passive var) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(intermediate untyped) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(intermediate default init) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(intermediate no init) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(while loop) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 8.000000, r_d = 5.000000) +diff(do while loop) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 8.000000, r_d = 5.000000) +diff(for loop) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(tye_outer.a + y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(type_outer.add(y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(x + y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 5.000000, x_b = 1.000000, y_b = 1.000000) +diff(x + y + x) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 7.000000, x_b = 2.000000, y_b = 1.000000) +diff(x - y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = -1.000000, x_b = 1.000000, y_b = -1.000000) +diff(x - y - x) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = -3.000000, x_b = 0.000000, y_b = -1.000000) +diff(x + y - x) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 3.000000, x_b = 0.000000, y_b = 1.000000) +diff(x * y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 6.000000, x_b = 3.000000, y_b = 2.000000) +diff(x * y * x) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 12.000000, x_b = 12.000000, y_b = 4.000000) +diff(x / y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 0.666667, x_b = 0.333333, y_b = -0.222222) +diff(x / y / y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 0.222222, x_b = 0.111111, y_b = -0.148148) +diff(x * y / x) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 3.000000, x_b = 0.000000, y_b = 1.000000) +diff(x * (x + y)) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 10.000000, x_b = 7.000000, y_b = 2.000000) +diff(x + x * y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 8.000000, x_b = 4.000000, y_b = 2.000000) +diff(sin(x-y)) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = -0.841471, x_b = 0.540302, y_b = -0.540302) +diff(x * func(x-y)) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 10.000000, x_b = 7.000000, y_b = 2.000000) +diff(x * func_outer(x-y)) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 10.000000, x_b = 7.000000, y_b = 2.000000) +2nd order diff of x*x at 2.000000 = 2.000000 diff --git a/regression-tests/test-results/clang-15-c++20/pure2-expected-is-as.cpp.output b/regression-tests/test-results/clang-15-c++20/pure2-expected-is-as.cpp.output new file mode 100644 index 000000000..7a5835498 --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20/pure2-expected-is-as.cpp.output @@ -0,0 +1,245 @@ +pure2-expected-is-as.cpp2:7:22: error: expected '(' for function-style cast or type construction + std::expected ex1 {123}; + ~~~^ +pure2-expected-is-as.cpp2:7:10: error: no member named 'expected' in namespace 'std'; did you mean 'unexpected'? + std::expected ex1 {123}; + ~~~~~^~~~~~~~ + unexpected +/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/exception:109:8: note: 'unexpected' declared here + void unexpected() __attribute__ ((__noreturn__)); + ^ +pure2-expected-is-as.cpp2:8:22: error: expected '(' for function-style cast or type construction + std::expected ex2 {std::unexpected(-1)}; + ~~~^ +pure2-expected-is-as.cpp2:8:10: error: no member named 'expected' in namespace 'std'; did you mean 'unexpected'? + std::expected ex2 {std::unexpected(-1)}; + ~~~~~^~~~~~~~ + unexpected +/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/exception:109:8: note: 'unexpected' declared here + void unexpected() __attribute__ ((__noreturn__)); + ^ +pure2-expected-is-as.cpp2:9:30: error: expected '(' for function-style cast or type construction + std::expected ex3 {"Expect the unexpected"}; + ~~~~~~~~~~~^ +pure2-expected-is-as.cpp2:9:10: error: no member named 'expected' in namespace 'std'; did you mean 'unexpected'? + std::expected ex3 {"Expect the unexpected"}; + ~~~~~^~~~~~~~ + unexpected +/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/exception:109:8: note: 'unexpected' declared here + void unexpected() __attribute__ ((__noreturn__)); + ^ +pure2-expected-is-as.cpp2:11:29: error: use of undeclared identifier 'ex1'; did you mean 'exp'? + if (cpp2::impl::is(ex1)) { + ^~~ + exp +/usr/include/x86_64-linux-gnu/bits/mathcalls.h:95:17: note: 'exp' declared here +__MATHCALL_VEC (exp,, (_Mdouble_ __x)); + ^ +pure2-expected-is-as.cpp2:15:30: error: use of undeclared identifier 'ex1'; did you mean 'exp'? + if (cpp2::impl::is(ex1)) { + ^~~ + exp +/usr/include/x86_64-linux-gnu/bits/mathcalls.h:95:17: note: 'exp' declared here +__MATHCALL_VEC (exp,, (_Mdouble_ __x)); + ^ +pure2-expected-is-as.cpp2:20:30: error: use of undeclared identifier 'ex1'; did you mean 'exp'? + if (cpp2::impl::is(ex1)) { + ^~~ + exp +/usr/include/x86_64-linux-gnu/bits/mathcalls.h:95:17: note: 'exp' declared here +__MATHCALL_VEC (exp,, (_Mdouble_ __x)); + ^ +pure2-expected-is-as.cpp2:25:29: warning: 'unexpected' is deprecated [-Wdeprecated-declarations] + if (cpp2::impl::is>(ex1)) { + ^ +/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/exception:108:3: note: 'unexpected' has been explicitly marked deprecated here + _GLIBCXX11_DEPRECATED + ^ +/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/x86_64-linux-gnu/c++/12/bits/c++config.h:103:32: note: expanded from macro '_GLIBCXX11_DEPRECATED' +# define _GLIBCXX11_DEPRECATED _GLIBCXX_DEPRECATED + ^ +/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/x86_64-linux-gnu/c++/12/bits/c++config.h:94:46: note: expanded from macro '_GLIBCXX_DEPRECATED' +# define _GLIBCXX_DEPRECATED __attribute__ ((__deprecated__)) + ^ +pure2-expected-is-as.cpp2:25:29: error: 'unexpected' does not name a template but is followed by template arguments + if (cpp2::impl::is>(ex1)) { + ^ ~~~~~ +/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/exception:109:8: note: non-template declaration found by name lookup + void unexpected() __attribute__ ((__noreturn__)); + ^ +pure2-expected-is-as.cpp2:25:46: error: use of undeclared identifier 'ex1'; did you mean 'exp'? + if (cpp2::impl::is>(ex1)) { + ^~~ + exp +/usr/include/x86_64-linux-gnu/bits/mathcalls.h:95:17: note: 'exp' declared here +__MATHCALL_VEC (exp,, (_Mdouble_ __x)); + ^ +pure2-expected-is-as.cpp2:30:24: error: use of undeclared identifier 'ex1'; did you mean 'exp'? + if (cpp2::impl::is(ex1, 123)) { + ^~~ + exp +/usr/include/x86_64-linux-gnu/bits/mathcalls.h:95:17: note: 'exp' declared here +__MATHCALL_VEC (exp,, (_Mdouble_ __x)); + ^ +pure2-expected-is-as.cpp2:34:24: error: use of undeclared identifier 'ex1'; did you mean 'exp'? + if (cpp2::impl::is(ex1, 100)) { + ^~~ + exp +/usr/include/x86_64-linux-gnu/bits/mathcalls.h:95:17: note: 'exp' declared here +__MATHCALL_VEC (exp,, (_Mdouble_ __x)); + ^ +In file included from pure2-expected-is-as.cpp:7: +../../../include/cpp2util.h:475:72: error: invalid application of 'sizeof' to a function type + (std::is_floating_point_v && std::is_floating_point_v && sizeof(From) > sizeof(To)) || // NOLINT(misc-redundant-expression) + ^~~~~~~~~~~~ +../../../include/cpp2util.h:2929:19: note: in instantiation of variable template specialization 'cpp2::impl::is_narrowing_v' requested here + if constexpr (is_narrowing_v) { + ^ +pure2-expected-is-as.cpp2:39:28: note: in instantiation of function template specialization 'cpp2::impl::as_' requested here + auto val1 {cpp2::impl::as_(ex1)}; + ^ +In file included from pure2-expected-is-as.cpp:7: +../../../include/cpp2util.h:2930:9: error: static assertion failed due to requirement 'program_violates_type_safety_guarantee': 'as' does not allow unsafe possibly-lossy narrowing conversions - if you're sure you want this, use 'unchecked_narrow' to explicitly force the conversion and possibly lose information + static_assert( + ^ +pure2-expected-is-as.cpp2:39:28: note: in instantiation of function template specialization 'cpp2::impl::as_' requested here + auto val1 {cpp2::impl::as_(ex1)}; + ^ +In file included from pure2-expected-is-as.cpp:7: +../../../include/cpp2util.h:2942:52: error: no matching function for call to 'as' + else if constexpr( std::is_same_v< CPP2_TYPEOF(as(CPP2_FORWARD(x))), nonesuch_ > ) { + ^~~~~ +../../../include/cpp2util.h:323:66: note: expanded from macro 'CPP2_TYPEOF' +#define CPP2_TYPEOF(x) std::remove_cvref_t + ^ +../../../include/cpp2util.h:1907:16: note: candidate template ignored: constraints not satisfied [with C = int, x:auto = double (&)(double) noexcept] +constexpr auto as(auto&& x CPP2_SOURCE_LOCATION_PARAM_WITH_DEFAULT_AS) -> decltype(auto) + ^ +../../../include/cpp2util.h:1913:18: note: because 'std::is_scalar_v >' evaluated to false + (std::is_scalar_v && !std::is_enum_v) + ^ +../../../include/cpp2util.h:1914:17: note: and 'std::is_floating_point_v >' evaluated to false + || std::is_floating_point_v + ^ +../../../include/cpp2util.h:1915:17: note: and 'std::is_base_of_v >' evaluated to false + || std::is_base_of_v + ^ +../../../include/cpp2util.h:1916:17: note: and 'std::is_base_of_v, int>' evaluated to false + || std::is_base_of_v + ^ +../../../include/cpp2util.h:1917:30: note: and 'C{std::forward(x)}' would be invalid: cannot initialize a value of type 'int' with an lvalue of type 'double (double) noexcept' + || requires { C{CPP2_FORWARD(x)}; } + ^ +../../../include/cpp2util.h:333:37: note: expanded from macro 'CPP2_FORWARD' +#define CPP2_FORWARD(x) std::forward(x) + ^ +../../../include/cpp2util.h:2046:6: note: candidate template ignored: constraints not satisfied [with C = int, X = double (&)(double) noexcept] +auto as(X&& x CPP2_SOURCE_LOCATION_PARAM_WITH_DEFAULT_AS) -> decltype(auto) + ^ +../../../include/cpp2util.h:2045:23: note: because 'specialization_of_template' evaluated to false +template< typename C, specialization_of_template X > + ^ +../../../include/cpp2util.h:897:7: note: because 'specialization_of_template_helper(std::forward(x))' would be invalid: no matching function for call to 'specialization_of_template_helper' + { specialization_of_template_helper(std::forward(x)) } -> std::same_as; + ^ +../../../include/cpp2util.h:2093:16: note: candidate template ignored: constraints not satisfied [with T = int, X = double (&)(double) noexcept] +constexpr auto as( X && x ) -> decltype(auto) { + ^ +../../../include/cpp2util.h:2092:22: note: because 'same_type_as' evaluated to false +template X> + ^ +../../../include/cpp2util.h:927:24: note: because 'std::same_as, std::remove_cvref_t >' evaluated to false +concept same_type_as = std::same_as, std::remove_cvref_t>; + ^ +/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/concepts:63:9: note: because '__detail::__same_as' evaluated to false + = __detail::__same_as<_Tp, _Up> && __detail::__same_as<_Up, _Tp>; + ^ +/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/concepts:57:27: note: because 'std::is_same_v' evaluated to false + concept __same_as = std::is_same_v<_Tp, _Up>; + ^ +../../../include/cpp2util.h:2136:16: note: candidate template ignored: constraints not satisfied [with T = int, X = double (&)(double) noexcept] +constexpr auto as( X&& x ) -> decltype(auto) { + ^ +../../../include/cpp2util.h:2135:22: note: because 'specialization_of_template' evaluated to false +template X> + ^ +../../../include/cpp2util.h:897:7: note: because 'specialization_of_template_helper(std::forward(x))' would be invalid: no matching function for call to 'specialization_of_template_helper' + { specialization_of_template_helper(std::forward(x)) } -> std::same_as; + ^ +../../../include/cpp2util.h:1882:16: note: candidate function template not viable: requires 0 arguments, but 1 was provided +constexpr auto as() -> auto + ^ +../../../include/cpp2util.h:1893:16: note: candidate function template not viable: requires 0 arguments, but 1 was provided +constexpr auto as() -> auto + ^ +../../../include/cpp2util.h:2943:9: error: static assertion failed due to requirement 'program_violates_type_safety_guarantee': No safe 'as' cast available - please check your cast + static_assert( + ^ +../../../include/cpp2util.h:2949:12: error: no matching function for call to 'as' + return as(CPP2_FORWARD(x)); + ^~~~~ +../../../include/cpp2util.h:1907:16: note: candidate template ignored: constraints not satisfied [with C = int, x:auto = double (&)(double) noexcept] +constexpr auto as(auto&& x CPP2_SOURCE_LOCATION_PARAM_WITH_DEFAULT_AS) -> decltype(auto) + ^ +../../../include/cpp2util.h:1913:18: note: because 'std::is_scalar_v >' evaluated to false + (std::is_scalar_v && !std::is_enum_v) + ^ +../../../include/cpp2util.h:1914:17: note: and 'std::is_floating_point_v >' evaluated to false + || std::is_floating_point_v + ^ +../../../include/cpp2util.h:1915:17: note: and 'std::is_base_of_v >' evaluated to false + || std::is_base_of_v + ^ +../../../include/cpp2util.h:1916:17: note: and 'std::is_base_of_v, int>' evaluated to false + || std::is_base_of_v + ^ +../../../include/cpp2util.h:1917:30: note: and 'C{std::forward(x)}' would be invalid: cannot initialize a value of type 'int' with an lvalue of type 'double (double) noexcept' + || requires { C{CPP2_FORWARD(x)}; } + ^ +../../../include/cpp2util.h:333:37: note: expanded from macro 'CPP2_FORWARD' +#define CPP2_FORWARD(x) std::forward(x) + ^ +../../../include/cpp2util.h:2046:6: note: candidate template ignored: constraints not satisfied [with C = int, X = double (&)(double) noexcept] +auto as(X&& x CPP2_SOURCE_LOCATION_PARAM_WITH_DEFAULT_AS) -> decltype(auto) + ^ +../../../include/cpp2util.h:2045:23: note: because 'specialization_of_template' evaluated to false +template< typename C, specialization_of_template X > + ^ +../../../include/cpp2util.h:897:7: note: because 'specialization_of_template_helper(std::forward(x))' would be invalid: no matching function for call to 'specialization_of_template_helper' + { specialization_of_template_helper(std::forward(x)) } -> std::same_as; + ^ +../../../include/cpp2util.h:2093:16: note: candidate template ignored: constraints not satisfied [with T = int, X = double (&)(double) noexcept] +constexpr auto as( X && x ) -> decltype(auto) { + ^ +../../../include/cpp2util.h:2092:22: note: because 'same_type_as' evaluated to false +template X> + ^ +../../../include/cpp2util.h:927:24: note: because 'std::same_as, std::remove_cvref_t >' evaluated to false +concept same_type_as = std::same_as, std::remove_cvref_t>; + ^ +/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/concepts:63:9: note: because '__detail::__same_as' evaluated to false + = __detail::__same_as<_Tp, _Up> && __detail::__same_as<_Up, _Tp>; + ^ +/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/concepts:57:27: note: because 'std::is_same_v' evaluated to false + concept __same_as = std::is_same_v<_Tp, _Up>; + ^ +../../../include/cpp2util.h:2136:16: note: candidate template ignored: constraints not satisfied [with T = int, X = double (&)(double) noexcept] +constexpr auto as( X&& x ) -> decltype(auto) { + ^ +../../../include/cpp2util.h:2135:22: note: because 'specialization_of_template' evaluated to false +template X> + ^ +../../../include/cpp2util.h:897:7: note: because 'specialization_of_template_helper(std::forward(x))' would be invalid: no matching function for call to 'specialization_of_template_helper' + { specialization_of_template_helper(std::forward(x)) } -> std::same_as; + ^ +../../../include/cpp2util.h:1882:16: note: candidate function template not viable: requires 0 arguments, but 1 was provided +constexpr auto as() -> auto + ^ +../../../include/cpp2util.h:1893:16: note: candidate function template not viable: requires 0 arguments, but 1 was provided +constexpr auto as() -> auto + ^ +pure2-expected-is-as.cpp2:39:37: error: use of undeclared identifier 'ex1' + auto val1 {cpp2::impl::as_(ex1)}; + ^ +fatal error: too many errors emitted, stopping now [-ferror-limit=] +1 warning and 20 errors generated. diff --git a/regression-tests/test-results/clang-15-c++20/pure2-function-body-reflection.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-function-body-reflection.cpp.execution new file mode 100644 index 000000000..d2076f3f7 --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20/pure2-function-body-reflection.cpp.execution @@ -0,0 +1 @@ +calling generated function ns::add_1... ns::add_1(42) returned 43 diff --git a/regression-tests/test-results/clang-15-c++20/pure2-function-single-expression-body-default-return.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-function-single-expression-body-default-return.cpp.execution new file mode 100644 index 000000000..30f4cb910 --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20/pure2-function-single-expression-body-default-return.cpp.execution @@ -0,0 +1 @@ +hi ho hum \ No newline at end of file diff --git a/regression-tests/test-results/clang-15-c++20/pure2-hashable.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-hashable.cpp.execution new file mode 100644 index 000000000..a11f9eb59 --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20/pure2-hashable.cpp.execution @@ -0,0 +1 @@ +6443762454025613088 \ No newline at end of file diff --git a/regression-tests/test-results/clang-15-c++20/pure2-last-use.cpp.output b/regression-tests/test-results/clang-15-c++20/pure2-last-use.cpp.output index 6b03c3909..e663bb1dc 100644 --- a/regression-tests/test-results/clang-15-c++20/pure2-last-use.cpp.output +++ b/regression-tests/test-results/clang-15-c++20/pure2-last-use.cpp.output @@ -13,7 +13,7 @@ pure2-last-use.cpp2:344:16: error: no template named 'move_only_function' in nam pure2-last-use.cpp2:348:161: error: no member named 'move_only_function' in namespace 'std' CPP2_REQUIRES_ (std::is_convertible_v>&> && std::is_convertible_v>&> && std::is_convertible_v>&>) ; ~~~~~^ -../../../include/cpp2util.h:10008:43: note: expanded from macro 'CPP2_REQUIRES_' +../../../include/cpp2util.h:10109:43: note: expanded from macro 'CPP2_REQUIRES_' #define CPP2_REQUIRES_(...) requires (__VA_ARGS__) ^~~~~~~~~~~ pure2-last-use.cpp2:348:188: error: expected expression @@ -49,26 +49,31 @@ class issue_857_4 { pure2-last-use.cpp2:905:1: note: still within definition of 'issue_857_4' here namespace captures { ^ -pure2-last-use.cpp2:279:272: error: no member named 'move_only_function' in namespace 'std' -requires (std::is_convertible_v>&> && std::is_convertible_v in_)>>&> && std::is_convertible_v>&> && std::is_convertible_v in_)>>&>) - ~~~~~^ -pure2-last-use.cpp2:279:299: error: expected expression -requires (std::is_convertible_v>&> && std::is_convertible_v in_)>>&> && std::is_convertible_v>&> && std::is_convertible_v in_)>>&>) - ^ -pure2-last-use.cpp2:279:304: error: use of address-of-label extension outside of a function body -requires (std::is_convertible_v>&> && std::is_convertible_v in_)>>&> && std::is_convertible_v>&> && std::is_convertible_v in_)>>&>) - ^ -pure2-last-use.cpp2:278:14: error: out-of-line definition of 'issue_857_4' does not match any declaration in 'issue_857_4' -issue_857_4::issue_857_4(auto&& f_, auto&& g_, auto&& mf_, auto&& mg_) - ^~~~~~~~~~~ -pure2-last-use.cpp2:281:272: error: member initializer 'g' does not name a non-static data member or base class - , g{ CPP2_FORWARD(g_) } - ^~~~~~~~~~~~~~~~~~~~~ -pure2-last-use.cpp2:282:272: error: member initializer 'mf' does not name a non-static data member or base class - , mf{ CPP2_FORWARD(mf_) } - ^~~~~~~~~~~~~~~~~~~~~~~ -pure2-last-use.cpp2:283:272: error: member initializer 'mg' does not name a non-static data member or base class - , mg{ CPP2_FORWARD(mg_) }{} - ^~~~~~~~~~~~~~~~~~~~~~~ -fatal error: too many errors emitted, stopping now [-ferror-limit=] -20 errors generated. +pure2-last-use.cpp2:279:179: error: expected variable name or 'this' in lambda capture list +requires (std::is_convertible_v>&> && std::is_convertible_v unnamed_param_1)>>&> && std::is_convertible_v>&> && std::is_convertible_v unnamed_param_1)>>&>) + ^ +pure2-last-use.cpp2:1044:2: error: expected '>' +} + ^ +pure2-last-use.cpp2:279:173: note: to match this '<' +requires (std::is_convertible_v>&> && std::is_convertible_v unnamed_param_1)>>&> && std::is_convertible_v>&> && std::is_convertible_v unnamed_param_1)>>&>) + ^ +pure2-last-use.cpp2:1045:1: error: expected a type +^ +pure2-last-use.cpp2:1044:2: error: expected '>' +} + ^ +pure2-last-use.cpp2:279:154: note: to match this '<' +requires (std::is_convertible_v>&> && std::is_convertible_v unnamed_param_1)>>&> && std::is_convertible_v>&> && std::is_convertible_v unnamed_param_1)>>&>) + ^ +pure2-last-use.cpp2:1045:1: error: expected a type +^ +pure2-last-use.cpp2:1044:2: error: expected '>' +} + ^ +pure2-last-use.cpp2:279:120: note: to match this '<' +requires (std::is_convertible_v>&> && std::is_convertible_v unnamed_param_1)>>&> && std::is_convertible_v>&> && std::is_convertible_v unnamed_param_1)>>&>) + ^ +pure2-last-use.cpp2:1045:1: error: expected function body after function declarator +^ +19 errors generated. diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex-general.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-regex-general.cpp.execution new file mode 100644 index 000000000..c44d08490 --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20/pure2-regex-general.cpp.execution @@ -0,0 +1,11 @@ +Running tests_01_char_matcher: +Not full match fails: 0 +Full match is ok: 1 +Search finds at position 1: 1 +Search finds at position 3: 3 +Find all finds at position: 1 +Find all finds at position: 4 +Find all finds at position: 7 +Find all found 3 matched: 3 +Find all finds at position: 2 +Find all found 1 match: 1 diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_04_start_end.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-regex_04_start_end.cpp.execution index 6fef36434..a1e2b9b63 100644 --- a/regression-tests/test-results/clang-15-c++20/pure2-regex_04_start_end.cpp.execution +++ b/regression-tests/test-results/clang-15-c++20/pure2-regex_04_start_end.cpp.execution @@ -8,4 +8,5 @@ Running tests_04_start_end: 07_y: OK regex: ^ parsed_regex: ^ str: abc result_expr: $& expected_results 08_y: OK regex: $ parsed_regex: $ str: abc result_expr: $& expected_results 09_n: OK regex: $b parsed_regex: $b str: b result_expr: - expected_results - +10_n: OK regex: \GX.*X parsed_regex: \GX.*X str: aaaXbX result_expr: - expected_results - diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_19_lookahead.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-regex_19_lookahead.cpp.execution index d4c65d951..0f723eb77 100644 --- a/regression-tests/test-results/clang-15-c++20/pure2-regex_19_lookahead.cpp.execution +++ b/regression-tests/test-results/clang-15-c++20/pure2-regex_19_lookahead.cpp.execution @@ -27,6 +27,14 @@ Running tests_19_lookahead: 26_y: OK regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) parsed_regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) str: aaaaaaaa result_expr: $1 expected_results aaaaaaa 27_y: OK regex: a(?!b(?!c))(..) parsed_regex: a(?!b(?!c))(..) str: abababc result_expr: $1 expected_results bc 28_y: OK regex: a(?!b(?=a))(..) parsed_regex: a(?!b(?=a))(..) str: abababc result_expr: $1 expected_results bc +29_y: OK regex: (?=foo) parsed_regex: (?=foo) str: foo result_expr: @+ expected_results 0 +30_y: OK regex: (?=foo) parsed_regex: (?=foo) str: XfooY result_expr: @+ expected_results 1 +31_y: OK regex: .*(?=foo) parsed_regex: .*(?=foo) str: XfooY result_expr: @+ expected_results 1 +32_y: OK regex: (?=.*P)P parsed_regex: (?=.*P)P str: aP result_expr: @+ expected_results 2 +33_y: OK regex: X(?=foo)f parsed_regex: X(?=foo)f str: ..XfooY.. result_expr: @+ expected_results 4 +34_y: OK regex: X(?=foo) parsed_regex: X(?=foo) str: ..XfooY.. result_expr: @+ expected_results 3 +35_y: OK regex: (?=XY*foo) parsed_regex: (?=XY*foo) str: Xfoo result_expr: @+ expected_results 0 +36_y: OK regex: ^(?=XY*foo) parsed_regex: ^(?=XY*foo) str: Xfoo result_expr: @+ expected_results 0 37_y: OK regex: X(\w+)(?=\s)|X(\w+) parsed_regex: X(\w+)(?=\s)|X(\w+) str: Xab result_expr: [$1-$2] expected_results [-ab] 38_y: OK regex: ^a*(?=b)b parsed_regex: ^a*(?=b)b str: ab result_expr: $& expected_results ab 39_y: OK regex: '(?!\A)x'm parsed_regex: '(?!\A)x'm str: a\nxb\n result_expr: - expected_results - @@ -44,4 +52,6 @@ Running tests_19_lookahead: 51_y: OK regex: ((?s)b.)c(?!\N) parsed_regex: ((?s)b.)c(?!\N) str: a\nb\nc\n result_expr: $1:$& expected_results b\n:b\nc 52_y: OK regex: '(b.)c(?!\N)'s parsed_regex: '(b.)c(?!\N)'s str: a\nb\nc\n result_expr: $1:$& expected_results b\n:b\nc 53_n: OK regex: a*(?!) parsed_regex: a*(?!) str: aaaab result_expr: - expected_results - +54_y: OK regex: (?)foo parsed_regex: (?)foo str: bar>ABCfoo result_expr: $& expected_results foo +55_y: OK regex: (?ABC)foo parsed_regex: (?ABC)foo str: bar>ABCfoo result_expr: $& expected_results ABCfoo diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_20_lookbehind.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-regex_20_lookbehind.cpp.execution new file mode 100644 index 000000000..cd61d4f56 --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20/pure2-regex_20_lookbehind.cpp.execution @@ -0,0 +1,58 @@ +Running tests_20_lookbehind: +01_y: OK regex: (?<=a)b parsed_regex: (?<=a)b str: ab result_expr: $& expected_results b +02_y: OK regex: (?<=af?)b parsed_regex: (?<=af?)b str: ab result_expr: $& expected_results b +03_n: OK regex: (?<=a)b parsed_regex: (?<=a)b str: cb result_expr: - expected_results - +04_n: OK regex: (?<=a(?:fo)?)b parsed_regex: (?<=a(?:fo)?)b str: cb result_expr: - expected_results - +05_n: OK regex: (?<=a)b parsed_regex: (?<=a)b str: b result_expr: - expected_results - +06_n: OK regex: (?<=a(?:foo)?)b parsed_regex: (?<=a(?:foo)?)b str: b result_expr: - expected_results - +07_y: OK regex: (?)foo parsed_regex: (?<=bar>)foo str: bar>foo result_expr: $& expected_results foo +50_n: OK regex: (?)foo parsed_regex: (?)foo str: bar>foo result_expr: - expected_results - +51_y: OK regex: (?<=bar>ABC)foo parsed_regex: (?<=bar>ABC)foo str: bar>ABCfoo result_expr: $& expected_results foo +52_n: OK regex: (?ABC)foo parsed_regex: (?ABC)foo str: bar>ABCfoo result_expr: - expected_results - +53_y: OK regex: (?<=abcd(?<=(aaaabcd))) parsed_regex: (?<=abcd(?<=(aaaabcd))) str: ..aaaabcd.. result_expr: $1 expected_results aaaabcd +54_y: OK regex: (?=xy(?<=(aaxy))) parsed_regex: (?=xy(?<=(aaxy))) str: ..aaxy.. result_expr: $1 expected_results aaxy +55_y: OK regex: (?=xy(?<=(aaxyz?))) parsed_regex: (?=xy(?<=(aaxyz?))) str: ..aaxy.. result_expr: $1 expected_results aaxy +56_y: OK regex: (?<=(?=(aaxy))aa) parsed_regex: (?<=(?=(aaxy))aa) str: ..aaxy.. result_expr: $1 expected_results aaxy + diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_21_atomic_patterns.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-regex_21_atomic_patterns.cpp.execution new file mode 100644 index 000000000..4812cfbb8 --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20/pure2-regex_21_atomic_patterns.cpp.execution @@ -0,0 +1,8 @@ +Running tests_21_atomic_patterns: +01_y: OK regex: (?>a+)b parsed_regex: (?>a+)b str: aaab result_expr: - expected_results - +02_y: OK regex: ((?>a+)b) parsed_regex: ((?>a+)b) str: aaab result_expr: $1 expected_results aaab +03_y: OK regex: (?>(a+))b parsed_regex: (?>(a+))b str: aaab result_expr: $1 expected_results aaa +04_y: OK regex: ((?>[^()]+)|\([^()]*\))+ parsed_regex: ((?>[^()]+)|\([^()]*\))+ str: ((abc(ade)ufh()()x result_expr: $& expected_results abc(ade)ufh()()x +05_y: OK regex: round\(((?>[^()]+))\) parsed_regex: round\(((?>[^()]+))\) str: _I(round(xs * sz),1) result_expr: $1 expected_results xs * sz +06_y: OK regex: ^((?>(?:aa)?b)?) parsed_regex: ^((?>(?:aa)?b)?) str: aab result_expr: $1 expected_results aab + diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-statement-scope-parameters.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-singleton-and-static.cpp.execution similarity index 50% rename from regression-tests/test-results/clang-18-c++23-libcpp/pure2-statement-scope-parameters.cpp.execution rename to regression-tests/test-results/clang-15-c++20/pure2-singleton-and-static.cpp.execution index 6fe5c7f6a..d81cc0710 100644 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-statement-scope-parameters.cpp.execution +++ b/regression-tests/test-results/clang-15-c++20/pure2-singleton-and-static.cpp.execution @@ -1,2 +1 @@ 42 -43 diff --git a/regression-tests/test-results/clang-15-c++20/pure2-try-catch.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-try-catch.cpp.execution new file mode 100644 index 000000000..c37cb6b5f --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20/pure2-try-catch.cpp.execution @@ -0,0 +1,2 @@ +oh look, a thrown int: 42 +oh look, another exception diff --git a/regression-tests/test-results/clang-15-c++20/pure2-type-safety-1.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-type-safety-1.cpp.execution index d1aa6265a..df9d257d3 100644 --- a/regression-tests/test-results/clang-15-c++20/pure2-type-safety-1.cpp.execution +++ b/regression-tests/test-results/clang-15-c++20/pure2-type-safety-1.cpp.execution @@ -7,3 +7,5 @@ variant is int? true any is int? true optional is int? true +optional is: int +optional<*D> is: *B *D diff --git a/regression-tests/test-results/clang-15-c++20/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp.execution index 541b2a0d9..371e06b05 100644 --- a/regression-tests/test-results/clang-15-c++20/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp.execution +++ b/regression-tests/test-results/clang-15-c++20/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp.execution @@ -4,5 +4,4 @@ ctor - from string construct [ Henry | 123 Ford Dr. ] ctor - from string assign [ Clara | 123 Ford Dr. ] ctor - copy (GENERAL) cp-construct [ Clara | 123 Ford Dr. ] <- [ Clara | 123 Ford Dr. ] ctor - move mv-construct [ Clara(CM) | 123 Ford Dr. ] <- [ | ] -ctor - copy (GENERAL) cp-assign [ Clara | 123 Ford Dr. ] <- [ Clara | 123 Ford Dr. ] assign - move mv-assign [ Clara | 123 Ford Dr. ] <- [ | ] diff --git a/regression-tests/test-results/clang-18-c++20/pure2-default-arguments.cpp.output b/regression-tests/test-results/clang-18-c++20/pure2-default-arguments.cpp.output deleted file mode 100644 index ba1cda599..000000000 --- a/regression-tests/test-results/clang-18-c++20/pure2-default-arguments.cpp.output +++ /dev/null @@ -1,7 +0,0 @@ -pure2-default-arguments.cpp2:6:56: error: cannot take address of consteval function 'current' outside of an immediate invocation - 6 | char const* fn = CPP2_UFCS_NONLOCAL(function_name)(std::source_location::current()) - | ^ -/usr/bin/../lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/source_location:60:5: note: declared here - 60 | current(__builtin_ret_type __p = __builtin_source_location()) noexcept - | ^ -1 error generated. diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_04_start_end.cpp.execution b/regression-tests/test-results/clang-18-c++20/pure2-regex_04_start_end.cpp.execution deleted file mode 100644 index 6fef36434..000000000 --- a/regression-tests/test-results/clang-18-c++20/pure2-regex_04_start_end.cpp.execution +++ /dev/null @@ -1,11 +0,0 @@ -Running tests_04_start_end: -01_y: OK regex: ^abc$ parsed_regex: ^abc$ str: abc result_expr: $& expected_results abc -02_n: OK regex: ^abc$ parsed_regex: ^abc$ str: abcc result_expr: - expected_results - -03_y: OK regex: ^abc parsed_regex: ^abc str: abcc result_expr: $& expected_results abc -04_n: OK regex: ^abc$ parsed_regex: ^abc$ str: aabc result_expr: - expected_results - -05_y: OK regex: abc$ parsed_regex: abc$ str: aabc result_expr: $& expected_results abc -06_n: OK regex: abc$ parsed_regex: abc$ str: aabcd result_expr: - expected_results - -07_y: OK regex: ^ parsed_regex: ^ str: abc result_expr: $& expected_results -08_y: OK regex: $ parsed_regex: $ str: abc result_expr: $& expected_results -09_n: OK regex: $b parsed_regex: $b str: b result_expr: - expected_results - - diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-allcpp1-hello.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-allcpp1-hello.cpp.execution deleted file mode 100644 index 802992c42..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-allcpp1-hello.cpp.execution +++ /dev/null @@ -1 +0,0 @@ -Hello world diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-as-for-variant-20-types.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-as-for-variant-20-types.cpp.execution deleted file mode 100644 index 5e2c9d82e..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-as-for-variant-20-types.cpp.execution +++ /dev/null @@ -1,60 +0,0 @@ -v as X< 0> = 0 -v as X< 1> = 1 -v as X< 2> = 2 -v as X< 3> = 3 -v as X< 4> = 4 -v as X< 5> = 5 -v as X< 6> = 6 -v as X< 7> = 7 -v as X< 8> = 8 -v as X< 9> = 9 -v as X<10> = 10 -v as X<11> = 11 -v as X<12> = 12 -v as X<13> = 13 -v as X<14> = 14 -v as X<15> = 15 -v as X<16> = 16 -v as X<17> = 17 -v as X<18> = 18 -v as X<19> = 19 -as_const(v) as X< 0> = 0 -as_const(v) as X< 1> = 1 -as_const(v) as X< 2> = 2 -as_const(v) as X< 3> = 3 -as_const(v) as X< 4> = 4 -as_const(v) as X< 5> = 5 -as_const(v) as X< 6> = 6 -as_const(v) as X< 7> = 7 -as_const(v) as X< 8> = 8 -as_const(v) as X< 9> = 9 -as_const(v) as X<10> = 10 -as_const(v) as X<11> = 11 -as_const(v) as X<12> = 12 -as_const(v) as X<13> = 13 -as_const(v) as X<14> = 14 -as_const(v) as X<15> = 15 -as_const(v) as X<16> = 16 -as_const(v) as X<17> = 17 -as_const(v) as X<18> = 18 -as_const(v) as X<19> = 19 -move(v) as X< 0> = 0 -move(v) as X< 1> = 1 -move(v) as X< 2> = 2 -move(v) as X< 3> = 3 -move(v) as X< 4> = 4 -move(v) as X< 5> = 5 -move(v) as X< 6> = 6 -move(v) as X< 7> = 7 -move(v) as X< 8> = 8 -move(v) as X< 9> = 9 -move(v) as X<10> = 10 -move(v) as X<11> = 11 -move(v) as X<12> = 12 -move(v) as X<13> = 13 -move(v) as X<14> = 14 -move(v) as X<15> = 15 -move(v) as X<16> = 16 -move(v) as X<17> = 17 -move(v) as X<18> = 18 -move(v) as X<19> = 19 diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-bounds-safety-with-assert-2.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-bounds-safety-with-assert-2.cpp.execution deleted file mode 100644 index 6330ca570..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-bounds-safety-with-assert-2.cpp.execution +++ /dev/null @@ -1,5 +0,0 @@ -1 -44 -45 -46 -5 diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-captures-in-expressions-and-postconditions.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-captures-in-expressions-and-postconditions.cpp.execution deleted file mode 100644 index dfca5b9a3..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-captures-in-expressions-and-postconditions.cpp.execution +++ /dev/null @@ -1,4 +0,0 @@ -hello -2022 -hello-ish -2022-ish diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-default-arguments.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-default-arguments.cpp.execution deleted file mode 100644 index 98b5204b6..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-default-arguments.cpp.execution +++ /dev/null @@ -1,4 +0,0 @@ -1 "test" -0 "" -1 "test" -0 "" diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-fixed-type-aliases.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-fixed-type-aliases.cpp.execution deleted file mode 100644 index 3122e6030..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-fixed-type-aliases.cpp.execution +++ /dev/null @@ -1,4 +0,0 @@ -true -false -"test.exe" -true diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-float-literals.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-float-literals.cpp.execution deleted file mode 100644 index 6b15b12bc..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-float-literals.cpp.execution +++ /dev/null @@ -1,72 +0,0 @@ -123 -123 -123 -123 -123 -123 -123456 -123 -123 -123 -123 -123 -123 -123456 -123456 -123456 -456 -456 -1e+10 -1e+10 -1e-10 -1e-10 -1e-10 -1e-10 -1e-10 -1e-10 -1e-10 -123456 -123456 -456 -456 -1e+10 -1e+10 -1e-10 -1e-10 -1e-10 -1e-10 -1e-10 -1e-10 -1e-10 -123 -123 -123 -123 -123 -123 -123456 -123 -123 -123 -123 -123 -123 -123456 -123456 -456 -1e+10 -1e+10 -1e-10 -1e-10 -1e-10 -1e-10 -1e-10 -123456 -456 -1e+10 -1e+10 -1e-10 -1e-10 -1e-10 -1e-10 -1e-10 diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-forwarding.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-forwarding.cpp.execution deleted file mode 100644 index 952feac3b..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-forwarding.cpp.execution +++ /dev/null @@ -1,12 +0,0 @@ -+X 1 -+X 2 -copy X 1 -copy X 2 -copy X 1 -move X 2 -+X 3 -+X 4 -copy X 3 -copy X 4 -move X 3 -move X 4 diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-function-expression-and-std-for-each.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-function-expression-and-std-for-each.cpp.execution deleted file mode 100644 index 728fbcc8f..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-function-expression-and-std-for-each.cpp.execution +++ /dev/null @@ -1,2 +0,0 @@ -hello-ish maybe -2022-ish maybe diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-function-expression-and-std-ranges-for-each-with-capture.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-function-expression-and-std-ranges-for-each-with-capture.cpp.execution deleted file mode 100644 index dfca5b9a3..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-function-expression-and-std-ranges-for-each-with-capture.cpp.execution +++ /dev/null @@ -1,4 +0,0 @@ -hello -2022 -hello-ish -2022-ish diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-function-expression-and-std-ranges-for-each.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-function-expression-and-std-ranges-for-each.cpp.execution deleted file mode 100644 index dfca5b9a3..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-function-expression-and-std-ranges-for-each.cpp.execution +++ /dev/null @@ -1,4 +0,0 @@ -hello -2022 -hello-ish -2022-ish diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-function-expression-with-pointer-capture.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-function-expression-with-pointer-capture.cpp.execution deleted file mode 100644 index e9d6a083f..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-function-expression-with-pointer-capture.cpp.execution +++ /dev/null @@ -1,6 +0,0 @@ - -hello - -2023 -hello-ish -2023-ish diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-function-expression-with-repeated-capture.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-function-expression-with-repeated-capture.cpp.execution deleted file mode 100644 index 137aaec33..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-function-expression-with-repeated-capture.cpp.execution +++ /dev/null @@ -1,6 +0,0 @@ - -hello - -2022 -hello-ish -2022-ish diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-hello.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-hello.cpp.execution deleted file mode 100644 index c8848197e..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-hello.cpp.execution +++ /dev/null @@ -1 +0,0 @@ -Hello [world] diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-increment-decrement.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-increment-decrement.cpp.execution deleted file mode 100644 index 6f42aeb32..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-increment-decrement.cpp.execution +++ /dev/null @@ -1,2 +0,0 @@ -12234 -12234 diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-initialization-safety-3.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-initialization-safety-3.cpp.execution deleted file mode 100644 index b261dd86c..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-initialization-safety-3.cpp.execution +++ /dev/null @@ -1 +0,0 @@ ->> [xyzzy] diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-inspect-templates.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-inspect-templates.cpp.execution deleted file mode 100644 index 03cdf50b7..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-inspect-templates.cpp.execution +++ /dev/null @@ -1,8 +0,0 @@ -inspected vec : std::vector -inspected arr : std::array -inspected var : std::variant -inspected myt : my_type -inspected vec : std::vector -inspected arr : std::array -inspected var : std::variant -inspected myt : my_type diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-inspect-values-2.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-inspect-values-2.cpp.execution deleted file mode 100644 index 8372eadca..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-inspect-values-2.cpp.execution +++ /dev/null @@ -1,5 +0,0 @@ -i is between 11 and 20 -less than 20 -i is between 10 and 30 -v is empty -v is empty diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-inspect-values.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-inspect-values.cpp.execution deleted file mode 100644 index e7130e0f8..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-inspect-values.cpp.execution +++ /dev/null @@ -1,12 +0,0 @@ -rev dodgson -(no match) -the answer -zero -plugh -zero -1 or 2 -1 or 2 -3 -integer -42 -xyzzy -(no match) diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-intro-example-three-loops.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-intro-example-three-loops.cpp.execution deleted file mode 100644 index 984a60a83..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-intro-example-three-loops.cpp.execution +++ /dev/null @@ -1,7 +0,0 @@ ->> hello ->> big ->> world - ** ** ** ->> [hello] ->> [big] ->> [world] diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-intro-for-with-counter-include-last.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-intro-for-with-counter-include-last.cpp.execution deleted file mode 100644 index 05961867a..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-intro-for-with-counter-include-last.cpp.execution +++ /dev/null @@ -1,5 +0,0 @@ -1 42 -2 84 -3 168 -4 336 -5 672 diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-is-as-value-with-variant.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-is-as-value-with-variant.cpp.execution deleted file mode 100644 index 13a1c120c..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-is-as-value-with-variant.cpp.execution +++ /dev/null @@ -1,42 +0,0 @@ -# std::monostate - ---- -# int(42) - 42 in(0,100) ---- -# int(24) - 24 in(0,100) ---- -# std::optional(100) - 100 std::optional(100) ---- -# std::any(-100) - ---- -# *int(314) - ---- -# std::unique_ptr(1000) - ---- -# my_variant(std::monostate) - ---- -# my_variant(int(42)) - ---- -# my_variant(int(24)) - ---- -# my_variant(std::optional(100)) - ---- -# my_variant(std::any(-100)) - ---- -# my_variant(*int(314)) - ---- -# my_variant(std::unique_ptr(1000)) - ---- diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-is-as-variant.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-is-as-variant.cpp.execution deleted file mode 100644 index 1dcf1c370..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-is-as-variant.cpp.execution +++ /dev/null @@ -1,145 +0,0 @@ -# std::monostate - -## v as lvalue reference - -v is empty = true -v is std::monostate = true -v is X< 0> = false, (v as X< 1>) = bad_variant_access -v is X< 1> = false, (v as X< 1>).to_string() = bad_variant_access -v is X<19> = false, (v as X<19>).to_string() = bad_variant_access -v is X<20> = false, (v as X<20>) = bad_variant_access - -## v as const lvalue reference - -v is empty = true -v is std::monostate = true -v is X< 0> = false, (v as X< 1>) = bad_variant_access -v is X< 1> = false, (v as X< 1>).to_string() = bad_variant_access -v is X<19> = false, (v as X<19>).to_string() = bad_variant_access -v is X<20> = false, (v as X<20>) = bad_variant_access - -## v as rvalue reference - -v is empty = true -v is std::monostate = true -v is X< 0> = false, (v as X< 1>) = bad_variant_access -v is X< 1> = false, (v as X< 1>).to_string() = bad_variant_access -v is X<19> = false, (v as X<19>).to_string() = bad_variant_access -v is X<20> = false, (v as X<20>) = bad_variant_access - -# X<1> - -## v as lvalue reference - -v is empty = false -v is std::monostate = false -v is X< 0> = false, (v as X< 1>) = bad_variant_access -v is X< 1> = true, (v as X< 1>).to_string() = X<1> -v is X<19> = false, (v as X<19>).to_string() = bad_variant_access -v is X<20> = false, (v as X<20>) = bad_variant_access - -## v as const lvalue reference - -v is empty = false -v is std::monostate = false -v is X< 0> = false, (v as X< 1>) = bad_variant_access -v is X< 1> = true, (v as X< 1>).to_string() = X<1> -v is X<19> = false, (v as X<19>).to_string() = bad_variant_access -v is X<20> = false, (v as X<20>) = bad_variant_access - -## v as rvalue reference - -v is empty = false -v is std::monostate = false -v is X< 0> = false, (v as X< 1>) = bad_variant_access -v is X< 1> = true, (v as X< 1>).to_string() = X<1> -v is X<19> = false, (v as X<19>).to_string() = bad_variant_access -v is X<20> = false, (v as X<20>) = bad_variant_access - -# X<19> - -## v as lvalue reference - -v is empty = false -v is std::monostate = false -v is X< 0> = false, (v as X< 1>) = bad_variant_access -v is X< 1> = false, (v as X< 1>).to_string() = bad_variant_access -v is X<19> = true, (v as X<19>).to_string() = X<19> -v is X<20> = false, (v as X<20>) = bad_variant_access - -## v as const lvalue reference - -v is empty = false -v is std::monostate = false -v is X< 0> = false, (v as X< 1>) = bad_variant_access -v is X< 1> = false, (v as X< 1>).to_string() = bad_variant_access -v is X<19> = true, (v as X<19>).to_string() = X<19> -v is X<20> = false, (v as X<20>) = bad_variant_access - -## v as rvalue reference - -v is empty = false -v is std::monostate = false -v is X< 0> = false, (v as X< 1>) = bad_variant_access -v is X< 1> = false, (v as X< 1>).to_string() = bad_variant_access -v is X<19> = true, (v as X<19>).to_string() = X<19> -v is X<20> = false, (v as X<20>) = bad_variant_access - -# X<20> - -## v as lvalue reference - -v is empty = false -v is std::monostate = false -v is X< 0> = false, (v as X< 1>) = bad_variant_access -v is X< 1> = false, (v as X< 1>).to_string() = bad_variant_access -v is X<19> = false, (v as X<19>).to_string() = bad_variant_access -v is X<20> = true, (v as X<20>) = works! - -## v as const lvalue reference - -v is empty = false -v is std::monostate = false -v is X< 0> = false, (v as X< 1>) = bad_variant_access -v is X< 1> = false, (v as X< 1>).to_string() = bad_variant_access -v is X<19> = false, (v as X<19>).to_string() = bad_variant_access -v is X<20> = true, (v as X<20>) = works! - -## v as rvalue reference - -v is empty = false -v is std::monostate = false -v is X< 0> = false, (v as X< 1>) = bad_variant_access -v is X< 1> = false, (v as X< 1>).to_string() = bad_variant_access -v is X<19> = false, (v as X<19>).to_string() = bad_variant_access -v is X<20> = true, (v as X<20>) = works! - -# X<10>(std::exception) - -## v as lvalue reference - -v is empty = true -v is std::monostate = false -v is X< 0> = false, (v as X< 1>) = bad_variant_access -v is X< 1> = false, (v as X< 1>).to_string() = bad_variant_access -v is X<19> = false, (v as X<19>).to_string() = bad_variant_access -v is X<20> = false, (v as X<20>) = bad_variant_access - -## v as const lvalue reference - -v is empty = true -v is std::monostate = false -v is X< 0> = false, (v as X< 1>) = bad_variant_access -v is X< 1> = false, (v as X< 1>).to_string() = bad_variant_access -v is X<19> = false, (v as X<19>).to_string() = bad_variant_access -v is X<20> = false, (v as X<20>) = bad_variant_access - -## v as rvalue reference - -v is empty = true -v is std::monostate = false -v is X< 0> = false, (v as X< 1>) = bad_variant_access -v is X< 1> = false, (v as X< 1>).to_string() = bad_variant_access -v is X<19> = false, (v as X<19>).to_string() = bad_variant_access -v is X<20> = false, (v as X<20>) = bad_variant_access - diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-lifetime-safety-pointer-init-4.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-lifetime-safety-pointer-init-4.cpp.execution deleted file mode 100644 index 7ee4d37b2..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-lifetime-safety-pointer-init-4.cpp.execution +++ /dev/null @@ -1 +0,0 @@ ->> 42 diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-multiple-return-values.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-multiple-return-values.cpp.execution deleted file mode 100644 index b3fc65a7c..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-multiple-return-values.cpp.execution +++ /dev/null @@ -1,2 +0,0 @@ -a is 10 -b is xyzzy diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-out-destruction.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-out-destruction.cpp.execution deleted file mode 100644 index df8e3e4ff..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-out-destruction.cpp.execution +++ /dev/null @@ -1,21 +0,0 @@ -enter main -enter f00 -enter f01 -+X 1 -exit f01 --X 1 -exit f00 - -enter f10 -enter f11 -enter f12 -enter f13 -enter f14 -+X 2 -exit f14 -exit f13 -exit f12 --X 2 -exit f11 -exit f10 -exit main diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-parameter-passing-generic-out.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-parameter-passing-generic-out.cpp.execution deleted file mode 100644 index 982a789cf..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-parameter-passing-generic-out.cpp.execution +++ /dev/null @@ -1,2 +0,0 @@ -42 -exxxx diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-postexpression-with-capture.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-postexpression-with-capture.cpp.execution deleted file mode 100644 index a17035eda..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-postexpression-with-capture.cpp.execution +++ /dev/null @@ -1,2 +0,0 @@ -xyzzy and plugh -xyzzyplugh diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-string-interpolation.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-string-interpolation.cpp.execution deleted file mode 100644 index eebb290a9..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-string-interpolation.cpp.execution +++ /dev/null @@ -1,17 +0,0 @@ -a = 2, b = (empty) -a^2 + b = 46 -sv = my string_view -osv = (empty) -osv = string literal bound to optional string_view -var = (empty) -var = abracadabra -var = 2.718280 -mypair = (12, 3.400000) -tup1 = (12) -tup2 = (12, 3.400000) -tup3 = (12, 3.400000, 456) -p = (first, (empty)) -t = (3.140000, (empty), (empty)) -vv = 0 -vv = (1, 2.300000) -custom = (customize me - no cpp2::to_string overload exists for this type) diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-test-parens.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-test-parens.cpp.execution deleted file mode 100644 index 59967f29d..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-test-parens.cpp.execution +++ /dev/null @@ -1,3 +0,0 @@ -11 -12 -13*14 is 182 diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-type-safety-1.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-type-safety-1.cpp.execution deleted file mode 100644 index f1a0d084e..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-type-safety-1.cpp.execution +++ /dev/null @@ -1,6 +0,0 @@ -1.1 is int? false -1 is int? true - -s* is Shape? true -s* is Circle? true -s* is Square? false diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-ufcs-multiple-template-arguments.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-ufcs-multiple-template-arguments.cpp.execution deleted file mode 100644 index dec75369f..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-ufcs-multiple-template-arguments.cpp.execution +++ /dev/null @@ -1,2 +0,0 @@ -rain -rain diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bounds-safety-span.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bounds-safety-span.cpp.execution deleted file mode 100644 index 3a0304fa2..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bounds-safety-span.cpp.execution +++ /dev/null @@ -1,3 +0,0 @@ ->> decorated ->> hello ->> world diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-break-continue.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-break-continue.cpp.execution deleted file mode 100644 index c8af55771..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-break-continue.cpp.execution +++ /dev/null @@ -1,26 +0,0 @@ -while_continue_inner: - 00 inner 01 02 inner outer 10 inner 11 12 inner outer 20 inner 21 22 inner outer -while_continue_outer: - 00 inner 01 10 inner 11 20 inner 21 -while_break_inner: - 00 inner 01 outer 10 inner 11 outer 20 inner 21 outer -while_break_outer: - 00 inner 01 - -do_continue_inner: - 00 inner 01 02 inner outer 10 inner 11 12 inner outer 20 inner 21 22 inner outer -do_continue_outer: - 00 inner 01 10 inner 11 20 inner 21 -do_break_inner: - 00 inner 01 outer 10 inner 11 outer 20 inner 21 outer -do_break_outer: - 00 inner 01 - -for_continue_inner: - 00 inner 01 02 inner outer 10 inner 11 12 inner outer 20 inner 21 22 inner outer -for_continue_outer: - 00 inner 01 10 inner 11 20 inner 21 -for_break_inner: - 00 inner 01 outer 10 inner 11 outer 20 inner 21 outer -for_break_outer: - 00 inner 01 \ No newline at end of file diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-memberwise-base-assignment.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-memberwise-base-assignment.cpp.execution deleted file mode 100644 index 566837e51..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-memberwise-base-assignment.cpp.execution +++ /dev/null @@ -1,2 +0,0 @@ -(out this, that) -(out this, that) diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-template-argument.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-template-argument.cpp.execution deleted file mode 100644 index c508d5366..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-template-argument.cpp.execution +++ /dev/null @@ -1 +0,0 @@ -false diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-ufcs-arguments.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-ufcs-arguments.cpp.execution deleted file mode 100644 index 0e41b7819..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-ufcs-arguments.cpp.execution +++ /dev/null @@ -1,4 +0,0 @@ -0123456789 -9 -0123456789 -9 diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-chained-comparisons.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-chained-comparisons.cpp.execution deleted file mode 100644 index b41a1bf75..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-chained-comparisons.cpp.execution +++ /dev/null @@ -1,27 +0,0 @@ -0 0 0: true false false -0 0 1: false false false -0 0 2: false false false -0 1 0: false false false -0 1 1: false true false -0 1 2: false true false -0 2 0: false false false -0 2 1: false false false -0 2 2: false true false -1 0 0: false false false -1 0 1: false false false -1 0 2: false false false -1 1 0: false false true -1 1 1: true false false -1 1 2: false false false -1 2 0: false false false -1 2 1: false false false -1 2 2: false true false -2 0 0: false false false -2 0 1: false false false -2 0 2: false false false -2 1 0: false false true -2 1 1: false false false -2 1 2: false false false -2 2 0: false false true -2 2 1: false false true -2 2 2: true false false diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-contracts.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-contracts.cpp.execution deleted file mode 100644 index e8a01cd98..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-contracts.cpp.execution +++ /dev/null @@ -1,3 +0,0 @@ -1 -2 -4 diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-default-arguments.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-default-arguments.cpp.output deleted file mode 100644 index 1b5962fb7..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-default-arguments.cpp.output +++ /dev/null @@ -1,7 +0,0 @@ -pure2-default-arguments.cpp2:6:56: error: cannot take address of consteval function 'current' outside of an immediate invocation - 6 | char const* fn = CPP2_UFCS_NONLOCAL(function_name)(std::source_location::current()) - | ^ -/usr/lib/llvm-18/bin/../include/c++/v1/source_location:60:36: note: declared here - 60 | static consteval source_location current(__bsl_ty __ptr = __builtin_source_location()) noexcept { - | ^ -1 error generated. diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-defaulted-comparisons-and-final-types.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-defaulted-comparisons-and-final-types.cpp.execution deleted file mode 100644 index 9ff824547..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-defaulted-comparisons-and-final-types.cpp.execution +++ /dev/null @@ -1 +0,0 @@ -less \ No newline at end of file diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-enum.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-enum.cpp.execution deleted file mode 100644 index 7e6611f6d..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-enum.cpp.execution +++ /dev/null @@ -1,36 +0,0 @@ -x.to_string() is clubs -x2.to_string() is clubs -x3.to_string() is hearts -x3.to_code() is skat_game::hearts -x4.to_string() is hearts -with if else: clubs -with inspect: clubs - -file_attributes::cached.get_raw_value() is 1 -file_attributes::current.get_raw_value() is 2 -file_attributes::obsolete.get_raw_value() is 4 -file_attributes::cached_and_current.get_raw_value() is 3 -f. get_raw_value() is 1 -f2.get_raw_value() is 1 -f is (cached) -f2 is (cached) -f2 is (none) -f2 is (cached) -f. get_raw_value() is 1 -f2.get_raw_value() is 1 -f is (f2) is true -f2 is (f ) is true - -f is (cached, current, obsolete, cached_and_current) -f2 is (cached, current, cached_and_current) -f. get_raw_value() is 7 -f2.get_raw_value() is 3 -f == f2 is false -f is (f2) is false -f2 is (f ) is false -(f & f2) == f2 is true -inspecting f: includes all f2's flags ('cached' and 'current') -f_from_string is (cached, current, cached_and_current) -f_from_string is (current, obsolete) -f_from_string.to_code() is (file_attributes::current | file_attributes::obsolete) -f_from_string is (cached, obsolete) diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-for-loop-range-with-lambda.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-for-loop-range-with-lambda.cpp.execution deleted file mode 100644 index 19b3a90b2..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-for-loop-range-with-lambda.cpp.execution +++ /dev/null @@ -1 +0,0 @@ -12345123451234512345 \ No newline at end of file diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-function-multiple-forward-arguments.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-function-multiple-forward-arguments.cpp.execution deleted file mode 100644 index 8baef1b4a..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-function-multiple-forward-arguments.cpp.execution +++ /dev/null @@ -1 +0,0 @@ -abc diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-function-typeids.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-function-typeids.cpp.execution deleted file mode 100644 index 08f16f663..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-function-typeids.cpp.execution +++ /dev/null @@ -1,17 +0,0 @@ -hello world! -hello world! -Come in, Frodo -Come in, Sam -Come in awhile, but take some biscuits on your way out, Frodo! -Come in awhile, but take some biscuits on your way out, Sam! -fg_out initialized gandalf to: A Powerful Mage -pg_out initialized galadriel to: A Powerful Mage -I hear you've moving, Frodo? -I hear you've moving, Sam? -Inout Gandalf ... fh_forward returned: Gandalf -Inout Galadriel ... ph_forward returned: Galadriel -Inout Galadriel ... ph_forward2 returned: Galadriel -In Gandalf ... fh_out returned: yohoho -In Galadriel ... ph_out returned: yohoho -43 -44 diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-hello.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-hello.cpp.execution deleted file mode 100644 index c8848197e..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-hello.cpp.execution +++ /dev/null @@ -1 +0,0 @@ -Hello [world] diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-initialization-safety-with-else-if.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-initialization-safety-with-else-if.cpp.execution deleted file mode 100644 index d00491fd7..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-initialization-safety-with-else-if.cpp.execution +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-inspect-expression-in-generic-function-multiple-types.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-inspect-expression-in-generic-function-multiple-types.cpp.execution deleted file mode 100644 index fd5a6cdff..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-inspect-expression-in-generic-function-multiple-types.cpp.execution +++ /dev/null @@ -1,8 +0,0 @@ - double value is not an int or string - variant value is not an int or string - any value is "xyzzy" - optional value is not an int or string - int value is integer 42 - variant value is integer 1 - any value is integer 2 - optional value is integer 3 diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-inspect-expression-with-as-in-generic-function.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-inspect-expression-with-as-in-generic-function.cpp.execution deleted file mode 100644 index 3cd874b4e..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-inspect-expression-with-as-in-generic-function.cpp.execution +++ /dev/null @@ -1,3 +0,0 @@ - syzygy value is not an int - 1 value is 1 - 1.100000 value is not an int diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-inspect-fallback-with-variant-any-optional.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-inspect-fallback-with-variant-any-optional.cpp.execution deleted file mode 100644 index a5cbcefe9..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-inspect-fallback-with-variant-any-optional.cpp.execution +++ /dev/null @@ -1,11 +0,0 @@ - -All these cases satisfy "matches std::string" - -variant - ... matches std::string - -string - ... matches std::string - -optional - ... matches std::string diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-inspect-generic-void-empty-with-variant-any-optional.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-inspect-generic-void-empty-with-variant-any-optional.cpp.execution deleted file mode 100644 index a2df8769d..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-inspect-generic-void-empty-with-variant-any-optional.cpp.execution +++ /dev/null @@ -1,17 +0,0 @@ - -All these cases satisfy "VOYDE AND EMPTIE" - -unique_ptr - ... VOYDE AND EMPTIE - -vector::iterator - ... VOYDE AND EMPTIE - -variant - ... VOYDE AND EMPTIE - -any - ... VOYDE AND EMPTIE - -optional - ... VOYDE AND EMPTIE diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-interpolation.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-interpolation.cpp.execution deleted file mode 100644 index 0cfa01615..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-interpolation.cpp.execution +++ /dev/null @@ -1,13 +0,0 @@ -g0g0g -0g0g -0g0 -00 -"0" -"0 -" - -pl(ug$h -0pl(ug$h -Dog kennel color mauve price 3.14 in stock = true -Dog kennel color mauve price 3.140000 in stock = true -complex: (1.2,3.4) diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-intro-example-hello-2022.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-intro-example-hello-2022.cpp.execution deleted file mode 100644 index 8e8c5ee29..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-intro-example-hello-2022.cpp.execution +++ /dev/null @@ -1,2 +0,0 @@ ->> [hello] - length 7 ->> [2022] - length 6 diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-intro-example-three-loops.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-intro-example-three-loops.cpp.execution deleted file mode 100644 index c218d85df..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-intro-example-three-loops.cpp.execution +++ /dev/null @@ -1,8 +0,0 @@ ->> hello ->> big ->> world - ** ** ** ->> [hello] ->> [big] ->> [world] ->> end of program diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-is-with-free-functions-predicate.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-is-with-free-functions-predicate.cpp.execution deleted file mode 100644 index c8a07e430..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-is-with-free-functions-predicate.cpp.execution +++ /dev/null @@ -1,6 +0,0 @@ -3.140000 is double bigger than 3 -3.140000 is bigger than 3 -42 is integer bigger than 3 -42 is bigger than 3 -a is integer bigger than 3 -a is bigger than 3 diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-is-with-polymorphic-types.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-is-with-polymorphic-types.cpp.execution deleted file mode 100644 index 3009b3c17..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-is-with-polymorphic-types.cpp.execution +++ /dev/null @@ -1,8 +0,0 @@ -vc is VC VA<0> VA<1> -p0* is VC VA<0> VA<1> -p1* is VC VA<0> VA<1> -vc& is *VC *VA<0> *VA<1> -p0 is *VC *VA<0> *VA<1> -p1 is *VC *VA<0> *VA<1> -nullptr is empty -A is A diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-is-with-unnamed-predicates.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-is-with-unnamed-predicates.cpp.execution deleted file mode 100644 index c8a07e430..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-is-with-unnamed-predicates.cpp.execution +++ /dev/null @@ -1,6 +0,0 @@ -3.140000 is double bigger than 3 -3.140000 is bigger than 3 -42 is integer bigger than 3 -42 is bigger than 3 -a is integer bigger than 3 -a is bigger than 3 diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-is-with-variable-and-value.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-is-with-variable-and-value.cpp.execution deleted file mode 100644 index a9bc0680a..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-is-with-variable-and-value.cpp.execution +++ /dev/null @@ -1,9 +0,0 @@ -3.14: unknown -42: 42 -WithOp(): unknown -WithGenOp(): unknown -Cmp(): comparable -std::string("text"): text -"text": text -std::string_view("text"): text -:std::vector = ('t','e','x','t','\0'): unknown diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-last-use.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-last-use.cpp.execution deleted file mode 100644 index 4632e068d..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-last-use.cpp.execution +++ /dev/null @@ -1 +0,0 @@ -123456 \ No newline at end of file diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-look-up-parameter-across-unnamed-function.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-look-up-parameter-across-unnamed-function.cpp.execution deleted file mode 100644 index 871727de1..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-look-up-parameter-across-unnamed-function.cpp.execution +++ /dev/null @@ -1 +0,0 @@ -84 diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-main-args.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-main-args.cpp.execution deleted file mode 100644 index bd992e432..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-main-args.cpp.execution +++ /dev/null @@ -1,2 +0,0 @@ -args.argc is 1 -args.argv[0] is test.exe diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-more-wildcards.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-more-wildcards.cpp.execution deleted file mode 100644 index e37d6cb21..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-more-wildcards.cpp.execution +++ /dev/null @@ -1,2 +0,0 @@ -yes, less -yes, always diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-print.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-print.cpp.execution deleted file mode 100644 index 4e4b4573d..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-print.cpp.execution +++ /dev/null @@ -1,2 +0,0 @@ -43 -forty-and-three diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-raw-string-literal-and-interpolation.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-raw-string-literal-and-interpolation.cpp.execution deleted file mode 100644 index c48e2bd60..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-raw-string-literal-and-interpolation.cpp.execution +++ /dev/null @@ -1,17 +0,0 @@ -this is a string -raw string without interpolation -this is raw string literal - -that can last for multiple - -lines -this is raw string literal -that can last for multiple -lines -42 R"(this can be added too)" -calculations like m["one"] + m["two"] = 3 also works -at the beginning of the line!!! - - - 4242 -1.2.0.42 diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_01_char_matcher.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_01_char_matcher.cpp.execution deleted file mode 100644 index af124736e..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_01_char_matcher.cpp.execution +++ /dev/null @@ -1,14 +0,0 @@ -Running tests_01_char_matcher: -01_y: OK regex: abc parsed_regex: abc str: abc result_expr: $& expected_results abc -02_y: OK regex: abc parsed_regex: abc str: abc result_expr: $-[0] expected_results 0 -03_y: OK regex: abc parsed_regex: abc str: abc result_expr: $+[0] expected_results 3 -04_n: OK regex: abc parsed_regex: abc str: xbc result_expr: - expected_results - -05_n: OK regex: abc parsed_regex: abc str: axc result_expr: - expected_results - -06_n: OK regex: abc parsed_regex: abc str: abx result_expr: - expected_results - -07_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $& expected_results abc -08_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $-[0] expected_results 1 -09_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $+[0] expected_results 4 -10_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $& expected_results abc -11_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $-[0] expected_results 2 -12_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $+[0] expected_results 5 - diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_02_ranges.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_02_ranges.cpp.execution deleted file mode 100644 index dc0b36002..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_02_ranges.cpp.execution +++ /dev/null @@ -1,42 +0,0 @@ -Running tests_02_ranges: -01_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $& expected_results abc -02_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $-[0] expected_results 0 -03_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $+[0] expected_results 3 -04_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $& expected_results abc -05_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $-[0] expected_results 0 -06_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $+[0] expected_results 3 -07_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $& expected_results abbc -08_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $-[0] expected_results 0 -09_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $+[0] expected_results 4 -10_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $& expected_results abbbbc -11_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $-[0] expected_results 0 -12_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $+[0] expected_results 6 -13_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $& expected_results abbbbc -14_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $-[0] expected_results 0 -15_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $+[0] expected_results 6 -16_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $& expected_results abbc -17_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $-[0] expected_results 0 -18_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $+[0] expected_results 4 -19_n: OK regex: ab+bc parsed_regex: ab+bc str: abc result_expr: - expected_results - -20_n: OK regex: ab+bc parsed_regex: ab+bc str: abq result_expr: - expected_results - -21_n: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abq result_expr: - expected_results - -22_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $& expected_results abbbbc -23_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $-[0] expected_results 0 -24_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $+[0] expected_results 6 -25_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $& expected_results abbbbc -26_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $-[0] expected_results 0 -27_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $+[0] expected_results 6 -28_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $& expected_results abbbbc -29_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $-[0] expected_results 0 -30_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $+[0] expected_results 6 -31_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $& expected_results abbbbc -32_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $-[0] expected_results 0 -33_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $+[0] expected_results 6 -34_n: OK regex: ab{4,5}bc parsed_regex: ab{4,5}bc str: abbbbc result_expr: - expected_results - -35_y: OK regex: ab?bc parsed_regex: ab?bc str: abbc result_expr: $& expected_results abbc -36_y: OK regex: ab?bc parsed_regex: ab?bc str: abc result_expr: $& expected_results abc -37_y: OK regex: ab{0,1}bc parsed_regex: ab{0,1}bc str: abc result_expr: $& expected_results abc -38_n: OK regex: ab?bc parsed_regex: ab?bc str: abbbbc result_expr: - expected_results - -39_y: OK regex: ab?c parsed_regex: ab?c str: abc result_expr: $& expected_results abc -40_y: OK regex: ab{0,1}c parsed_regex: ab{0,1}c str: abc result_expr: $& expected_results abc - diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_03_wildcard.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_03_wildcard.cpp.execution deleted file mode 100644 index f3f0ea9cc..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_03_wildcard.cpp.execution +++ /dev/null @@ -1,22 +0,0 @@ -Running tests_03_wildcard: -01_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $& expected_results a -02_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $-[0] expected_results 0 -03_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $+[0] expected_results 1 -04_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $& expected_results abbb -05_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $-[0] expected_results 0 -06_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $+[0] expected_results 4 -07_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $& expected_results a -08_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $-[0] expected_results 0 -09_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $+[0] expected_results 1 -10_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $& expected_results abbb -11_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $-[0] expected_results 0 -12_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $+[0] expected_results 4 -13_y: OK Warning: Parsed regex does not match. regex: \N{ 3 , 4 } parsed_regex: \N{3,4} str: abbbbc result_expr: $+[0] expected_results 4 -14_y: OK regex: a.c parsed_regex: a.c str: abc result_expr: $& expected_results abc -15_y: OK regex: a.c parsed_regex: a.c str: axc result_expr: $& expected_results axc -16_y: OK regex: a\Nc parsed_regex: a\Nc str: abc result_expr: $& expected_results abc -17_y: OK regex: a.*c parsed_regex: a.*c str: axyzc result_expr: $& expected_results axyzc -18_y: OK regex: a\N*c parsed_regex: a\N*c str: axyzc result_expr: $& expected_results axyzc -19_n: OK regex: a.*c parsed_regex: a.*c str: axyzd result_expr: - expected_results - -20_n: OK regex: a\N*c parsed_regex: a\N*c str: axyzd result_expr: - expected_results - - diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_05_classes.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_05_classes.cpp.execution deleted file mode 100644 index 306bf3395..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_05_classes.cpp.execution +++ /dev/null @@ -1,21 +0,0 @@ -Running tests_05_classes: -01_n: OK regex: a[bc]d parsed_regex: a[bc]d str: abc result_expr: - expected_results - -02_y: OK regex: a[bc]d parsed_regex: a[bc]d str: abd result_expr: $& expected_results abd -03_y: OK regex: a[b]d parsed_regex: a[b]d str: abd result_expr: $& expected_results abd -04_y: OK regex: [a][b][d] parsed_regex: [a][b][d] str: abd result_expr: $& expected_results abd -05_y: OK regex: .[b]. parsed_regex: .[b]. str: abd result_expr: $& expected_results abd -06_n: OK regex: .[b]. parsed_regex: .[b]. str: aBd result_expr: - expected_results - -07_n: OK regex: a[b-d]e parsed_regex: a[b-d]e str: abd result_expr: - expected_results - -08_y: OK regex: a[b-d]e parsed_regex: a[b-d]e str: ace result_expr: $& expected_results ace -09_y: OK regex: a[b-d] parsed_regex: a[b-d] str: aac result_expr: $& expected_results ac -10_y: OK regex: a[-b] parsed_regex: a[-b] str: a- result_expr: $& expected_results a- -11_y: OK regex: a[b-] parsed_regex: a[b-] str: a- result_expr: $& expected_results a- -12_y: OK regex: a] parsed_regex: a] str: a] result_expr: $& expected_results a] -13_y: OK regex: a[]]b parsed_regex: a[]]b str: a]b result_expr: $& expected_results a]b -14_y: OK regex: a[^bc]d parsed_regex: a[^bc]d str: aed result_expr: $& expected_results aed -15_n: OK regex: a[^bc]d parsed_regex: a[^bc]d str: abd result_expr: - expected_results - -16_y: OK regex: a[^-b]c parsed_regex: a[^-b]c str: adc result_expr: $& expected_results adc -17_n: OK regex: a[^-b]c parsed_regex: a[^-b]c str: a-c result_expr: - expected_results - -18_n: OK regex: a[^]b]c parsed_regex: a[^]b]c str: a]c result_expr: - expected_results - -19_y: OK regex: a[^]b]c parsed_regex: a[^]b]c str: adc result_expr: $& expected_results adc - diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_06_boundaries.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_06_boundaries.cpp.execution deleted file mode 100644 index 420a4c587..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_06_boundaries.cpp.execution +++ /dev/null @@ -1,19 +0,0 @@ -Running tests_06_boundaries: -01_y: OK regex: \ba\b parsed_regex: \ba\b str: a- result_expr: - expected_results - -02_y: OK regex: \ba\b parsed_regex: \ba\b str: -a result_expr: - expected_results - -03_y: OK regex: \ba\b parsed_regex: \ba\b str: -a- result_expr: - expected_results - -04_n: OK regex: \by\b parsed_regex: \by\b str: xy result_expr: - expected_results - -05_n: OK regex: \by\b parsed_regex: \by\b str: yz result_expr: - expected_results - -06_n: OK regex: \by\b parsed_regex: \by\b str: xyz result_expr: - expected_results - -07_n: OK regex: \Ba\B parsed_regex: \Ba\B str: a- result_expr: - expected_results - -08_n: OK regex: \Ba\B parsed_regex: \Ba\B str: -a result_expr: - expected_results - -09_n: OK regex: \Ba\B parsed_regex: \Ba\B str: -a- result_expr: - expected_results - -10_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: - expected_results - -11_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: $-[0] expected_results 1 -12_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: $+[0] expected_results 2 -13_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: - expected_results - -14_y: OK regex: \by\B parsed_regex: \by\B str: yz result_expr: - expected_results - -15_y: OK regex: \By\B parsed_regex: \By\B str: xyz result_expr: - expected_results - -16_n: OK regex: \b parsed_regex: \b str: result_expr: - expected_results - -17_y: OK regex: \B parsed_regex: \B str: result_expr: - expected_results - - diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_07_short_classes.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_07_short_classes.cpp.execution deleted file mode 100644 index 519c05f92..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_07_short_classes.cpp.execution +++ /dev/null @@ -1,26 +0,0 @@ -Running tests_07_short_classes: -01_y: OK regex: \w parsed_regex: \w str: a result_expr: - expected_results - -02_n: OK regex: \w parsed_regex: \w str: - result_expr: - expected_results - -03_n: OK regex: \W parsed_regex: \W str: a result_expr: - expected_results - -04_y: OK regex: \W parsed_regex: \W str: - result_expr: - expected_results - -05_y: OK regex: a\sb parsed_regex: a\sb str: a b result_expr: - expected_results - -06_n: OK regex: a\sb parsed_regex: a\sb str: a-b result_expr: - expected_results - -07_n: OK regex: a\Sb parsed_regex: a\Sb str: a b result_expr: - expected_results - -08_y: OK regex: a\Sb parsed_regex: a\Sb str: a-b result_expr: - expected_results - -09_y: OK regex: \d parsed_regex: \d str: 1 result_expr: - expected_results - -10_n: OK regex: \d parsed_regex: \d str: - result_expr: - expected_results - -11_n: OK regex: \D parsed_regex: \D str: 1 result_expr: - expected_results - -12_y: OK regex: \D parsed_regex: \D str: - result_expr: - expected_results - -13_y: OK regex: [\w] parsed_regex: [\w] str: a result_expr: - expected_results - -14_n: OK regex: [\w] parsed_regex: [\w] str: - result_expr: - expected_results - -15_n: OK regex: [\W] parsed_regex: [\W] str: a result_expr: - expected_results - -16_y: OK regex: [\W] parsed_regex: [\W] str: - result_expr: - expected_results - -17_y: OK regex: a[\s]b parsed_regex: a[\s]b str: a b result_expr: - expected_results - -18_n: OK regex: a[\s]b parsed_regex: a[\s]b str: a-b result_expr: - expected_results - -19_n: OK regex: a[\S]b parsed_regex: a[\S]b str: a b result_expr: - expected_results - -20_y: OK regex: a[\S]b parsed_regex: a[\S]b str: a-b result_expr: - expected_results - -21_y: OK regex: [\d] parsed_regex: [\d] str: 1 result_expr: - expected_results - -22_n: OK regex: [\d] parsed_regex: [\d] str: - result_expr: - expected_results - -23_n: OK regex: [\D] parsed_regex: [\D] str: 1 result_expr: - expected_results - -24_y: OK regex: [\D] parsed_regex: [\D] str: - result_expr: - expected_results - - diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_08_alternatives.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_08_alternatives.cpp.execution deleted file mode 100644 index c12fd2afe..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_08_alternatives.cpp.execution +++ /dev/null @@ -1,4 +0,0 @@ -Running tests_08_alternatives: -01_y: OK regex: ab|cd parsed_regex: ab|cd str: abc result_expr: $& expected_results ab -02_y: OK regex: ab|cd parsed_regex: ab|cd str: abcd result_expr: $& expected_results ab - diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_09_groups.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_09_groups.cpp.execution deleted file mode 100644 index 05df860f9..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_09_groups.cpp.execution +++ /dev/null @@ -1,13 +0,0 @@ -Running tests_09_groups: -01_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $&-$1 expected_results ef- -02_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $-[0] expected_results 1 -03_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $+[0] expected_results 3 -04_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $-[1] expected_results 1 -05_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $+[1] expected_results 1 -06_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $&-$1-$2 expected_results a-a-a -07_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $-[0]-$-[1]-$-[2] expected_results 0-0-0 -08_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $+[0]-$+[1]-$+[2] expected_results 1-1-1 -09_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $&-$1-$2 expected_results abc-a-c -10_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $-[0]-$-[1]-$-[2] expected_results 0-0-2 -11_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $+[0]-$+[1]-$+[2] expected_results 3-1-3 - diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_10_escapes.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_10_escapes.cpp.execution deleted file mode 100644 index 7f23465cb..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_10_escapes.cpp.execution +++ /dev/null @@ -1,22 +0,0 @@ -Running tests_10_escapes: -01_y: OK regex: a\(b parsed_regex: a\(b str: a(b result_expr: $&-$1 expected_results a(b- -02_y: OK regex: a\(*b parsed_regex: a\(*b str: ab result_expr: $& expected_results ab -03_y: OK regex: a\(*b parsed_regex: a\(*b str: a((b result_expr: $& expected_results a((b -04_y: OK regex: a\\b parsed_regex: a\\b str: a\b result_expr: $& expected_results a\b -05_y: OK regex: foo(\h+)bar parsed_regex: foo(\h+)bar str: foo\tbar result_expr: $1 expected_results \t -06_y: OK regex: (\H+)(\h) parsed_regex: (\H+)(\h) str: foo\tbar result_expr: $1-$2 expected_results foo-\t -07_y: OK regex: (\h+)(\H) parsed_regex: (\h+)(\H) str: foo\tbar result_expr: $1-$2 expected_results \t-b -08_y: OK regex: foo(\h)bar parsed_regex: foo(\h)bar str: foo\tbar result_expr: $1 expected_results \t -09_y: OK regex: (\H)(\h) parsed_regex: (\H)(\h) str: foo\tbar result_expr: $1-$2 expected_results o-\t -10_y: OK regex: (\h)(\H) parsed_regex: (\h)(\H) str: foo\tbar result_expr: $1-$2 expected_results \t-b -11_y: OK regex: foo(\v+)bar parsed_regex: foo(\v+)bar str: foo\r\n\r\n\nbar result_expr: $1 expected_results \r\n\r\n\n -12_y: OK regex: (\V+)(\v) parsed_regex: (\V+)(\v) str: foo\r\n\r\n\nbar result_expr: $1-$2 expected_results foo-\r -13_y: OK regex: (\v+)(\V) parsed_regex: (\v+)(\V) str: foo\r\n\r\n\nbar result_expr: $1-$2 expected_results \r\n\r\n\n-b -14_y: OK regex: foo(\v)bar parsed_regex: foo(\v)bar str: foo\rbar result_expr: $1 expected_results \r -15_y: OK regex: (\V)(\v) parsed_regex: (\V)(\v) str: foo\rbar result_expr: $1-$2 expected_results o-\r -16_y: OK regex: (\v)(\V) parsed_regex: (\v)(\V) str: foo\rbar result_expr: $1-$2 expected_results \r-b -17_y: OK regex: foo\t\n\r\f\a\ebar parsed_regex: foo\t\n\r\f\a\ebar str: foo\t\n\r\f\a\ebar result_expr: $& expected_results foo\t\n\r\f\a\ebar -18_y: OK regex: foo\Kbar parsed_regex: foo\Kbar str: foobar result_expr: $& expected_results bar -19_y: OK regex: \x41\x42 parsed_regex: \x41\x42 str: AB result_expr: $& expected_results AB -20_y: OK regex: \101\o{102} parsed_regex: \101\o{102} str: AB result_expr: $& expected_results AB - diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_11_group_references.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_11_group_references.cpp.execution deleted file mode 100644 index 724d0085a..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_11_group_references.cpp.execution +++ /dev/null @@ -1,26 +0,0 @@ -Running tests_11_group_references: -01_y: OK regex: (foo)(\g-2) parsed_regex: (foo)(\g-2) str: foofoo result_expr: $1-$2 expected_results foo-foo -02_y: OK regex: (foo)(\g-2)(foo)(\g-2) parsed_regex: (foo)(\g-2)(foo)(\g-2) str: foofoofoofoo result_expr: $1-$2-$3-$4 expected_results foo-foo-foo-foo -03_y: OK regex: (([abc]+) \g-1)(([abc]+) \g{-1}) parsed_regex: (([abc]+) \g-1)(([abc]+) \g{-1}) str: abc abccba cba result_expr: $2-$4 expected_results abc-cba -04_y: OK regex: (a)(b)(c)\g1\g2\g3 parsed_regex: (a)(b)(c)\g1\g2\g3 str: abcabc result_expr: $1$2$3 expected_results abc -05_y: OK regex: /(?'n'foo) \g{n}/ parsed_regex: /(?'n'foo) \g{n}/ str: ..foo foo.. result_expr: $1 expected_results foo -06_y: OK regex: /(?'n'foo) \g{ n }/ parsed_regex: /(?'n'foo) \g{ n }/ str: ..foo foo.. result_expr: $1 expected_results foo -07_yM: OK regex: /(?'n'foo) \g{n}/ parsed_regex: /(?'n'foo) \g{n}/ str: ..foo foo.. result_expr: $+{n} expected_results foo -08_y: OK regex: /(?foo) \g{n}/ parsed_regex: /(?foo) \g{n}/ str: ..foo foo.. result_expr: $1 expected_results foo -09_yM: OK regex: /(?foo) \g{n}/ parsed_regex: /(?foo) \g{n}/ str: ..foo foo.. result_expr: $+{n} expected_results foo -10_y: OK regex: /(?as) (\w+) \g{as} (\w+)/ parsed_regex: /(?as) (\w+) \g{as} (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie -11_y: OK regex: /(?'n'foo) \k/ parsed_regex: /(?'n'foo) \k/ str: ..foo foo.. result_expr: $1 expected_results foo -12_yM: OK regex: /(?'n'foo) \k/ parsed_regex: /(?'n'foo) \k/ str: ..foo foo.. result_expr: $+{n} expected_results foo -13_y: OK regex: /(?foo) \k'n'/ parsed_regex: /(?foo) \k'n'/ str: ..foo foo.. result_expr: $1 expected_results foo -14_yM: OK regex: /(?foo) \k'n'/ parsed_regex: /(?foo) \k'n'/ str: ..foo foo.. result_expr: $+{n} expected_results foo -15_yM: OK regex: /(?'a1'foo) \k'a1'/ parsed_regex: /(?'a1'foo) \k'a1'/ str: ..foo foo.. result_expr: $+{a1} expected_results foo -16_yM: OK regex: /(?foo) \k/ parsed_regex: /(?foo) \k/ str: ..foo foo.. result_expr: $+{a1} expected_results foo -17_yM: OK regex: /(?'_'foo) \k'_'/ parsed_regex: /(?'_'foo) \k'_'/ str: ..foo foo.. result_expr: $+{_} expected_results foo -18_yM: OK regex: /(?<_>foo) \k<_>/ parsed_regex: /(?<_>foo) \k<_>/ str: ..foo foo.. result_expr: $+{_} expected_results foo -19_yM: OK regex: /(?'_0_'foo) \k'_0_'/ parsed_regex: /(?'_0_'foo) \k'_0_'/ str: ..foo foo.. result_expr: $+{_0_} expected_results foo -20_yM: OK regex: /(?<_0_>foo) \k<_0_>/ parsed_regex: /(?<_0_>foo) \k<_0_>/ str: ..foo foo.. result_expr: $+{_0_} expected_results foo -21_y: OK regex: /(?as) (\w+) \k (\w+)/ parsed_regex: /(?as) (\w+) \k (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie -22_y: OK regex: /(?as) (\w+) \k{as} (\w+)/ parsed_regex: /(?as) (\w+) \k{as} (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie -23_y: OK regex: /(?as) (\w+) \k'as' (\w+)/ parsed_regex: /(?as) (\w+) \k'as' (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie -24_y: OK regex: /(?as) (\w+) \k{ as } (\w+)/ parsed_regex: /(?as) (\w+) \k{ as } (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie - diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_12_case_insensitive.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_12_case_insensitive.cpp.execution deleted file mode 100644 index 4939deb24..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_12_case_insensitive.cpp.execution +++ /dev/null @@ -1,121 +0,0 @@ -Running tests_12_case_insensitive: -01_y: OK regex: 'abc'i parsed_regex: 'abc'i str: ABC result_expr: $& expected_results ABC -02_n: OK regex: 'abc'i parsed_regex: 'abc'i str: XBC result_expr: - expected_results - -03_n: OK regex: 'abc'i parsed_regex: 'abc'i str: AXC result_expr: - expected_results - -04_n: OK regex: 'abc'i parsed_regex: 'abc'i str: ABX result_expr: - expected_results - -05_y: OK regex: 'abc'i parsed_regex: 'abc'i str: XABCY result_expr: $& expected_results ABC -06_y: OK regex: 'abc'i parsed_regex: 'abc'i str: ABABC result_expr: $& expected_results ABC -07_y: OK regex: 'ab*c'i parsed_regex: 'ab*c'i str: ABC result_expr: $& expected_results ABC -08_y: OK regex: 'ab*bc'i parsed_regex: 'ab*bc'i str: ABC result_expr: $& expected_results ABC -09_y: OK regex: 'ab*bc'i parsed_regex: 'ab*bc'i str: ABBC result_expr: $& expected_results ABBC -10_y: OK regex: 'ab*?bc'i parsed_regex: 'ab*?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC -11_y: OK regex: 'ab{0,}?bc'i parsed_regex: 'ab{0,}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC -12_y: OK regex: 'ab+?bc'i parsed_regex: 'ab+?bc'i str: ABBC result_expr: $& expected_results ABBC -13_n: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABC result_expr: - expected_results - -14_n: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABQ result_expr: - expected_results - -15_n: OK regex: 'ab{1,}bc'i parsed_regex: 'ab{1,}bc'i str: ABQ result_expr: - expected_results - -16_y: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABBBBC result_expr: $& expected_results ABBBBC -17_y: OK regex: 'ab{1,}?bc'i parsed_regex: 'ab{1,}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC -18_y: OK regex: 'ab{1,3}?bc'i parsed_regex: 'ab{1,3}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC -19_y: OK regex: 'ab{3,4}?bc'i parsed_regex: 'ab{3,4}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC -20_n: OK regex: 'ab{4,5}?bc'i parsed_regex: 'ab{4,5}?bc'i str: ABBBBC result_expr: - expected_results - -21_y: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABBC result_expr: $& expected_results ABBC -22_y: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABC result_expr: $& expected_results ABC -23_y: OK regex: 'ab{0,1}?bc'i parsed_regex: 'ab{0,1}?bc'i str: ABC result_expr: $& expected_results ABC -24_n: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABBBBC result_expr: - expected_results - -25_y: OK regex: 'ab??c'i parsed_regex: 'ab??c'i str: ABC result_expr: $& expected_results ABC -26_y: OK regex: 'ab{0,1}?c'i parsed_regex: 'ab{0,1}?c'i str: ABC result_expr: $& expected_results ABC -27_y: OK regex: '^abc$'i parsed_regex: '^abc$'i str: ABC result_expr: $& expected_results ABC -28_n: OK regex: '^abc$'i parsed_regex: '^abc$'i str: ABCC result_expr: - expected_results - -29_y: OK regex: '^abc'i parsed_regex: '^abc'i str: ABCC result_expr: $& expected_results ABC -30_n: OK regex: '^abc$'i parsed_regex: '^abc$'i str: AABC result_expr: - expected_results - -31_y: OK regex: 'abc$'i parsed_regex: 'abc$'i str: AABC result_expr: $& expected_results ABC -32_y: OK regex: '^'i parsed_regex: '^'i str: ABC result_expr: $& expected_results -33_y: OK regex: '$'i parsed_regex: '$'i str: ABC result_expr: $& expected_results -34_y: OK regex: 'a.c'i parsed_regex: 'a.c'i str: ABC result_expr: $& expected_results ABC -35_y: OK regex: 'a.c'i parsed_regex: 'a.c'i str: AXC result_expr: $& expected_results AXC -36_y: OK regex: 'a\Nc'i parsed_regex: 'a\Nc'i str: ABC result_expr: $& expected_results ABC -37_y: OK regex: 'a.*?c'i parsed_regex: 'a.*?c'i str: AXYZC result_expr: $& expected_results AXYZC -38_n: OK regex: 'a.*c'i parsed_regex: 'a.*c'i str: AXYZD result_expr: - expected_results - -39_n: OK regex: 'a[bc]d'i parsed_regex: 'a[bc]d'i str: ABC result_expr: - expected_results - -40_y: OK regex: 'a[bc]d'i parsed_regex: 'a[bc]d'i str: ABD result_expr: $& expected_results ABD -41_n: OK regex: 'a[b-d]e'i parsed_regex: 'a[b-d]e'i str: ABD result_expr: - expected_results - -42_y: OK regex: 'a[b-d]e'i parsed_regex: 'a[b-d]e'i str: ACE result_expr: $& expected_results ACE -43_y: OK regex: 'a[b-d]'i parsed_regex: 'a[b-d]'i str: AAC result_expr: $& expected_results AC -44_y: OK regex: 'a[-b]'i parsed_regex: 'a[-b]'i str: A- result_expr: $& expected_results A- -45_y: OK regex: 'a[b-]'i parsed_regex: 'a[b-]'i str: A- result_expr: $& expected_results A- -46_y: OK regex: 'a]'i parsed_regex: 'a]'i str: A] result_expr: $& expected_results A] -47_y: OK regex: 'a[]]b'i parsed_regex: 'a[]]b'i str: A]B result_expr: $& expected_results A]B -48_y: OK regex: 'a[^bc]d'i parsed_regex: 'a[^bc]d'i str: AED result_expr: $& expected_results AED -49_n: OK regex: 'a[^bc]d'i parsed_regex: 'a[^bc]d'i str: ABD result_expr: - expected_results - -50_y: OK regex: 'a[^-b]c'i parsed_regex: 'a[^-b]c'i str: ADC result_expr: $& expected_results ADC -51_n: OK regex: 'a[^-b]c'i parsed_regex: 'a[^-b]c'i str: A-C result_expr: - expected_results - -52_n: OK regex: 'a[^]b]c'i parsed_regex: 'a[^]b]c'i str: A]C result_expr: - expected_results - -53_y: OK regex: 'a[^]b]c'i parsed_regex: 'a[^]b]c'i str: ADC result_expr: $& expected_results ADC -54_y: OK regex: 'ab|cd'i parsed_regex: 'ab|cd'i str: ABC result_expr: $& expected_results AB -55_y: OK regex: 'ab|cd'i parsed_regex: 'ab|cd'i str: ABCD result_expr: $& expected_results AB -56_y: OK regex: '()ef'i parsed_regex: '()ef'i str: DEF result_expr: $&-$1 expected_results EF- -57_n: OK regex: '$b'i parsed_regex: '$b'i str: B result_expr: - expected_results - -58_y: OK regex: 'a\(b'i parsed_regex: 'a\(b'i str: A(B result_expr: $&-$1 expected_results A(B- -59_y: OK regex: 'a\(*b'i parsed_regex: 'a\(*b'i str: AB result_expr: $& expected_results AB -60_y: OK regex: 'a\(*b'i parsed_regex: 'a\(*b'i str: A((B result_expr: $& expected_results A((B -61_y: OK regex: 'a\\b'i parsed_regex: 'a\\b'i str: A\B result_expr: $& expected_results A\B -62_y: OK regex: '((a))'i parsed_regex: '((a))'i str: ABC result_expr: $&-$1-$2 expected_results A-A-A -63_y: OK regex: '(a)b(c)'i parsed_regex: '(a)b(c)'i str: ABC result_expr: $&-$1-$2 expected_results ABC-A-C -64_y: OK regex: 'a+b+c'i parsed_regex: 'a+b+c'i str: AABBABC result_expr: $& expected_results ABC -65_y: OK regex: 'a{1,}b{1,}c'i parsed_regex: 'a{1,}b{1,}c'i str: AABBABC result_expr: $& expected_results ABC -66_y: OK regex: 'a.+?c'i parsed_regex: 'a.+?c'i str: ABCABC result_expr: $& expected_results ABC -67_y: OK regex: 'a.*?c'i parsed_regex: 'a.*?c'i str: ABCABC result_expr: $& expected_results ABC -68_y: OK regex: 'a.{0,5}?c'i parsed_regex: 'a.{0,5}?c'i str: ABCABC result_expr: $& expected_results ABC -69_y: OK regex: '(a+|b)*'i parsed_regex: '(a+|b)*'i str: AB result_expr: $&-$1 expected_results AB-B -70_y: OK regex: '(a+|b){0,}'i parsed_regex: '(a+|b){0,}'i str: AB result_expr: $&-$1 expected_results AB-B -71_y: OK regex: '(a+|b)+'i parsed_regex: '(a+|b)+'i str: AB result_expr: $&-$1 expected_results AB-B -72_y: OK regex: '(a+|b){1,}'i parsed_regex: '(a+|b){1,}'i str: AB result_expr: $&-$1 expected_results AB-B -73_y: OK regex: '(a+|b)?'i parsed_regex: '(a+|b)?'i str: AB result_expr: $&-$1 expected_results A-A -74_y: OK regex: '(a+|b){0,1}'i parsed_regex: '(a+|b){0,1}'i str: AB result_expr: $&-$1 expected_results A-A -75_y: OK regex: '(a+|b){0,1}?'i parsed_regex: '(a+|b){0,1}?'i str: AB result_expr: $&-$1 expected_results - -76_y: OK regex: '[^ab]*'i parsed_regex: '[^ab]*'i str: CDE result_expr: $& expected_results CDE -77_n: OK regex: 'abc'i parsed_regex: 'abc'i str: result_expr: - expected_results - -78_y: OK regex: 'a*'i parsed_regex: 'a*'i str: result_expr: $& expected_results -79_y: OK regex: '([abc])*d'i parsed_regex: '([abc])*d'i str: ABBBCD result_expr: $&-$1 expected_results ABBBCD-C -80_y: OK regex: '([abc])*bcd'i parsed_regex: '([abc])*bcd'i str: ABCD result_expr: $&-$1 expected_results ABCD-A -81_y: OK regex: 'a|b|c|d|e'i parsed_regex: 'a|b|c|d|e'i str: E result_expr: $& expected_results E -82_y: OK regex: '(a|b|c|d|e)f'i parsed_regex: '(a|b|c|d|e)f'i str: EF result_expr: $&-$1 expected_results EF-E -83_y: OK regex: 'abcd*efg'i parsed_regex: 'abcd*efg'i str: ABCDEFG result_expr: $& expected_results ABCDEFG -84_y: OK regex: 'ab*'i parsed_regex: 'ab*'i str: XABYABBBZ result_expr: $& expected_results AB -85_y: OK regex: 'ab*'i parsed_regex: 'ab*'i str: XAYABBBZ result_expr: $& expected_results A -86_y: OK regex: '(ab|cd)e'i parsed_regex: '(ab|cd)e'i str: ABCDE result_expr: $&-$1 expected_results CDE-CD -87_y: OK regex: '[abhgefdc]ij'i parsed_regex: '[abhgefdc]ij'i str: HIJ result_expr: $& expected_results HIJ -88_n: OK regex: '^(ab|cd)e'i parsed_regex: '^(ab|cd)e'i str: ABCDE result_expr: x$1y expected_results XY -89_y: OK regex: '(abc|)ef'i parsed_regex: '(abc|)ef'i str: ABCDEF result_expr: $&-$1 expected_results EF- -90_y: OK regex: '(a|b)c*d'i parsed_regex: '(a|b)c*d'i str: ABCD result_expr: $&-$1 expected_results BCD-B -91_y: OK regex: '(ab|ab*)bc'i parsed_regex: '(ab|ab*)bc'i str: ABC result_expr: $&-$1 expected_results ABC-A -92_y: OK regex: 'a([bc]*)c*'i parsed_regex: 'a([bc]*)c*'i str: ABC result_expr: $&-$1 expected_results ABC-BC -93_y: OK regex: 'a([bc]*)(c*d)'i parsed_regex: 'a([bc]*)(c*d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-BC-D -94_y: OK regex: 'a([bc]+)(c*d)'i parsed_regex: 'a([bc]+)(c*d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-BC-D -95_y: OK regex: 'a([bc]*)(c+d)'i parsed_regex: 'a([bc]*)(c+d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-B-CD -96_y: OK regex: 'a[bcd]*dcdcde'i parsed_regex: 'a[bcd]*dcdcde'i str: ADCDCDE result_expr: $& expected_results ADCDCDE -97_n: OK regex: 'a[bcd]+dcdcde'i parsed_regex: 'a[bcd]+dcdcde'i str: ADCDCDE result_expr: - expected_results - -98_y: OK regex: '(ab|a)b*c'i parsed_regex: '(ab|a)b*c'i str: ABC result_expr: $&-$1 expected_results ABC-AB -99_y: OK regex: '((a)(b)c)(d)'i parsed_regex: '((a)(b)c)(d)'i str: ABCD result_expr: $1-$2-$3-$4 expected_results ABC-A-B-D -100_y: OK regex: '[a-zA-Z_][a-zA-Z0-9_]*'i parsed_regex: '[a-zA-Z_][a-zA-Z0-9_]*'i str: ALPHA result_expr: $& expected_results ALPHA -101_y: OK regex: '^a(bc+|b[eh])g|.h$'i parsed_regex: '^a(bc+|b[eh])g|.h$'i str: ABH result_expr: $&-$1 expected_results BH- -102_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: EFFGZ result_expr: $&-$1-$2 expected_results EFFGZ-EFFGZ- -103_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: IJ result_expr: $&-$1-$2 expected_results IJ-IJ-J -104_n: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: EFFG result_expr: - expected_results - -105_n: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: BCDD result_expr: - expected_results - -106_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: REFFGZ result_expr: $&-$1-$2 expected_results EFFGZ-EFFGZ- -107_y: OK regex: '((((((((((a))))))))))'i parsed_regex: '((((((((((a))))))))))'i str: A result_expr: $10 expected_results A -108_y: OK regex: '((((((((((a))))))))))\10'i parsed_regex: '((((((((((a))))))))))\10'i str: AA result_expr: $& expected_results AA -109_y: OK regex: '(((((((((a)))))))))'i parsed_regex: '(((((((((a)))))))))'i str: A result_expr: $& expected_results A -110_n: OK regex: 'multiple words of text'i parsed_regex: 'multiple words of text'i str: UH-UH result_expr: - expected_results - -111_y: OK regex: 'multiple words'i parsed_regex: 'multiple words'i str: MULTIPLE WORDS, YEAH result_expr: $& expected_results MULTIPLE WORDS -112_y: OK regex: '(.*)c(.*)'i parsed_regex: '(.*)c(.*)'i str: ABCDE result_expr: $&-$1-$2 expected_results ABCDE-AB-DE -113_y: OK regex: '\((.*), (.*)\)'i parsed_regex: '\((.*), (.*)\)'i str: (A, B) result_expr: ($2, $1) expected_results (B, A) -114_n: OK regex: '[k]'i parsed_regex: '[k]'i str: AB result_expr: - expected_results - -115_y: OK regex: 'abcd'i parsed_regex: 'abcd'i str: ABCD result_expr: $& expected_results ABCD -116_y: OK regex: 'a(bc)d'i parsed_regex: 'a(bc)d'i str: ABCD result_expr: $1 expected_results BC -117_y: OK regex: 'a[-]?c'i parsed_regex: 'a[-]?c'i str: AC result_expr: $& expected_results AC -118_y: OK regex: '(abc)\1'i parsed_regex: '(abc)\1'i str: ABCABC result_expr: $1 expected_results ABC -119_y: OK regex: '([a-c]*)\1'i parsed_regex: '([a-c]*)\1'i str: ABCABC result_expr: $1 expected_results ABC - diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_13_posessive_modifier.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_13_posessive_modifier.cpp.execution deleted file mode 100644 index 916d1a084..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_13_posessive_modifier.cpp.execution +++ /dev/null @@ -1,50 +0,0 @@ -Running tests_13_posessive_modifier: -01_n: OK regex: a++a parsed_regex: a++a str: aaaaa result_expr: - expected_results - -02_n: OK regex: a*+a parsed_regex: a*+a str: aaaaa result_expr: - expected_results - -03_n: OK regex: a{1,5}+a parsed_regex: a{1,5}+a str: aaaaa result_expr: - expected_results - -04_n: OK regex: a?+a parsed_regex: a?+a str: ab result_expr: - expected_results - -05_y: OK regex: a++b parsed_regex: a++b str: aaaaab result_expr: $& expected_results aaaaab -06_y: OK regex: a*+b parsed_regex: a*+b str: aaaaab result_expr: $& expected_results aaaaab -07_y: OK regex: a{1,5}+b parsed_regex: a{1,5}+b str: aaaaab result_expr: $& expected_results aaaaab -08_y: OK regex: a?+b parsed_regex: a?+b str: ab result_expr: $& expected_results ab -09_n: OK regex: fooa++a parsed_regex: fooa++a str: fooaaaaa result_expr: - expected_results - -10_n: OK regex: fooa*+a parsed_regex: fooa*+a str: fooaaaaa result_expr: - expected_results - -11_n: OK regex: fooa{1,5}+a parsed_regex: fooa{1,5}+a str: fooaaaaa result_expr: - expected_results - -12_n: OK regex: fooa?+a parsed_regex: fooa?+a str: fooab result_expr: - expected_results - -13_y: OK regex: fooa++b parsed_regex: fooa++b str: fooaaaaab result_expr: $& expected_results fooaaaaab -14_y: OK regex: fooa*+b parsed_regex: fooa*+b str: fooaaaaab result_expr: $& expected_results fooaaaaab -15_y: OK regex: fooa{1,5}+b parsed_regex: fooa{1,5}+b str: fooaaaaab result_expr: $& expected_results fooaaaaab -16_y: OK regex: fooa?+b parsed_regex: fooa?+b str: fooab result_expr: $& expected_results fooab -17_n: OK regex: (aA)++(aA) parsed_regex: (aA)++(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA -18_n: OK regex: (aA|bB)++(aA|bB) parsed_regex: (aA|bB)++(aA|bB) str: aAaAbBaAbB result_expr: - expected_results aAaAbBaAbB -19_n: OK regex: (aA)*+(aA) parsed_regex: (aA)*+(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA -20_n: OK regex: (aA|bB)*+(aA|bB) parsed_regex: (aA|bB)*+(aA|bB) str: aAaAbBaAaA result_expr: - expected_results aAaAbBaAaA -21_n: OK regex: (aA){1,5}+(aA) parsed_regex: (aA){1,5}+(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA -22_n: OK regex: (aA|bB){1,5}+(aA|bB) parsed_regex: (aA|bB){1,5}+(aA|bB) str: aAaAbBaAaA result_expr: - expected_results aAaAbBaAaA -23_n: OK regex: (aA)?+(aA) parsed_regex: (aA)?+(aA) str: aAb result_expr: - expected_results aAb -24_n: OK regex: (aA|bB)?+(aA|bB) parsed_regex: (aA|bB)?+(aA|bB) str: bBb result_expr: - expected_results bBb -25_y: OK regex: (aA)++b parsed_regex: (aA)++b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb -26_y: OK regex: (aA|bB)++b parsed_regex: (aA|bB)++b str: aAbBaAaAbBb result_expr: $& expected_results aAbBaAaAbBb -27_y: OK regex: (aA)*+b parsed_regex: (aA)*+b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb -28_y: OK regex: (aA|bB)*+b parsed_regex: (aA|bB)*+b str: bBbBbBbBbBb result_expr: $& expected_results bBbBbBbBbBb -29_y: OK regex: (aA){1,5}+b parsed_regex: (aA){1,5}+b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb -30_y: OK regex: (aA|bB){1,5}+b parsed_regex: (aA|bB){1,5}+b str: bBaAbBaAbBb result_expr: $& expected_results bBaAbBaAbBb -31_y: OK regex: (aA)?+b parsed_regex: (aA)?+b str: aAb result_expr: $& expected_results aAb -32_y: OK regex: (aA|bB)?+b parsed_regex: (aA|bB)?+b str: bBb result_expr: $& expected_results bBb -33_n: OK regex: foo(aA)++(aA) parsed_regex: foo(aA)++(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA -34_n: OK regex: foo(aA|bB)++(aA|bB) parsed_regex: foo(aA|bB)++(aA|bB) str: foobBbBbBaAaA result_expr: - expected_results foobBbBbBaAaA -35_n: OK regex: foo(aA)*+(aA) parsed_regex: foo(aA)*+(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA -36_n: OK regex: foo(aA|bB)*+(aA|bB) parsed_regex: foo(aA|bB)*+(aA|bB) str: foobBaAbBaAaA result_expr: - expected_results foobBaAbBaAaA -37_n: OK regex: foo(aA){1,5}+(aA) parsed_regex: foo(aA){1,5}+(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA -38_n: OK regex: foo(aA|bB){1,5}+(aA|bB) parsed_regex: foo(aA|bB){1,5}+(aA|bB) str: fooaAbBbBaAaA result_expr: - expected_results fooaAbBbBaAaA -39_n: OK regex: foo(aA)?+(aA) parsed_regex: foo(aA)?+(aA) str: fooaAb result_expr: - expected_results fooaAb -40_n: OK regex: foo(aA|bB)?+(aA|bB) parsed_regex: foo(aA|bB)?+(aA|bB) str: foobBb result_expr: - expected_results foobBb -41_y: OK regex: foo(aA)++b parsed_regex: foo(aA)++b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb -42_y: OK regex: foo(aA|bB)++b parsed_regex: foo(aA|bB)++b str: foobBaAbBaAbBb result_expr: $& expected_results foobBaAbBaAbBb -43_y: OK regex: foo(aA)*+b parsed_regex: foo(aA)*+b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb -44_y: OK regex: foo(aA|bB)*+b parsed_regex: foo(aA|bB)*+b str: foobBbBaAaAaAb result_expr: $& expected_results foobBbBaAaAaAb -45_y: OK regex: foo(aA){1,5}+b parsed_regex: foo(aA){1,5}+b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb -46_y: OK regex: foo(aA|bB){1,5}+b parsed_regex: foo(aA|bB){1,5}+b str: foobBaAaAaAaAb result_expr: $& expected_results foobBaAaAaAaAb -47_y: OK regex: foo(aA)?+b parsed_regex: foo(aA)?+b str: fooaAb result_expr: $& expected_results fooaAb -48_y: OK regex: foo(aA|bB)?+b parsed_regex: foo(aA|bB)?+b str: foobBb result_expr: $& expected_results foobBb - diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_13_possessive_modifier.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_13_possessive_modifier.cpp.execution deleted file mode 100644 index 3eaf91fed..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_13_possessive_modifier.cpp.execution +++ /dev/null @@ -1,50 +0,0 @@ -Running tests_13_possessive_modifier: -01_n: OK regex: a++a parsed_regex: a++a str: aaaaa result_expr: - expected_results - -02_n: OK regex: a*+a parsed_regex: a*+a str: aaaaa result_expr: - expected_results - -03_n: OK regex: a{1,5}+a parsed_regex: a{1,5}+a str: aaaaa result_expr: - expected_results - -04_n: OK regex: a?+a parsed_regex: a?+a str: ab result_expr: - expected_results - -05_y: OK regex: a++b parsed_regex: a++b str: aaaaab result_expr: $& expected_results aaaaab -06_y: OK regex: a*+b parsed_regex: a*+b str: aaaaab result_expr: $& expected_results aaaaab -07_y: OK regex: a{1,5}+b parsed_regex: a{1,5}+b str: aaaaab result_expr: $& expected_results aaaaab -08_y: OK regex: a?+b parsed_regex: a?+b str: ab result_expr: $& expected_results ab -09_n: OK regex: fooa++a parsed_regex: fooa++a str: fooaaaaa result_expr: - expected_results - -10_n: OK regex: fooa*+a parsed_regex: fooa*+a str: fooaaaaa result_expr: - expected_results - -11_n: OK regex: fooa{1,5}+a parsed_regex: fooa{1,5}+a str: fooaaaaa result_expr: - expected_results - -12_n: OK regex: fooa?+a parsed_regex: fooa?+a str: fooab result_expr: - expected_results - -13_y: OK regex: fooa++b parsed_regex: fooa++b str: fooaaaaab result_expr: $& expected_results fooaaaaab -14_y: OK regex: fooa*+b parsed_regex: fooa*+b str: fooaaaaab result_expr: $& expected_results fooaaaaab -15_y: OK regex: fooa{1,5}+b parsed_regex: fooa{1,5}+b str: fooaaaaab result_expr: $& expected_results fooaaaaab -16_y: OK regex: fooa?+b parsed_regex: fooa?+b str: fooab result_expr: $& expected_results fooab -17_n: OK regex: (aA)++(aA) parsed_regex: (aA)++(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA -18_n: OK regex: (aA|bB)++(aA|bB) parsed_regex: (aA|bB)++(aA|bB) str: aAaAbBaAbB result_expr: - expected_results aAaAbBaAbB -19_n: OK regex: (aA)*+(aA) parsed_regex: (aA)*+(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA -20_n: OK regex: (aA|bB)*+(aA|bB) parsed_regex: (aA|bB)*+(aA|bB) str: aAaAbBaAaA result_expr: - expected_results aAaAbBaAaA -21_n: OK regex: (aA){1,5}+(aA) parsed_regex: (aA){1,5}+(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA -22_n: OK regex: (aA|bB){1,5}+(aA|bB) parsed_regex: (aA|bB){1,5}+(aA|bB) str: aAaAbBaAaA result_expr: - expected_results aAaAbBaAaA -23_n: OK regex: (aA)?+(aA) parsed_regex: (aA)?+(aA) str: aAb result_expr: - expected_results aAb -24_n: OK regex: (aA|bB)?+(aA|bB) parsed_regex: (aA|bB)?+(aA|bB) str: bBb result_expr: - expected_results bBb -25_y: OK regex: (aA)++b parsed_regex: (aA)++b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb -26_y: OK regex: (aA|bB)++b parsed_regex: (aA|bB)++b str: aAbBaAaAbBb result_expr: $& expected_results aAbBaAaAbBb -27_y: OK regex: (aA)*+b parsed_regex: (aA)*+b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb -28_y: OK regex: (aA|bB)*+b parsed_regex: (aA|bB)*+b str: bBbBbBbBbBb result_expr: $& expected_results bBbBbBbBbBb -29_y: OK regex: (aA){1,5}+b parsed_regex: (aA){1,5}+b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb -30_y: OK regex: (aA|bB){1,5}+b parsed_regex: (aA|bB){1,5}+b str: bBaAbBaAbBb result_expr: $& expected_results bBaAbBaAbBb -31_y: OK regex: (aA)?+b parsed_regex: (aA)?+b str: aAb result_expr: $& expected_results aAb -32_y: OK regex: (aA|bB)?+b parsed_regex: (aA|bB)?+b str: bBb result_expr: $& expected_results bBb -33_n: OK regex: foo(aA)++(aA) parsed_regex: foo(aA)++(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA -34_n: OK regex: foo(aA|bB)++(aA|bB) parsed_regex: foo(aA|bB)++(aA|bB) str: foobBbBbBaAaA result_expr: - expected_results foobBbBbBaAaA -35_n: OK regex: foo(aA)*+(aA) parsed_regex: foo(aA)*+(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA -36_n: OK regex: foo(aA|bB)*+(aA|bB) parsed_regex: foo(aA|bB)*+(aA|bB) str: foobBaAbBaAaA result_expr: - expected_results foobBaAbBaAaA -37_n: OK regex: foo(aA){1,5}+(aA) parsed_regex: foo(aA){1,5}+(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA -38_n: OK regex: foo(aA|bB){1,5}+(aA|bB) parsed_regex: foo(aA|bB){1,5}+(aA|bB) str: fooaAbBbBaAaA result_expr: - expected_results fooaAbBbBaAaA -39_n: OK regex: foo(aA)?+(aA) parsed_regex: foo(aA)?+(aA) str: fooaAb result_expr: - expected_results fooaAb -40_n: OK regex: foo(aA|bB)?+(aA|bB) parsed_regex: foo(aA|bB)?+(aA|bB) str: foobBb result_expr: - expected_results foobBb -41_y: OK regex: foo(aA)++b parsed_regex: foo(aA)++b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb -42_y: OK regex: foo(aA|bB)++b parsed_regex: foo(aA|bB)++b str: foobBaAbBaAbBb result_expr: $& expected_results foobBaAbBaAbBb -43_y: OK regex: foo(aA)*+b parsed_regex: foo(aA)*+b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb -44_y: OK regex: foo(aA|bB)*+b parsed_regex: foo(aA|bB)*+b str: foobBbBaAaAaAb result_expr: $& expected_results foobBbBaAaAaAb -45_y: OK regex: foo(aA){1,5}+b parsed_regex: foo(aA){1,5}+b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb -46_y: OK regex: foo(aA|bB){1,5}+b parsed_regex: foo(aA|bB){1,5}+b str: foobBaAaAaAaAb result_expr: $& expected_results foobBaAaAaAaAb -47_y: OK regex: foo(aA)?+b parsed_regex: foo(aA)?+b str: fooaAb result_expr: $& expected_results fooaAb -48_y: OK regex: foo(aA|bB)?+b parsed_regex: foo(aA|bB)?+b str: foobBb result_expr: $& expected_results foobBb - diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_14_multiline_modifier.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_14_multiline_modifier.cpp.execution deleted file mode 100644 index f75692392..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_14_multiline_modifier.cpp.execution +++ /dev/null @@ -1,201 +0,0 @@ -Running tests_14_multiline_modifier: -01_y: OK regex: \Z parsed_regex: \Z str: a\nb\n result_expr: $-[0] expected_results 3 -02_y: OK regex: \z parsed_regex: \z str: a\nb\n result_expr: $-[0] expected_results 4 -03_y: OK regex: $ parsed_regex: $ str: a\nb\n result_expr: $-[0] expected_results 3 -04_y: OK regex: \Z parsed_regex: \Z str: b\na\n result_expr: $-[0] expected_results 3 -05_y: OK regex: \z parsed_regex: \z str: b\na\n result_expr: $-[0] expected_results 4 -06_y: OK regex: $ parsed_regex: $ str: b\na\n result_expr: $-[0] expected_results 3 -07_y: OK regex: \Z parsed_regex: \Z str: b\na result_expr: $-[0] expected_results 3 -08_y: OK regex: \z parsed_regex: \z str: b\na result_expr: $-[0] expected_results 3 -09_y: OK regex: $ parsed_regex: $ str: b\na result_expr: $-[0] expected_results 3 -10_y: OK regex: '\Z'm parsed_regex: '\Z'm str: a\nb\n result_expr: $-[0] expected_results 3 -11_y: OK regex: '\z'm parsed_regex: '\z'm str: a\nb\n result_expr: $-[0] expected_results 4 -12_y: OK regex: '$'m parsed_regex: '$'m str: a\nb\n result_expr: $-[0] expected_results 1 -13_y: OK regex: '\Z'm parsed_regex: '\Z'm str: b\na\n result_expr: $-[0] expected_results 3 -14_y: OK regex: '\z'm parsed_regex: '\z'm str: b\na\n result_expr: $-[0] expected_results 4 -15_y: OK regex: '$'m parsed_regex: '$'m str: b\na\n result_expr: $-[0] expected_results 1 -16_y: OK regex: '\Z'm parsed_regex: '\Z'm str: b\na result_expr: $-[0] expected_results 3 -17_y: OK regex: '\z'm parsed_regex: '\z'm str: b\na result_expr: $-[0] expected_results 3 -18_y: OK regex: '$'m parsed_regex: '$'m str: b\na result_expr: $-[0] expected_results 1 -19_n: OK regex: a\Z parsed_regex: a\Z str: a\nb\n result_expr: - expected_results - -20_n: OK regex: a\z parsed_regex: a\z str: a\nb\n result_expr: - expected_results - -21_n: OK regex: a$ parsed_regex: a$ str: a\nb\n result_expr: - expected_results - -22_y: OK regex: a\Z parsed_regex: a\Z str: b\na\n result_expr: $-[0] expected_results 2 -23_n: OK regex: a\z parsed_regex: a\z str: b\na\n result_expr: - expected_results - -24_y: OK regex: a$ parsed_regex: a$ str: b\na\n result_expr: $-[0] expected_results 2 -25_y: OK regex: a\Z parsed_regex: a\Z str: b\na result_expr: $-[0] expected_results 2 -26_y: OK regex: a\z parsed_regex: a\z str: b\na result_expr: $-[0] expected_results 2 -27_y: OK regex: a$ parsed_regex: a$ str: b\na result_expr: $-[0] expected_results 2 -28_n: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: a\nb\n result_expr: - expected_results - -29_n: OK regex: 'a\z'm parsed_regex: 'a\z'm str: a\nb\n result_expr: - expected_results - -30_y: OK regex: 'a$'m parsed_regex: 'a$'m str: a\nb\n result_expr: $-[0] expected_results 0 -31_y: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: b\na\n result_expr: $-[0] expected_results 2 -32_n: OK regex: 'a\z'm parsed_regex: 'a\z'm str: b\na\n result_expr: - expected_results - -33_y: OK regex: 'a$'m parsed_regex: 'a$'m str: b\na\n result_expr: $-[0] expected_results 2 -34_y: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: b\na result_expr: $-[0] expected_results 2 -35_y: OK regex: 'a\z'm parsed_regex: 'a\z'm str: b\na result_expr: $-[0] expected_results 2 -36_y: OK regex: 'a$'m parsed_regex: 'a$'m str: b\na result_expr: $-[0] expected_results 2 -37_n: OK regex: aa\Z parsed_regex: aa\Z str: aa\nb\n result_expr: - expected_results - -38_n: OK regex: aa\z parsed_regex: aa\z str: aa\nb\n result_expr: - expected_results - -39_n: OK regex: aa$ parsed_regex: aa$ str: aa\nb\n result_expr: - expected_results - -40_y: OK regex: aa\Z parsed_regex: aa\Z str: b\naa\n result_expr: $-[0] expected_results 2 -41_n: OK regex: aa\z parsed_regex: aa\z str: b\naa\n result_expr: - expected_results - -42_y: OK regex: aa$ parsed_regex: aa$ str: b\naa\n result_expr: $-[0] expected_results 2 -43_y: OK regex: aa\Z parsed_regex: aa\Z str: b\naa result_expr: $-[0] expected_results 2 -44_y: OK regex: aa\z parsed_regex: aa\z str: b\naa result_expr: $-[0] expected_results 2 -45_y: OK regex: aa$ parsed_regex: aa$ str: b\naa result_expr: $-[0] expected_results 2 -46_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: aa\nb\n result_expr: - expected_results - -47_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: aa\nb\n result_expr: - expected_results - -48_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: aa\nb\n result_expr: $-[0] expected_results 0 -49_y: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b\naa\n result_expr: $-[0] expected_results 2 -50_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b\naa\n result_expr: - expected_results - -51_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b\naa\n result_expr: $-[0] expected_results 2 -52_y: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b\naa result_expr: $-[0] expected_results 2 -53_y: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b\naa result_expr: $-[0] expected_results 2 -54_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b\naa result_expr: $-[0] expected_results 2 -55_n: OK regex: aa\Z parsed_regex: aa\Z str: ac\nb\n result_expr: - expected_results - -56_n: OK regex: aa\z parsed_regex: aa\z str: ac\nb\n result_expr: - expected_results - -57_n: OK regex: aa$ parsed_regex: aa$ str: ac\nb\n result_expr: - expected_results - -58_n: OK regex: aa\Z parsed_regex: aa\Z str: b\nac\n result_expr: - expected_results - -59_n: OK regex: aa\z parsed_regex: aa\z str: b\nac\n result_expr: - expected_results - -60_n: OK regex: aa$ parsed_regex: aa$ str: b\nac\n result_expr: - expected_results - -61_n: OK regex: aa\Z parsed_regex: aa\Z str: b\nac result_expr: - expected_results - -62_n: OK regex: aa\z parsed_regex: aa\z str: b\nac result_expr: - expected_results - -63_n: OK regex: aa$ parsed_regex: aa$ str: b\nac result_expr: - expected_results - -64_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: ac\nb\n result_expr: - expected_results - -65_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: ac\nb\n result_expr: - expected_results - -66_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: ac\nb\n result_expr: - expected_results - -67_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b\nac\n result_expr: - expected_results - -68_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b\nac\n result_expr: - expected_results - -69_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b\nac\n result_expr: - expected_results - -70_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b\nac result_expr: - expected_results - -71_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b\nac result_expr: - expected_results - -72_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b\nac result_expr: - expected_results - -73_n: OK regex: aa\Z parsed_regex: aa\Z str: ca\nb\n result_expr: - expected_results - -74_n: OK regex: aa\z parsed_regex: aa\z str: ca\nb\n result_expr: - expected_results - -75_n: OK regex: aa$ parsed_regex: aa$ str: ca\nb\n result_expr: - expected_results - -76_n: OK regex: aa\Z parsed_regex: aa\Z str: b\nca\n result_expr: - expected_results - -77_n: OK regex: aa\z parsed_regex: aa\z str: b\nca\n result_expr: - expected_results - -78_n: OK regex: aa$ parsed_regex: aa$ str: b\nca\n result_expr: - expected_results - -79_n: OK regex: aa\Z parsed_regex: aa\Z str: b\nca result_expr: - expected_results - -80_n: OK regex: aa\z parsed_regex: aa\z str: b\nca result_expr: - expected_results - -81_n: OK regex: aa$ parsed_regex: aa$ str: b\nca result_expr: - expected_results - -82_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: ca\nb\n result_expr: - expected_results - -83_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: ca\nb\n result_expr: - expected_results - -84_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: ca\nb\n result_expr: - expected_results - -85_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b\nca\n result_expr: - expected_results - -86_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b\nca\n result_expr: - expected_results - -87_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b\nca\n result_expr: - expected_results - -88_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b\nca result_expr: - expected_results - -89_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b\nca result_expr: - expected_results - -90_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b\nca result_expr: - expected_results - -91_n: OK regex: ab\Z parsed_regex: ab\Z str: ab\nb\n result_expr: - expected_results - -92_n: OK regex: ab\z parsed_regex: ab\z str: ab\nb\n result_expr: - expected_results - -93_n: OK regex: ab$ parsed_regex: ab$ str: ab\nb\n result_expr: - expected_results - -94_y: OK regex: ab\Z parsed_regex: ab\Z str: b\nab\n result_expr: $-[0] expected_results 2 -95_n: OK regex: ab\z parsed_regex: ab\z str: b\nab\n result_expr: - expected_results - -96_y: OK regex: ab$ parsed_regex: ab$ str: b\nab\n result_expr: $-[0] expected_results 2 -97_y: OK regex: ab\Z parsed_regex: ab\Z str: b\nab result_expr: $-[0] expected_results 2 -98_y: OK regex: ab\z parsed_regex: ab\z str: b\nab result_expr: $-[0] expected_results 2 -99_y: OK regex: ab$ parsed_regex: ab$ str: b\nab result_expr: $-[0] expected_results 2 -100_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ab\nb\n result_expr: - expected_results - -101_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ab\nb\n result_expr: - expected_results - -102_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ab\nb\n result_expr: $-[0] expected_results 0 -103_y: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b\nab\n result_expr: $-[0] expected_results 2 -104_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b\nab\n result_expr: - expected_results - -105_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b\nab\n result_expr: $-[0] expected_results 2 -106_y: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b\nab result_expr: $-[0] expected_results 2 -107_y: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b\nab result_expr: $-[0] expected_results 2 -108_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b\nab result_expr: $-[0] expected_results 2 -109_n: OK regex: ab\Z parsed_regex: ab\Z str: ac\nb\n result_expr: - expected_results - -110_n: OK regex: ab\z parsed_regex: ab\z str: ac\nb\n result_expr: - expected_results - -111_n: OK regex: ab$ parsed_regex: ab$ str: ac\nb\n result_expr: - expected_results - -112_n: OK regex: ab\Z parsed_regex: ab\Z str: b\nac\n result_expr: - expected_results - -113_n: OK regex: ab\z parsed_regex: ab\z str: b\nac\n result_expr: - expected_results - -114_n: OK regex: ab$ parsed_regex: ab$ str: b\nac\n result_expr: - expected_results - -115_n: OK regex: ab\Z parsed_regex: ab\Z str: b\nac result_expr: - expected_results - -116_n: OK regex: ab\z parsed_regex: ab\z str: b\nac result_expr: - expected_results - -117_n: OK regex: ab$ parsed_regex: ab$ str: b\nac result_expr: - expected_results - -118_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ac\nb\n result_expr: - expected_results - -119_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ac\nb\n result_expr: - expected_results - -120_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ac\nb\n result_expr: - expected_results - -121_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b\nac\n result_expr: - expected_results - -122_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b\nac\n result_expr: - expected_results - -123_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b\nac\n result_expr: - expected_results - -124_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b\nac result_expr: - expected_results - -125_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b\nac result_expr: - expected_results - -126_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b\nac result_expr: - expected_results - -127_n: OK regex: ab\Z parsed_regex: ab\Z str: ca\nb\n result_expr: - expected_results - -128_n: OK regex: ab\z parsed_regex: ab\z str: ca\nb\n result_expr: - expected_results - -129_n: OK regex: ab$ parsed_regex: ab$ str: ca\nb\n result_expr: - expected_results - -130_n: OK regex: ab\Z parsed_regex: ab\Z str: b\nca\n result_expr: - expected_results - -131_n: OK regex: ab\z parsed_regex: ab\z str: b\nca\n result_expr: - expected_results - -132_n: OK regex: ab$ parsed_regex: ab$ str: b\nca\n result_expr: - expected_results - -133_n: OK regex: ab\Z parsed_regex: ab\Z str: b\nca result_expr: - expected_results - -134_n: OK regex: ab\z parsed_regex: ab\z str: b\nca result_expr: - expected_results - -135_n: OK regex: ab$ parsed_regex: ab$ str: b\nca result_expr: - expected_results - -136_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ca\nb\n result_expr: - expected_results - -137_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ca\nb\n result_expr: - expected_results - -138_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ca\nb\n result_expr: - expected_results - -139_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b\nca\n result_expr: - expected_results - -140_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b\nca\n result_expr: - expected_results - -141_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b\nca\n result_expr: - expected_results - -142_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b\nca result_expr: - expected_results - -143_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b\nca result_expr: - expected_results - -144_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b\nca result_expr: - expected_results - -145_n: OK regex: abb\Z parsed_regex: abb\Z str: abb\nb\n result_expr: - expected_results - -146_n: OK regex: abb\z parsed_regex: abb\z str: abb\nb\n result_expr: - expected_results - -147_n: OK regex: abb$ parsed_regex: abb$ str: abb\nb\n result_expr: - expected_results - -148_y: OK regex: abb\Z parsed_regex: abb\Z str: b\nabb\n result_expr: $-[0] expected_results 2 -149_n: OK regex: abb\z parsed_regex: abb\z str: b\nabb\n result_expr: - expected_results - -150_y: OK regex: abb$ parsed_regex: abb$ str: b\nabb\n result_expr: $-[0] expected_results 2 -151_y: OK regex: abb\Z parsed_regex: abb\Z str: b\nabb result_expr: $-[0] expected_results 2 -152_y: OK regex: abb\z parsed_regex: abb\z str: b\nabb result_expr: $-[0] expected_results 2 -153_y: OK regex: abb$ parsed_regex: abb$ str: b\nabb result_expr: $-[0] expected_results 2 -154_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: abb\nb\n result_expr: - expected_results - -155_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: abb\nb\n result_expr: - expected_results - -156_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: abb\nb\n result_expr: $-[0] expected_results 0 -157_y: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b\nabb\n result_expr: $-[0] expected_results 2 -158_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b\nabb\n result_expr: - expected_results - -159_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b\nabb\n result_expr: $-[0] expected_results 2 -160_y: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b\nabb result_expr: $-[0] expected_results 2 -161_y: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b\nabb result_expr: $-[0] expected_results 2 -162_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b\nabb result_expr: $-[0] expected_results 2 -163_n: OK regex: abb\Z parsed_regex: abb\Z str: ac\nb\n result_expr: - expected_results - -164_n: OK regex: abb\z parsed_regex: abb\z str: ac\nb\n result_expr: - expected_results - -165_n: OK regex: abb$ parsed_regex: abb$ str: ac\nb\n result_expr: - expected_results - -166_n: OK regex: abb\Z parsed_regex: abb\Z str: b\nac\n result_expr: - expected_results - -167_n: OK regex: abb\z parsed_regex: abb\z str: b\nac\n result_expr: - expected_results - -168_n: OK regex: abb$ parsed_regex: abb$ str: b\nac\n result_expr: - expected_results - -169_n: OK regex: abb\Z parsed_regex: abb\Z str: b\nac result_expr: - expected_results - -170_n: OK regex: abb\z parsed_regex: abb\z str: b\nac result_expr: - expected_results - -171_n: OK regex: abb$ parsed_regex: abb$ str: b\nac result_expr: - expected_results - -172_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: ac\nb\n result_expr: - expected_results - -173_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: ac\nb\n result_expr: - expected_results - -174_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: ac\nb\n result_expr: - expected_results - -175_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b\nac\n result_expr: - expected_results - -176_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b\nac\n result_expr: - expected_results - -177_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b\nac\n result_expr: - expected_results - -178_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b\nac result_expr: - expected_results - -179_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b\nac result_expr: - expected_results - -180_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b\nac result_expr: - expected_results - -181_n: OK regex: abb\Z parsed_regex: abb\Z str: ca\nb\n result_expr: - expected_results - -182_n: OK regex: abb\z parsed_regex: abb\z str: ca\nb\n result_expr: - expected_results - -183_n: OK regex: abb$ parsed_regex: abb$ str: ca\nb\n result_expr: - expected_results - -184_n: OK regex: abb\Z parsed_regex: abb\Z str: b\nca\n result_expr: - expected_results - -185_n: OK regex: abb\z parsed_regex: abb\z str: b\nca\n result_expr: - expected_results - -186_n: OK regex: abb$ parsed_regex: abb$ str: b\nca\n result_expr: - expected_results - -187_n: OK regex: abb\Z parsed_regex: abb\Z str: b\nca result_expr: - expected_results - -188_n: OK regex: abb\z parsed_regex: abb\z str: b\nca result_expr: - expected_results - -189_n: OK regex: abb$ parsed_regex: abb$ str: b\nca result_expr: - expected_results - -190_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: ca\nb\n result_expr: - expected_results - -191_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: ca\nb\n result_expr: - expected_results - -192_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: ca\nb\n result_expr: - expected_results - -193_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b\nca\n result_expr: - expected_results - -194_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b\nca\n result_expr: - expected_results - -195_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b\nca\n result_expr: - expected_results - -196_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b\nca result_expr: - expected_results - -197_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b\nca result_expr: - expected_results - -198_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b\nca result_expr: - expected_results - -199_y: OK regex: '\Aa$'m parsed_regex: '\Aa$'m str: a\n\n result_expr: $& expected_results a - diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_15_group_modifiers.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_15_group_modifiers.cpp.execution deleted file mode 100644 index 825910cc8..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_15_group_modifiers.cpp.execution +++ /dev/null @@ -1,55 +0,0 @@ -Running tests_15_group_modifiers: -01_y: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: ab result_expr: $& expected_results ab -02_y: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: ab result_expr: $&:$1 expected_results ab:a -03_y: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: Ab result_expr: $& expected_results Ab -04_y: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: Ab result_expr: $&:$1 expected_results Ab:A -05_n: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: aB result_expr: - expected_results - -06_n: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: aB result_expr: - expected_results - -07_y: OK regex: (?i:a)b parsed_regex: (?i:a)b str: ab result_expr: $& expected_results ab -08_y: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: ab result_expr: $&:$1 expected_results ab:a -09_y: OK regex: (?i:a)b parsed_regex: (?i:a)b str: Ab result_expr: $& expected_results Ab -10_y: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: Ab result_expr: $&:$1 expected_results Ab:A -11_n: OK regex: (?i:a)b parsed_regex: (?i:a)b str: aB result_expr: - expected_results - -12_n: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: aB result_expr: - expected_results - -13_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: ab result_expr: $& expected_results ab -14_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: ab result_expr: $&:$1 expected_results ab:a -15_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: aB result_expr: $& expected_results aB -16_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: aB result_expr: $&:$1 expected_results aB:a -17_n: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: Ab result_expr: - expected_results - -18_n: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: Ab result_expr: - expected_results - -19_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: aB result_expr: $& expected_results aB -20_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: aB result_expr: $1 expected_results a -21_n: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: AB result_expr: - expected_results - -22_n: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: AB result_expr: - expected_results - -23_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: ab result_expr: $& expected_results ab -24_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: ab result_expr: $&:$1 expected_results ab:a -25_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: aB result_expr: $& expected_results aB -26_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: aB result_expr: $&:$1 expected_results aB:a -27_n: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: Ab result_expr: - expected_results - -28_n: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: Ab result_expr: - expected_results - -29_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: aB result_expr: $& expected_results aB -30_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: aB result_expr: $1 expected_results a -31_n: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: AB result_expr: - expected_results - -32_n: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: AB result_expr: - expected_results - -33_n: OK regex: '((?-i:a.))b'i parsed_regex: '((?-i:a.))b'i str: a\nB result_expr: - expected_results - -34_n: OK regex: '((?-i:a\N))b'i parsed_regex: '((?-i:a\N))b'i str: a\nB result_expr: - expected_results - -35_y: OK regex: '((?s-i:a.))b'i parsed_regex: '((?s-i:a.))b'i str: a\nB result_expr: $1 expected_results a\n -36_n: OK regex: '((?s-i:a\N))b'i parsed_regex: '((?s-i:a\N))b'i str: a\nB result_expr: - expected_results - -37_n: OK regex: '((?s-i:a.))b'i parsed_regex: '((?s-i:a.))b'i str: B\nB result_expr: - expected_results - -38_n: OK regex: '((?s-i:a\N))b'i parsed_regex: '((?s-i:a\N))b'i str: B\nB result_expr: - expected_results - -39_y: OK regex: (?i:.[b].) parsed_regex: (?i:.[b].) str: abd result_expr: $& expected_results abd -40_y: OK regex: (?i:\N[b]\N) parsed_regex: (?i:\N[b]\N) str: abd result_expr: $& expected_results abd -41_n: OK regex: ^(?:a?b?)*$ parsed_regex: ^(?:a?b?)*$ str: a-- result_expr: - expected_results - -42_y: OK regex: ((?s)^a(.))((?m)^b$) parsed_regex: ((?s)^a(.))((?m)^b$) str: a\nb\nc\n result_expr: $1;$2;$3 expected_results a\n;\n;b -43_y: OK regex: ((?m)^b$) parsed_regex: ((?m)^b$) str: a\nb\nc\n result_expr: $1 expected_results b -44_y: OK regex: (?m)^b parsed_regex: (?m)^b str: a\nb\n result_expr: $& expected_results b -45_y: OK regex: (?m)^(b) parsed_regex: (?m)^(b) str: a\nb\n result_expr: $1 expected_results b -46_y: OK regex: ((?m)^b) parsed_regex: ((?m)^b) str: a\nb\n result_expr: $1 expected_results b -47_y: OK regex: \n((?m)^b) parsed_regex: \n((?m)^b) str: a\nb\n result_expr: $1 expected_results b -48_n: OK regex: ^b parsed_regex: ^b str: a\nb\nc\n result_expr: - expected_results - -49_n: OK regex: ()^b parsed_regex: ()^b str: a\nb\nc\n result_expr: - expected_results - -50_y: OK regex: ((?m)^b) parsed_regex: ((?m)^b) str: a\nb\nc\n result_expr: $1 expected_results b -51_y: OK Warning: Parsed regex does not match. regex: '(foo)'n parsed_regex: '(?:foo)'n str: foobar result_expr: $&-$1 expected_results foo- -52_y: OK Warning: Parsed regex does not match. regex: '(?-n)(foo)(?n)(bar)'n parsed_regex: '(?-n)(foo)(?n)(?:bar)'n str: foobar result_expr: $&-$1-$2 expected_results foobar-foo- -53_y: OK Warning: Parsed regex does not match. regex: '(?-n:(foo)(?n:(bar)))'n parsed_regex: '(?-n:(foo)(?n:(?:bar)))'n str: foobar result_expr: $&-$1-$2 expected_results foobar-foo- - diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_16_perl_syntax_modifier.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_16_perl_syntax_modifier.cpp.execution deleted file mode 100644 index 761720007..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_16_perl_syntax_modifier.cpp.execution +++ /dev/null @@ -1,35 +0,0 @@ -Running tests_16_perl_syntax_modifier: -01_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $& expected_results a -02_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $-[0] expected_results 0 -03_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $+[0] expected_results 1 -04_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $& expected_results abbb -05_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $-[0] expected_results 0 -06_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $+[0] expected_results 4 -07_y: OK Warning: Parsed regex does not match. regex: /a\N c/x parsed_regex: /a\Nc/x str: abc result_expr: $& expected_results abc -08_y: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzc result_expr: $& expected_results axyzc -09_n: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzd result_expr: - expected_results - -10_yS: OK regex: /[a b]/x parsed_regex: /[a b]/x str: result_expr: $& expected_results -11_n: OK regex: /[a b]/xx parsed_regex: /[a b]/xx str: result_expr: - expected_results - -12_y: OK regex: /[a\ b]/xx parsed_regex: /[a\ b]/xx str: result_expr: $& expected_results -13_n: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: a result_expr: - expected_results - -14_n: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: b result_expr: - expected_results - -15_y: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: A result_expr: $& expected_results A -16_yS: OK regex: /(?x:[a b])/xx parsed_regex: /(?x:[a b])/xx str: result_expr: $& expected_results -17_n: OK regex: /(?xx:[a b])/x parsed_regex: /(?xx:[a b])/x str: result_expr: - expected_results - -18_yS: OK regex: /(?x)[a b]/xx parsed_regex: /(?x)[a b]/xx str: result_expr: $& expected_results -19_n: OK regex: /(?xx)[a b]/x parsed_regex: /(?xx)[a b]/x str: result_expr: - expected_results - -20_yS: OK regex: /(?-x:[a b])/xx parsed_regex: /(?-x:[a b])/xx str: result_expr: $& expected_results -21_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $& expected_results a -22_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $-[0] expected_results 0 -23_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $+[0] expected_results 1 -24_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $& expected_results abbb -25_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $-[0] expected_results 0 -26_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $+[0] expected_results 4 -27_y: OK Warning: Parsed regex does not match. regex: /a\N c/x parsed_regex: /a\Nc/x str: abc result_expr: $& expected_results abc -28_y: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzc result_expr: $& expected_results axyzc -29_n: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzd result_expr: - expected_results - -30_y: OK regex: /[#]/ parsed_regex: /[#]/ str: a#b result_expr: $& expected_results # -31_y: OK regex: /[#]b/ parsed_regex: /[#]b/ str: a#b result_expr: $& expected_results #b -32_y: OK regex: /[#]/x parsed_regex: /[#]/x str: a#b result_expr: $& expected_results # -33_y: OK regex: /[#]b/x parsed_regex: /[#]b/x str: a#b result_expr: $& expected_results #b - diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_17_comments.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_17_comments.cpp.execution deleted file mode 100644 index 17c9a5d55..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_17_comments.cpp.execution +++ /dev/null @@ -1,5 +0,0 @@ -Running tests_17_comments: -01_y: OK regex: ^a(?#xxx){3}c parsed_regex: ^a(?#xxx){3}c str: aaac result_expr: $& expected_results aaac -02_y: OK Warning: Parsed regex does not match. regex: '^a (?#xxx) (?#yyy) {3}c'x parsed_regex: '^a(?#xxx)(?#yyy){3}c'x str: aaac result_expr: $& expected_results aaac -03_y: OK Warning: Parsed regex does not match. regex: 'foo # Match foo'x parsed_regex: 'foo'x str: foobar result_expr: $& expected_results foo - diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_18_branch_reset.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_18_branch_reset.cpp.execution deleted file mode 100644 index 1d088ce31..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_18_branch_reset.cpp.execution +++ /dev/null @@ -1,17 +0,0 @@ -Running tests_18_branch_reset: -01_y: OK regex: (?|(a)) parsed_regex: (?|(a)) str: a result_expr: $1-$+ expected_results a-a -02_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: d!o!da result_expr: $1-$2-$3 expected_results !o!-o-a -03_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: aabc result_expr: $1-$2-$3 expected_results a--c -04_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: ixyjp result_expr: $1-$2-$3 expected_results x-y-p -05_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: a result_expr: $1 expected_results a -06_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: b result_expr: $1 expected_results b -07_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: c result_expr: $1 expected_results c -08_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: d result_expr: $1 expected_results d -09_y: OK regex: (.)(?|(.)(.)x|(.)d)(.) parsed_regex: (.)(?|(.)(.)x|(.)d)(.) str: abcde result_expr: $1-$2-$3-$4-$5- expected_results b-c--e-- -10_y: OK regex: (\N)(?|(\N)(\N)x|(\N)d)(\N) parsed_regex: (\N)(?|(\N)(\N)x|(\N)d)(\N) str: abcde result_expr: $1-$2-$3-$4-$5- expected_results b-c--e-- -11_yM: OK regex: (?|(?x)) parsed_regex: (?|(?x)) str: x result_expr: $+{foo} expected_results x -12_yM: OK regex: (?|(?x)|(?y)) parsed_regex: (?|(?x)|(?y)) str: x result_expr: $+{foo} expected_results x -13_yM: OK regex: (?|(?y)|(?x)) parsed_regex: (?|(?y)|(?x)) str: x result_expr: $+{foo} expected_results x -14_yM: OK regex: (?)(?|(?x)) parsed_regex: (?)(?|(?x)) str: x result_expr: $+{foo} expected_results x -15_y: OK regex: (?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(a)) parsed_regex: (?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(a)) str: a result_expr: $& expected_results a - diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_19_lookahead.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_19_lookahead.cpp.execution deleted file mode 100644 index d4c65d951..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_19_lookahead.cpp.execution +++ /dev/null @@ -1,47 +0,0 @@ -Running tests_19_lookahead: -01_y: OK regex: a(?!b). parsed_regex: a(?!b). str: abad result_expr: $& expected_results ad -02_y: OK regex: (?=)a parsed_regex: (?=)a str: a result_expr: $& expected_results a -03_y: OK regex: a(?=d). parsed_regex: a(?=d). str: abad result_expr: $& expected_results ad -04_y: OK regex: a(?=c|d). parsed_regex: a(?=c|d). str: abad result_expr: $& expected_results ad -05_y: OK regex: ^(?:b|a(?=(.)))*\1 parsed_regex: ^(?:b|a(?=(.)))*\1 str: abc result_expr: $& expected_results ab -06_y: OK regex: (?=(a+?))(\1ab) parsed_regex: (?=(a+?))(\1ab) str: aaab result_expr: $2 expected_results aab -07_n: OK regex: ^(?=(a+?))\1ab parsed_regex: ^(?=(a+?))\1ab str: aaab result_expr: - expected_results - -08_y: OK regex: (?=(a+?))(\1ab) parsed_regex: (?=(a+?))(\1ab) str: aaab result_expr: $2 expected_results aab -09_n: OK regex: ^(?=(a+?))\1ab parsed_regex: ^(?=(a+?))\1ab str: aaab result_expr: - expected_results - -10_y: OK regex: (.*)(?=c) parsed_regex: (.*)(?=c) str: abcd result_expr: $1 expected_results ab -11_yB: OK regex: (.*)(?=c)c parsed_regex: (.*)(?=c)c str: abcd result_expr: $1 expected_results ab -12_y: OK regex: (.*)(?=b|c) parsed_regex: (.*)(?=b|c) str: abcd result_expr: $1 expected_results ab -13_y: OK regex: (.*)(?=b|c)c parsed_regex: (.*)(?=b|c)c str: abcd result_expr: $1 expected_results ab -14_y: OK regex: (.*)(?=c|b) parsed_regex: (.*)(?=c|b) str: abcd result_expr: $1 expected_results ab -15_y: OK regex: (.*)(?=c|b)c parsed_regex: (.*)(?=c|b)c str: abcd result_expr: $1 expected_results ab -16_y: OK regex: (.*)(?=[bc]) parsed_regex: (.*)(?=[bc]) str: abcd result_expr: $1 expected_results ab -17_yB: OK regex: (.*)(?=[bc])c parsed_regex: (.*)(?=[bc])c str: abcd result_expr: $1 expected_results ab -18_y: OK regex: (.*?)(?=c) parsed_regex: (.*?)(?=c) str: abcd result_expr: $1 expected_results ab -19_yB: OK regex: (.*?)(?=c)c parsed_regex: (.*?)(?=c)c str: abcd result_expr: $1 expected_results ab -20_y: OK regex: (.*?)(?=b|c) parsed_regex: (.*?)(?=b|c) str: abcd result_expr: $1 expected_results a -21_y: OK regex: (.*?)(?=b|c)c parsed_regex: (.*?)(?=b|c)c str: abcd result_expr: $1 expected_results ab -22_y: OK regex: (.*?)(?=c|b) parsed_regex: (.*?)(?=c|b) str: abcd result_expr: $1 expected_results a -23_y: OK regex: (.*?)(?=c|b)c parsed_regex: (.*?)(?=c|b)c str: abcd result_expr: $1 expected_results ab -24_y: OK regex: (.*?)(?=[bc]) parsed_regex: (.*?)(?=[bc]) str: abcd result_expr: $1 expected_results a -25_yB: OK regex: (.*?)(?=[bc])c parsed_regex: (.*?)(?=[bc])c str: abcd result_expr: $1 expected_results ab -26_y: OK regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) parsed_regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) str: aaaaaaaa result_expr: $1 expected_results aaaaaaa -27_y: OK regex: a(?!b(?!c))(..) parsed_regex: a(?!b(?!c))(..) str: abababc result_expr: $1 expected_results bc -28_y: OK regex: a(?!b(?=a))(..) parsed_regex: a(?!b(?=a))(..) str: abababc result_expr: $1 expected_results bc -37_y: OK regex: X(\w+)(?=\s)|X(\w+) parsed_regex: X(\w+)(?=\s)|X(\w+) str: Xab result_expr: [$1-$2] expected_results [-ab] -38_y: OK regex: ^a*(?=b)b parsed_regex: ^a*(?=b)b str: ab result_expr: $& expected_results ab -39_y: OK regex: '(?!\A)x'm parsed_regex: '(?!\A)x'm str: a\nxb\n result_expr: - expected_results - -40_n: OK regex: '^(o)(?!.*\1)'i parsed_regex: '^(o)(?!.*\1)'i str: Oo result_expr: - expected_results - -41_n: OK regex: .*a(?!(b|cd)*e).*f parsed_regex: .*a(?!(b|cd)*e).*f str: ......abef result_expr: - expected_results - -42_y: OK regex: ^(a*?)(?!(aa|aaaa)*$) parsed_regex: ^(a*?)(?!(aa|aaaa)*$) str: aaaaaaaaaaaaaaaaaaaa result_expr: $1 expected_results a -43_y: OK regex: (?!)+?|(.{2,4}) parsed_regex: (?!)+?|(.{2,4}) str: abcde result_expr: $1 expected_results abcd -44_y: OK regex: ^(a*?)(?!(a{6}|a{5})*$) parsed_regex: ^(a*?)(?!(a{6}|a{5})*$) str: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa result_expr: $+[1] expected_results 12 -45_y: OK regex: a(?!b(?!c(?!d(?!e))))...(.) parsed_regex: a(?!b(?!c(?!d(?!e))))...(.) str: abxabcdxabcde result_expr: $1 expected_results e -46_y: OK regex: X(?!b+(?!(c+)*(?!(c+)*d))).*X parsed_regex: X(?!b+(?!(c+)*(?!(c+)*d))).*X str: aXbbbbbbbcccccccccccccaaaX result_expr: - expected_results - -47_y: OK regex: ((?s).)c(?!.) parsed_regex: ((?s).)c(?!.) str: a\nb\nc\n result_expr: $1 expected_results \n -48_y: OK regex: ((?s).)c(?!.) parsed_regex: ((?s).)c(?!.) str: a\nb\nc\n result_expr: $1:$& expected_results \n:\nc -49_y: OK regex: ((?s)b.)c(?!.) parsed_regex: ((?s)b.)c(?!.) str: a\nb\nc\n result_expr: $1 expected_results b\n -50_y: OK regex: ((?s)b.)c(?!.) parsed_regex: ((?s)b.)c(?!.) str: a\nb\nc\n result_expr: $1:$& expected_results b\n:b\nc -51_y: OK regex: ((?s)b.)c(?!\N) parsed_regex: ((?s)b.)c(?!\N) str: a\nb\nc\n result_expr: $1:$& expected_results b\n:b\nc -52_y: OK regex: '(b.)c(?!\N)'s parsed_regex: '(b.)c(?!\N)'s str: a\nb\nc\n result_expr: $1:$& expected_results b\n:b\nc -53_n: OK regex: a*(?!) parsed_regex: a*(?!) str: aaaab result_expr: - expected_results - - diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-requires-clauses.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-requires-clauses.cpp.execution deleted file mode 100644 index 105d7d9ad..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-requires-clauses.cpp.execution +++ /dev/null @@ -1 +0,0 @@ -100 \ No newline at end of file diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-return-tuple-operator.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-return-tuple-operator.cpp.execution deleted file mode 100644 index a3b7f9a55..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-return-tuple-operator.cpp.execution +++ /dev/null @@ -1,3 +0,0 @@ -12 , 34 -23 , 45 -34 , 56 diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-synthesize-rightshift-and-rightshifteq.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-synthesize-rightshift-and-rightshifteq.cpp.execution deleted file mode 100644 index b8626c4cf..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-synthesize-rightshift-and-rightshifteq.cpp.execution +++ /dev/null @@ -1 +0,0 @@ -4 diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-template-parameter-lists.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-template-parameter-lists.cpp.execution deleted file mode 100644 index 2861a7a20..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-template-parameter-lists.cpp.execution +++ /dev/null @@ -1,4 +0,0 @@ -f1: 2 -f2: 4 -f3: 6 -f4: 8 diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-type-constraints.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-type-constraints.cpp.execution deleted file mode 100644 index 4ca9382bc..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-type-constraints.cpp.execution +++ /dev/null @@ -1,2 +0,0 @@ -satisfies std::regular -fallback diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-type-safety-2-with-inspect-expression.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-type-safety-2-with-inspect-expression.cpp.execution deleted file mode 100644 index 7045a6e79..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-type-safety-2-with-inspect-expression.cpp.execution +++ /dev/null @@ -1,8 +0,0 @@ - double value is not an int - variant value is not an int - any value is not an int - optional value is not an int - int value is 42 - variant value is 1 - any value is 2 - optional value is 3 diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-basics.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-basics.cpp.execution deleted file mode 100644 index 96b31fc42..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-basics.cpp.execution +++ /dev/null @@ -1,27 +0,0 @@ -myclass: implicit from int - data: 1, more: 504 -N::myclass::f with 53 -N::myclass::nested::g -f1: 2 -f2: 4 -f3: 6 -f4: 8 -myclass: explicit from string - data: 99, more: abracadabra -myclass: default - data: 504, more: 3.141590 -myclass: from int and string - data: 77, more: hair1 plugh -x's state before assignments: data: 1, more: 504 -myclass: implicit from int - data: 84, more: 504 -myclass: explicit from string - data: 99, more: syzygy -myclass: implicit from int - data: 84, more: 504 -myclass: explicit from string - data: 99, more: syzygy -myclass: destructor -myclass: destructor -myclass: destructor -myclass: destructor diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-down-upcast.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-down-upcast.cpp.execution deleted file mode 100644 index 20751af06..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-down-upcast.cpp.execution +++ /dev/null @@ -1,24 +0,0 @@ -const foo -const foo -const foo -const foo -foo -foo -Call B const: 0.000000 -Call B const: 0.000000 -Call A const: 0 -Call B const: 0.000000 -Call B const: 0.000000 -Call A const: 0 -Call B mut: 0.000000 -Call B mut: 0.000000 -Call A mut: 0 -Call A const: 0 -Call B const: 0.000000 -Call A const: 0 -Call A const: 0 -Call B const: 0.000000 -Call A const: 0 -Call A mut: 0 -Call B mut: 0.000000 -Call A mut: 0 diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-inheritance.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-inheritance.cpp.execution deleted file mode 100644 index 809430aaa..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-inheritance.cpp.execution +++ /dev/null @@ -1,5 +0,0 @@ -Parsnip checks in for the day's shift -printing: Parsnip lives at 123 Main St. --> [vcall: make_speak] Parsnip cracks a few jokes with a coworker --> [vcall: do_work] Parsnip carries some half-tonne crates of Fe2O3 to cold storage -Tired but satisfied after another successful day, Parsnip checks out and goes home to their family diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-order-independence-and-nesting.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-order-independence-and-nesting.cpp.execution deleted file mode 100644 index cc716cc8c..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-order-independence-and-nesting.cpp.execution +++ /dev/null @@ -1,5 +0,0 @@ -made a safely initialized cycle -leaving call to 'why(5)' -leaving call to 'why(3)' -leaving call to 'why(1)' -hallo welt diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-ordering-via-meta-functions.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-ordering-via-meta-functions.cpp.execution deleted file mode 100644 index 54b3aab09..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-ordering-via-meta-functions.cpp.execution +++ /dev/null @@ -1 +0,0 @@ -less more less diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-smf-and-that-1-provide-everything.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-smf-and-that-1-provide-everything.cpp.execution deleted file mode 100644 index fc5a23bde..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-smf-and-that-1-provide-everything.cpp.execution +++ /dev/null @@ -1,8 +0,0 @@ -Function invoked Call syntax Results ----------------------- ------------ ------------------------------------------------------ -ctor - from string construct [ Henry | 123 Ford Dr. ] -ctor - from string assign [ Clara | 123 Ford Dr. ] -ctor - copy (GENERAL) cp-construct [ Clara | 123 Ford Dr. ] <- [ Clara | 123 Ford Dr. ] -ctor - move mv-construct [ Clara(CM) | 123 Ford Dr. ] <- [ | ] -assign - copy cp-assign [ Clara | 123 Ford Dr.(AC) ] <- [ Clara | 123 Ford Dr. ] -assign - move mv-assign [ Clara | 123 Ford Dr. ] <- [ | ] diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-smf-and-that-2-provide-mvconstruct-and-cpassign.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-smf-and-that-2-provide-mvconstruct-and-cpassign.cpp.execution deleted file mode 100644 index 7cbf0f869..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-smf-and-that-2-provide-mvconstruct-and-cpassign.cpp.execution +++ /dev/null @@ -1,8 +0,0 @@ -Function invoked Call syntax Results ----------------------- ------------ ------------------------------------------------------ -ctor - from string construct [ Henry | 123 Ford Dr. ] -ctor - from string assign [ Clara | 123 Ford Dr. ] -ctor - copy (GENERAL) cp-construct [ Clara | 123 Ford Dr. ] <- [ Clara | 123 Ford Dr. ] -ctor - move mv-construct [ Clara(CM) | 123 Ford Dr. ] <- [ | ] -assign - copy cp-assign [ Clara | 123 Ford Dr.(AC) ] <- [ Clara | 123 Ford Dr. ] -assign - copy mv-assign [ Clara | 123 Ford Dr.(AC) ] <- [ | ] diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp.execution deleted file mode 100644 index 541b2a0d9..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp.execution +++ /dev/null @@ -1,8 +0,0 @@ -Function invoked Call syntax Results ----------------------- ------------ ------------------------------------------------------ -ctor - from string construct [ Henry | 123 Ford Dr. ] -ctor - from string assign [ Clara | 123 Ford Dr. ] -ctor - copy (GENERAL) cp-construct [ Clara | 123 Ford Dr. ] <- [ Clara | 123 Ford Dr. ] -ctor - move mv-construct [ Clara(CM) | 123 Ford Dr. ] <- [ | ] -ctor - copy (GENERAL) cp-assign [ Clara | 123 Ford Dr. ] <- [ Clara | 123 Ford Dr. ] -assign - move mv-assign [ Clara | 123 Ford Dr. ] <- [ | ] diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-smf-and-that-4-provide-cpassign-and-mvassign.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-smf-and-that-4-provide-cpassign-and-mvassign.cpp.execution deleted file mode 100644 index 24d4e763a..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-smf-and-that-4-provide-cpassign-and-mvassign.cpp.execution +++ /dev/null @@ -1,8 +0,0 @@ -Function invoked Call syntax Results ----------------------- ------------ ------------------------------------------------------ -ctor - from string construct [ Henry | 123 Ford Dr. ] -ctor - from string assign [ Clara | 123 Ford Dr. ] -ctor - copy (GENERAL) cp-construct [ Clara | 123 Ford Dr. ] <- [ Clara | 123 Ford Dr. ] -ctor - copy (GENERAL) mv-construct [ Clara | 123 Ford Dr. ] <- [ | ] -assign - copy cp-assign [ Clara | 123 Ford Dr.(AC) ] <- [ Clara | 123 Ford Dr. ] -assign - move mv-assign [ Clara | 123 Ford Dr. ] <- [ | ] diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-smf-and-that-5-provide-nothing-but-general-case.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-smf-and-that-5-provide-nothing-but-general-case.cpp.execution deleted file mode 100644 index c387c0371..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-smf-and-that-5-provide-nothing-but-general-case.cpp.execution +++ /dev/null @@ -1,8 +0,0 @@ -Function invoked Call syntax Results ----------------------- ------------ ------------------------------------------------------ -ctor - from string construct [ Henry | 123 Ford Dr. ] -ctor - from string assign [ Clara | 123 Ford Dr. ] -ctor - copy (GENERAL) cp-construct [ Clara | 123 Ford Dr. ] <- [ Clara | 123 Ford Dr. ] -ctor - copy (GENERAL) mv-construct [ Clara | 123 Ford Dr. ] <- [ | ] -ctor - copy (GENERAL) cp-assign [ Clara | 123 Ford Dr. ] <- [ Clara | 123 Ford Dr. ] -ctor - copy (GENERAL) mv-assign [ Clara | 123 Ford Dr. ] <- [ | ] diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-that-parameters.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-that-parameters.cpp.execution deleted file mode 100644 index abd49e623..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-that-parameters.cpp.execution +++ /dev/null @@ -1,7 +0,0 @@ -name 'Henry', addr '123 Ford Dr.' ------ -name 'Henry', addr '123 Ford Dr.' -name 'Henry', addr '123 Ford Dr.' ------ -name '', addr '' -name 'Henry', addr '123 Ford Dr.' diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-value-types-via-meta-functions.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-value-types-via-meta-functions.cpp.execution deleted file mode 100644 index daee7bf51..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-value-types-via-meta-functions.cpp.execution +++ /dev/null @@ -1 +0,0 @@ -less less less \ No newline at end of file diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-union.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-union.cpp.execution deleted file mode 100644 index e52daad8e..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-union.cpp.execution +++ /dev/null @@ -1,4 +0,0 @@ -sizeof(x) - alignof(x) == max(sizeof(fields)) is true -(not a name) -xyz -42 \ No newline at end of file diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-unsafe.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-unsafe.cpp.execution deleted file mode 100644 index 705506a60..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-unsafe.cpp.execution +++ /dev/null @@ -1 +0,0 @@ -plugh \ No newline at end of file diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/xyzzy b/regression-tests/test-results/clang-18-c++23-libcpp/xyzzy deleted file mode 100644 index 805bcb853..000000000 --- a/regression-tests/test-results/clang-18-c++23-libcpp/xyzzy +++ /dev/null @@ -1 +0,0 @@ -Hello Fred with UFCS! \ No newline at end of file diff --git a/regression-tests/test-results/clang-18-c++20/clang-version.output b/regression-tests/test-results/clang-19-c++20/clang-version.output similarity index 100% rename from regression-tests/test-results/clang-18-c++20/clang-version.output rename to regression-tests/test-results/clang-19-c++20/clang-version.output diff --git a/regression-tests/test-results/apple-clang-14-c++2b/mixed-allcpp1-hello.cpp.execution b/regression-tests/test-results/clang-19-c++20/mixed-allcpp1-hello.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/mixed-allcpp1-hello.cpp.execution rename to regression-tests/test-results/clang-19-c++20/mixed-allcpp1-hello.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/mixed-as-for-variant-20-types.cpp.execution b/regression-tests/test-results/clang-19-c++20/mixed-as-for-variant-20-types.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/mixed-as-for-variant-20-types.cpp.execution rename to regression-tests/test-results/clang-19-c++20/mixed-as-for-variant-20-types.cpp.execution diff --git a/regression-tests/test-results/clang-19-c++20/mixed-autodiff-taylor.cpp.execution b/regression-tests/test-results/clang-19-c++20/mixed-autodiff-taylor.cpp.execution new file mode 100644 index 000000000..0a486b06f --- /dev/null +++ b/regression-tests/test-results/clang-19-c++20/mixed-autodiff-taylor.cpp.execution @@ -0,0 +1,63 @@ +x + x = 4.000000 +x + x diff order 1 = 2.000000 +x + x diff order 2 = 0.000000 +x + x diff order 3 = 0.000000 +x + x diff order 4 = 0.000000 +x + x diff order 5 = 0.000000 +x + x diff order 6 = 0.000000 +0 - x = -2.000000 +0 - x diff order 1 = -1.000000 +0 - x diff order 2 = 0.000000 +0 - x diff order 3 = 0.000000 +0 - x diff order 4 = 0.000000 +0 - x diff order 5 = 0.000000 +0 - x diff order 6 = 0.000000 +x^7 = 128.000000 +x^7 diff order 1 = 448.000000 +x^7 diff order 2 = 1344.000000 +x^7 diff order 3 = 3360.000000 +x^7 diff order 4 = 6720.000000 +x^7 diff order 5 = 10080.000000 +x^7 diff order 6 = 10080.000000 +1/x = 0.500000 +1/x diff order 1 = -0.250000 +1/x diff order 2 = 0.250000 +1/x diff order 3 = -0.375000 +1/x diff order 4 = 0.750000 +1/x diff order 5 = -1.875000 +1/x diff order 6 = 5.625000 +sqrt(x) = 1.414214 +sqrt(x) diff order 1 = 0.353553 +sqrt(x) diff order 2 = -0.088388 +sqrt(x) diff order 3 = 0.066291 +sqrt(x) diff order 4 = -0.082864 +sqrt(x) diff order 5 = 0.145012 +sqrt(x) diff order 6 = -0.326277 +log(x) = 0.693147 +log(x) diff order 1 = 0.500000 +log(x) diff order 2 = -0.250000 +log(x) diff order 3 = 0.250000 +log(x) diff order 4 = -0.375000 +log(x) diff order 5 = 0.750000 +log(x) diff order 6 = -1.875000 +exp(x) = 7.389056 +exp(x) diff order 1 = 7.389056 +exp(x) diff order 2 = 7.389056 +exp(x) diff order 3 = 7.389056 +exp(x) diff order 4 = 7.389056 +exp(x) diff order 5 = 7.389056 +exp(x) diff order 6 = 7.389056 +sin(x) = 0.909297 +sin(x) diff order 1 = -0.416147 +sin(x) diff order 2 = -0.909297 +sin(x) diff order 3 = 0.416147 +sin(x) diff order 4 = 0.909297 +sin(x) diff order 5 = -0.416147 +sin(x) diff order 6 = -0.909297 +cos(x) = -0.416147 +cos(x) diff order 1 = -0.909297 +cos(x) diff order 2 = 0.416147 +cos(x) diff order 3 = 0.909297 +cos(x) diff order 4 = -0.416147 +cos(x) diff order 5 = -0.909297 +cos(x) diff order 6 = 0.416147 diff --git a/regression-tests/test-results/clang-18-c++20/mixed-bounds-check.cpp.execution b/regression-tests/test-results/clang-19-c++20/mixed-bounds-check.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/mixed-bounds-check.cpp.execution rename to regression-tests/test-results/clang-19-c++20/mixed-bounds-check.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/mixed-bounds-safety-with-assert-2.cpp.execution b/regression-tests/test-results/clang-19-c++20/mixed-bounds-safety-with-assert-2.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/mixed-bounds-safety-with-assert-2.cpp.execution rename to regression-tests/test-results/clang-19-c++20/mixed-bounds-safety-with-assert-2.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/mixed-bounds-safety-with-assert.cpp.execution b/regression-tests/test-results/clang-19-c++20/mixed-bounds-safety-with-assert.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/mixed-bounds-safety-with-assert.cpp.execution rename to regression-tests/test-results/clang-19-c++20/mixed-bounds-safety-with-assert.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/mixed-captures-in-expressions-and-postconditions.cpp.execution b/regression-tests/test-results/clang-19-c++20/mixed-captures-in-expressions-and-postconditions.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/mixed-captures-in-expressions-and-postconditions.cpp.execution rename to regression-tests/test-results/clang-19-c++20/mixed-captures-in-expressions-and-postconditions.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/mixed-default-arguments.cpp.execution b/regression-tests/test-results/clang-19-c++20/mixed-default-arguments.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/mixed-default-arguments.cpp.execution rename to regression-tests/test-results/clang-19-c++20/mixed-default-arguments.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/mixed-fixed-type-aliases.cpp.execution b/regression-tests/test-results/clang-19-c++20/mixed-fixed-type-aliases.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/mixed-fixed-type-aliases.cpp.execution rename to regression-tests/test-results/clang-19-c++20/mixed-fixed-type-aliases.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/mixed-float-literals.cpp.execution b/regression-tests/test-results/clang-19-c++20/mixed-float-literals.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/mixed-float-literals.cpp.execution rename to regression-tests/test-results/clang-19-c++20/mixed-float-literals.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/mixed-forwarding.cpp.execution b/regression-tests/test-results/clang-19-c++20/mixed-forwarding.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/mixed-forwarding.cpp.execution rename to regression-tests/test-results/clang-19-c++20/mixed-forwarding.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/mixed-function-expression-and-std-for-each.cpp.execution b/regression-tests/test-results/clang-19-c++20/mixed-function-expression-and-std-for-each.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/mixed-function-expression-and-std-for-each.cpp.execution rename to regression-tests/test-results/clang-19-c++20/mixed-function-expression-and-std-for-each.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/mixed-function-expression-and-std-ranges-for-each-with-capture.cpp.execution b/regression-tests/test-results/clang-19-c++20/mixed-function-expression-and-std-ranges-for-each-with-capture.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/mixed-function-expression-and-std-ranges-for-each-with-capture.cpp.execution rename to regression-tests/test-results/clang-19-c++20/mixed-function-expression-and-std-ranges-for-each-with-capture.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/mixed-function-expression-and-std-ranges-for-each.cpp.execution b/regression-tests/test-results/clang-19-c++20/mixed-function-expression-and-std-ranges-for-each.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/mixed-function-expression-and-std-ranges-for-each.cpp.execution rename to regression-tests/test-results/clang-19-c++20/mixed-function-expression-and-std-ranges-for-each.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/mixed-function-expression-with-pointer-capture.cpp.execution b/regression-tests/test-results/clang-19-c++20/mixed-function-expression-with-pointer-capture.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/mixed-function-expression-with-pointer-capture.cpp.execution rename to regression-tests/test-results/clang-19-c++20/mixed-function-expression-with-pointer-capture.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/mixed-function-expression-with-repeated-capture.cpp.execution b/regression-tests/test-results/clang-19-c++20/mixed-function-expression-with-repeated-capture.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/mixed-function-expression-with-repeated-capture.cpp.execution rename to regression-tests/test-results/clang-19-c++20/mixed-function-expression-with-repeated-capture.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/mixed-hello.cpp.execution b/regression-tests/test-results/clang-19-c++20/mixed-hello.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/mixed-hello.cpp.execution rename to regression-tests/test-results/clang-19-c++20/mixed-hello.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/mixed-increment-decrement.cpp.execution b/regression-tests/test-results/clang-19-c++20/mixed-increment-decrement.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/mixed-increment-decrement.cpp.execution rename to regression-tests/test-results/clang-19-c++20/mixed-increment-decrement.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/mixed-initialization-safety-3-contract-violation.cpp.execution b/regression-tests/test-results/clang-19-c++20/mixed-initialization-safety-3-contract-violation.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/mixed-initialization-safety-3-contract-violation.cpp.execution rename to regression-tests/test-results/clang-19-c++20/mixed-initialization-safety-3-contract-violation.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/mixed-initialization-safety-3.cpp.execution b/regression-tests/test-results/clang-19-c++20/mixed-initialization-safety-3.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/mixed-initialization-safety-3.cpp.execution rename to regression-tests/test-results/clang-19-c++20/mixed-initialization-safety-3.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/mixed-inspect-templates.cpp.execution b/regression-tests/test-results/clang-19-c++20/mixed-inspect-templates.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/mixed-inspect-templates.cpp.execution rename to regression-tests/test-results/clang-19-c++20/mixed-inspect-templates.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/mixed-inspect-values-2.cpp.execution b/regression-tests/test-results/clang-19-c++20/mixed-inspect-values-2.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/mixed-inspect-values-2.cpp.execution rename to regression-tests/test-results/clang-19-c++20/mixed-inspect-values-2.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/mixed-inspect-values.cpp.execution b/regression-tests/test-results/clang-19-c++20/mixed-inspect-values.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/mixed-inspect-values.cpp.execution rename to regression-tests/test-results/clang-19-c++20/mixed-inspect-values.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/mixed-intro-example-three-loops.cpp.execution b/regression-tests/test-results/clang-19-c++20/mixed-intro-example-three-loops.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/mixed-intro-example-three-loops.cpp.execution rename to regression-tests/test-results/clang-19-c++20/mixed-intro-example-three-loops.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/mixed-intro-for-with-counter-include-last.cpp.execution b/regression-tests/test-results/clang-19-c++20/mixed-intro-for-with-counter-include-last.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/mixed-intro-for-with-counter-include-last.cpp.execution rename to regression-tests/test-results/clang-19-c++20/mixed-intro-for-with-counter-include-last.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/mixed-is-as-value-with-variant.cpp.execution b/regression-tests/test-results/clang-19-c++20/mixed-is-as-value-with-variant.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/mixed-is-as-value-with-variant.cpp.execution rename to regression-tests/test-results/clang-19-c++20/mixed-is-as-value-with-variant.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/mixed-is-as-variant.cpp.execution b/regression-tests/test-results/clang-19-c++20/mixed-is-as-variant.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/mixed-is-as-variant.cpp.execution rename to regression-tests/test-results/clang-19-c++20/mixed-is-as-variant.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/mixed-lifetime-safety-and-null-contracts.cpp.execution b/regression-tests/test-results/clang-19-c++20/mixed-lifetime-safety-and-null-contracts.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/mixed-lifetime-safety-and-null-contracts.cpp.execution rename to regression-tests/test-results/clang-19-c++20/mixed-lifetime-safety-and-null-contracts.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/mixed-lifetime-safety-pointer-init-4.cpp.execution b/regression-tests/test-results/clang-19-c++20/mixed-lifetime-safety-pointer-init-4.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/mixed-lifetime-safety-pointer-init-4.cpp.execution rename to regression-tests/test-results/clang-19-c++20/mixed-lifetime-safety-pointer-init-4.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/mixed-multiple-return-values.cpp.execution b/regression-tests/test-results/clang-19-c++20/mixed-multiple-return-values.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/mixed-multiple-return-values.cpp.execution rename to regression-tests/test-results/clang-19-c++20/mixed-multiple-return-values.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/mixed-out-destruction.cpp.execution b/regression-tests/test-results/clang-19-c++20/mixed-out-destruction.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/mixed-out-destruction.cpp.execution rename to regression-tests/test-results/clang-19-c++20/mixed-out-destruction.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/mixed-parameter-passing-generic-out.cpp.execution b/regression-tests/test-results/clang-19-c++20/mixed-parameter-passing-generic-out.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/mixed-parameter-passing-generic-out.cpp.execution rename to regression-tests/test-results/clang-19-c++20/mixed-parameter-passing-generic-out.cpp.execution diff --git a/regression-tests/test-results/clang-19-c++20/mixed-parameter-passing.cpp.execution b/regression-tests/test-results/clang-19-c++20/mixed-parameter-passing.cpp.execution new file mode 100644 index 000000000..256f7e186 --- /dev/null +++ b/regression-tests/test-results/clang-19-c++20/mixed-parameter-passing.cpp.execution @@ -0,0 +1,2 @@ +123 +0 diff --git a/regression-tests/test-results/apple-clang-14-c++2b/mixed-postexpression-with-capture.cpp.execution b/regression-tests/test-results/clang-19-c++20/mixed-postexpression-with-capture.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/mixed-postexpression-with-capture.cpp.execution rename to regression-tests/test-results/clang-19-c++20/mixed-postexpression-with-capture.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/mixed-string-interpolation.cpp.execution b/regression-tests/test-results/clang-19-c++20/mixed-string-interpolation.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/mixed-string-interpolation.cpp.execution rename to regression-tests/test-results/clang-19-c++20/mixed-string-interpolation.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/mixed-test-parens.cpp.execution b/regression-tests/test-results/clang-19-c++20/mixed-test-parens.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/mixed-test-parens.cpp.execution rename to regression-tests/test-results/clang-19-c++20/mixed-test-parens.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/mixed-type-safety-1.cpp.execution b/regression-tests/test-results/clang-19-c++20/mixed-type-safety-1.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/mixed-type-safety-1.cpp.execution rename to regression-tests/test-results/clang-19-c++20/mixed-type-safety-1.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/mixed-ufcs-multiple-template-arguments.cpp.execution b/regression-tests/test-results/clang-19-c++20/mixed-ufcs-multiple-template-arguments.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/mixed-ufcs-multiple-template-arguments.cpp.execution rename to regression-tests/test-results/clang-19-c++20/mixed-ufcs-multiple-template-arguments.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-assert-expected-not-null.cpp.output b/regression-tests/test-results/clang-19-c++20/pure2-assert-expected-not-null.cpp.output similarity index 88% rename from regression-tests/test-results/clang-18-c++20/pure2-assert-expected-not-null.cpp.output rename to regression-tests/test-results/clang-19-c++20/pure2-assert-expected-not-null.cpp.output index ba14d3848..3ac2f431e 100644 --- a/regression-tests/test-results/clang-18-c++20/pure2-assert-expected-not-null.cpp.output +++ b/regression-tests/test-results/clang-19-c++20/pure2-assert-expected-not-null.cpp.output @@ -5,7 +5,7 @@ pure2-assert-expected-not-null.cpp2:7:10: error: no member named 'expected' in n 7 | std::expected ex {4}; | ~~~~~^~~~~~~~ | unexpected -/usr/bin/../lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/exception:110:8: note: 'unexpected' declared here +/usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/exception:110:8: note: 'unexpected' declared here 110 | void unexpected() __attribute__ ((__noreturn__,__cold__)); | ^ pure2-assert-expected-not-null.cpp2:9:193: error: use of undeclared identifier 'ex' @@ -18,7 +18,7 @@ pure2-assert-expected-not-null.cpp2:14:10: error: no member named 'expected' in 14 | std::expected ex {std::unexpected(false)}; | ~~~~~^~~~~~~~ | unexpected -/usr/bin/../lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/exception:110:8: note: 'unexpected' declared here +/usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/exception:110:8: note: 'unexpected' declared here 110 | void unexpected() __attribute__ ((__noreturn__,__cold__)); | ^ pure2-assert-expected-not-null.cpp2:15:52: error: use of undeclared identifier 'ex' diff --git a/regression-tests/test-results/clang-18-c++20/pure2-assert-optional-not-null.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-assert-optional-not-null.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-assert-optional-not-null.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-assert-optional-not-null.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-assert-shared-ptr-not-null.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-assert-shared-ptr-not-null.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-assert-shared-ptr-not-null.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-assert-shared-ptr-not-null.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-assert-unique-ptr-not-null.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-assert-unique-ptr-not-null.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-assert-unique-ptr-not-null.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-assert-unique-ptr-not-null.cpp.execution diff --git a/regression-tests/test-results/clang-19-c++20/pure2-autodiff-higher-order.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-autodiff-higher-order.cpp.execution new file mode 100644 index 000000000..84a5f58de --- /dev/null +++ b/regression-tests/test-results/clang-19-c++20/pure2-autodiff-higher-order.cpp.execution @@ -0,0 +1,240 @@ +diff(x + y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x + y + x) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 7.000000 + d1 = 4.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x - y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = -1.000000 + d1 = -1.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x - y - x) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = -3.000000 + d1 = -2.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x + y - x) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 3.000000 + d1 = 2.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x * y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 6.000000 + d1 = 7.000000 + d2 = 4.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x * y * x) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 12.000000 + d1 = 20.000000 + d2 = 22.000000 + d3 = 12.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x / y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 0.666667 + d1 = -0.111111 + d2 = 0.148148 + d3 = -0.296296 + d4 = 0.790123 + d5 = -2.633745 + d6 = 10.534979 +diff(x / y / y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 0.222222 + d1 = -0.185185 + d2 = 0.296296 + d3 = -0.691358 + d4 = 2.106996 + d5 = -7.901235 + d6 = 35.116598 +diff(x * y / x) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 3.000000 + d1 = 2.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x * (x + y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 10.000000 + d1 = 11.000000 + d2 = 6.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x + x * y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 8.000000 + d1 = 8.000000 + d2 = 4.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(+x + y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(-x + y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 1.000000 + d1 = 1.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x * func(x, y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 10.000000 + d1 = 11.000000 + d2 = 6.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x * func_outer(x, y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 10.000000 + d1 = 11.000000 + d2 = 6.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(sin(x - y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = -0.841471 + d1 = -0.540302 + d2 = 0.841471 + d3 = 0.540302 + d4 = -0.841471 + d5 = -0.540302 + d6 = 0.841471 +diff(if branch) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 2.000000 + d1 = 1.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(if else branch) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 2.000000 + d1 = 1.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(direct return) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(intermediate var) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(intermediate passive var) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(intermediate untyped) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(intermediate default init) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(intermediate no init) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(while loop) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 8.000000 + d1 = 5.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(do while loop) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 8.000000 + d1 = 5.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(for loop) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(tye_outer.a + y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(type_outer.add(y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 diff --git a/regression-tests/test-results/clang-19-c++20/pure2-autodiff.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-autodiff.cpp.execution new file mode 100644 index 000000000..863bd6bd5 --- /dev/null +++ b/regression-tests/test-results/clang-19-c++20/pure2-autodiff.cpp.execution @@ -0,0 +1,46 @@ +diff(x + y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(x + y + x) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 7.000000, r_d = 4.000000) +diff(x - y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = -1.000000, r_d = -1.000000) +diff(x - y - x) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = -3.000000, r_d = -2.000000) +diff(x + y - x) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 3.000000, r_d = 2.000000) +diff(x * y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 6.000000, r_d = 7.000000) +diff(x * y * x) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 12.000000, r_d = 20.000000) +diff(x / y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 0.666667, r_d = -0.111111) +diff(x / y / y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 0.222222, r_d = -0.185185) +diff(x * y / x) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 3.000000, r_d = 2.000000) +diff(x * (x + y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 10.000000, r_d = 11.000000) +diff(x + x * y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 8.000000, r_d = 8.000000) +diff(+x + y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(-x + y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 1.000000, r_d = 1.000000) +diff(x * func(x, y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 10.000000, r_d = 11.000000) +diff(x * func_outer(x, y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 10.000000, r_d = 11.000000) +diff(sin(x - y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = -0.841471, r_d = -0.540302) +diff(if branch) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 2.000000, r_d = 1.000000) +diff(if else branch) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 2.000000, r_d = 1.000000) +diff(direct return) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(intermediate var) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(intermediate passive var) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(intermediate untyped) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(intermediate default init) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(intermediate no init) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(while loop) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 8.000000, r_d = 5.000000) +diff(do while loop) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 8.000000, r_d = 5.000000) +diff(for loop) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(tye_outer.a + y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(type_outer.add(y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(x + y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 5.000000, x_b = 1.000000, y_b = 1.000000) +diff(x + y + x) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 7.000000, x_b = 2.000000, y_b = 1.000000) +diff(x - y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = -1.000000, x_b = 1.000000, y_b = -1.000000) +diff(x - y - x) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = -3.000000, x_b = 0.000000, y_b = -1.000000) +diff(x + y - x) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 3.000000, x_b = 0.000000, y_b = 1.000000) +diff(x * y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 6.000000, x_b = 3.000000, y_b = 2.000000) +diff(x * y * x) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 12.000000, x_b = 12.000000, y_b = 4.000000) +diff(x / y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 0.666667, x_b = 0.333333, y_b = -0.222222) +diff(x / y / y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 0.222222, x_b = 0.111111, y_b = -0.148148) +diff(x * y / x) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 3.000000, x_b = 0.000000, y_b = 1.000000) +diff(x * (x + y)) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 10.000000, x_b = 7.000000, y_b = 2.000000) +diff(x + x * y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 8.000000, x_b = 4.000000, y_b = 2.000000) +diff(sin(x-y)) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = -0.841471, x_b = 0.540302, y_b = -0.540302) +diff(x * func(x-y)) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 10.000000, x_b = 7.000000, y_b = 2.000000) +diff(x * func_outer(x-y)) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 10.000000, x_b = 7.000000, y_b = 2.000000) +2nd order diff of x*x at 2.000000 = 2.000000 diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-bounds-safety-span.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-bounds-safety-span.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-bounds-safety-span.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-bounds-safety-span.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-break-continue.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-break-continue.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-break-continue.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-break-continue.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-bugfix-for-memberwise-base-assignment.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-bugfix-for-memberwise-base-assignment.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-bugfix-for-memberwise-base-assignment.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-bugfix-for-memberwise-base-assignment.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-bugfix-for-template-argument.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-bugfix-for-template-argument.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-bugfix-for-template-argument.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-bugfix-for-template-argument.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-bugfix-for-ufcs-arguments.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-bugfix-for-ufcs-arguments.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-bugfix-for-ufcs-arguments.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-bugfix-for-ufcs-arguments.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-chained-comparisons.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-chained-comparisons.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-chained-comparisons.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-chained-comparisons.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-contracts.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-contracts.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-contracts.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-contracts.cpp.execution diff --git a/regression-tests/test-results/clang-19-c++20/pure2-default-arguments.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-default-arguments.cpp.execution new file mode 100644 index 000000000..1c40c551d --- /dev/null +++ b/regression-tests/test-results/clang-19-c++20/pure2-default-arguments.cpp.execution @@ -0,0 +1,4 @@ +calling: int main(const int, char **) +012 +a newer compiler +1, 1, 66 diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-defaulted-comparisons-and-final-types.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-defaulted-comparisons-and-final-types.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-defaulted-comparisons-and-final-types.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-defaulted-comparisons-and-final-types.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-enum.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-enum.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-enum.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-enum.cpp.execution diff --git a/regression-tests/test-results/clang-19-c++20/pure2-expected-is-as.cpp.output b/regression-tests/test-results/clang-19-c++20/pure2-expected-is-as.cpp.output new file mode 100644 index 000000000..f50a444ec --- /dev/null +++ b/regression-tests/test-results/clang-19-c++20/pure2-expected-is-as.cpp.output @@ -0,0 +1,245 @@ +pure2-expected-is-as.cpp2:7:22: error: expected '(' for function-style cast or type construction + 7 | std::expected ex1 {123}; + | ~~~^ +pure2-expected-is-as.cpp2:7:10: error: no member named 'expected' in namespace 'std'; did you mean 'unexpected'? + 7 | std::expected ex1 {123}; + | ~~~~~^~~~~~~~ + | unexpected +/usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/exception:110:8: note: 'unexpected' declared here + 110 | void unexpected() __attribute__ ((__noreturn__,__cold__)); + | ^ +pure2-expected-is-as.cpp2:8:22: error: expected '(' for function-style cast or type construction + 8 | std::expected ex2 {std::unexpected(-1)}; + | ~~~^ +pure2-expected-is-as.cpp2:8:10: error: no member named 'expected' in namespace 'std'; did you mean 'unexpected'? + 8 | std::expected ex2 {std::unexpected(-1)}; + | ~~~~~^~~~~~~~ + | unexpected +/usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/exception:110:8: note: 'unexpected' declared here + 110 | void unexpected() __attribute__ ((__noreturn__,__cold__)); + | ^ +pure2-expected-is-as.cpp2:9:30: error: expected '(' for function-style cast or type construction + 9 | std::expected ex3 {"Expect the unexpected"}; + | ~~~~~~~~~~~^ +pure2-expected-is-as.cpp2:9:10: error: no member named 'expected' in namespace 'std'; did you mean 'unexpected'? + 9 | std::expected ex3 {"Expect the unexpected"}; + | ~~~~~^~~~~~~~ + | unexpected +/usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/exception:110:8: note: 'unexpected' declared here + 110 | void unexpected() __attribute__ ((__noreturn__,__cold__)); + | ^ +pure2-expected-is-as.cpp2:11:29: error: use of undeclared identifier 'ex1'; did you mean 'exp'? + 11 | if (cpp2::impl::is(ex1)) { + | ^~~ + | exp +/usr/include/x86_64-linux-gnu/bits/mathcalls.h:95:17: note: 'exp' declared here + 95 | __MATHCALL_VEC (exp,, (_Mdouble_ __x)); + | ^ +pure2-expected-is-as.cpp2:15:30: error: use of undeclared identifier 'ex1'; did you mean 'exp'? + 15 | if (cpp2::impl::is(ex1)) { + | ^~~ + | exp +/usr/include/x86_64-linux-gnu/bits/mathcalls.h:95:17: note: 'exp' declared here + 95 | __MATHCALL_VEC (exp,, (_Mdouble_ __x)); + | ^ +pure2-expected-is-as.cpp2:20:30: error: use of undeclared identifier 'ex1'; did you mean 'exp'? + 20 | if (cpp2::impl::is(ex1)) { + | ^~~ + | exp +/usr/include/x86_64-linux-gnu/bits/mathcalls.h:95:17: note: 'exp' declared here + 95 | __MATHCALL_VEC (exp,, (_Mdouble_ __x)); + | ^ +pure2-expected-is-as.cpp2:25:29: warning: 'unexpected' is deprecated [-Wdeprecated-declarations] + 25 | if (cpp2::impl::is>(ex1)) { + | ^ +/usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/exception:109:3: note: 'unexpected' has been explicitly marked deprecated here + 109 | _GLIBCXX11_DEPRECATED + | ^ +/usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/x86_64-linux-gnu/c++/14/bits/c++config.h:107:32: note: expanded from macro '_GLIBCXX11_DEPRECATED' + 107 | # define _GLIBCXX11_DEPRECATED _GLIBCXX_DEPRECATED + | ^ +/usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/x86_64-linux-gnu/c++/14/bits/c++config.h:98:46: note: expanded from macro '_GLIBCXX_DEPRECATED' + 98 | # define _GLIBCXX_DEPRECATED __attribute__ ((__deprecated__)) + | ^ +pure2-expected-is-as.cpp2:25:29: error: 'unexpected' does not name a template but is followed by template arguments + 25 | if (cpp2::impl::is>(ex1)) { + | ^ ~~~~~ +/usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/exception:110:8: note: non-template declaration found by name lookup + 110 | void unexpected() __attribute__ ((__noreturn__,__cold__)); + | ^ +pure2-expected-is-as.cpp2:25:46: error: use of undeclared identifier 'ex1'; did you mean 'exp'? + 25 | if (cpp2::impl::is>(ex1)) { + | ^~~ + | exp +/usr/include/x86_64-linux-gnu/bits/mathcalls.h:95:17: note: 'exp' declared here + 95 | __MATHCALL_VEC (exp,, (_Mdouble_ __x)); + | ^ +pure2-expected-is-as.cpp2:30:24: error: use of undeclared identifier 'ex1'; did you mean 'exp'? + 30 | if (cpp2::impl::is(ex1, 123)) { + | ^~~ + | exp +/usr/include/x86_64-linux-gnu/bits/mathcalls.h:95:17: note: 'exp' declared here + 95 | __MATHCALL_VEC (exp,, (_Mdouble_ __x)); + | ^ +pure2-expected-is-as.cpp2:34:24: error: use of undeclared identifier 'ex1'; did you mean 'exp'? + 34 | if (cpp2::impl::is(ex1, 100)) { + | ^~~ + | exp +/usr/include/x86_64-linux-gnu/bits/mathcalls.h:95:17: note: 'exp' declared here + 95 | __MATHCALL_VEC (exp,, (_Mdouble_ __x)); + | ^ +In file included from pure2-expected-is-as.cpp:7: +../../../include/cpp2util.h:475:72: error: invalid application of 'sizeof' to a function type + 475 | (std::is_floating_point_v && std::is_floating_point_v && sizeof(From) > sizeof(To)) || // NOLINT(misc-redundant-expression) + | ^~~~~~~~~~~~ +../../../include/cpp2util.h:2929:19: note: in instantiation of variable template specialization 'cpp2::impl::is_narrowing_v' requested here + 2929 | if constexpr (is_narrowing_v) { + | ^ +pure2-expected-is-as.cpp2:39:28: note: in instantiation of function template specialization 'cpp2::impl::as_' requested here + 39 | auto val1 {cpp2::impl::as_(ex1)}; + | ^ +In file included from pure2-expected-is-as.cpp:7: +../../../include/cpp2util.h:2931:13: error: static assertion failed due to requirement 'program_violates_type_safety_guarantee': 'as' does not allow unsafe possibly-lossy narrowing conversions - if you're sure you want this, use 'unchecked_narrow' to explicitly force the conversion and possibly lose information + 2931 | program_violates_type_safety_guarantee, + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +pure2-expected-is-as.cpp2:39:28: note: in instantiation of function template specialization 'cpp2::impl::as_' requested here + 39 | auto val1 {cpp2::impl::as_(ex1)}; + | ^ +In file included from pure2-expected-is-as.cpp:7: +../../../include/cpp2util.h:2942:52: error: no matching function for call to 'as' + 2942 | else if constexpr( std::is_same_v< CPP2_TYPEOF(as(CPP2_FORWARD(x))), nonesuch_ > ) { + | ^~~~~ +../../../include/cpp2util.h:323:66: note: expanded from macro 'CPP2_TYPEOF' + 323 | #define CPP2_TYPEOF(x) std::remove_cvref_t + | ^ +../../../include/cpp2util.h:1907:16: note: candidate template ignored: constraints not satisfied [with C = int, x:auto = double (&)(double) noexcept] + 1907 | constexpr auto as(auto&& x CPP2_SOURCE_LOCATION_PARAM_WITH_DEFAULT_AS) -> decltype(auto) + | ^ +../../../include/cpp2util.h:1913:18: note: because 'std::is_scalar_v >' evaluated to false + 1913 | (std::is_scalar_v && !std::is_enum_v) + | ^ +../../../include/cpp2util.h:1914:17: note: and 'std::is_floating_point_v >' evaluated to false + 1914 | || std::is_floating_point_v + | ^ +../../../include/cpp2util.h:1915:17: note: and 'std::is_base_of_v >' evaluated to false + 1915 | || std::is_base_of_v + | ^ +../../../include/cpp2util.h:1916:17: note: and 'std::is_base_of_v, int>' evaluated to false + 1916 | || std::is_base_of_v + | ^ +../../../include/cpp2util.h:1917:30: note: and 'C{std::forward(x)}' would be invalid: cannot initialize a value of type 'int' with an lvalue of type 'double (double) noexcept' + 1917 | || requires { C{CPP2_FORWARD(x)}; } + | ^ +../../../include/cpp2util.h:333:37: note: expanded from macro 'CPP2_FORWARD' + 333 | #define CPP2_FORWARD(x) std::forward(x) + | ^ +../../../include/cpp2util.h:2046:6: note: candidate template ignored: constraints not satisfied [with C = int, X = double (&)(double) noexcept] + 2046 | auto as(X&& x CPP2_SOURCE_LOCATION_PARAM_WITH_DEFAULT_AS) -> decltype(auto) + | ^ +../../../include/cpp2util.h:2045:23: note: because 'specialization_of_template' evaluated to false + 2045 | template< typename C, specialization_of_template X > + | ^ +../../../include/cpp2util.h:897:7: note: because 'specialization_of_template_helper(std::forward(x))' would be invalid: no matching function for call to 'specialization_of_template_helper' + 897 | { specialization_of_template_helper(std::forward(x)) } -> std::same_as; + | ^ +../../../include/cpp2util.h:2093:16: note: candidate template ignored: constraints not satisfied [with T = int, X = double (&)(double) noexcept] + 2093 | constexpr auto as( X && x ) -> decltype(auto) { + | ^ +../../../include/cpp2util.h:2092:22: note: because 'same_type_as' evaluated to false + 2092 | template X> + | ^ +../../../include/cpp2util.h:927:24: note: because 'std::same_as, std::remove_cvref_t >' evaluated to false + 927 | concept same_type_as = std::same_as, std::remove_cvref_t>; + | ^ +/usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/concepts:63:9: note: because '__detail::__same_as' evaluated to false + 63 | = __detail::__same_as<_Tp, _Up> && __detail::__same_as<_Up, _Tp>; + | ^ +/usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/concepts:57:27: note: because 'std::is_same_v' evaluated to false + 57 | concept __same_as = std::is_same_v<_Tp, _Up>; + | ^ +../../../include/cpp2util.h:2136:16: note: candidate template ignored: constraints not satisfied [with T = int, X = double (&)(double) noexcept] + 2136 | constexpr auto as( X&& x ) -> decltype(auto) { + | ^ +../../../include/cpp2util.h:2135:22: note: because 'specialization_of_template' evaluated to false + 2135 | template X> + | ^ +../../../include/cpp2util.h:897:7: note: because 'specialization_of_template_helper(std::forward(x))' would be invalid: no matching function for call to 'specialization_of_template_helper' + 897 | { specialization_of_template_helper(std::forward(x)) } -> std::same_as; + | ^ +../../../include/cpp2util.h:1882:16: note: candidate function template not viable: requires 0 arguments, but 1 was provided + 1882 | constexpr auto as() -> auto + | ^ +../../../include/cpp2util.h:1893:16: note: candidate function template not viable: requires 0 arguments, but 1 was provided + 1893 | constexpr auto as() -> auto + | ^ +../../../include/cpp2util.h:2944:13: error: static assertion failed due to requirement 'program_violates_type_safety_guarantee': No safe 'as' cast available - please check your cast + 2944 | program_violates_type_safety_guarantee, + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +../../../include/cpp2util.h:2949:12: error: no matching function for call to 'as' + 2949 | return as(CPP2_FORWARD(x)); + | ^~~~~ +../../../include/cpp2util.h:1907:16: note: candidate template ignored: constraints not satisfied [with C = int, x:auto = double (&)(double) noexcept] + 1907 | constexpr auto as(auto&& x CPP2_SOURCE_LOCATION_PARAM_WITH_DEFAULT_AS) -> decltype(auto) + | ^ +../../../include/cpp2util.h:1913:18: note: because 'std::is_scalar_v >' evaluated to false + 1913 | (std::is_scalar_v && !std::is_enum_v) + | ^ +../../../include/cpp2util.h:1914:17: note: and 'std::is_floating_point_v >' evaluated to false + 1914 | || std::is_floating_point_v + | ^ +../../../include/cpp2util.h:1915:17: note: and 'std::is_base_of_v >' evaluated to false + 1915 | || std::is_base_of_v + | ^ +../../../include/cpp2util.h:1916:17: note: and 'std::is_base_of_v, int>' evaluated to false + 1916 | || std::is_base_of_v + | ^ +../../../include/cpp2util.h:1917:30: note: and 'C{std::forward(x)}' would be invalid: cannot initialize a value of type 'int' with an lvalue of type 'double (double) noexcept' + 1917 | || requires { C{CPP2_FORWARD(x)}; } + | ^ +../../../include/cpp2util.h:333:37: note: expanded from macro 'CPP2_FORWARD' + 333 | #define CPP2_FORWARD(x) std::forward(x) + | ^ +../../../include/cpp2util.h:2046:6: note: candidate template ignored: constraints not satisfied [with C = int, X = double (&)(double) noexcept] + 2046 | auto as(X&& x CPP2_SOURCE_LOCATION_PARAM_WITH_DEFAULT_AS) -> decltype(auto) + | ^ +../../../include/cpp2util.h:2045:23: note: because 'specialization_of_template' evaluated to false + 2045 | template< typename C, specialization_of_template X > + | ^ +../../../include/cpp2util.h:897:7: note: because 'specialization_of_template_helper(std::forward(x))' would be invalid: no matching function for call to 'specialization_of_template_helper' + 897 | { specialization_of_template_helper(std::forward(x)) } -> std::same_as; + | ^ +../../../include/cpp2util.h:2093:16: note: candidate template ignored: constraints not satisfied [with T = int, X = double (&)(double) noexcept] + 2093 | constexpr auto as( X && x ) -> decltype(auto) { + | ^ +../../../include/cpp2util.h:2092:22: note: because 'same_type_as' evaluated to false + 2092 | template X> + | ^ +../../../include/cpp2util.h:927:24: note: because 'std::same_as, std::remove_cvref_t >' evaluated to false + 927 | concept same_type_as = std::same_as, std::remove_cvref_t>; + | ^ +/usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/concepts:63:9: note: because '__detail::__same_as' evaluated to false + 63 | = __detail::__same_as<_Tp, _Up> && __detail::__same_as<_Up, _Tp>; + | ^ +/usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/concepts:57:27: note: because 'std::is_same_v' evaluated to false + 57 | concept __same_as = std::is_same_v<_Tp, _Up>; + | ^ +../../../include/cpp2util.h:2136:16: note: candidate template ignored: constraints not satisfied [with T = int, X = double (&)(double) noexcept] + 2136 | constexpr auto as( X&& x ) -> decltype(auto) { + | ^ +../../../include/cpp2util.h:2135:22: note: because 'specialization_of_template' evaluated to false + 2135 | template X> + | ^ +../../../include/cpp2util.h:897:7: note: because 'specialization_of_template_helper(std::forward(x))' would be invalid: no matching function for call to 'specialization_of_template_helper' + 897 | { specialization_of_template_helper(std::forward(x)) } -> std::same_as; + | ^ +../../../include/cpp2util.h:1882:16: note: candidate function template not viable: requires 0 arguments, but 1 was provided + 1882 | constexpr auto as() -> auto + | ^ +../../../include/cpp2util.h:1893:16: note: candidate function template not viable: requires 0 arguments, but 1 was provided + 1893 | constexpr auto as() -> auto + | ^ +pure2-expected-is-as.cpp2:39:37: error: use of undeclared identifier 'ex1' + 39 | auto val1 {cpp2::impl::as_(ex1)}; + | ^ +fatal error: too many errors emitted, stopping now [-ferror-limit=] +1 warning and 20 errors generated. diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-for-loop-range-with-lambda.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-for-loop-range-with-lambda.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-for-loop-range-with-lambda.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-for-loop-range-with-lambda.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-forward-return.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-forward-return.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-forward-return.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-forward-return.cpp.execution diff --git a/regression-tests/test-results/clang-19-c++20/pure2-function-body-reflection.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-function-body-reflection.cpp.execution new file mode 100644 index 000000000..d2076f3f7 --- /dev/null +++ b/regression-tests/test-results/clang-19-c++20/pure2-function-body-reflection.cpp.execution @@ -0,0 +1 @@ +calling generated function ns::add_1... ns::add_1(42) returned 43 diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-function-multiple-forward-arguments.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-function-multiple-forward-arguments.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-function-multiple-forward-arguments.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-function-multiple-forward-arguments.cpp.execution diff --git a/regression-tests/test-results/clang-19-c++20/pure2-function-single-expression-body-default-return.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-function-single-expression-body-default-return.cpp.execution new file mode 100644 index 000000000..30f4cb910 --- /dev/null +++ b/regression-tests/test-results/clang-19-c++20/pure2-function-single-expression-body-default-return.cpp.execution @@ -0,0 +1 @@ +hi ho hum \ No newline at end of file diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-function-typeids.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-function-typeids.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-function-typeids.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-function-typeids.cpp.execution diff --git a/regression-tests/test-results/clang-19-c++20/pure2-hashable.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-hashable.cpp.execution new file mode 100644 index 000000000..a11f9eb59 --- /dev/null +++ b/regression-tests/test-results/clang-19-c++20/pure2-hashable.cpp.execution @@ -0,0 +1 @@ +6443762454025613088 \ No newline at end of file diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-hello.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-hello.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-hello.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-hello.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-initialization-safety-with-else-if.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-initialization-safety-with-else-if.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-initialization-safety-with-else-if.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-initialization-safety-with-else-if.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-inspect-expression-in-generic-function-multiple-types.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-inspect-expression-in-generic-function-multiple-types.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-inspect-expression-in-generic-function-multiple-types.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-inspect-expression-in-generic-function-multiple-types.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-inspect-expression-with-as-in-generic-function.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-inspect-expression-with-as-in-generic-function.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-inspect-expression-with-as-in-generic-function.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-inspect-expression-with-as-in-generic-function.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-inspect-fallback-with-variant-any-optional.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-inspect-fallback-with-variant-any-optional.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-inspect-fallback-with-variant-any-optional.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-inspect-fallback-with-variant-any-optional.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-inspect-generic-void-empty-with-variant-any-optional.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-inspect-generic-void-empty-with-variant-any-optional.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-inspect-generic-void-empty-with-variant-any-optional.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-inspect-generic-void-empty-with-variant-any-optional.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-interpolation.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-interpolation.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-interpolation.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-interpolation.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-intro-example-hello-2022.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-intro-example-hello-2022.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-intro-example-hello-2022.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-intro-example-hello-2022.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-intro-example-three-loops.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-intro-example-three-loops.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-intro-example-three-loops.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-intro-example-three-loops.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-is-with-free-functions-predicate.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-is-with-free-functions-predicate.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-is-with-free-functions-predicate.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-is-with-free-functions-predicate.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-is-with-polymorphic-types.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-is-with-polymorphic-types.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-is-with-polymorphic-types.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-is-with-polymorphic-types.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-is-with-unnamed-predicates.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-is-with-unnamed-predicates.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-is-with-unnamed-predicates.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-is-with-unnamed-predicates.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-is-with-variable-and-value.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-is-with-variable-and-value.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-is-with-variable-and-value.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-is-with-variable-and-value.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-last-use.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-last-use.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-last-use.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-last-use.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-last-use.cpp.output b/regression-tests/test-results/clang-19-c++20/pure2-last-use.cpp.output similarity index 58% rename from regression-tests/test-results/clang-18-c++23-libcpp/pure2-last-use.cpp.output rename to regression-tests/test-results/clang-19-c++20/pure2-last-use.cpp.output index 4162dcfa1..424b3e98f 100644 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-last-use.cpp.output +++ b/regression-tests/test-results/clang-19-c++20/pure2-last-use.cpp.output @@ -13,8 +13,8 @@ pure2-last-use.cpp2:344:16: error: no template named 'move_only_function' in nam pure2-last-use.cpp2:348:161: error: no member named 'move_only_function' in namespace 'std' 348 | CPP2_REQUIRES_ (std::is_convertible_v>&> && std::is_convertible_v>&> && std::is_convertible_v>&>) ; | ~~~~~^ -../../../include/cpp2util.h:10008:43: note: expanded from macro 'CPP2_REQUIRES_' - 10008 | #define CPP2_REQUIRES_(...) requires (__VA_ARGS__) +../../../include/cpp2util.h:10109:43: note: expanded from macro 'CPP2_REQUIRES_' + 10109 | #define CPP2_REQUIRES_(...) requires (__VA_ARGS__) | ^~~~~~~~~~~ pure2-last-use.cpp2:348:188: error: expected expression 348 | CPP2_REQUIRES_ (std::is_convertible_v>&> && std::is_convertible_v>&> && std::is_convertible_v>&>) ; @@ -49,26 +49,34 @@ pure2-last-use.cpp2:271:7: error: missing '}' at end of definition of 'issue_857 pure2-last-use.cpp2:905:1: note: still within definition of 'issue_857_4' here 905 | namespace captures { | ^ -pure2-last-use.cpp2:279:272: error: no member named 'move_only_function' in namespace 'std' - 279 | requires (std::is_convertible_v>&> && std::is_convertible_v in_)>>&> && std::is_convertible_v>&> && std::is_convertible_v in_)>>&>) - | ~~~~~^ -pure2-last-use.cpp2:279:299: error: expected expression - 279 | requires (std::is_convertible_v>&> && std::is_convertible_v in_)>>&> && std::is_convertible_v>&> && std::is_convertible_v in_)>>&>) - | ^ -pure2-last-use.cpp2:279:304: error: use of address-of-label extension outside of a function body - 279 | requires (std::is_convertible_v>&> && std::is_convertible_v in_)>>&> && std::is_convertible_v>&> && std::is_convertible_v in_)>>&>) - | ^ -pure2-last-use.cpp2:278:14: error: out-of-line definition of 'issue_857_4' does not match any declaration in 'issue_857_4' - 278 | issue_857_4::issue_857_4(auto&& f_, auto&& g_, auto&& mf_, auto&& mg_) - | ^~~~~~~~~~~ -pure2-last-use.cpp2:281:272: error: member initializer 'g' does not name a non-static data member or base class - 281 | , g{ CPP2_FORWARD(g_) } - | ^~~~~~~~~~~~~~~~~~~~~ -pure2-last-use.cpp2:282:272: error: member initializer 'mf' does not name a non-static data member or base class - 282 | , mf{ CPP2_FORWARD(mf_) } - | ^~~~~~~~~~~~~~~~~~~~~~~ -pure2-last-use.cpp2:283:272: error: member initializer 'mg' does not name a non-static data member or base class - 283 | , mg{ CPP2_FORWARD(mg_) }{} - | ^~~~~~~~~~~~~~~~~~~~~~~ -fatal error: too many errors emitted, stopping now [-ferror-limit=] -20 errors generated. +pure2-last-use.cpp2:279:179: error: expected variable name or 'this' in lambda capture list + 279 | requires (std::is_convertible_v>&> && std::is_convertible_v unnamed_param_1)>>&> && std::is_convertible_v>&> && std::is_convertible_v unnamed_param_1)>>&>) + | ^ +pure2-last-use.cpp2:1044:2: error: expected '>' + 1044 | } + | ^ +pure2-last-use.cpp2:279:173: note: to match this '<' + 279 | requires (std::is_convertible_v>&> && std::is_convertible_v unnamed_param_1)>>&> && std::is_convertible_v>&> && std::is_convertible_v unnamed_param_1)>>&>) + | ^ +pure2-last-use.cpp2:1045:1: error: type name requires a specifier or qualifier + 1045 | + | ^ +pure2-last-use.cpp2:1044:2: error: expected '>' + 1044 | } + | ^ +pure2-last-use.cpp2:279:154: note: to match this '<' + 279 | requires (std::is_convertible_v>&> && std::is_convertible_v unnamed_param_1)>>&> && std::is_convertible_v>&> && std::is_convertible_v unnamed_param_1)>>&>) + | ^ +pure2-last-use.cpp2:1045:1: error: type name requires a specifier or qualifier + 1045 | + | ^ +pure2-last-use.cpp2:1044:2: error: expected '>' + 1044 | } + | ^ +pure2-last-use.cpp2:279:120: note: to match this '<' + 279 | requires (std::is_convertible_v>&> && std::is_convertible_v unnamed_param_1)>>&> && std::is_convertible_v>&> && std::is_convertible_v unnamed_param_1)>>&>) + | ^ +pure2-last-use.cpp2:1045:1: error: expected function body after function declarator + 1045 | + | ^ +19 errors generated. diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-look-up-parameter-across-unnamed-function.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-look-up-parameter-across-unnamed-function.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-look-up-parameter-across-unnamed-function.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-look-up-parameter-across-unnamed-function.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-main-args.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-main-args.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-main-args.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-main-args.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-more-wildcards.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-more-wildcards.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-more-wildcards.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-more-wildcards.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-print.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-print.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-print.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-print.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-range-operators.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-range-operators.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-range-operators.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-range-operators.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-raw-string-literal-and-interpolation.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-raw-string-literal-and-interpolation.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-raw-string-literal-and-interpolation.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-raw-string-literal-and-interpolation.cpp.execution diff --git a/regression-tests/test-results/clang-19-c++20/pure2-regex-general.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-regex-general.cpp.execution new file mode 100644 index 000000000..c44d08490 --- /dev/null +++ b/regression-tests/test-results/clang-19-c++20/pure2-regex-general.cpp.execution @@ -0,0 +1,11 @@ +Running tests_01_char_matcher: +Not full match fails: 0 +Full match is ok: 1 +Search finds at position 1: 1 +Search finds at position 3: 3 +Find all finds at position: 1 +Find all finds at position: 4 +Find all finds at position: 7 +Find all found 3 matched: 3 +Find all finds at position: 2 +Find all found 1 match: 1 diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_01_char_matcher.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-regex_01_char_matcher.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_01_char_matcher.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-regex_01_char_matcher.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_02_ranges.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-regex_02_ranges.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_02_ranges.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-regex_02_ranges.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_03_wildcard.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-regex_03_wildcard.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_03_wildcard.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-regex_03_wildcard.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_04_start_end.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-regex_04_start_end.cpp.execution similarity index 89% rename from regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_04_start_end.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-regex_04_start_end.cpp.execution index 6fef36434..a1e2b9b63 100644 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_04_start_end.cpp.execution +++ b/regression-tests/test-results/clang-19-c++20/pure2-regex_04_start_end.cpp.execution @@ -8,4 +8,5 @@ Running tests_04_start_end: 07_y: OK regex: ^ parsed_regex: ^ str: abc result_expr: $& expected_results 08_y: OK regex: $ parsed_regex: $ str: abc result_expr: $& expected_results 09_n: OK regex: $b parsed_regex: $b str: b result_expr: - expected_results - +10_n: OK regex: \GX.*X parsed_regex: \GX.*X str: aaaXbX result_expr: - expected_results - diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_05_classes.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-regex_05_classes.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_05_classes.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-regex_05_classes.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_06_boundaries.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-regex_06_boundaries.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_06_boundaries.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-regex_06_boundaries.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_07_short_classes.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-regex_07_short_classes.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_07_short_classes.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-regex_07_short_classes.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_08_alternatives.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-regex_08_alternatives.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_08_alternatives.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-regex_08_alternatives.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_09_groups.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-regex_09_groups.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_09_groups.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-regex_09_groups.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_10_escapes.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-regex_10_escapes.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_10_escapes.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-regex_10_escapes.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_11_group_references.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-regex_11_group_references.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_11_group_references.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-regex_11_group_references.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_12_case_insensitive.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-regex_12_case_insensitive.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_12_case_insensitive.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-regex_12_case_insensitive.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_13_posessive_modifier.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-regex_13_posessive_modifier.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_13_posessive_modifier.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-regex_13_posessive_modifier.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_13_possessive_modifier.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-regex_13_possessive_modifier.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_13_possessive_modifier.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-regex_13_possessive_modifier.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_14_multiline_modifier.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-regex_14_multiline_modifier.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_14_multiline_modifier.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-regex_14_multiline_modifier.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_15_group_modifiers.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-regex_15_group_modifiers.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_15_group_modifiers.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-regex_15_group_modifiers.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_16_perl_syntax_modifier.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-regex_16_perl_syntax_modifier.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_16_perl_syntax_modifier.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-regex_16_perl_syntax_modifier.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_17_comments.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-regex_17_comments.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_17_comments.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-regex_17_comments.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_18_branch_reset.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-regex_18_branch_reset.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_18_branch_reset.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-regex_18_branch_reset.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_19_lookahead.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-regex_19_lookahead.cpp.execution similarity index 83% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_19_lookahead.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-regex_19_lookahead.cpp.execution index d4c65d951..0f723eb77 100644 --- a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_19_lookahead.cpp.execution +++ b/regression-tests/test-results/clang-19-c++20/pure2-regex_19_lookahead.cpp.execution @@ -27,6 +27,14 @@ Running tests_19_lookahead: 26_y: OK regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) parsed_regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) str: aaaaaaaa result_expr: $1 expected_results aaaaaaa 27_y: OK regex: a(?!b(?!c))(..) parsed_regex: a(?!b(?!c))(..) str: abababc result_expr: $1 expected_results bc 28_y: OK regex: a(?!b(?=a))(..) parsed_regex: a(?!b(?=a))(..) str: abababc result_expr: $1 expected_results bc +29_y: OK regex: (?=foo) parsed_regex: (?=foo) str: foo result_expr: @+ expected_results 0 +30_y: OK regex: (?=foo) parsed_regex: (?=foo) str: XfooY result_expr: @+ expected_results 1 +31_y: OK regex: .*(?=foo) parsed_regex: .*(?=foo) str: XfooY result_expr: @+ expected_results 1 +32_y: OK regex: (?=.*P)P parsed_regex: (?=.*P)P str: aP result_expr: @+ expected_results 2 +33_y: OK regex: X(?=foo)f parsed_regex: X(?=foo)f str: ..XfooY.. result_expr: @+ expected_results 4 +34_y: OK regex: X(?=foo) parsed_regex: X(?=foo) str: ..XfooY.. result_expr: @+ expected_results 3 +35_y: OK regex: (?=XY*foo) parsed_regex: (?=XY*foo) str: Xfoo result_expr: @+ expected_results 0 +36_y: OK regex: ^(?=XY*foo) parsed_regex: ^(?=XY*foo) str: Xfoo result_expr: @+ expected_results 0 37_y: OK regex: X(\w+)(?=\s)|X(\w+) parsed_regex: X(\w+)(?=\s)|X(\w+) str: Xab result_expr: [$1-$2] expected_results [-ab] 38_y: OK regex: ^a*(?=b)b parsed_regex: ^a*(?=b)b str: ab result_expr: $& expected_results ab 39_y: OK regex: '(?!\A)x'm parsed_regex: '(?!\A)x'm str: a\nxb\n result_expr: - expected_results - @@ -44,4 +52,6 @@ Running tests_19_lookahead: 51_y: OK regex: ((?s)b.)c(?!\N) parsed_regex: ((?s)b.)c(?!\N) str: a\nb\nc\n result_expr: $1:$& expected_results b\n:b\nc 52_y: OK regex: '(b.)c(?!\N)'s parsed_regex: '(b.)c(?!\N)'s str: a\nb\nc\n result_expr: $1:$& expected_results b\n:b\nc 53_n: OK regex: a*(?!) parsed_regex: a*(?!) str: aaaab result_expr: - expected_results - +54_y: OK regex: (?)foo parsed_regex: (?)foo str: bar>ABCfoo result_expr: $& expected_results foo +55_y: OK regex: (?ABC)foo parsed_regex: (?ABC)foo str: bar>ABCfoo result_expr: $& expected_results ABCfoo diff --git a/regression-tests/test-results/clang-19-c++20/pure2-regex_20_lookbehind.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-regex_20_lookbehind.cpp.execution new file mode 100644 index 000000000..cd61d4f56 --- /dev/null +++ b/regression-tests/test-results/clang-19-c++20/pure2-regex_20_lookbehind.cpp.execution @@ -0,0 +1,58 @@ +Running tests_20_lookbehind: +01_y: OK regex: (?<=a)b parsed_regex: (?<=a)b str: ab result_expr: $& expected_results b +02_y: OK regex: (?<=af?)b parsed_regex: (?<=af?)b str: ab result_expr: $& expected_results b +03_n: OK regex: (?<=a)b parsed_regex: (?<=a)b str: cb result_expr: - expected_results - +04_n: OK regex: (?<=a(?:fo)?)b parsed_regex: (?<=a(?:fo)?)b str: cb result_expr: - expected_results - +05_n: OK regex: (?<=a)b parsed_regex: (?<=a)b str: b result_expr: - expected_results - +06_n: OK regex: (?<=a(?:foo)?)b parsed_regex: (?<=a(?:foo)?)b str: b result_expr: - expected_results - +07_y: OK regex: (?)foo parsed_regex: (?<=bar>)foo str: bar>foo result_expr: $& expected_results foo +50_n: OK regex: (?)foo parsed_regex: (?)foo str: bar>foo result_expr: - expected_results - +51_y: OK regex: (?<=bar>ABC)foo parsed_regex: (?<=bar>ABC)foo str: bar>ABCfoo result_expr: $& expected_results foo +52_n: OK regex: (?ABC)foo parsed_regex: (?ABC)foo str: bar>ABCfoo result_expr: - expected_results - +53_y: OK regex: (?<=abcd(?<=(aaaabcd))) parsed_regex: (?<=abcd(?<=(aaaabcd))) str: ..aaaabcd.. result_expr: $1 expected_results aaaabcd +54_y: OK regex: (?=xy(?<=(aaxy))) parsed_regex: (?=xy(?<=(aaxy))) str: ..aaxy.. result_expr: $1 expected_results aaxy +55_y: OK regex: (?=xy(?<=(aaxyz?))) parsed_regex: (?=xy(?<=(aaxyz?))) str: ..aaxy.. result_expr: $1 expected_results aaxy +56_y: OK regex: (?<=(?=(aaxy))aa) parsed_regex: (?<=(?=(aaxy))aa) str: ..aaxy.. result_expr: $1 expected_results aaxy + diff --git a/regression-tests/test-results/clang-19-c++20/pure2-regex_21_atomic_patterns.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-regex_21_atomic_patterns.cpp.execution new file mode 100644 index 000000000..4812cfbb8 --- /dev/null +++ b/regression-tests/test-results/clang-19-c++20/pure2-regex_21_atomic_patterns.cpp.execution @@ -0,0 +1,8 @@ +Running tests_21_atomic_patterns: +01_y: OK regex: (?>a+)b parsed_regex: (?>a+)b str: aaab result_expr: - expected_results - +02_y: OK regex: ((?>a+)b) parsed_regex: ((?>a+)b) str: aaab result_expr: $1 expected_results aaab +03_y: OK regex: (?>(a+))b parsed_regex: (?>(a+))b str: aaab result_expr: $1 expected_results aaa +04_y: OK regex: ((?>[^()]+)|\([^()]*\))+ parsed_regex: ((?>[^()]+)|\([^()]*\))+ str: ((abc(ade)ufh()()x result_expr: $& expected_results abc(ade)ufh()()x +05_y: OK regex: round\(((?>[^()]+))\) parsed_regex: round\(((?>[^()]+))\) str: _I(round(xs * sz),1) result_expr: $1 expected_results xs * sz +06_y: OK regex: ^((?>(?:aa)?b)?) parsed_regex: ^((?>(?:aa)?b)?) str: aab result_expr: $1 expected_results aab + diff --git a/regression-tests/test-results/clang-19-c++20/pure2-repeated-call.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-repeated-call.cpp.execution new file mode 100644 index 000000000..d81cc0710 --- /dev/null +++ b/regression-tests/test-results/clang-19-c++20/pure2-repeated-call.cpp.execution @@ -0,0 +1 @@ +42 diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-requires-clauses.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-requires-clauses.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-requires-clauses.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-requires-clauses.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-return-tuple-operator.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-return-tuple-operator.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-return-tuple-operator.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-return-tuple-operator.cpp.execution diff --git a/regression-tests/test-results/clang-19-c++20/pure2-singleton-and-static.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-singleton-and-static.cpp.execution new file mode 100644 index 000000000..d81cc0710 --- /dev/null +++ b/regression-tests/test-results/clang-19-c++20/pure2-singleton-and-static.cpp.execution @@ -0,0 +1 @@ +42 diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-statement-scope-parameters.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-statement-scope-parameters.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-statement-scope-parameters.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-statement-scope-parameters.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-synthesize-rightshift-and-rightshifteq.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-synthesize-rightshift-and-rightshifteq.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-synthesize-rightshift-and-rightshifteq.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-synthesize-rightshift-and-rightshifteq.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-template-parameter-lists.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-template-parameter-lists.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-template-parameter-lists.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-template-parameter-lists.cpp.execution diff --git a/regression-tests/test-results/clang-19-c++20/pure2-try-catch.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-try-catch.cpp.execution new file mode 100644 index 000000000..c37cb6b5f --- /dev/null +++ b/regression-tests/test-results/clang-19-c++20/pure2-try-catch.cpp.execution @@ -0,0 +1,2 @@ +oh look, a thrown int: 42 +oh look, another exception diff --git a/regression-tests/test-results/clang-18-c++20/pure2-type-and-namespace-aliases.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-type-and-namespace-aliases.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-type-and-namespace-aliases.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-type-and-namespace-aliases.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-type-constraints.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-type-constraints.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-type-constraints.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-type-constraints.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-type-safety-1.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-type-safety-1.cpp.execution similarity index 88% rename from regression-tests/test-results/clang-18-c++23-libcpp/pure2-type-safety-1.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-type-safety-1.cpp.execution index d1aa6265a..df9d257d3 100644 --- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-type-safety-1.cpp.execution +++ b/regression-tests/test-results/clang-19-c++20/pure2-type-safety-1.cpp.execution @@ -7,3 +7,5 @@ variant is int? true any is int? true optional is int? true +optional is: int +optional<*D> is: *B *D diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-type-safety-2-with-inspect-expression.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-type-safety-2-with-inspect-expression.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-type-safety-2-with-inspect-expression.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-type-safety-2-with-inspect-expression.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-types-basics.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-types-basics.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-types-basics.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-types-basics.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-types-down-upcast.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-types-down-upcast.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-types-down-upcast.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-types-down-upcast.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-types-inheritance.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-types-inheritance.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-types-inheritance.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-types-inheritance.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-types-order-independence-and-nesting.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-types-order-independence-and-nesting.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-types-order-independence-and-nesting.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-types-order-independence-and-nesting.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-types-ordering-via-meta-functions.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-types-ordering-via-meta-functions.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-types-ordering-via-meta-functions.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-types-ordering-via-meta-functions.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-types-smf-and-that-1-provide-everything.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-types-smf-and-that-1-provide-everything.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-types-smf-and-that-1-provide-everything.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-types-smf-and-that-1-provide-everything.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-types-smf-and-that-2-provide-mvconstruct-and-cpassign.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-types-smf-and-that-2-provide-mvconstruct-and-cpassign.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-types-smf-and-that-2-provide-mvconstruct-and-cpassign.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-types-smf-and-that-2-provide-mvconstruct-and-cpassign.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp.execution similarity index 84% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp.execution index 541b2a0d9..371e06b05 100644 --- a/regression-tests/test-results/apple-clang-14-c++2b/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp.execution +++ b/regression-tests/test-results/clang-19-c++20/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp.execution @@ -4,5 +4,4 @@ ctor - from string construct [ Henry | 123 Ford Dr. ] ctor - from string assign [ Clara | 123 Ford Dr. ] ctor - copy (GENERAL) cp-construct [ Clara | 123 Ford Dr. ] <- [ Clara | 123 Ford Dr. ] ctor - move mv-construct [ Clara(CM) | 123 Ford Dr. ] <- [ | ] -ctor - copy (GENERAL) cp-assign [ Clara | 123 Ford Dr. ] <- [ Clara | 123 Ford Dr. ] assign - move mv-assign [ Clara | 123 Ford Dr. ] <- [ | ] diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-types-smf-and-that-4-provide-cpassign-and-mvassign.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-types-smf-and-that-4-provide-cpassign-and-mvassign.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-types-smf-and-that-4-provide-cpassign-and-mvassign.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-types-smf-and-that-4-provide-cpassign-and-mvassign.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-types-smf-and-that-5-provide-nothing-but-general-case.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-types-smf-and-that-5-provide-nothing-but-general-case.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-types-smf-and-that-5-provide-nothing-but-general-case.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-types-smf-and-that-5-provide-nothing-but-general-case.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-types-that-parameters.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-types-that-parameters.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-types-that-parameters.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-types-that-parameters.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-types-value-types-via-meta-functions.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-types-value-types-via-meta-functions.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-types-value-types-via-meta-functions.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-types-value-types-via-meta-functions.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-union.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-union.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-union.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-union.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-unsafe.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-unsafe.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-unsafe.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-unsafe.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-variadics.cpp.execution b/regression-tests/test-results/clang-19-c++20/pure2-variadics.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-variadics.cpp.execution rename to regression-tests/test-results/clang-19-c++20/pure2-variadics.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/xyzzy b/regression-tests/test-results/clang-19-c++20/xyzzy similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/xyzzy rename to regression-tests/test-results/clang-19-c++20/xyzzy diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/clang-version.output b/regression-tests/test-results/clang-19-c++23-libcpp/clang-version.output similarity index 100% rename from regression-tests/test-results/clang-18-c++23-libcpp/clang-version.output rename to regression-tests/test-results/clang-19-c++23-libcpp/clang-version.output diff --git a/regression-tests/test-results/clang-18-c++20/mixed-allcpp1-hello.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/mixed-allcpp1-hello.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/mixed-allcpp1-hello.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/mixed-allcpp1-hello.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/mixed-as-for-variant-20-types.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/mixed-as-for-variant-20-types.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/mixed-as-for-variant-20-types.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/mixed-as-for-variant-20-types.cpp.execution diff --git a/regression-tests/test-results/clang-19-c++23-libcpp/mixed-autodiff-taylor.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/mixed-autodiff-taylor.cpp.execution new file mode 100644 index 000000000..0a486b06f --- /dev/null +++ b/regression-tests/test-results/clang-19-c++23-libcpp/mixed-autodiff-taylor.cpp.execution @@ -0,0 +1,63 @@ +x + x = 4.000000 +x + x diff order 1 = 2.000000 +x + x diff order 2 = 0.000000 +x + x diff order 3 = 0.000000 +x + x diff order 4 = 0.000000 +x + x diff order 5 = 0.000000 +x + x diff order 6 = 0.000000 +0 - x = -2.000000 +0 - x diff order 1 = -1.000000 +0 - x diff order 2 = 0.000000 +0 - x diff order 3 = 0.000000 +0 - x diff order 4 = 0.000000 +0 - x diff order 5 = 0.000000 +0 - x diff order 6 = 0.000000 +x^7 = 128.000000 +x^7 diff order 1 = 448.000000 +x^7 diff order 2 = 1344.000000 +x^7 diff order 3 = 3360.000000 +x^7 diff order 4 = 6720.000000 +x^7 diff order 5 = 10080.000000 +x^7 diff order 6 = 10080.000000 +1/x = 0.500000 +1/x diff order 1 = -0.250000 +1/x diff order 2 = 0.250000 +1/x diff order 3 = -0.375000 +1/x diff order 4 = 0.750000 +1/x diff order 5 = -1.875000 +1/x diff order 6 = 5.625000 +sqrt(x) = 1.414214 +sqrt(x) diff order 1 = 0.353553 +sqrt(x) diff order 2 = -0.088388 +sqrt(x) diff order 3 = 0.066291 +sqrt(x) diff order 4 = -0.082864 +sqrt(x) diff order 5 = 0.145012 +sqrt(x) diff order 6 = -0.326277 +log(x) = 0.693147 +log(x) diff order 1 = 0.500000 +log(x) diff order 2 = -0.250000 +log(x) diff order 3 = 0.250000 +log(x) diff order 4 = -0.375000 +log(x) diff order 5 = 0.750000 +log(x) diff order 6 = -1.875000 +exp(x) = 7.389056 +exp(x) diff order 1 = 7.389056 +exp(x) diff order 2 = 7.389056 +exp(x) diff order 3 = 7.389056 +exp(x) diff order 4 = 7.389056 +exp(x) diff order 5 = 7.389056 +exp(x) diff order 6 = 7.389056 +sin(x) = 0.909297 +sin(x) diff order 1 = -0.416147 +sin(x) diff order 2 = -0.909297 +sin(x) diff order 3 = 0.416147 +sin(x) diff order 4 = 0.909297 +sin(x) diff order 5 = -0.416147 +sin(x) diff order 6 = -0.909297 +cos(x) = -0.416147 +cos(x) diff order 1 = -0.909297 +cos(x) diff order 2 = 0.416147 +cos(x) diff order 3 = 0.909297 +cos(x) diff order 4 = -0.416147 +cos(x) diff order 5 = -0.909297 +cos(x) diff order 6 = 0.416147 diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-bounds-check.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/mixed-bounds-check.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++23-libcpp/mixed-bounds-check.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/mixed-bounds-check.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/mixed-bounds-safety-with-assert-2.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/mixed-bounds-safety-with-assert-2.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/mixed-bounds-safety-with-assert-2.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/mixed-bounds-safety-with-assert-2.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-bounds-safety-with-assert.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/mixed-bounds-safety-with-assert.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++23-libcpp/mixed-bounds-safety-with-assert.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/mixed-bounds-safety-with-assert.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/mixed-captures-in-expressions-and-postconditions.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/mixed-captures-in-expressions-and-postconditions.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/mixed-captures-in-expressions-and-postconditions.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/mixed-captures-in-expressions-and-postconditions.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/mixed-default-arguments.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/mixed-default-arguments.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/mixed-default-arguments.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/mixed-default-arguments.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/mixed-fixed-type-aliases.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/mixed-fixed-type-aliases.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/mixed-fixed-type-aliases.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/mixed-fixed-type-aliases.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/mixed-float-literals.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/mixed-float-literals.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/mixed-float-literals.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/mixed-float-literals.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/mixed-forwarding.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/mixed-forwarding.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/mixed-forwarding.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/mixed-forwarding.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/mixed-function-expression-and-std-for-each.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/mixed-function-expression-and-std-for-each.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/mixed-function-expression-and-std-for-each.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/mixed-function-expression-and-std-for-each.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/mixed-function-expression-and-std-ranges-for-each-with-capture.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/mixed-function-expression-and-std-ranges-for-each-with-capture.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/mixed-function-expression-and-std-ranges-for-each-with-capture.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/mixed-function-expression-and-std-ranges-for-each-with-capture.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/mixed-function-expression-and-std-ranges-for-each.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/mixed-function-expression-and-std-ranges-for-each.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/mixed-function-expression-and-std-ranges-for-each.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/mixed-function-expression-and-std-ranges-for-each.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/mixed-function-expression-with-pointer-capture.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/mixed-function-expression-with-pointer-capture.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/mixed-function-expression-with-pointer-capture.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/mixed-function-expression-with-pointer-capture.cpp.execution diff --git a/regression-tests/test-results/clang-19-c++23-libcpp/mixed-function-expression-with-repeated-capture.cpp b/regression-tests/test-results/clang-19-c++23-libcpp/mixed-function-expression-with-repeated-capture.cpp new file mode 100644 index 000000000..c7a140e3e --- /dev/null +++ b/regression-tests/test-results/clang-19-c++23-libcpp/mixed-function-expression-with-repeated-capture.cpp @@ -0,0 +1,43 @@ +#include +#include +#include +#include +#include +#include + + +//=== Cpp2 type declarations ==================================================== + + +#include "cpp2util.h" + +#line 1 "mixed-function-expression-with-repeated-capture.cpp2" + + +//=== Cpp2 type definitions and function declarations =========================== + +#line 1 "mixed-function-expression-with-repeated-capture.cpp2" + +#line 8 "mixed-function-expression-with-repeated-capture.cpp2" +[[nodiscard]] auto main() -> int; + +//=== Cpp2 function definitions ================================================= + +#line 1 "mixed-function-expression-with-repeated-capture.cpp2" + +#line 8 "mixed-function-expression-with-repeated-capture.cpp2" +[[nodiscard]] auto main() -> int{ + std::vector vec { + "hello", "2022"}; + + auto y {"\n"}; + std::ranges::for_each + (vec, [_0 = cpp2::move(y)](auto const& x) mutable -> decltype(auto) { return std::cout << _0 << x << _0; }); + + auto callback {[](auto& x) -> decltype(auto) { return x += "-ish"; }}; + std::ranges::for_each(vec, cpp2::move(callback)); + + for ( auto const& str : cpp2::move(vec) ) + std::cout << str << "\n"; +} + diff --git a/regression-tests/test-results/clang-18-c++20/mixed-function-expression-with-repeated-capture.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/mixed-function-expression-with-repeated-capture.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/mixed-function-expression-with-repeated-capture.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/mixed-function-expression-with-repeated-capture.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/mixed-hello.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/mixed-hello.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/mixed-hello.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/mixed-hello.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/mixed-increment-decrement.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/mixed-increment-decrement.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/mixed-increment-decrement.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/mixed-increment-decrement.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-initialization-safety-3-contract-violation.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/mixed-initialization-safety-3-contract-violation.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++23-libcpp/mixed-initialization-safety-3-contract-violation.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/mixed-initialization-safety-3-contract-violation.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/mixed-initialization-safety-3.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/mixed-initialization-safety-3.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/mixed-initialization-safety-3.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/mixed-initialization-safety-3.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/mixed-inspect-templates.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/mixed-inspect-templates.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/mixed-inspect-templates.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/mixed-inspect-templates.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/mixed-inspect-values-2.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/mixed-inspect-values-2.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/mixed-inspect-values-2.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/mixed-inspect-values-2.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/mixed-inspect-values.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/mixed-inspect-values.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/mixed-inspect-values.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/mixed-inspect-values.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/mixed-intro-example-three-loops.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/mixed-intro-example-three-loops.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/mixed-intro-example-three-loops.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/mixed-intro-example-three-loops.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/mixed-intro-for-with-counter-include-last.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/mixed-intro-for-with-counter-include-last.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/mixed-intro-for-with-counter-include-last.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/mixed-intro-for-with-counter-include-last.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/mixed-is-as-value-with-variant.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/mixed-is-as-value-with-variant.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/mixed-is-as-value-with-variant.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/mixed-is-as-value-with-variant.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/mixed-is-as-variant.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/mixed-is-as-variant.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/mixed-is-as-variant.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/mixed-is-as-variant.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-lifetime-safety-and-null-contracts.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/mixed-lifetime-safety-and-null-contracts.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++23-libcpp/mixed-lifetime-safety-and-null-contracts.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/mixed-lifetime-safety-and-null-contracts.cpp.execution diff --git a/regression-tests/test-results/clang-19-c++23-libcpp/mixed-lifetime-safety-pointer-init-4.cpp b/regression-tests/test-results/clang-19-c++23-libcpp/mixed-lifetime-safety-pointer-init-4.cpp new file mode 100644 index 000000000..7351d0900 --- /dev/null +++ b/regression-tests/test-results/clang-19-c++23-libcpp/mixed-lifetime-safety-pointer-init-4.cpp @@ -0,0 +1,57 @@ +#line 2 "mixed-lifetime-safety-pointer-init-4.cpp2" +#include +#include + + +//=== Cpp2 type declarations ==================================================== + + +#include "cpp2util.h" + +#line 1 "mixed-lifetime-safety-pointer-init-4.cpp2" + + +//=== Cpp2 type definitions and function declarations =========================== + +#line 1 "mixed-lifetime-safety-pointer-init-4.cpp2" + +#line 5 "mixed-lifetime-safety-pointer-init-4.cpp2" +[[nodiscard]] auto main() -> int; + +#line 21 "mixed-lifetime-safety-pointer-init-4.cpp2" +auto print_and_decorate(auto const& x) -> void; +#line 24 "mixed-lifetime-safety-pointer-init-4.cpp2" + +bool flip_a_coin() { + // Change std::mt19937 to std::random_device for non-deterministic PRNG + static std::mt19937 rand; + return rand() % 2 == 1; +} + + +//=== Cpp2 function definitions ================================================= + +#line 1 "mixed-lifetime-safety-pointer-init-4.cpp2" + +#line 5 "mixed-lifetime-safety-pointer-init-4.cpp2" +[[nodiscard]] auto main() -> int{ + int x {42}; + int y {43}; + cpp2::impl::deferred_init p; + + // ... more code ... + if (flip_a_coin()) { + p.construct(&y); + } + else { + p.construct(&x); + } + + print_and_decorate(*cpp2::impl::assert_not_null(cpp2::move(p.value()))); +} + +#line 21 "mixed-lifetime-safety-pointer-init-4.cpp2" +auto print_and_decorate(auto const& x) -> void{ + std::cout << ">> " << x << "\n"; +} + diff --git a/regression-tests/test-results/clang-18-c++20/mixed-lifetime-safety-pointer-init-4.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/mixed-lifetime-safety-pointer-init-4.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/mixed-lifetime-safety-pointer-init-4.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/mixed-lifetime-safety-pointer-init-4.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/mixed-multiple-return-values.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/mixed-multiple-return-values.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/mixed-multiple-return-values.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/mixed-multiple-return-values.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/mixed-out-destruction.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/mixed-out-destruction.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/mixed-out-destruction.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/mixed-out-destruction.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/mixed-parameter-passing-generic-out.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/mixed-parameter-passing-generic-out.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/mixed-parameter-passing-generic-out.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/mixed-parameter-passing-generic-out.cpp.execution diff --git a/regression-tests/test-results/clang-19-c++23-libcpp/mixed-parameter-passing.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/mixed-parameter-passing.cpp.execution new file mode 100644 index 000000000..256f7e186 --- /dev/null +++ b/regression-tests/test-results/clang-19-c++23-libcpp/mixed-parameter-passing.cpp.execution @@ -0,0 +1,2 @@ +123 +0 diff --git a/regression-tests/test-results/clang-18-c++20/mixed-postexpression-with-capture.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/mixed-postexpression-with-capture.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/mixed-postexpression-with-capture.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/mixed-postexpression-with-capture.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/mixed-string-interpolation.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/mixed-string-interpolation.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/mixed-string-interpolation.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/mixed-string-interpolation.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/mixed-test-parens.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/mixed-test-parens.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/mixed-test-parens.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/mixed-test-parens.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/mixed-type-safety-1.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/mixed-type-safety-1.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/mixed-type-safety-1.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/mixed-type-safety-1.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/mixed-ufcs-multiple-template-arguments.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/mixed-ufcs-multiple-template-arguments.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/mixed-ufcs-multiple-template-arguments.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/mixed-ufcs-multiple-template-arguments.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-assert-expected-not-null.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-assert-expected-not-null.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++23-libcpp/pure2-assert-expected-not-null.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-assert-expected-not-null.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-assert-optional-not-null.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-assert-optional-not-null.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++23-libcpp/pure2-assert-optional-not-null.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-assert-optional-not-null.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-assert-shared-ptr-not-null.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-assert-shared-ptr-not-null.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++23-libcpp/pure2-assert-shared-ptr-not-null.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-assert-shared-ptr-not-null.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-assert-unique-ptr-not-null.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-assert-unique-ptr-not-null.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++23-libcpp/pure2-assert-unique-ptr-not-null.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-assert-unique-ptr-not-null.cpp.execution diff --git a/regression-tests/test-results/clang-19-c++23-libcpp/pure2-autodiff-higher-order.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-autodiff-higher-order.cpp.execution new file mode 100644 index 000000000..84a5f58de --- /dev/null +++ b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-autodiff-higher-order.cpp.execution @@ -0,0 +1,240 @@ +diff(x + y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x + y + x) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 7.000000 + d1 = 4.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x - y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = -1.000000 + d1 = -1.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x - y - x) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = -3.000000 + d1 = -2.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x + y - x) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 3.000000 + d1 = 2.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x * y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 6.000000 + d1 = 7.000000 + d2 = 4.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x * y * x) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 12.000000 + d1 = 20.000000 + d2 = 22.000000 + d3 = 12.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x / y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 0.666667 + d1 = -0.111111 + d2 = 0.148148 + d3 = -0.296296 + d4 = 0.790123 + d5 = -2.633745 + d6 = 10.534979 +diff(x / y / y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 0.222222 + d1 = -0.185185 + d2 = 0.296296 + d3 = -0.691358 + d4 = 2.106996 + d5 = -7.901235 + d6 = 35.116598 +diff(x * y / x) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 3.000000 + d1 = 2.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x * (x + y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 10.000000 + d1 = 11.000000 + d2 = 6.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x + x * y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 8.000000 + d1 = 8.000000 + d2 = 4.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(+x + y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(-x + y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 1.000000 + d1 = 1.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x * func(x, y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 10.000000 + d1 = 11.000000 + d2 = 6.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x * func_outer(x, y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 10.000000 + d1 = 11.000000 + d2 = 6.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(sin(x - y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = -0.841471 + d1 = -0.540302 + d2 = 0.841471 + d3 = 0.540302 + d4 = -0.841471 + d5 = -0.540302 + d6 = 0.841471 +diff(if branch) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 2.000000 + d1 = 1.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(if else branch) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 2.000000 + d1 = 1.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(direct return) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(intermediate var) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(intermediate passive var) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(intermediate untyped) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(intermediate default init) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(intermediate no init) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(while loop) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 8.000000 + d1 = 5.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(do while loop) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 8.000000 + d1 = 5.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(for loop) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(tye_outer.a + y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(type_outer.add(y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 diff --git a/regression-tests/test-results/clang-19-c++23-libcpp/pure2-autodiff.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-autodiff.cpp.execution new file mode 100644 index 000000000..863bd6bd5 --- /dev/null +++ b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-autodiff.cpp.execution @@ -0,0 +1,46 @@ +diff(x + y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(x + y + x) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 7.000000, r_d = 4.000000) +diff(x - y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = -1.000000, r_d = -1.000000) +diff(x - y - x) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = -3.000000, r_d = -2.000000) +diff(x + y - x) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 3.000000, r_d = 2.000000) +diff(x * y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 6.000000, r_d = 7.000000) +diff(x * y * x) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 12.000000, r_d = 20.000000) +diff(x / y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 0.666667, r_d = -0.111111) +diff(x / y / y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 0.222222, r_d = -0.185185) +diff(x * y / x) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 3.000000, r_d = 2.000000) +diff(x * (x + y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 10.000000, r_d = 11.000000) +diff(x + x * y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 8.000000, r_d = 8.000000) +diff(+x + y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(-x + y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 1.000000, r_d = 1.000000) +diff(x * func(x, y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 10.000000, r_d = 11.000000) +diff(x * func_outer(x, y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 10.000000, r_d = 11.000000) +diff(sin(x - y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = -0.841471, r_d = -0.540302) +diff(if branch) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 2.000000, r_d = 1.000000) +diff(if else branch) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 2.000000, r_d = 1.000000) +diff(direct return) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(intermediate var) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(intermediate passive var) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(intermediate untyped) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(intermediate default init) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(intermediate no init) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(while loop) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 8.000000, r_d = 5.000000) +diff(do while loop) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 8.000000, r_d = 5.000000) +diff(for loop) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(tye_outer.a + y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(type_outer.add(y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(x + y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 5.000000, x_b = 1.000000, y_b = 1.000000) +diff(x + y + x) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 7.000000, x_b = 2.000000, y_b = 1.000000) +diff(x - y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = -1.000000, x_b = 1.000000, y_b = -1.000000) +diff(x - y - x) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = -3.000000, x_b = 0.000000, y_b = -1.000000) +diff(x + y - x) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 3.000000, x_b = 0.000000, y_b = 1.000000) +diff(x * y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 6.000000, x_b = 3.000000, y_b = 2.000000) +diff(x * y * x) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 12.000000, x_b = 12.000000, y_b = 4.000000) +diff(x / y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 0.666667, x_b = 0.333333, y_b = -0.222222) +diff(x / y / y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 0.222222, x_b = 0.111111, y_b = -0.148148) +diff(x * y / x) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 3.000000, x_b = 0.000000, y_b = 1.000000) +diff(x * (x + y)) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 10.000000, x_b = 7.000000, y_b = 2.000000) +diff(x + x * y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 8.000000, x_b = 4.000000, y_b = 2.000000) +diff(sin(x-y)) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = -0.841471, x_b = 0.540302, y_b = -0.540302) +diff(x * func(x-y)) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 10.000000, x_b = 7.000000, y_b = 2.000000) +diff(x * func_outer(x-y)) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 10.000000, x_b = 7.000000, y_b = 2.000000) +2nd order diff of x*x at 2.000000 = 2.000000 diff --git a/regression-tests/test-results/clang-18-c++20/pure2-bounds-safety-span.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-bounds-safety-span.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-bounds-safety-span.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-bounds-safety-span.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-break-continue.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-break-continue.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-break-continue.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-break-continue.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-bugfix-for-memberwise-base-assignment.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-bugfix-for-memberwise-base-assignment.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-bugfix-for-memberwise-base-assignment.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-bugfix-for-memberwise-base-assignment.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-bugfix-for-template-argument.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-bugfix-for-template-argument.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-bugfix-for-template-argument.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-bugfix-for-template-argument.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-bugfix-for-ufcs-arguments.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-bugfix-for-ufcs-arguments.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-bugfix-for-ufcs-arguments.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-bugfix-for-ufcs-arguments.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-chained-comparisons.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-chained-comparisons.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-chained-comparisons.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-chained-comparisons.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-contracts.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-contracts.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-contracts.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-contracts.cpp.execution diff --git a/regression-tests/test-results/clang-19-c++23-libcpp/pure2-default-arguments.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-default-arguments.cpp.execution new file mode 100644 index 000000000..1c40c551d --- /dev/null +++ b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-default-arguments.cpp.execution @@ -0,0 +1,4 @@ +calling: int main(const int, char **) +012 +a newer compiler +1, 1, 66 diff --git a/regression-tests/test-results/clang-18-c++20/pure2-defaulted-comparisons-and-final-types.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-defaulted-comparisons-and-final-types.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-defaulted-comparisons-and-final-types.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-defaulted-comparisons-and-final-types.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-enum.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-enum.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-enum.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-enum.cpp.execution diff --git a/regression-tests/test-results/clang-19-c++23-libcpp/pure2-expected-is-as.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-expected-is-as.cpp.execution new file mode 100644 index 000000000..5483d6cd7 --- /dev/null +++ b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-expected-is-as.cpp.execution @@ -0,0 +1,15 @@ +ex1 is int +ex1 is 123 +ex1 as int = 123 +ex2 is unexpected and error is: -1 +ex2 is 'empty' aka unexpected and error is: -1 +ex2 as std::unexpected and error = -1 + +expected with value + ...integer 123 + +expected with unexpected + ...unexpected -1 + +expected with value + ...string Expect the unexpected diff --git a/regression-tests/test-results/clang-18-c++20/pure2-for-loop-range-with-lambda.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-for-loop-range-with-lambda.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-for-loop-range-with-lambda.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-for-loop-range-with-lambda.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-forward-return.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-forward-return.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-forward-return.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-forward-return.cpp.execution diff --git a/regression-tests/test-results/clang-19-c++23-libcpp/pure2-function-body-reflection.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-function-body-reflection.cpp.execution new file mode 100644 index 000000000..d2076f3f7 --- /dev/null +++ b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-function-body-reflection.cpp.execution @@ -0,0 +1 @@ +calling generated function ns::add_1... ns::add_1(42) returned 43 diff --git a/regression-tests/test-results/clang-18-c++20/pure2-function-multiple-forward-arguments.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-function-multiple-forward-arguments.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-function-multiple-forward-arguments.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-function-multiple-forward-arguments.cpp.execution diff --git a/regression-tests/test-results/clang-19-c++23-libcpp/pure2-function-single-expression-body-default-return.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-function-single-expression-body-default-return.cpp.execution new file mode 100644 index 000000000..30f4cb910 --- /dev/null +++ b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-function-single-expression-body-default-return.cpp.execution @@ -0,0 +1 @@ +hi ho hum \ No newline at end of file diff --git a/regression-tests/test-results/clang-18-c++20/pure2-function-typeids.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-function-typeids.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-function-typeids.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-function-typeids.cpp.execution diff --git a/regression-tests/test-results/clang-19-c++23-libcpp/pure2-hashable.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-hashable.cpp.execution new file mode 100644 index 000000000..cb627d7a9 --- /dev/null +++ b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-hashable.cpp.execution @@ -0,0 +1 @@ +12145505332166550543 \ No newline at end of file diff --git a/regression-tests/test-results/clang-18-c++20/pure2-hello.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-hello.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-hello.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-hello.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-initialization-safety-with-else-if.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-initialization-safety-with-else-if.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-initialization-safety-with-else-if.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-initialization-safety-with-else-if.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-inspect-expression-in-generic-function-multiple-types.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-inspect-expression-in-generic-function-multiple-types.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-inspect-expression-in-generic-function-multiple-types.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-inspect-expression-in-generic-function-multiple-types.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-inspect-expression-with-as-in-generic-function.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-inspect-expression-with-as-in-generic-function.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-inspect-expression-with-as-in-generic-function.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-inspect-expression-with-as-in-generic-function.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-inspect-fallback-with-variant-any-optional.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-inspect-fallback-with-variant-any-optional.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-inspect-fallback-with-variant-any-optional.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-inspect-fallback-with-variant-any-optional.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-inspect-generic-void-empty-with-variant-any-optional.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-inspect-generic-void-empty-with-variant-any-optional.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-inspect-generic-void-empty-with-variant-any-optional.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-inspect-generic-void-empty-with-variant-any-optional.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-interpolation.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-interpolation.cpp.execution similarity index 100% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-interpolation.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-interpolation.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-intro-example-hello-2022.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-intro-example-hello-2022.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-intro-example-hello-2022.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-intro-example-hello-2022.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-intro-example-three-loops.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-intro-example-three-loops.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-intro-example-three-loops.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-intro-example-three-loops.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-is-with-free-functions-predicate.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-is-with-free-functions-predicate.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-is-with-free-functions-predicate.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-is-with-free-functions-predicate.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-is-with-polymorphic-types.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-is-with-polymorphic-types.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-is-with-polymorphic-types.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-is-with-polymorphic-types.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-is-with-unnamed-predicates.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-is-with-unnamed-predicates.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-is-with-unnamed-predicates.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-is-with-unnamed-predicates.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-is-with-variable-and-value.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-is-with-variable-and-value.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-is-with-variable-and-value.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-is-with-variable-and-value.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-last-use.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-last-use.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-last-use.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-last-use.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-last-use.cpp.output b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-last-use.cpp.output similarity index 58% rename from regression-tests/test-results/clang-18-c++20/pure2-last-use.cpp.output rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-last-use.cpp.output index 4162dcfa1..424b3e98f 100644 --- a/regression-tests/test-results/clang-18-c++20/pure2-last-use.cpp.output +++ b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-last-use.cpp.output @@ -13,8 +13,8 @@ pure2-last-use.cpp2:344:16: error: no template named 'move_only_function' in nam pure2-last-use.cpp2:348:161: error: no member named 'move_only_function' in namespace 'std' 348 | CPP2_REQUIRES_ (std::is_convertible_v>&> && std::is_convertible_v>&> && std::is_convertible_v>&>) ; | ~~~~~^ -../../../include/cpp2util.h:10008:43: note: expanded from macro 'CPP2_REQUIRES_' - 10008 | #define CPP2_REQUIRES_(...) requires (__VA_ARGS__) +../../../include/cpp2util.h:10109:43: note: expanded from macro 'CPP2_REQUIRES_' + 10109 | #define CPP2_REQUIRES_(...) requires (__VA_ARGS__) | ^~~~~~~~~~~ pure2-last-use.cpp2:348:188: error: expected expression 348 | CPP2_REQUIRES_ (std::is_convertible_v>&> && std::is_convertible_v>&> && std::is_convertible_v>&>) ; @@ -49,26 +49,34 @@ pure2-last-use.cpp2:271:7: error: missing '}' at end of definition of 'issue_857 pure2-last-use.cpp2:905:1: note: still within definition of 'issue_857_4' here 905 | namespace captures { | ^ -pure2-last-use.cpp2:279:272: error: no member named 'move_only_function' in namespace 'std' - 279 | requires (std::is_convertible_v>&> && std::is_convertible_v in_)>>&> && std::is_convertible_v>&> && std::is_convertible_v in_)>>&>) - | ~~~~~^ -pure2-last-use.cpp2:279:299: error: expected expression - 279 | requires (std::is_convertible_v>&> && std::is_convertible_v in_)>>&> && std::is_convertible_v>&> && std::is_convertible_v in_)>>&>) - | ^ -pure2-last-use.cpp2:279:304: error: use of address-of-label extension outside of a function body - 279 | requires (std::is_convertible_v>&> && std::is_convertible_v in_)>>&> && std::is_convertible_v>&> && std::is_convertible_v in_)>>&>) - | ^ -pure2-last-use.cpp2:278:14: error: out-of-line definition of 'issue_857_4' does not match any declaration in 'issue_857_4' - 278 | issue_857_4::issue_857_4(auto&& f_, auto&& g_, auto&& mf_, auto&& mg_) - | ^~~~~~~~~~~ -pure2-last-use.cpp2:281:272: error: member initializer 'g' does not name a non-static data member or base class - 281 | , g{ CPP2_FORWARD(g_) } - | ^~~~~~~~~~~~~~~~~~~~~ -pure2-last-use.cpp2:282:272: error: member initializer 'mf' does not name a non-static data member or base class - 282 | , mf{ CPP2_FORWARD(mf_) } - | ^~~~~~~~~~~~~~~~~~~~~~~ -pure2-last-use.cpp2:283:272: error: member initializer 'mg' does not name a non-static data member or base class - 283 | , mg{ CPP2_FORWARD(mg_) }{} - | ^~~~~~~~~~~~~~~~~~~~~~~ -fatal error: too many errors emitted, stopping now [-ferror-limit=] -20 errors generated. +pure2-last-use.cpp2:279:179: error: expected variable name or 'this' in lambda capture list + 279 | requires (std::is_convertible_v>&> && std::is_convertible_v unnamed_param_1)>>&> && std::is_convertible_v>&> && std::is_convertible_v unnamed_param_1)>>&>) + | ^ +pure2-last-use.cpp2:1044:2: error: expected '>' + 1044 | } + | ^ +pure2-last-use.cpp2:279:173: note: to match this '<' + 279 | requires (std::is_convertible_v>&> && std::is_convertible_v unnamed_param_1)>>&> && std::is_convertible_v>&> && std::is_convertible_v unnamed_param_1)>>&>) + | ^ +pure2-last-use.cpp2:1045:1: error: type name requires a specifier or qualifier + 1045 | + | ^ +pure2-last-use.cpp2:1044:2: error: expected '>' + 1044 | } + | ^ +pure2-last-use.cpp2:279:154: note: to match this '<' + 279 | requires (std::is_convertible_v>&> && std::is_convertible_v unnamed_param_1)>>&> && std::is_convertible_v>&> && std::is_convertible_v unnamed_param_1)>>&>) + | ^ +pure2-last-use.cpp2:1045:1: error: type name requires a specifier or qualifier + 1045 | + | ^ +pure2-last-use.cpp2:1044:2: error: expected '>' + 1044 | } + | ^ +pure2-last-use.cpp2:279:120: note: to match this '<' + 279 | requires (std::is_convertible_v>&> && std::is_convertible_v unnamed_param_1)>>&> && std::is_convertible_v>&> && std::is_convertible_v unnamed_param_1)>>&>) + | ^ +pure2-last-use.cpp2:1045:1: error: expected function body after function declarator + 1045 | + | ^ +19 errors generated. diff --git a/regression-tests/test-results/clang-18-c++20/pure2-look-up-parameter-across-unnamed-function.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-look-up-parameter-across-unnamed-function.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-look-up-parameter-across-unnamed-function.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-look-up-parameter-across-unnamed-function.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-main-args.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-main-args.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-main-args.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-main-args.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-more-wildcards.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-more-wildcards.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-more-wildcards.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-more-wildcards.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-print.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-print.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-print.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-print.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-range-operators.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-range-operators.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++23-libcpp/pure2-range-operators.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-range-operators.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-raw-string-literal-and-interpolation.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-raw-string-literal-and-interpolation.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-raw-string-literal-and-interpolation.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-raw-string-literal-and-interpolation.cpp.execution diff --git a/regression-tests/test-results/clang-19-c++23-libcpp/pure2-regex-general.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-regex-general.cpp.execution new file mode 100644 index 000000000..c44d08490 --- /dev/null +++ b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-regex-general.cpp.execution @@ -0,0 +1,11 @@ +Running tests_01_char_matcher: +Not full match fails: 0 +Full match is ok: 1 +Search finds at position 1: 1 +Search finds at position 3: 3 +Find all finds at position: 1 +Find all finds at position: 4 +Find all finds at position: 7 +Find all found 3 matched: 3 +Find all finds at position: 2 +Find all found 1 match: 1 diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_01_char_matcher.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-regex_01_char_matcher.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-regex_01_char_matcher.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-regex_01_char_matcher.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_02_ranges.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-regex_02_ranges.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-regex_02_ranges.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-regex_02_ranges.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_03_wildcard.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-regex_03_wildcard.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-regex_03_wildcard.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-regex_03_wildcard.cpp.execution diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_04_start_end.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-regex_04_start_end.cpp.execution similarity index 89% rename from regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_04_start_end.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-regex_04_start_end.cpp.execution index 6fef36434..a1e2b9b63 100644 --- a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_04_start_end.cpp.execution +++ b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-regex_04_start_end.cpp.execution @@ -8,4 +8,5 @@ Running tests_04_start_end: 07_y: OK regex: ^ parsed_regex: ^ str: abc result_expr: $& expected_results 08_y: OK regex: $ parsed_regex: $ str: abc result_expr: $& expected_results 09_n: OK regex: $b parsed_regex: $b str: b result_expr: - expected_results - +10_n: OK regex: \GX.*X parsed_regex: \GX.*X str: aaaXbX result_expr: - expected_results - diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_05_classes.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-regex_05_classes.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-regex_05_classes.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-regex_05_classes.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_06_boundaries.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-regex_06_boundaries.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-regex_06_boundaries.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-regex_06_boundaries.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_07_short_classes.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-regex_07_short_classes.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-regex_07_short_classes.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-regex_07_short_classes.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_08_alternatives.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-regex_08_alternatives.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-regex_08_alternatives.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-regex_08_alternatives.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_09_groups.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-regex_09_groups.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-regex_09_groups.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-regex_09_groups.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_10_escapes.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-regex_10_escapes.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-regex_10_escapes.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-regex_10_escapes.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_11_group_references.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-regex_11_group_references.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-regex_11_group_references.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-regex_11_group_references.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_12_case_insensitive.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-regex_12_case_insensitive.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-regex_12_case_insensitive.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-regex_12_case_insensitive.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_13_posessive_modifier.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-regex_13_posessive_modifier.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-regex_13_posessive_modifier.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-regex_13_posessive_modifier.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_13_possessive_modifier.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-regex_13_possessive_modifier.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-regex_13_possessive_modifier.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-regex_13_possessive_modifier.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_14_multiline_modifier.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-regex_14_multiline_modifier.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-regex_14_multiline_modifier.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-regex_14_multiline_modifier.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_15_group_modifiers.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-regex_15_group_modifiers.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-regex_15_group_modifiers.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-regex_15_group_modifiers.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_16_perl_syntax_modifier.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-regex_16_perl_syntax_modifier.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-regex_16_perl_syntax_modifier.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-regex_16_perl_syntax_modifier.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_17_comments.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-regex_17_comments.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-regex_17_comments.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-regex_17_comments.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_18_branch_reset.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-regex_18_branch_reset.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-regex_18_branch_reset.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-regex_18_branch_reset.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_19_lookahead.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-regex_19_lookahead.cpp.execution similarity index 83% rename from regression-tests/test-results/clang-18-c++20/pure2-regex_19_lookahead.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-regex_19_lookahead.cpp.execution index d4c65d951..0f723eb77 100644 --- a/regression-tests/test-results/clang-18-c++20/pure2-regex_19_lookahead.cpp.execution +++ b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-regex_19_lookahead.cpp.execution @@ -27,6 +27,14 @@ Running tests_19_lookahead: 26_y: OK regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) parsed_regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) str: aaaaaaaa result_expr: $1 expected_results aaaaaaa 27_y: OK regex: a(?!b(?!c))(..) parsed_regex: a(?!b(?!c))(..) str: abababc result_expr: $1 expected_results bc 28_y: OK regex: a(?!b(?=a))(..) parsed_regex: a(?!b(?=a))(..) str: abababc result_expr: $1 expected_results bc +29_y: OK regex: (?=foo) parsed_regex: (?=foo) str: foo result_expr: @+ expected_results 0 +30_y: OK regex: (?=foo) parsed_regex: (?=foo) str: XfooY result_expr: @+ expected_results 1 +31_y: OK regex: .*(?=foo) parsed_regex: .*(?=foo) str: XfooY result_expr: @+ expected_results 1 +32_y: OK regex: (?=.*P)P parsed_regex: (?=.*P)P str: aP result_expr: @+ expected_results 2 +33_y: OK regex: X(?=foo)f parsed_regex: X(?=foo)f str: ..XfooY.. result_expr: @+ expected_results 4 +34_y: OK regex: X(?=foo) parsed_regex: X(?=foo) str: ..XfooY.. result_expr: @+ expected_results 3 +35_y: OK regex: (?=XY*foo) parsed_regex: (?=XY*foo) str: Xfoo result_expr: @+ expected_results 0 +36_y: OK regex: ^(?=XY*foo) parsed_regex: ^(?=XY*foo) str: Xfoo result_expr: @+ expected_results 0 37_y: OK regex: X(\w+)(?=\s)|X(\w+) parsed_regex: X(\w+)(?=\s)|X(\w+) str: Xab result_expr: [$1-$2] expected_results [-ab] 38_y: OK regex: ^a*(?=b)b parsed_regex: ^a*(?=b)b str: ab result_expr: $& expected_results ab 39_y: OK regex: '(?!\A)x'm parsed_regex: '(?!\A)x'm str: a\nxb\n result_expr: - expected_results - @@ -44,4 +52,6 @@ Running tests_19_lookahead: 51_y: OK regex: ((?s)b.)c(?!\N) parsed_regex: ((?s)b.)c(?!\N) str: a\nb\nc\n result_expr: $1:$& expected_results b\n:b\nc 52_y: OK regex: '(b.)c(?!\N)'s parsed_regex: '(b.)c(?!\N)'s str: a\nb\nc\n result_expr: $1:$& expected_results b\n:b\nc 53_n: OK regex: a*(?!) parsed_regex: a*(?!) str: aaaab result_expr: - expected_results - +54_y: OK regex: (?)foo parsed_regex: (?)foo str: bar>ABCfoo result_expr: $& expected_results foo +55_y: OK regex: (?ABC)foo parsed_regex: (?ABC)foo str: bar>ABCfoo result_expr: $& expected_results ABCfoo diff --git a/regression-tests/test-results/clang-19-c++23-libcpp/pure2-regex_20_lookbehind.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-regex_20_lookbehind.cpp.execution new file mode 100644 index 000000000..cd61d4f56 --- /dev/null +++ b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-regex_20_lookbehind.cpp.execution @@ -0,0 +1,58 @@ +Running tests_20_lookbehind: +01_y: OK regex: (?<=a)b parsed_regex: (?<=a)b str: ab result_expr: $& expected_results b +02_y: OK regex: (?<=af?)b parsed_regex: (?<=af?)b str: ab result_expr: $& expected_results b +03_n: OK regex: (?<=a)b parsed_regex: (?<=a)b str: cb result_expr: - expected_results - +04_n: OK regex: (?<=a(?:fo)?)b parsed_regex: (?<=a(?:fo)?)b str: cb result_expr: - expected_results - +05_n: OK regex: (?<=a)b parsed_regex: (?<=a)b str: b result_expr: - expected_results - +06_n: OK regex: (?<=a(?:foo)?)b parsed_regex: (?<=a(?:foo)?)b str: b result_expr: - expected_results - +07_y: OK regex: (?)foo parsed_regex: (?<=bar>)foo str: bar>foo result_expr: $& expected_results foo +50_n: OK regex: (?)foo parsed_regex: (?)foo str: bar>foo result_expr: - expected_results - +51_y: OK regex: (?<=bar>ABC)foo parsed_regex: (?<=bar>ABC)foo str: bar>ABCfoo result_expr: $& expected_results foo +52_n: OK regex: (?ABC)foo parsed_regex: (?ABC)foo str: bar>ABCfoo result_expr: - expected_results - +53_y: OK regex: (?<=abcd(?<=(aaaabcd))) parsed_regex: (?<=abcd(?<=(aaaabcd))) str: ..aaaabcd.. result_expr: $1 expected_results aaaabcd +54_y: OK regex: (?=xy(?<=(aaxy))) parsed_regex: (?=xy(?<=(aaxy))) str: ..aaxy.. result_expr: $1 expected_results aaxy +55_y: OK regex: (?=xy(?<=(aaxyz?))) parsed_regex: (?=xy(?<=(aaxyz?))) str: ..aaxy.. result_expr: $1 expected_results aaxy +56_y: OK regex: (?<=(?=(aaxy))aa) parsed_regex: (?<=(?=(aaxy))aa) str: ..aaxy.. result_expr: $1 expected_results aaxy + diff --git a/regression-tests/test-results/clang-19-c++23-libcpp/pure2-regex_21_atomic_patterns.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-regex_21_atomic_patterns.cpp.execution new file mode 100644 index 000000000..4812cfbb8 --- /dev/null +++ b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-regex_21_atomic_patterns.cpp.execution @@ -0,0 +1,8 @@ +Running tests_21_atomic_patterns: +01_y: OK regex: (?>a+)b parsed_regex: (?>a+)b str: aaab result_expr: - expected_results - +02_y: OK regex: ((?>a+)b) parsed_regex: ((?>a+)b) str: aaab result_expr: $1 expected_results aaab +03_y: OK regex: (?>(a+))b parsed_regex: (?>(a+))b str: aaab result_expr: $1 expected_results aaa +04_y: OK regex: ((?>[^()]+)|\([^()]*\))+ parsed_regex: ((?>[^()]+)|\([^()]*\))+ str: ((abc(ade)ufh()()x result_expr: $& expected_results abc(ade)ufh()()x +05_y: OK regex: round\(((?>[^()]+))\) parsed_regex: round\(((?>[^()]+))\) str: _I(round(xs * sz),1) result_expr: $1 expected_results xs * sz +06_y: OK regex: ^((?>(?:aa)?b)?) parsed_regex: ^((?>(?:aa)?b)?) str: aab result_expr: $1 expected_results aab + diff --git a/regression-tests/test-results/clang-19-c++23-libcpp/pure2-repeated-call.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-repeated-call.cpp.execution new file mode 100644 index 000000000..d81cc0710 --- /dev/null +++ b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-repeated-call.cpp.execution @@ -0,0 +1 @@ +42 diff --git a/regression-tests/test-results/clang-18-c++20/pure2-requires-clauses.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-requires-clauses.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-requires-clauses.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-requires-clauses.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-return-tuple-operator.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-return-tuple-operator.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-return-tuple-operator.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-return-tuple-operator.cpp.execution diff --git a/regression-tests/test-results/clang-19-c++23-libcpp/pure2-singleton-and-static.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-singleton-and-static.cpp.execution new file mode 100644 index 000000000..d81cc0710 --- /dev/null +++ b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-singleton-and-static.cpp.execution @@ -0,0 +1 @@ +42 diff --git a/regression-tests/test-results/clang-18-c++20/pure2-statement-scope-parameters.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-statement-scope-parameters.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-statement-scope-parameters.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-statement-scope-parameters.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-synthesize-rightshift-and-rightshifteq.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-synthesize-rightshift-and-rightshifteq.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-synthesize-rightshift-and-rightshifteq.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-synthesize-rightshift-and-rightshifteq.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-template-parameter-lists.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-template-parameter-lists.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-template-parameter-lists.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-template-parameter-lists.cpp.execution diff --git a/regression-tests/test-results/clang-19-c++23-libcpp/pure2-try-catch.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-try-catch.cpp.execution new file mode 100644 index 000000000..c37cb6b5f --- /dev/null +++ b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-try-catch.cpp.execution @@ -0,0 +1,2 @@ +oh look, a thrown int: 42 +oh look, another exception diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-type-and-namespace-aliases.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-type-and-namespace-aliases.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++23-libcpp/pure2-type-and-namespace-aliases.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-type-and-namespace-aliases.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-type-constraints.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-type-constraints.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-type-constraints.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-type-constraints.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-type-safety-1.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-type-safety-1.cpp.execution similarity index 88% rename from regression-tests/test-results/clang-18-c++20/pure2-type-safety-1.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-type-safety-1.cpp.execution index d1aa6265a..df9d257d3 100644 --- a/regression-tests/test-results/clang-18-c++20/pure2-type-safety-1.cpp.execution +++ b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-type-safety-1.cpp.execution @@ -7,3 +7,5 @@ variant is int? true any is int? true optional is int? true +optional is: int +optional<*D> is: *B *D diff --git a/regression-tests/test-results/clang-18-c++20/pure2-type-safety-2-with-inspect-expression.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-type-safety-2-with-inspect-expression.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-type-safety-2-with-inspect-expression.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-type-safety-2-with-inspect-expression.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-types-basics.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-types-basics.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-types-basics.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-types-basics.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-types-down-upcast.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-types-down-upcast.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-types-down-upcast.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-types-down-upcast.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-types-inheritance.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-types-inheritance.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-types-inheritance.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-types-inheritance.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-types-order-independence-and-nesting.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-types-order-independence-and-nesting.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-types-order-independence-and-nesting.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-types-order-independence-and-nesting.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-types-ordering-via-meta-functions.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-types-ordering-via-meta-functions.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-types-ordering-via-meta-functions.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-types-ordering-via-meta-functions.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-types-smf-and-that-1-provide-everything.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-types-smf-and-that-1-provide-everything.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-types-smf-and-that-1-provide-everything.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-types-smf-and-that-1-provide-everything.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-types-smf-and-that-2-provide-mvconstruct-and-cpassign.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-types-smf-and-that-2-provide-mvconstruct-and-cpassign.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-types-smf-and-that-2-provide-mvconstruct-and-cpassign.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-types-smf-and-that-2-provide-mvconstruct-and-cpassign.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp.execution similarity index 84% rename from regression-tests/test-results/clang-18-c++20/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp.execution index 541b2a0d9..371e06b05 100644 --- a/regression-tests/test-results/clang-18-c++20/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp.execution +++ b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp.execution @@ -4,5 +4,4 @@ ctor - from string construct [ Henry | 123 Ford Dr. ] ctor - from string assign [ Clara | 123 Ford Dr. ] ctor - copy (GENERAL) cp-construct [ Clara | 123 Ford Dr. ] <- [ Clara | 123 Ford Dr. ] ctor - move mv-construct [ Clara(CM) | 123 Ford Dr. ] <- [ | ] -ctor - copy (GENERAL) cp-assign [ Clara | 123 Ford Dr. ] <- [ Clara | 123 Ford Dr. ] assign - move mv-assign [ Clara | 123 Ford Dr. ] <- [ | ] diff --git a/regression-tests/test-results/clang-18-c++20/pure2-types-smf-and-that-4-provide-cpassign-and-mvassign.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-types-smf-and-that-4-provide-cpassign-and-mvassign.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-types-smf-and-that-4-provide-cpassign-and-mvassign.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-types-smf-and-that-4-provide-cpassign-and-mvassign.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-types-smf-and-that-5-provide-nothing-but-general-case.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-types-smf-and-that-5-provide-nothing-but-general-case.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-types-smf-and-that-5-provide-nothing-but-general-case.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-types-smf-and-that-5-provide-nothing-but-general-case.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-types-that-parameters.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-types-that-parameters.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-types-that-parameters.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-types-that-parameters.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-types-value-types-via-meta-functions.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-types-value-types-via-meta-functions.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-types-value-types-via-meta-functions.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-types-value-types-via-meta-functions.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-union.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-union.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-union.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-union.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/pure2-unsafe.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-unsafe.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++20/pure2-unsafe.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-unsafe.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-variadics.cpp.execution b/regression-tests/test-results/clang-19-c++23-libcpp/pure2-variadics.cpp.execution similarity index 100% rename from regression-tests/test-results/clang-18-c++23-libcpp/pure2-variadics.cpp.execution rename to regression-tests/test-results/clang-19-c++23-libcpp/pure2-variadics.cpp.execution diff --git a/regression-tests/test-results/clang-18-c++20/xyzzy b/regression-tests/test-results/clang-19-c++23-libcpp/xyzzy similarity index 100% rename from regression-tests/test-results/clang-18-c++20/xyzzy rename to regression-tests/test-results/clang-19-c++23-libcpp/xyzzy diff --git a/regression-tests/test-results/cpp2_post_build.sh b/regression-tests/test-results/cpp2_post_build.sh new file mode 100644 index 000000000..e69de29bb diff --git a/regression-tests/test-results/gcc-10-c++20/mixed-autodiff-taylor.cpp.execution b/regression-tests/test-results/gcc-10-c++20/mixed-autodiff-taylor.cpp.execution new file mode 100644 index 000000000..0a486b06f --- /dev/null +++ b/regression-tests/test-results/gcc-10-c++20/mixed-autodiff-taylor.cpp.execution @@ -0,0 +1,63 @@ +x + x = 4.000000 +x + x diff order 1 = 2.000000 +x + x diff order 2 = 0.000000 +x + x diff order 3 = 0.000000 +x + x diff order 4 = 0.000000 +x + x diff order 5 = 0.000000 +x + x diff order 6 = 0.000000 +0 - x = -2.000000 +0 - x diff order 1 = -1.000000 +0 - x diff order 2 = 0.000000 +0 - x diff order 3 = 0.000000 +0 - x diff order 4 = 0.000000 +0 - x diff order 5 = 0.000000 +0 - x diff order 6 = 0.000000 +x^7 = 128.000000 +x^7 diff order 1 = 448.000000 +x^7 diff order 2 = 1344.000000 +x^7 diff order 3 = 3360.000000 +x^7 diff order 4 = 6720.000000 +x^7 diff order 5 = 10080.000000 +x^7 diff order 6 = 10080.000000 +1/x = 0.500000 +1/x diff order 1 = -0.250000 +1/x diff order 2 = 0.250000 +1/x diff order 3 = -0.375000 +1/x diff order 4 = 0.750000 +1/x diff order 5 = -1.875000 +1/x diff order 6 = 5.625000 +sqrt(x) = 1.414214 +sqrt(x) diff order 1 = 0.353553 +sqrt(x) diff order 2 = -0.088388 +sqrt(x) diff order 3 = 0.066291 +sqrt(x) diff order 4 = -0.082864 +sqrt(x) diff order 5 = 0.145012 +sqrt(x) diff order 6 = -0.326277 +log(x) = 0.693147 +log(x) diff order 1 = 0.500000 +log(x) diff order 2 = -0.250000 +log(x) diff order 3 = 0.250000 +log(x) diff order 4 = -0.375000 +log(x) diff order 5 = 0.750000 +log(x) diff order 6 = -1.875000 +exp(x) = 7.389056 +exp(x) diff order 1 = 7.389056 +exp(x) diff order 2 = 7.389056 +exp(x) diff order 3 = 7.389056 +exp(x) diff order 4 = 7.389056 +exp(x) diff order 5 = 7.389056 +exp(x) diff order 6 = 7.389056 +sin(x) = 0.909297 +sin(x) diff order 1 = -0.416147 +sin(x) diff order 2 = -0.909297 +sin(x) diff order 3 = 0.416147 +sin(x) diff order 4 = 0.909297 +sin(x) diff order 5 = -0.416147 +sin(x) diff order 6 = -0.909297 +cos(x) = -0.416147 +cos(x) diff order 1 = -0.909297 +cos(x) diff order 2 = 0.416147 +cos(x) diff order 3 = 0.909297 +cos(x) diff order 4 = -0.416147 +cos(x) diff order 5 = -0.909297 +cos(x) diff order 6 = 0.416147 diff --git a/regression-tests/test-results/gcc-10-c++20/mixed-increment-decrement.cpp.output b/regression-tests/test-results/gcc-10-c++20/mixed-increment-decrement.cpp.output index a7c03e8ca..d5758e9a8 100644 --- a/regression-tests/test-results/gcc-10-c++20/mixed-increment-decrement.cpp.output +++ b/regression-tests/test-results/gcc-10-c++20/mixed-increment-decrement.cpp.output @@ -1,10 +1,10 @@ mixed-increment-decrement.cpp2:4:47: error: expected ‘;’ at end of member declaration In file included from mixed-increment-decrement.cpp:6: -../../../include/cpp2util.h:10005:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10. +../../../include/cpp2util.h:10106:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10. mixed-increment-decrement.cpp2:5:1: note: in expansion of macro ‘CPP2_REQUIRES_’ mixed-increment-decrement.cpp2:4:39: error: expected ‘;’ at end of member declaration In file included from mixed-increment-decrement.cpp:6: -../../../include/cpp2util.h:10005:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10. +../../../include/cpp2util.h:10106:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10. mixed-increment-decrement.cpp2:5:1: note: in expansion of macro ‘CPP2_REQUIRES_’ mixed-increment-decrement.cpp2:4:32: error: no declaration matches ‘iterator& iterator::operator++() & requires true’ mixed-increment-decrement.cpp2:4:18: note: candidates are: ‘iterator iterator::operator++(int) &’ diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-autodiff-higher-order.cpp.execution b/regression-tests/test-results/gcc-10-c++20/pure2-autodiff-higher-order.cpp.execution new file mode 100644 index 000000000..84a5f58de --- /dev/null +++ b/regression-tests/test-results/gcc-10-c++20/pure2-autodiff-higher-order.cpp.execution @@ -0,0 +1,240 @@ +diff(x + y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x + y + x) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 7.000000 + d1 = 4.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x - y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = -1.000000 + d1 = -1.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x - y - x) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = -3.000000 + d1 = -2.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x + y - x) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 3.000000 + d1 = 2.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x * y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 6.000000 + d1 = 7.000000 + d2 = 4.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x * y * x) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 12.000000 + d1 = 20.000000 + d2 = 22.000000 + d3 = 12.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x / y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 0.666667 + d1 = -0.111111 + d2 = 0.148148 + d3 = -0.296296 + d4 = 0.790123 + d5 = -2.633745 + d6 = 10.534979 +diff(x / y / y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 0.222222 + d1 = -0.185185 + d2 = 0.296296 + d3 = -0.691358 + d4 = 2.106996 + d5 = -7.901235 + d6 = 35.116598 +diff(x * y / x) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 3.000000 + d1 = 2.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x * (x + y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 10.000000 + d1 = 11.000000 + d2 = 6.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x + x * y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 8.000000 + d1 = 8.000000 + d2 = 4.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(+x + y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(-x + y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 1.000000 + d1 = 1.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x * func(x, y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 10.000000 + d1 = 11.000000 + d2 = 6.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x * func_outer(x, y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 10.000000 + d1 = 11.000000 + d2 = 6.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(sin(x - y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = -0.841471 + d1 = -0.540302 + d2 = 0.841471 + d3 = 0.540302 + d4 = -0.841471 + d5 = -0.540302 + d6 = 0.841471 +diff(if branch) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 2.000000 + d1 = 1.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(if else branch) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 2.000000 + d1 = 1.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(direct return) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(intermediate var) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(intermediate passive var) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(intermediate untyped) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(intermediate default init) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(intermediate no init) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(while loop) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 8.000000 + d1 = 5.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(do while loop) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 8.000000 + d1 = 5.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(for loop) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(tye_outer.a + y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(type_outer.add(y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-autodiff.cpp.execution b/regression-tests/test-results/gcc-10-c++20/pure2-autodiff.cpp.execution new file mode 100644 index 000000000..863bd6bd5 --- /dev/null +++ b/regression-tests/test-results/gcc-10-c++20/pure2-autodiff.cpp.execution @@ -0,0 +1,46 @@ +diff(x + y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(x + y + x) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 7.000000, r_d = 4.000000) +diff(x - y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = -1.000000, r_d = -1.000000) +diff(x - y - x) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = -3.000000, r_d = -2.000000) +diff(x + y - x) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 3.000000, r_d = 2.000000) +diff(x * y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 6.000000, r_d = 7.000000) +diff(x * y * x) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 12.000000, r_d = 20.000000) +diff(x / y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 0.666667, r_d = -0.111111) +diff(x / y / y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 0.222222, r_d = -0.185185) +diff(x * y / x) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 3.000000, r_d = 2.000000) +diff(x * (x + y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 10.000000, r_d = 11.000000) +diff(x + x * y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 8.000000, r_d = 8.000000) +diff(+x + y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(-x + y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 1.000000, r_d = 1.000000) +diff(x * func(x, y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 10.000000, r_d = 11.000000) +diff(x * func_outer(x, y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 10.000000, r_d = 11.000000) +diff(sin(x - y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = -0.841471, r_d = -0.540302) +diff(if branch) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 2.000000, r_d = 1.000000) +diff(if else branch) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 2.000000, r_d = 1.000000) +diff(direct return) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(intermediate var) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(intermediate passive var) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(intermediate untyped) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(intermediate default init) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(intermediate no init) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(while loop) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 8.000000, r_d = 5.000000) +diff(do while loop) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 8.000000, r_d = 5.000000) +diff(for loop) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(tye_outer.a + y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(type_outer.add(y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(x + y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 5.000000, x_b = 1.000000, y_b = 1.000000) +diff(x + y + x) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 7.000000, x_b = 2.000000, y_b = 1.000000) +diff(x - y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = -1.000000, x_b = 1.000000, y_b = -1.000000) +diff(x - y - x) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = -3.000000, x_b = 0.000000, y_b = -1.000000) +diff(x + y - x) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 3.000000, x_b = 0.000000, y_b = 1.000000) +diff(x * y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 6.000000, x_b = 3.000000, y_b = 2.000000) +diff(x * y * x) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 12.000000, x_b = 12.000000, y_b = 4.000000) +diff(x / y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 0.666667, x_b = 0.333333, y_b = -0.222222) +diff(x / y / y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 0.222222, x_b = 0.111111, y_b = -0.148148) +diff(x * y / x) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 3.000000, x_b = 0.000000, y_b = 1.000000) +diff(x * (x + y)) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 10.000000, x_b = 7.000000, y_b = 2.000000) +diff(x + x * y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 8.000000, x_b = 4.000000, y_b = 2.000000) +diff(sin(x-y)) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = -0.841471, x_b = 0.540302, y_b = -0.540302) +diff(x * func(x-y)) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 10.000000, x_b = 7.000000, y_b = 2.000000) +diff(x * func_outer(x-y)) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 10.000000, x_b = 7.000000, y_b = 2.000000) +2nd order diff of x*x at 2.000000 = 2.000000 diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-bugfix-for-requires-clause-in-forward-declaration.cpp.output b/regression-tests/test-results/gcc-10-c++20/pure2-bugfix-for-requires-clause-in-forward-declaration.cpp.output index 74eb53800..861317781 100644 --- a/regression-tests/test-results/gcc-10-c++20/pure2-bugfix-for-requires-clause-in-forward-declaration.cpp.output +++ b/regression-tests/test-results/gcc-10-c++20/pure2-bugfix-for-requires-clause-in-forward-declaration.cpp.output @@ -1,14 +1,14 @@ -pure2-bugfix-for-requires-clause-in-forward-declaration.cpp2:3:36: error: expected ‘;’ at end of member declaration +pure2-bugfix-for-requires-clause-in-forward-declaration.cpp2:3:27: error: expected ‘;’ at end of member declaration In file included from pure2-bugfix-for-requires-clause-in-forward-declaration.cpp:7: -../../../include/cpp2util.h:10005:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10. +../../../include/cpp2util.h:10106:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10. pure2-bugfix-for-requires-clause-in-forward-declaration.cpp2:4:1: note: in expansion of macro ‘CPP2_REQUIRES_’ pure2-bugfix-for-requires-clause-in-forward-declaration.cpp2:3:46: error: expected ‘;’ at end of member declaration In file included from pure2-bugfix-for-requires-clause-in-forward-declaration.cpp:7: -../../../include/cpp2util.h:10005:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10. +../../../include/cpp2util.h:10106:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10. pure2-bugfix-for-requires-clause-in-forward-declaration.cpp2:4:1: note: in expansion of macro ‘CPP2_REQUIRES_’ pure2-bugfix-for-requires-clause-in-forward-declaration.cpp2:3:3: error: no declaration matches ‘element::element(auto:112&&) requires is_convertible_v::type>::type, const std::__cxx11::add_const_t, std::allocator > >&>’ pure2-bugfix-for-requires-clause-in-forward-declaration.cpp2:5:11: note: candidates are: ‘element::element(const element&)’ -pure2-bugfix-for-requires-clause-in-forward-declaration.cpp2:3:20: note: ‘template element::element(auto:110&&)’ +pure2-bugfix-for-requires-clause-in-forward-declaration.cpp2:3:11: note: ‘template element::element(auto:110&&)’ pure2-bugfix-for-requires-clause-in-forward-declaration.cpp2:1:7: note: ‘class element’ defined here pure2-bugfix-for-requires-clause-in-forward-declaration.cpp2:5:78: error: expected unqualified-id before ‘{’ token pure2-bugfix-for-requires-clause-in-forward-declaration.cpp2:3:8: error: no declaration matches ‘element& element::operator=(auto:113&&) requires is_convertible_v::type>::type, const std::__cxx11::add_const_t, std::allocator > >&>’ diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-bugfix-for-ufcs-arguments.cpp.output b/regression-tests/test-results/gcc-10-c++20/pure2-bugfix-for-ufcs-arguments.cpp.output index 8214e0e44..7a63608c5 100644 --- a/regression-tests/test-results/gcc-10-c++20/pure2-bugfix-for-ufcs-arguments.cpp.output +++ b/regression-tests/test-results/gcc-10-c++20/pure2-bugfix-for-ufcs-arguments.cpp.output @@ -1,10 +1,10 @@ pure2-bugfix-for-ufcs-arguments.cpp2:71:22: error: expected ‘;’ at end of member declaration In file included from pure2-bugfix-for-ufcs-arguments.cpp:7: -../../../include/cpp2util.h:10005:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10. +../../../include/cpp2util.h:10106:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10. pure2-bugfix-for-ufcs-arguments.cpp2:72:1: note: in expansion of macro ‘CPP2_REQUIRES_’ pure2-bugfix-for-ufcs-arguments.cpp2:74:39: error: expected ‘;’ at end of member declaration In file included from pure2-bugfix-for-ufcs-arguments.cpp:7: -../../../include/cpp2util.h:10005:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10. +../../../include/cpp2util.h:10106:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10. pure2-bugfix-for-ufcs-arguments.cpp2:75:1: note: in expansion of macro ‘CPP2_REQUIRES_’ pure2-bugfix-for-ufcs-arguments.cpp2:72:3: error: no declaration matches ‘B::B(auto:130&&) requires is_convertible_v::type>::type, const add_const_t&>’ pure2-bugfix-for-ufcs-arguments.cpp2:68:7: note: candidates are: ‘constexpr B::B(B&&)’ diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-default-arguments.cpp.output b/regression-tests/test-results/gcc-10-c++20/pure2-default-arguments.cpp.output index e24aac089..49c29a222 100644 --- a/regression-tests/test-results/gcc-10-c++20/pure2-default-arguments.cpp.output +++ b/regression-tests/test-results/gcc-10-c++20/pure2-default-arguments.cpp.output @@ -1,66 +1,26 @@ In file included from pure2-default-arguments.cpp:7: -../../../include/cpp2util.h:2086:28: error: local variable ‘obj’ may not appear in this context - 2086 | if constexpr (std::is_same_v< typename It::type, C >) { if (CPP2_FORWARD(x).index() == It::index) { ptr = &std::get(x); return true; } }; - | ^~~ -../../../include/cpp2util.h:2047:34: note: in definition of macro ‘CPP2_UFCS_IDENTITY’ - 2047 | if (x.valueless_by_exception()) { - | ^~~~~~~~ -../../../include/cpp2util.h:2086:15: note: in expansion of macro ‘CPP2_FORWARD’ - 2086 | if constexpr (std::is_same_v< typename It::type, C >) { if (CPP2_FORWARD(x).index() == It::index) { ptr = &std::get(x); return true; } }; - | ^~~~~~~~~~~~ -../../../include/cpp2util.h:2107:22: note: in expansion of macro ‘CPP2_UFCS_CONSTRAINT_ARG’ - 2107 | // is Value - | ^ -../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’ - 2137 | // std::optional is and as - | ^ -pure2-default-arguments.cpp2:6:22: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’ -../../../include/cpp2util.h:2086:92: error: local variable ‘params’ may not appear in this context - 2086 | if constexpr (std::is_same_v< typename It::type, C >) { if (CPP2_FORWARD(x).index() == It::index) { ptr = &std::get(x); return true; } }; - | ^~~~~~ -../../../include/cpp2util.h:2047:34: note: in definition of macro ‘CPP2_UFCS_IDENTITY’ - 2047 | if (x.valueless_by_exception()) { - | ^~~~~~~~ -../../../include/cpp2util.h:2086:79: note: in expansion of macro ‘CPP2_FORWARD’ - 2086 | if constexpr (std::is_same_v< typename It::type, C >) { if (CPP2_FORWARD(x).index() == It::index) { ptr = &std::get(x); return true; } }; - | ^~~~~~~~~~~~ -../../../include/cpp2util.h:2107:22: note: in expansion of macro ‘CPP2_UFCS_CONSTRAINT_ARG’ - 2107 | // is Value - | ^ -../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’ - 2137 | // std::optional is and as - | ^ -pure2-default-arguments.cpp2:6:22: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’ -../../../include/cpp2util.h:2087:74: error: local variable ‘obj’ may not appear in this context - 2087 | return false; - | ^ -../../../include/cpp2util.h:2047:34: note: in definition of macro ‘CPP2_UFCS_IDENTITY’ - 2047 | if (x.valueless_by_exception()) { - | ^~~~~~~~ -../../../include/cpp2util.h:2087:61: note: in expansion of macro ‘CPP2_FORWARD’ - 2087 | return false; - | ^ -../../../include/cpp2util.h:2107:22: note: in expansion of macro ‘CPP2_UFCS_CONSTRAINT_ARG’ - 2107 | // is Value - | ^ -../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’ - 2137 | // std::optional is and as - | ^ -pure2-default-arguments.cpp2:6:22: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’ -../../../include/cpp2util.h:2087:93: error: local variable ‘params’ may not appear in this context - 2087 | return false; - | ^ -../../../include/cpp2util.h:2047:34: note: in definition of macro ‘CPP2_UFCS_IDENTITY’ - 2047 | if (x.valueless_by_exception()) { - | ^~~~~~~~ -../../../include/cpp2util.h:2087:80: note: in expansion of macro ‘CPP2_FORWARD’ - 2087 | return false; - | ^ -../../../include/cpp2util.h:2107:22: note: in expansion of macro ‘CPP2_UFCS_CONSTRAINT_ARG’ - 2107 | // is Value - | ^ -../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’ - 2137 | // std::optional is and as - | ^ -pure2-default-arguments.cpp2:6:22: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’ -pure2-default-arguments.cpp2:6:61: error: ‘std::source_location’ has not been declared +../../../include/cpp2util.h:10047:28: error: local variable ‘obj’ may not appear in this context +../../../include/cpp2util.h:10008:34: note: in definition of macro ‘CPP2_UFCS_IDENTITY’ +../../../include/cpp2util.h:10047:15: note: in expansion of macro ‘CPP2_FORWARD’ +../../../include/cpp2util.h:10066:22: note: in expansion of macro ‘CPP2_UFCS_CONSTRAINT_ARG’ +../../../include/cpp2util.h:10096:59: note: in expansion of macro ‘CPP2_UFCS_’ +pure2-default-arguments.cpp2:6:38: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’ +../../../include/cpp2util.h:10047:92: error: local variable ‘params’ may not appear in this context +../../../include/cpp2util.h:10008:34: note: in definition of macro ‘CPP2_UFCS_IDENTITY’ +../../../include/cpp2util.h:10047:79: note: in expansion of macro ‘CPP2_FORWARD’ +../../../include/cpp2util.h:10066:22: note: in expansion of macro ‘CPP2_UFCS_CONSTRAINT_ARG’ +../../../include/cpp2util.h:10096:59: note: in expansion of macro ‘CPP2_UFCS_’ +pure2-default-arguments.cpp2:6:38: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’ +../../../include/cpp2util.h:10048:74: error: local variable ‘obj’ may not appear in this context +../../../include/cpp2util.h:10008:34: note: in definition of macro ‘CPP2_UFCS_IDENTITY’ +../../../include/cpp2util.h:10048:61: note: in expansion of macro ‘CPP2_FORWARD’ +../../../include/cpp2util.h:10066:22: note: in expansion of macro ‘CPP2_UFCS_CONSTRAINT_ARG’ +../../../include/cpp2util.h:10096:59: note: in expansion of macro ‘CPP2_UFCS_’ +pure2-default-arguments.cpp2:6:38: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’ +../../../include/cpp2util.h:10048:93: error: local variable ‘params’ may not appear in this context +../../../include/cpp2util.h:10008:34: note: in definition of macro ‘CPP2_UFCS_IDENTITY’ +../../../include/cpp2util.h:10048:80: note: in expansion of macro ‘CPP2_FORWARD’ +../../../include/cpp2util.h:10066:22: note: in expansion of macro ‘CPP2_UFCS_CONSTRAINT_ARG’ +../../../include/cpp2util.h:10096:59: note: in expansion of macro ‘CPP2_UFCS_’ +pure2-default-arguments.cpp2:6:38: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’ +pure2-default-arguments.cpp2:6:77: error: ‘std::source_location’ has not been declared diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-expected-is-as.cpp.output b/regression-tests/test-results/gcc-10-c++20/pure2-expected-is-as.cpp.output new file mode 100644 index 000000000..d3c176907 --- /dev/null +++ b/regression-tests/test-results/gcc-10-c++20/pure2-expected-is-as.cpp.output @@ -0,0 +1,39 @@ +pure2-expected-is-as.cpp2: In function ‘int main()’: +pure2-expected-is-as.cpp2:7:10: error: ‘expected’ is not a member of ‘std’; did you mean ‘unexpected’? +pure2-expected-is-as.cpp2:7:19: error: expected primary-expression before ‘int’ +pure2-expected-is-as.cpp2:8:10: error: ‘expected’ is not a member of ‘std’; did you mean ‘unexpected’? +pure2-expected-is-as.cpp2:8:19: error: expected primary-expression before ‘int’ +pure2-expected-is-as.cpp2:9:10: error: ‘expected’ is not a member of ‘std’; did you mean ‘unexpected’? +pure2-expected-is-as.cpp2:9:30: error: expected primary-expression before ‘,’ token +pure2-expected-is-as.cpp2:9:37: error: expected primary-expression before ‘>’ token +pure2-expected-is-as.cpp2:9:39: error: ‘ex3’ was not declared in this scope; did you mean ‘exp’? +pure2-expected-is-as.cpp2:11:29: error: ‘ex1’ was not declared in this scope; did you mean ‘exp’? +pure2-expected-is-as.cpp2:15:30: error: ‘ex1’ was not declared in this scope; did you mean ‘exp’? +pure2-expected-is-as.cpp2:20:30: error: ‘ex1’ was not declared in this scope; did you mean ‘exp’? +pure2-expected-is-as.cpp2:25:21: error: parse error in template argument list +pure2-expected-is-as.cpp2:25:46: error: ‘ex1’ was not declared in this scope; did you mean ‘exp’? +pure2-expected-is-as.cpp2:30:24: error: ‘ex1’ was not declared in this scope; did you mean ‘exp’? +pure2-expected-is-as.cpp2:34:24: error: ‘ex1’ was not declared in this scope; did you mean ‘exp’? +pure2-expected-is-as.cpp2:39:37: error: ‘ex1’ was not declared in this scope; did you mean ‘exp’? +pure2-expected-is-as.cpp2:42:29: error: ‘ex2’ was not declared in this scope; did you mean ‘exp2’? +pure2-expected-is-as.cpp2:47:30: error: ‘ex2’ was not declared in this scope; did you mean ‘exp2’? +pure2-expected-is-as.cpp2:52:24: error: ‘ex2’ was not declared in this scope; did you mean ‘exp2’? +pure2-expected-is-as.cpp2:57:21: error: parse error in template argument list +pure2-expected-is-as.cpp2:57:46: error: ‘ex2’ was not declared in this scope; did you mean ‘exp2’? +pure2-expected-is-as.cpp2:61:30: error: ‘ex2’ was not declared in this scope; did you mean ‘exp2’? +pure2-expected-is-as.cpp2:65:31: error: parse error in template argument list +pure2-expected-is-as.cpp2:65:57: error: ‘ex2’ was not declared in this scope; did you mean ‘exp2’? +pure2-expected-is-as.cpp2: In function ‘void test_inspect(const auto:110&, const auto:111&)’: +pure2-expected-is-as.cpp2:77:55: error: template argument 1 is invalid +pure2-expected-is-as.cpp2:77:21: error: ‘cpp2::impl::unexp’ has not been declared +pure2-expected-is-as.cpp2: In lambda function: +pure2-expected-is-as.cpp2:78:33: error: ‘unexp’ was not declared in this scope +pure2-expected-is-as.cpp2: In lambda function: +pure2-expected-is-as.cpp2:85:34: error: parse error in template argument list +pure2-expected-is-as.cpp2:85:159: error: parse error in template argument list +In file included from pure2-expected-is-as.cpp:7: +pure2-expected-is-as.cpp2:85:309: error: parse error in template argument list +../../../include/cpp2util.h:323:66: note: in definition of macro ‘CPP2_TYPEOF’ + 323 | #define CPP2_TYPEOF(x) std::remove_cvref_t + | ^ +pure2-expected-is-as.cpp2:85:430: error: parse error in template argument list diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-function-body-reflection.cpp.execution b/regression-tests/test-results/gcc-10-c++20/pure2-function-body-reflection.cpp.execution new file mode 100644 index 000000000..d2076f3f7 --- /dev/null +++ b/regression-tests/test-results/gcc-10-c++20/pure2-function-body-reflection.cpp.execution @@ -0,0 +1 @@ +calling generated function ns::add_1... ns::add_1(42) returned 43 diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-hashable.cpp.output b/regression-tests/test-results/gcc-10-c++20/pure2-hashable.cpp.output index b8603fc72..52c7ec08d 100644 --- a/regression-tests/test-results/gcc-10-c++20/pure2-hashable.cpp.output +++ b/regression-tests/test-results/gcc-10-c++20/pure2-hashable.cpp.output @@ -1,14 +1,14 @@ pure2-hashable.cpp2:3:27: error: expected ‘;’ at end of member declaration In file included from pure2-hashable.cpp:7: -../../../include/cpp2util.h:10005:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10. +../../../include/cpp2util.h:10106:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10. pure2-hashable.cpp2:4:1: note: in expansion of macro ‘CPP2_REQUIRES_’ pure2-hashable.cpp2:6:42: error: expected ‘;’ at end of member declaration In file included from pure2-hashable.cpp:7: -../../../include/cpp2util.h:10005:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10. +../../../include/cpp2util.h:10106:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10. pure2-hashable.cpp2:7:1: note: in expansion of macro ‘CPP2_REQUIRES_’ pure2-hashable.cpp2:10:53: error: expected ‘;’ at end of member declaration In file included from pure2-hashable.cpp:7: -../../../include/cpp2util.h:10005:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10. +../../../include/cpp2util.h:10106:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10. pure2-hashable.cpp2:11:1: note: in expansion of macro ‘CPP2_REQUIRES_’ pure2-hashable.cpp2:3:1: error: no declaration matches ‘base::base(auto:115&&) requires is_convertible_v::type>::type, const std::add_const_t&>’ pure2-hashable.cpp2:1:7: note: candidates are: ‘constexpr base::base(base&&)’ diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-last-use.cpp.output b/regression-tests/test-results/gcc-10-c++20/pure2-last-use.cpp.output index aacfe5b98..3ca3f5ff8 100644 --- a/regression-tests/test-results/gcc-10-c++20/pure2-last-use.cpp.output +++ b/regression-tests/test-results/gcc-10-c++20/pure2-last-use.cpp.output @@ -1,71 +1,71 @@ pure2-last-use.cpp2:259:32: error: expected ‘;’ at end of member declaration In file included from pure2-last-use.cpp:7: -../../../include/cpp2util.h:10005:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10. +../../../include/cpp2util.h:10106:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10. pure2-last-use.cpp2:260:1: note: in expansion of macro ‘CPP2_REQUIRES_’ pure2-last-use.cpp2:262:49: error: expected ‘;’ at end of member declaration In file included from pure2-last-use.cpp:7: -../../../include/cpp2util.h:10005:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10. +../../../include/cpp2util.h:10106:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10. pure2-last-use.cpp2:263:1: note: in expansion of macro ‘CPP2_REQUIRES_’ pure2-last-use.cpp2:265:32: error: expected ‘;’ at end of member declaration In file included from pure2-last-use.cpp:7: -../../../include/cpp2util.h:10005:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10. +../../../include/cpp2util.h:10106:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10. pure2-last-use.cpp2:266:1: note: in expansion of macro ‘CPP2_REQUIRES_’ pure2-last-use.cpp2:268:49: error: expected ‘;’ at end of member declaration In file included from pure2-last-use.cpp:7: -../../../include/cpp2util.h:10005:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10. +../../../include/cpp2util.h:10106:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10. pure2-last-use.cpp2:269:1: note: in expansion of macro ‘CPP2_REQUIRES_’ pure2-last-use.cpp2:269:32: error: expected ‘;’ at end of member declaration In file included from pure2-last-use.cpp:7: -../../../include/cpp2util.h:10005:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10. +../../../include/cpp2util.h:10106:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10. pure2-last-use.cpp2:270:1: note: in expansion of macro ‘CPP2_REQUIRES_’ pure2-last-use.cpp2:272:49: error: expected ‘;’ at end of member declaration In file included from pure2-last-use.cpp:7: -../../../include/cpp2util.h:10005:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10. +../../../include/cpp2util.h:10106:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10. pure2-last-use.cpp2:273:1: note: in expansion of macro ‘CPP2_REQUIRES_’ pure2-last-use.cpp2:274:16: error: ‘move_only_function’ in namespace ‘std’ does not name a template type pure2-last-use.cpp2:275:16: error: ‘move_only_function’ in namespace ‘std’ does not name a template type pure2-last-use.cpp2:276:67: error: expected ‘;’ at end of member declaration In file included from pure2-last-use.cpp:7: -../../../include/cpp2util.h:10005:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10. +../../../include/cpp2util.h:10106:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10. pure2-last-use.cpp2:277:1: note: in expansion of macro ‘CPP2_REQUIRES_’ pure2-last-use.cpp2:334:32: error: expected ‘;’ at end of member declaration In file included from pure2-last-use.cpp:7: -../../../include/cpp2util.h:10005:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10. +../../../include/cpp2util.h:10106:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10. pure2-last-use.cpp2:335:1: note: in expansion of macro ‘CPP2_REQUIRES_’ pure2-last-use.cpp2:337:49: error: expected ‘;’ at end of member declaration In file included from pure2-last-use.cpp:7: -../../../include/cpp2util.h:10005:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10. +../../../include/cpp2util.h:10106:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10. pure2-last-use.cpp2:338:1: note: in expansion of macro ‘CPP2_REQUIRES_’ pure2-last-use.cpp2:340:32: error: expected ‘;’ at end of member declaration In file included from pure2-last-use.cpp:7: -../../../include/cpp2util.h:10005:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10. +../../../include/cpp2util.h:10106:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10. pure2-last-use.cpp2:341:1: note: in expansion of macro ‘CPP2_REQUIRES_’ pure2-last-use.cpp2:344:16: error: ‘move_only_function’ in namespace ‘std’ does not name a template type pure2-last-use.cpp2:347:54: error: expected ‘;’ at end of member declaration In file included from pure2-last-use.cpp:7: -../../../include/cpp2util.h:10005:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10. +../../../include/cpp2util.h:10106:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10. pure2-last-use.cpp2:348:1: note: in expansion of macro ‘CPP2_REQUIRES_’ pure2-last-use.cpp2:773:64: error: ‘std::move_only_function’ has not been declared pure2-last-use.cpp2:773:87: error: expected ‘,’ or ‘...’ before ‘<’ token pure2-last-use.cpp2:849:49: error: expected ‘;’ at end of member declaration In file included from pure2-last-use.cpp:7: -../../../include/cpp2util.h:10005:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10. +../../../include/cpp2util.h:10106:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10. pure2-last-use.cpp2:850:1: note: in expansion of macro ‘CPP2_REQUIRES_’ pure2-last-use.cpp2:922:22: error: expected ‘;’ at end of member declaration In file included from pure2-last-use.cpp:7: -../../../include/cpp2util.h:10005:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10. +../../../include/cpp2util.h:10106:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10. pure2-last-use.cpp2:923:1: note: in expansion of macro ‘CPP2_REQUIRES_’ pure2-last-use.cpp2:925:39: error: expected ‘;’ at end of member declaration In file included from pure2-last-use.cpp:7: -../../../include/cpp2util.h:10005:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10. +../../../include/cpp2util.h:10106:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10. pure2-last-use.cpp2:926:1: note: in expansion of macro ‘CPP2_REQUIRES_’ pure2-last-use.cpp2:980:26: error: expected ‘;’ at end of member declaration In file included from pure2-last-use.cpp:7: -../../../include/cpp2util.h:10005:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10. +../../../include/cpp2util.h:10106:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10. pure2-last-use.cpp2:981:1: note: in expansion of macro ‘CPP2_REQUIRES_’ pure2-last-use.cpp2:983:43: error: expected ‘;’ at end of member declaration In file included from pure2-last-use.cpp:7: -../../../include/cpp2util.h:10005:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10. +../../../include/cpp2util.h:10106:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10. pure2-last-use.cpp2:984:1: note: in expansion of macro ‘CPP2_REQUIRES_’ pure2-last-use.cpp2:183:3: error: no declaration matches ‘issue_857_2::issue_857_2(auto:155&&) requires is_convertible_v::type>::type, const std::add_const_t > >&>’ pure2-last-use.cpp2:257:7: note: candidates are: ‘issue_857_2::issue_857_2(issue_857_2&&)’ @@ -102,9 +102,9 @@ pure2-last-use.cpp2:266:7: note: candidates are: ‘issue_857_6& issue_857_6::op pure2-last-use.cpp2:266:7: note: ‘issue_857_6& issue_857_6::operator=(const issue_857_6&)’ pure2-last-use.cpp2:272:14: note: ‘template issue_857_6& issue_857_6::operator=(auto:125&&)’ pure2-last-use.cpp2:266:7: note: ‘class issue_857_6’ defined here -pure2-last-use.cpp2:279:272: error: ‘move_only_function’ is not a member of ‘std’ -pure2-last-use.cpp2:279:295: error: template argument 1 is invalid -pure2-last-use.cpp2:279:299: error: expected primary-expression before ‘>’ token -pure2-last-use.cpp2:279:304: error: label ‘std’ referenced outside of any function -pure2-last-use.cpp2:279:307: error: expected ‘)’ before ‘::’ token +pure2-last-use.cpp2:279:301: error: ‘move_only_function’ is not a member of ‘std’ +pure2-last-use.cpp2:279:324: error: template argument 1 is invalid +pure2-last-use.cpp2:279:328: error: expected primary-expression before ‘>’ token +pure2-last-use.cpp2:279:333: error: label ‘std’ referenced outside of any function +pure2-last-use.cpp2:279:336: error: expected ‘)’ before ‘::’ token pure2-last-use.cpp2:280: confused by earlier errors, bailing out diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-print.cpp.output b/regression-tests/test-results/gcc-10-c++20/pure2-print.cpp.output index 7c8de51c7..976adc19c 100644 --- a/regression-tests/test-results/gcc-10-c++20/pure2-print.cpp.output +++ b/regression-tests/test-results/gcc-10-c++20/pure2-print.cpp.output @@ -1,11 +1,11 @@ In file included from pure2-print.cpp:7: -../../../include/cpp2util.h:10005:33: error: expected unqualified-id before ‘static_assert’ +../../../include/cpp2util.h:10106:33: error: expected unqualified-id before ‘static_assert’ pure2-print.cpp2:9:1: note: in expansion of macro ‘CPP2_REQUIRES_’ pure2-print.cpp2:67:59: error: expected ‘;’ at end of member declaration In file included from pure2-print.cpp:7: -../../../include/cpp2util.h:10005:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10. +../../../include/cpp2util.h:10106:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10. pure2-print.cpp2:68:1: note: in expansion of macro ‘CPP2_REQUIRES_’ -../../../include/cpp2util.h:10005:33: error: expected initializer before ‘static_assert’ +../../../include/cpp2util.h:10106:33: error: expected initializer before ‘static_assert’ pure2-print.cpp2:97:1: note: in expansion of macro ‘CPP2_REQUIRES_’ pure2-print.cpp2:9:41: error: ‘constexpr const T outer::object_alias’ is not a static data member of ‘class outer’ pure2-print.cpp2:9:48: error: template definition of non-template ‘constexpr const T outer::object_alias’ diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex-general.cpp.execution b/regression-tests/test-results/gcc-10-c++20/pure2-regex-general.cpp.execution new file mode 100644 index 000000000..c44d08490 --- /dev/null +++ b/regression-tests/test-results/gcc-10-c++20/pure2-regex-general.cpp.execution @@ -0,0 +1,11 @@ +Running tests_01_char_matcher: +Not full match fails: 0 +Full match is ok: 1 +Search finds at position 1: 1 +Search finds at position 3: 3 +Find all finds at position: 1 +Find all finds at position: 4 +Find all finds at position: 7 +Find all found 3 matched: 3 +Find all finds at position: 2 +Find all found 1 match: 1 diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_04_start_end.cpp.execution b/regression-tests/test-results/gcc-10-c++20/pure2-regex_04_start_end.cpp.execution index 6fef36434..a1e2b9b63 100644 --- a/regression-tests/test-results/gcc-10-c++20/pure2-regex_04_start_end.cpp.execution +++ b/regression-tests/test-results/gcc-10-c++20/pure2-regex_04_start_end.cpp.execution @@ -8,4 +8,5 @@ Running tests_04_start_end: 07_y: OK regex: ^ parsed_regex: ^ str: abc result_expr: $& expected_results 08_y: OK regex: $ parsed_regex: $ str: abc result_expr: $& expected_results 09_n: OK regex: $b parsed_regex: $b str: b result_expr: - expected_results - +10_n: OK regex: \GX.*X parsed_regex: \GX.*X str: aaaXbX result_expr: - expected_results - diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_19_lookahead.cpp.execution b/regression-tests/test-results/gcc-10-c++20/pure2-regex_19_lookahead.cpp.execution index d4c65d951..0f723eb77 100644 --- a/regression-tests/test-results/gcc-10-c++20/pure2-regex_19_lookahead.cpp.execution +++ b/regression-tests/test-results/gcc-10-c++20/pure2-regex_19_lookahead.cpp.execution @@ -27,6 +27,14 @@ Running tests_19_lookahead: 26_y: OK regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) parsed_regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) str: aaaaaaaa result_expr: $1 expected_results aaaaaaa 27_y: OK regex: a(?!b(?!c))(..) parsed_regex: a(?!b(?!c))(..) str: abababc result_expr: $1 expected_results bc 28_y: OK regex: a(?!b(?=a))(..) parsed_regex: a(?!b(?=a))(..) str: abababc result_expr: $1 expected_results bc +29_y: OK regex: (?=foo) parsed_regex: (?=foo) str: foo result_expr: @+ expected_results 0 +30_y: OK regex: (?=foo) parsed_regex: (?=foo) str: XfooY result_expr: @+ expected_results 1 +31_y: OK regex: .*(?=foo) parsed_regex: .*(?=foo) str: XfooY result_expr: @+ expected_results 1 +32_y: OK regex: (?=.*P)P parsed_regex: (?=.*P)P str: aP result_expr: @+ expected_results 2 +33_y: OK regex: X(?=foo)f parsed_regex: X(?=foo)f str: ..XfooY.. result_expr: @+ expected_results 4 +34_y: OK regex: X(?=foo) parsed_regex: X(?=foo) str: ..XfooY.. result_expr: @+ expected_results 3 +35_y: OK regex: (?=XY*foo) parsed_regex: (?=XY*foo) str: Xfoo result_expr: @+ expected_results 0 +36_y: OK regex: ^(?=XY*foo) parsed_regex: ^(?=XY*foo) str: Xfoo result_expr: @+ expected_results 0 37_y: OK regex: X(\w+)(?=\s)|X(\w+) parsed_regex: X(\w+)(?=\s)|X(\w+) str: Xab result_expr: [$1-$2] expected_results [-ab] 38_y: OK regex: ^a*(?=b)b parsed_regex: ^a*(?=b)b str: ab result_expr: $& expected_results ab 39_y: OK regex: '(?!\A)x'm parsed_regex: '(?!\A)x'm str: a\nxb\n result_expr: - expected_results - @@ -44,4 +52,6 @@ Running tests_19_lookahead: 51_y: OK regex: ((?s)b.)c(?!\N) parsed_regex: ((?s)b.)c(?!\N) str: a\nb\nc\n result_expr: $1:$& expected_results b\n:b\nc 52_y: OK regex: '(b.)c(?!\N)'s parsed_regex: '(b.)c(?!\N)'s str: a\nb\nc\n result_expr: $1:$& expected_results b\n:b\nc 53_n: OK regex: a*(?!) parsed_regex: a*(?!) str: aaaab result_expr: - expected_results - +54_y: OK regex: (?)foo parsed_regex: (?)foo str: bar>ABCfoo result_expr: $& expected_results foo +55_y: OK regex: (?ABC)foo parsed_regex: (?ABC)foo str: bar>ABCfoo result_expr: $& expected_results ABCfoo diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_20_lookbehind.cpp.execution b/regression-tests/test-results/gcc-10-c++20/pure2-regex_20_lookbehind.cpp.execution new file mode 100644 index 000000000..cd61d4f56 --- /dev/null +++ b/regression-tests/test-results/gcc-10-c++20/pure2-regex_20_lookbehind.cpp.execution @@ -0,0 +1,58 @@ +Running tests_20_lookbehind: +01_y: OK regex: (?<=a)b parsed_regex: (?<=a)b str: ab result_expr: $& expected_results b +02_y: OK regex: (?<=af?)b parsed_regex: (?<=af?)b str: ab result_expr: $& expected_results b +03_n: OK regex: (?<=a)b parsed_regex: (?<=a)b str: cb result_expr: - expected_results - +04_n: OK regex: (?<=a(?:fo)?)b parsed_regex: (?<=a(?:fo)?)b str: cb result_expr: - expected_results - +05_n: OK regex: (?<=a)b parsed_regex: (?<=a)b str: b result_expr: - expected_results - +06_n: OK regex: (?<=a(?:foo)?)b parsed_regex: (?<=a(?:foo)?)b str: b result_expr: - expected_results - +07_y: OK regex: (?)foo parsed_regex: (?<=bar>)foo str: bar>foo result_expr: $& expected_results foo +50_n: OK regex: (?)foo parsed_regex: (?)foo str: bar>foo result_expr: - expected_results - +51_y: OK regex: (?<=bar>ABC)foo parsed_regex: (?<=bar>ABC)foo str: bar>ABCfoo result_expr: $& expected_results foo +52_n: OK regex: (?ABC)foo parsed_regex: (?ABC)foo str: bar>ABCfoo result_expr: - expected_results - +53_y: OK regex: (?<=abcd(?<=(aaaabcd))) parsed_regex: (?<=abcd(?<=(aaaabcd))) str: ..aaaabcd.. result_expr: $1 expected_results aaaabcd +54_y: OK regex: (?=xy(?<=(aaxy))) parsed_regex: (?=xy(?<=(aaxy))) str: ..aaxy.. result_expr: $1 expected_results aaxy +55_y: OK regex: (?=xy(?<=(aaxyz?))) parsed_regex: (?=xy(?<=(aaxyz?))) str: ..aaxy.. result_expr: $1 expected_results aaxy +56_y: OK regex: (?<=(?=(aaxy))aa) parsed_regex: (?<=(?=(aaxy))aa) str: ..aaxy.. result_expr: $1 expected_results aaxy + diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_21_atomic_patterns.cpp.execution b/regression-tests/test-results/gcc-10-c++20/pure2-regex_21_atomic_patterns.cpp.execution new file mode 100644 index 000000000..4812cfbb8 --- /dev/null +++ b/regression-tests/test-results/gcc-10-c++20/pure2-regex_21_atomic_patterns.cpp.execution @@ -0,0 +1,8 @@ +Running tests_21_atomic_patterns: +01_y: OK regex: (?>a+)b parsed_regex: (?>a+)b str: aaab result_expr: - expected_results - +02_y: OK regex: ((?>a+)b) parsed_regex: ((?>a+)b) str: aaab result_expr: $1 expected_results aaab +03_y: OK regex: (?>(a+))b parsed_regex: (?>(a+))b str: aaab result_expr: $1 expected_results aaa +04_y: OK regex: ((?>[^()]+)|\([^()]*\))+ parsed_regex: ((?>[^()]+)|\([^()]*\))+ str: ((abc(ade)ufh()()x result_expr: $& expected_results abc(ade)ufh()()x +05_y: OK regex: round\(((?>[^()]+))\) parsed_regex: round\(((?>[^()]+))\) str: _I(round(xs * sz),1) result_expr: $1 expected_results xs * sz +06_y: OK regex: ^((?>(?:aa)?b)?) parsed_regex: ^((?>(?:aa)?b)?) str: aab result_expr: $1 expected_results aab + diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-requires-clauses.cpp.output b/regression-tests/test-results/gcc-10-c++20/pure2-requires-clauses.cpp.output index ff9d345ec..d8d3706ca 100644 --- a/regression-tests/test-results/gcc-10-c++20/pure2-requires-clauses.cpp.output +++ b/regression-tests/test-results/gcc-10-c++20/pure2-requires-clauses.cpp.output @@ -1,3 +1,3 @@ In file included from pure2-requires-clauses.cpp:7: -../../../include/cpp2util.h:10005:33: error: expected unqualified-id before ‘static_assert’ +../../../include/cpp2util.h:10106:33: error: expected unqualified-id before ‘static_assert’ pure2-requires-clauses.cpp2:21:1: note: in expansion of macro ‘CPP2_REQUIRES_’ diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-singleton-and-static.cpp.execution b/regression-tests/test-results/gcc-10-c++20/pure2-singleton-and-static.cpp.execution new file mode 100644 index 000000000..d81cc0710 --- /dev/null +++ b/regression-tests/test-results/gcc-10-c++20/pure2-singleton-and-static.cpp.execution @@ -0,0 +1 @@ +42 diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-trailing-commas.cpp.output b/regression-tests/test-results/gcc-10-c++20/pure2-trailing-commas.cpp.output index 3cb7e8f10..60c626379 100644 --- a/regression-tests/test-results/gcc-10-c++20/pure2-trailing-commas.cpp.output +++ b/regression-tests/test-results/gcc-10-c++20/pure2-trailing-commas.cpp.output @@ -1,10 +1,10 @@ pure2-trailing-commas.cpp2:10:23: error: expected ‘;’ at end of member declaration In file included from pure2-trailing-commas.cpp:7: -../../../include/cpp2util.h:10005:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10. +../../../include/cpp2util.h:10106:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10. pure2-trailing-commas.cpp2:11:1: note: in expansion of macro ‘CPP2_REQUIRES_’ pure2-trailing-commas.cpp2:13:42: error: expected ‘;’ at end of member declaration In file included from pure2-trailing-commas.cpp:7: -../../../include/cpp2util.h:10005:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10. +../../../include/cpp2util.h:10106:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10. pure2-trailing-commas.cpp2:14:1: note: in expansion of macro ‘CPP2_REQUIRES_’ pure2-trailing-commas.cpp2:9:1: error: no declaration matches ‘vals::vals(auto:116&&) requires is_convertible_v::type>::type, const std::add_const_t&>’ pure2-trailing-commas.cpp2:9:7: note: candidates are: ‘constexpr vals::vals(vals&&)’ diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-try-catch.cpp.execution b/regression-tests/test-results/gcc-10-c++20/pure2-try-catch.cpp.execution new file mode 100644 index 000000000..c37cb6b5f --- /dev/null +++ b/regression-tests/test-results/gcc-10-c++20/pure2-try-catch.cpp.execution @@ -0,0 +1,2 @@ +oh look, a thrown int: 42 +oh look, another exception diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-type-safety-1.cpp.execution b/regression-tests/test-results/gcc-10-c++20/pure2-type-safety-1.cpp.execution index d1aa6265a..df9d257d3 100644 --- a/regression-tests/test-results/gcc-10-c++20/pure2-type-safety-1.cpp.execution +++ b/regression-tests/test-results/gcc-10-c++20/pure2-type-safety-1.cpp.execution @@ -7,3 +7,5 @@ variant is int? true any is int? true optional is int? true +optional is: int +optional<*D> is: *B *D diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-types-ordering-via-meta-functions.cpp.output b/regression-tests/test-results/gcc-10-c++20/pure2-types-ordering-via-meta-functions.cpp.output index a73207a53..4230a5730 100644 --- a/regression-tests/test-results/gcc-10-c++20/pure2-types-ordering-via-meta-functions.cpp.output +++ b/regression-tests/test-results/gcc-10-c++20/pure2-types-ordering-via-meta-functions.cpp.output @@ -1,10 +1,10 @@ pure2-types-ordering-via-meta-functions.cpp2:19:33: error: expected ‘;’ at end of member declaration In file included from pure2-types-ordering-via-meta-functions.cpp:7: -../../../include/cpp2util.h:10005:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10. +../../../include/cpp2util.h:10106:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10. pure2-types-ordering-via-meta-functions.cpp2:20:1: note: in expansion of macro ‘CPP2_REQUIRES_’ pure2-types-ordering-via-meta-functions.cpp2:22:48: error: expected ‘;’ at end of member declaration In file included from pure2-types-ordering-via-meta-functions.cpp:7: -../../../include/cpp2util.h:10005:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10. +../../../include/cpp2util.h:10106:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10. pure2-types-ordering-via-meta-functions.cpp2:23:1: note: in expansion of macro ‘CPP2_REQUIRES_’ pure2-types-ordering-via-meta-functions.cpp2:19:5: error: no declaration matches ‘mystruct::mystruct(auto:112&&) requires is_convertible_v::type>::type, const std::add_const_t&>’ pure2-types-ordering-via-meta-functions.cpp2:17:7: note: candidates are: ‘constexpr mystruct::mystruct(mystruct&&)’ diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp.execution b/regression-tests/test-results/gcc-10-c++20/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp.execution index 541b2a0d9..371e06b05 100644 --- a/regression-tests/test-results/gcc-10-c++20/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp.execution +++ b/regression-tests/test-results/gcc-10-c++20/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp.execution @@ -4,5 +4,4 @@ ctor - from string construct [ Henry | 123 Ford Dr. ] ctor - from string assign [ Clara | 123 Ford Dr. ] ctor - copy (GENERAL) cp-construct [ Clara | 123 Ford Dr. ] <- [ Clara | 123 Ford Dr. ] ctor - move mv-construct [ Clara(CM) | 123 Ford Dr. ] <- [ | ] -ctor - copy (GENERAL) cp-assign [ Clara | 123 Ford Dr. ] <- [ Clara | 123 Ford Dr. ] assign - move mv-assign [ Clara | 123 Ford Dr. ] <- [ | ] diff --git a/regression-tests/test-results/gcc-10-c++20/run-tests-gcc-10.sh b/regression-tests/test-results/gcc-10-c++20/run-tests-gcc-10.sh index 098601c49..c7bea3ed8 100644 --- a/regression-tests/test-results/gcc-10-c++20/run-tests-gcc-10.sh +++ b/regression-tests/test-results/gcc-10-c++20/run-tests-gcc-10.sh @@ -10,7 +10,7 @@ for f in *.cpp do let count=count+1 printf "[%s] Starting gcc 10 %s\n" "$count" "$f" - g++-10 -I../../../include -std=c++20 -pthread -Wold-style-cast -Wunused-parameter -o test.exe $f > $f.output 2>&1 + g++-10 -I../../../include -std=c++20 -pthread -Wold-style-cast -Wunused-parameter -Wno-unused-result -o test.exe $f > $f.output 2>&1 rm -f $f if test -f "test.exe"; then let exe_count=exe_count+1 diff --git a/regression-tests/test-results/gcc-13-c++2b/mixed-autodiff-taylor.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/mixed-autodiff-taylor.cpp.execution new file mode 100644 index 000000000..0a486b06f --- /dev/null +++ b/regression-tests/test-results/gcc-13-c++2b/mixed-autodiff-taylor.cpp.execution @@ -0,0 +1,63 @@ +x + x = 4.000000 +x + x diff order 1 = 2.000000 +x + x diff order 2 = 0.000000 +x + x diff order 3 = 0.000000 +x + x diff order 4 = 0.000000 +x + x diff order 5 = 0.000000 +x + x diff order 6 = 0.000000 +0 - x = -2.000000 +0 - x diff order 1 = -1.000000 +0 - x diff order 2 = 0.000000 +0 - x diff order 3 = 0.000000 +0 - x diff order 4 = 0.000000 +0 - x diff order 5 = 0.000000 +0 - x diff order 6 = 0.000000 +x^7 = 128.000000 +x^7 diff order 1 = 448.000000 +x^7 diff order 2 = 1344.000000 +x^7 diff order 3 = 3360.000000 +x^7 diff order 4 = 6720.000000 +x^7 diff order 5 = 10080.000000 +x^7 diff order 6 = 10080.000000 +1/x = 0.500000 +1/x diff order 1 = -0.250000 +1/x diff order 2 = 0.250000 +1/x diff order 3 = -0.375000 +1/x diff order 4 = 0.750000 +1/x diff order 5 = -1.875000 +1/x diff order 6 = 5.625000 +sqrt(x) = 1.414214 +sqrt(x) diff order 1 = 0.353553 +sqrt(x) diff order 2 = -0.088388 +sqrt(x) diff order 3 = 0.066291 +sqrt(x) diff order 4 = -0.082864 +sqrt(x) diff order 5 = 0.145012 +sqrt(x) diff order 6 = -0.326277 +log(x) = 0.693147 +log(x) diff order 1 = 0.500000 +log(x) diff order 2 = -0.250000 +log(x) diff order 3 = 0.250000 +log(x) diff order 4 = -0.375000 +log(x) diff order 5 = 0.750000 +log(x) diff order 6 = -1.875000 +exp(x) = 7.389056 +exp(x) diff order 1 = 7.389056 +exp(x) diff order 2 = 7.389056 +exp(x) diff order 3 = 7.389056 +exp(x) diff order 4 = 7.389056 +exp(x) diff order 5 = 7.389056 +exp(x) diff order 6 = 7.389056 +sin(x) = 0.909297 +sin(x) diff order 1 = -0.416147 +sin(x) diff order 2 = -0.909297 +sin(x) diff order 3 = 0.416147 +sin(x) diff order 4 = 0.909297 +sin(x) diff order 5 = -0.416147 +sin(x) diff order 6 = -0.909297 +cos(x) = -0.416147 +cos(x) diff order 1 = -0.909297 +cos(x) diff order 2 = 0.416147 +cos(x) diff order 3 = 0.909297 +cos(x) diff order 4 = -0.416147 +cos(x) diff order 5 = -0.909297 +cos(x) diff order 6 = 0.416147 diff --git a/regression-tests/test-results/gcc-13-c++2b/mixed-bounds-safety-with-assert.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/mixed-bounds-safety-with-assert.cpp.execution index a5e330156..654e69a8c 100644 --- a/regression-tests/test-results/gcc-13-c++2b/mixed-bounds-safety-with-assert.cpp.execution +++ b/regression-tests/test-results/gcc-13-c++2b/mixed-bounds-safety-with-assert.cpp.execution @@ -1 +1 @@ -mixed-bounds-safety-with-assert.cpp2(11) void print_subrange(const auto:115&, cpp2::impl::in, cpp2::impl::in) [with auto:115 = std::vector; cpp2::impl::in = const int]: Bounds safety violation +mixed-bounds-safety-with-assert.cpp2(11) void print_subrange(const auto:130&, cpp2::impl::in, cpp2::impl::in) [with auto:130 = std::vector; cpp2::impl::in = const int]: Bounds safety violation diff --git a/regression-tests/test-results/gcc-13-c++2b/mixed-bugfix-for-ufcs-non-local.cpp.output b/regression-tests/test-results/gcc-13-c++2b/mixed-bugfix-for-ufcs-non-local.cpp.output index dc9d6f979..d41c45e6a 100644 --- a/regression-tests/test-results/gcc-13-c++2b/mixed-bugfix-for-ufcs-non-local.cpp.output +++ b/regression-tests/test-results/gcc-13-c++2b/mixed-bugfix-for-ufcs-non-local.cpp.output @@ -1,41 +1,21 @@ In file included from mixed-bugfix-for-ufcs-non-local.cpp:6: -../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type - 2100 | // - | ^ -../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’ - 2137 | return std::same_as; - | ^ +../../../include/cpp2util.h:10059:1: error: lambda-expression in template parameter type +../../../include/cpp2util.h:10096:59: note: in expansion of macro ‘CPP2_UFCS_’ mixed-bugfix-for-ufcs-non-local.cpp2:13:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’ mixed-bugfix-for-ufcs-non-local.cpp2:13:36: error: template argument 1 is invalid -../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type - 2100 | // - | ^ -../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’ - 2137 | return std::same_as; - | ^ +../../../include/cpp2util.h:10059:1: error: lambda-expression in template parameter type +../../../include/cpp2util.h:10096:59: note: in expansion of macro ‘CPP2_UFCS_’ mixed-bugfix-for-ufcs-non-local.cpp2:21:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’ mixed-bugfix-for-ufcs-non-local.cpp2:21:36: error: template argument 1 is invalid -../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type - 2100 | // - | ^ -../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’ - 2137 | return std::same_as; - | ^ +../../../include/cpp2util.h:10059:1: error: lambda-expression in template parameter type +../../../include/cpp2util.h:10096:59: note: in expansion of macro ‘CPP2_UFCS_’ mixed-bugfix-for-ufcs-non-local.cpp2:31:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’ mixed-bugfix-for-ufcs-non-local.cpp2:31:36: error: template argument 1 is invalid -../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type - 2100 | // - | ^ -../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’ - 2137 | return std::same_as; - | ^ +../../../include/cpp2util.h:10059:1: error: lambda-expression in template parameter type +../../../include/cpp2util.h:10096:59: note: in expansion of macro ‘CPP2_UFCS_’ mixed-bugfix-for-ufcs-non-local.cpp2:33:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’ mixed-bugfix-for-ufcs-non-local.cpp2:33:36: error: template argument 1 is invalid -../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type - 2100 | // - | ^ -../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’ - 2137 | return std::same_as; - | ^ +../../../include/cpp2util.h:10059:1: error: lambda-expression in template parameter type +../../../include/cpp2util.h:10096:59: note: in expansion of macro ‘CPP2_UFCS_’ mixed-bugfix-for-ufcs-non-local.cpp2:21:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’ mixed-bugfix-for-ufcs-non-local.cpp2:21:36: error: template argument 1 is invalid diff --git a/regression-tests/test-results/gcc-13-c++2b/mixed-parameter-passing.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/mixed-parameter-passing.cpp.execution new file mode 100644 index 000000000..256f7e186 --- /dev/null +++ b/regression-tests/test-results/gcc-13-c++2b/mixed-parameter-passing.cpp.execution @@ -0,0 +1,2 @@ +123 +0 diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-autodiff-higher-order.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/pure2-autodiff-higher-order.cpp.execution new file mode 100644 index 000000000..84a5f58de --- /dev/null +++ b/regression-tests/test-results/gcc-13-c++2b/pure2-autodiff-higher-order.cpp.execution @@ -0,0 +1,240 @@ +diff(x + y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x + y + x) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 7.000000 + d1 = 4.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x - y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = -1.000000 + d1 = -1.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x - y - x) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = -3.000000 + d1 = -2.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x + y - x) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 3.000000 + d1 = 2.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x * y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 6.000000 + d1 = 7.000000 + d2 = 4.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x * y * x) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 12.000000 + d1 = 20.000000 + d2 = 22.000000 + d3 = 12.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x / y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 0.666667 + d1 = -0.111111 + d2 = 0.148148 + d3 = -0.296296 + d4 = 0.790123 + d5 = -2.633745 + d6 = 10.534979 +diff(x / y / y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 0.222222 + d1 = -0.185185 + d2 = 0.296296 + d3 = -0.691358 + d4 = 2.106996 + d5 = -7.901235 + d6 = 35.116598 +diff(x * y / x) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 3.000000 + d1 = 2.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x * (x + y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 10.000000 + d1 = 11.000000 + d2 = 6.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x + x * y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 8.000000 + d1 = 8.000000 + d2 = 4.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(+x + y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(-x + y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 1.000000 + d1 = 1.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x * func(x, y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 10.000000 + d1 = 11.000000 + d2 = 6.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x * func_outer(x, y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 10.000000 + d1 = 11.000000 + d2 = 6.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(sin(x - y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = -0.841471 + d1 = -0.540302 + d2 = 0.841471 + d3 = 0.540302 + d4 = -0.841471 + d5 = -0.540302 + d6 = 0.841471 +diff(if branch) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 2.000000 + d1 = 1.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(if else branch) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 2.000000 + d1 = 1.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(direct return) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(intermediate var) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(intermediate passive var) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(intermediate untyped) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(intermediate default init) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(intermediate no init) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(while loop) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 8.000000 + d1 = 5.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(do while loop) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 8.000000 + d1 = 5.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(for loop) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(tye_outer.a + y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(type_outer.add(y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-autodiff.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/pure2-autodiff.cpp.execution new file mode 100644 index 000000000..863bd6bd5 --- /dev/null +++ b/regression-tests/test-results/gcc-13-c++2b/pure2-autodiff.cpp.execution @@ -0,0 +1,46 @@ +diff(x + y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(x + y + x) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 7.000000, r_d = 4.000000) +diff(x - y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = -1.000000, r_d = -1.000000) +diff(x - y - x) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = -3.000000, r_d = -2.000000) +diff(x + y - x) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 3.000000, r_d = 2.000000) +diff(x * y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 6.000000, r_d = 7.000000) +diff(x * y * x) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 12.000000, r_d = 20.000000) +diff(x / y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 0.666667, r_d = -0.111111) +diff(x / y / y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 0.222222, r_d = -0.185185) +diff(x * y / x) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 3.000000, r_d = 2.000000) +diff(x * (x + y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 10.000000, r_d = 11.000000) +diff(x + x * y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 8.000000, r_d = 8.000000) +diff(+x + y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(-x + y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 1.000000, r_d = 1.000000) +diff(x * func(x, y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 10.000000, r_d = 11.000000) +diff(x * func_outer(x, y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 10.000000, r_d = 11.000000) +diff(sin(x - y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = -0.841471, r_d = -0.540302) +diff(if branch) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 2.000000, r_d = 1.000000) +diff(if else branch) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 2.000000, r_d = 1.000000) +diff(direct return) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(intermediate var) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(intermediate passive var) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(intermediate untyped) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(intermediate default init) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(intermediate no init) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(while loop) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 8.000000, r_d = 5.000000) +diff(do while loop) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 8.000000, r_d = 5.000000) +diff(for loop) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(tye_outer.a + y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(type_outer.add(y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(x + y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 5.000000, x_b = 1.000000, y_b = 1.000000) +diff(x + y + x) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 7.000000, x_b = 2.000000, y_b = 1.000000) +diff(x - y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = -1.000000, x_b = 1.000000, y_b = -1.000000) +diff(x - y - x) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = -3.000000, x_b = 0.000000, y_b = -1.000000) +diff(x + y - x) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 3.000000, x_b = 0.000000, y_b = 1.000000) +diff(x * y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 6.000000, x_b = 3.000000, y_b = 2.000000) +diff(x * y * x) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 12.000000, x_b = 12.000000, y_b = 4.000000) +diff(x / y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 0.666667, x_b = 0.333333, y_b = -0.222222) +diff(x / y / y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 0.222222, x_b = 0.111111, y_b = -0.148148) +diff(x * y / x) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 3.000000, x_b = 0.000000, y_b = 1.000000) +diff(x * (x + y)) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 10.000000, x_b = 7.000000, y_b = 2.000000) +diff(x + x * y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 8.000000, x_b = 4.000000, y_b = 2.000000) +diff(sin(x-y)) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = -0.841471, x_b = 0.540302, y_b = -0.540302) +diff(x * func(x-y)) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 10.000000, x_b = 7.000000, y_b = 2.000000) +diff(x * func_outer(x-y)) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 10.000000, x_b = 7.000000, y_b = 2.000000) +2nd order diff of x*x at 2.000000 = 2.000000 diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-expected-is-as.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/pure2-expected-is-as.cpp.execution new file mode 100644 index 000000000..5483d6cd7 --- /dev/null +++ b/regression-tests/test-results/gcc-13-c++2b/pure2-expected-is-as.cpp.execution @@ -0,0 +1,15 @@ +ex1 is int +ex1 is 123 +ex1 as int = 123 +ex2 is unexpected and error is: -1 +ex2 is 'empty' aka unexpected and error is: -1 +ex2 as std::unexpected and error = -1 + +expected with value + ...integer 123 + +expected with unexpected + ...unexpected -1 + +expected with value + ...string Expect the unexpected diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-function-body-reflection.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/pure2-function-body-reflection.cpp.execution new file mode 100644 index 000000000..d2076f3f7 --- /dev/null +++ b/regression-tests/test-results/gcc-13-c++2b/pure2-function-body-reflection.cpp.execution @@ -0,0 +1 @@ +calling generated function ns::add_1... ns::add_1(42) returned 43 diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-function-single-expression-body-default-return.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/pure2-function-single-expression-body-default-return.cpp.execution new file mode 100644 index 000000000..30f4cb910 --- /dev/null +++ b/regression-tests/test-results/gcc-13-c++2b/pure2-function-single-expression-body-default-return.cpp.execution @@ -0,0 +1 @@ +hi ho hum \ No newline at end of file diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-hashable.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/pure2-hashable.cpp.execution new file mode 100644 index 000000000..a11f9eb59 --- /dev/null +++ b/regression-tests/test-results/gcc-13-c++2b/pure2-hashable.cpp.execution @@ -0,0 +1 @@ +6443762454025613088 \ No newline at end of file diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex-general.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/pure2-regex-general.cpp.execution new file mode 100644 index 000000000..c44d08490 --- /dev/null +++ b/regression-tests/test-results/gcc-13-c++2b/pure2-regex-general.cpp.execution @@ -0,0 +1,11 @@ +Running tests_01_char_matcher: +Not full match fails: 0 +Full match is ok: 1 +Search finds at position 1: 1 +Search finds at position 3: 3 +Find all finds at position: 1 +Find all finds at position: 4 +Find all finds at position: 7 +Find all found 3 matched: 3 +Find all finds at position: 2 +Find all found 1 match: 1 diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_04_start_end.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_04_start_end.cpp.execution index 6fef36434..a1e2b9b63 100644 --- a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_04_start_end.cpp.execution +++ b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_04_start_end.cpp.execution @@ -8,4 +8,5 @@ Running tests_04_start_end: 07_y: OK regex: ^ parsed_regex: ^ str: abc result_expr: $& expected_results 08_y: OK regex: $ parsed_regex: $ str: abc result_expr: $& expected_results 09_n: OK regex: $b parsed_regex: $b str: b result_expr: - expected_results - +10_n: OK regex: \GX.*X parsed_regex: \GX.*X str: aaaXbX result_expr: - expected_results - diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_19_lookahead.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_19_lookahead.cpp.execution index d4c65d951..0f723eb77 100644 --- a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_19_lookahead.cpp.execution +++ b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_19_lookahead.cpp.execution @@ -27,6 +27,14 @@ Running tests_19_lookahead: 26_y: OK regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) parsed_regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) str: aaaaaaaa result_expr: $1 expected_results aaaaaaa 27_y: OK regex: a(?!b(?!c))(..) parsed_regex: a(?!b(?!c))(..) str: abababc result_expr: $1 expected_results bc 28_y: OK regex: a(?!b(?=a))(..) parsed_regex: a(?!b(?=a))(..) str: abababc result_expr: $1 expected_results bc +29_y: OK regex: (?=foo) parsed_regex: (?=foo) str: foo result_expr: @+ expected_results 0 +30_y: OK regex: (?=foo) parsed_regex: (?=foo) str: XfooY result_expr: @+ expected_results 1 +31_y: OK regex: .*(?=foo) parsed_regex: .*(?=foo) str: XfooY result_expr: @+ expected_results 1 +32_y: OK regex: (?=.*P)P parsed_regex: (?=.*P)P str: aP result_expr: @+ expected_results 2 +33_y: OK regex: X(?=foo)f parsed_regex: X(?=foo)f str: ..XfooY.. result_expr: @+ expected_results 4 +34_y: OK regex: X(?=foo) parsed_regex: X(?=foo) str: ..XfooY.. result_expr: @+ expected_results 3 +35_y: OK regex: (?=XY*foo) parsed_regex: (?=XY*foo) str: Xfoo result_expr: @+ expected_results 0 +36_y: OK regex: ^(?=XY*foo) parsed_regex: ^(?=XY*foo) str: Xfoo result_expr: @+ expected_results 0 37_y: OK regex: X(\w+)(?=\s)|X(\w+) parsed_regex: X(\w+)(?=\s)|X(\w+) str: Xab result_expr: [$1-$2] expected_results [-ab] 38_y: OK regex: ^a*(?=b)b parsed_regex: ^a*(?=b)b str: ab result_expr: $& expected_results ab 39_y: OK regex: '(?!\A)x'm parsed_regex: '(?!\A)x'm str: a\nxb\n result_expr: - expected_results - @@ -44,4 +52,6 @@ Running tests_19_lookahead: 51_y: OK regex: ((?s)b.)c(?!\N) parsed_regex: ((?s)b.)c(?!\N) str: a\nb\nc\n result_expr: $1:$& expected_results b\n:b\nc 52_y: OK regex: '(b.)c(?!\N)'s parsed_regex: '(b.)c(?!\N)'s str: a\nb\nc\n result_expr: $1:$& expected_results b\n:b\nc 53_n: OK regex: a*(?!) parsed_regex: a*(?!) str: aaaab result_expr: - expected_results - +54_y: OK regex: (?)foo parsed_regex: (?)foo str: bar>ABCfoo result_expr: $& expected_results foo +55_y: OK regex: (?ABC)foo parsed_regex: (?ABC)foo str: bar>ABCfoo result_expr: $& expected_results ABCfoo diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_20_lookbehind.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_20_lookbehind.cpp.execution new file mode 100644 index 000000000..cd61d4f56 --- /dev/null +++ b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_20_lookbehind.cpp.execution @@ -0,0 +1,58 @@ +Running tests_20_lookbehind: +01_y: OK regex: (?<=a)b parsed_regex: (?<=a)b str: ab result_expr: $& expected_results b +02_y: OK regex: (?<=af?)b parsed_regex: (?<=af?)b str: ab result_expr: $& expected_results b +03_n: OK regex: (?<=a)b parsed_regex: (?<=a)b str: cb result_expr: - expected_results - +04_n: OK regex: (?<=a(?:fo)?)b parsed_regex: (?<=a(?:fo)?)b str: cb result_expr: - expected_results - +05_n: OK regex: (?<=a)b parsed_regex: (?<=a)b str: b result_expr: - expected_results - +06_n: OK regex: (?<=a(?:foo)?)b parsed_regex: (?<=a(?:foo)?)b str: b result_expr: - expected_results - +07_y: OK regex: (?)foo parsed_regex: (?<=bar>)foo str: bar>foo result_expr: $& expected_results foo +50_n: OK regex: (?)foo parsed_regex: (?)foo str: bar>foo result_expr: - expected_results - +51_y: OK regex: (?<=bar>ABC)foo parsed_regex: (?<=bar>ABC)foo str: bar>ABCfoo result_expr: $& expected_results foo +52_n: OK regex: (?ABC)foo parsed_regex: (?ABC)foo str: bar>ABCfoo result_expr: - expected_results - +53_y: OK regex: (?<=abcd(?<=(aaaabcd))) parsed_regex: (?<=abcd(?<=(aaaabcd))) str: ..aaaabcd.. result_expr: $1 expected_results aaaabcd +54_y: OK regex: (?=xy(?<=(aaxy))) parsed_regex: (?=xy(?<=(aaxy))) str: ..aaxy.. result_expr: $1 expected_results aaxy +55_y: OK regex: (?=xy(?<=(aaxyz?))) parsed_regex: (?=xy(?<=(aaxyz?))) str: ..aaxy.. result_expr: $1 expected_results aaxy +56_y: OK regex: (?<=(?=(aaxy))aa) parsed_regex: (?<=(?=(aaxy))aa) str: ..aaxy.. result_expr: $1 expected_results aaxy + diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_21_atomic_patterns.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_21_atomic_patterns.cpp.execution new file mode 100644 index 000000000..4812cfbb8 --- /dev/null +++ b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_21_atomic_patterns.cpp.execution @@ -0,0 +1,8 @@ +Running tests_21_atomic_patterns: +01_y: OK regex: (?>a+)b parsed_regex: (?>a+)b str: aaab result_expr: - expected_results - +02_y: OK regex: ((?>a+)b) parsed_regex: ((?>a+)b) str: aaab result_expr: $1 expected_results aaab +03_y: OK regex: (?>(a+))b parsed_regex: (?>(a+))b str: aaab result_expr: $1 expected_results aaa +04_y: OK regex: ((?>[^()]+)|\([^()]*\))+ parsed_regex: ((?>[^()]+)|\([^()]*\))+ str: ((abc(ade)ufh()()x result_expr: $& expected_results abc(ade)ufh()()x +05_y: OK regex: round\(((?>[^()]+))\) parsed_regex: round\(((?>[^()]+))\) str: _I(round(xs * sz),1) result_expr: $1 expected_results xs * sz +06_y: OK regex: ^((?>(?:aa)?b)?) parsed_regex: ^((?>(?:aa)?b)?) str: aab result_expr: $1 expected_results aab + diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-singleton-and-static.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/pure2-singleton-and-static.cpp.execution new file mode 100644 index 000000000..d81cc0710 --- /dev/null +++ b/regression-tests/test-results/gcc-13-c++2b/pure2-singleton-and-static.cpp.execution @@ -0,0 +1 @@ +42 diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-try-catch.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/pure2-try-catch.cpp.execution new file mode 100644 index 000000000..c37cb6b5f --- /dev/null +++ b/regression-tests/test-results/gcc-13-c++2b/pure2-try-catch.cpp.execution @@ -0,0 +1,2 @@ +oh look, a thrown int: 42 +oh look, another exception diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-type-safety-1.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/pure2-type-safety-1.cpp.execution index d1aa6265a..df9d257d3 100644 --- a/regression-tests/test-results/gcc-13-c++2b/pure2-type-safety-1.cpp.execution +++ b/regression-tests/test-results/gcc-13-c++2b/pure2-type-safety-1.cpp.execution @@ -7,3 +7,5 @@ variant is int? true any is int? true optional is int? true +optional is: int +optional<*D> is: *B *D diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp.execution index 541b2a0d9..371e06b05 100644 --- a/regression-tests/test-results/gcc-13-c++2b/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp.execution +++ b/regression-tests/test-results/gcc-13-c++2b/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp.execution @@ -4,5 +4,4 @@ ctor - from string construct [ Henry | 123 Ford Dr. ] ctor - from string assign [ Clara | 123 Ford Dr. ] ctor - copy (GENERAL) cp-construct [ Clara | 123 Ford Dr. ] <- [ Clara | 123 Ford Dr. ] ctor - move mv-construct [ Clara(CM) | 123 Ford Dr. ] <- [ | ] -ctor - copy (GENERAL) cp-assign [ Clara | 123 Ford Dr. ] <- [ Clara | 123 Ford Dr. ] assign - move mv-assign [ Clara | 123 Ford Dr. ] <- [ | ] diff --git a/regression-tests/test-results/gcc-14-c++2b/mixed-autodiff-taylor.cpp.execution b/regression-tests/test-results/gcc-14-c++2b/mixed-autodiff-taylor.cpp.execution new file mode 100644 index 000000000..0a486b06f --- /dev/null +++ b/regression-tests/test-results/gcc-14-c++2b/mixed-autodiff-taylor.cpp.execution @@ -0,0 +1,63 @@ +x + x = 4.000000 +x + x diff order 1 = 2.000000 +x + x diff order 2 = 0.000000 +x + x diff order 3 = 0.000000 +x + x diff order 4 = 0.000000 +x + x diff order 5 = 0.000000 +x + x diff order 6 = 0.000000 +0 - x = -2.000000 +0 - x diff order 1 = -1.000000 +0 - x diff order 2 = 0.000000 +0 - x diff order 3 = 0.000000 +0 - x diff order 4 = 0.000000 +0 - x diff order 5 = 0.000000 +0 - x diff order 6 = 0.000000 +x^7 = 128.000000 +x^7 diff order 1 = 448.000000 +x^7 diff order 2 = 1344.000000 +x^7 diff order 3 = 3360.000000 +x^7 diff order 4 = 6720.000000 +x^7 diff order 5 = 10080.000000 +x^7 diff order 6 = 10080.000000 +1/x = 0.500000 +1/x diff order 1 = -0.250000 +1/x diff order 2 = 0.250000 +1/x diff order 3 = -0.375000 +1/x diff order 4 = 0.750000 +1/x diff order 5 = -1.875000 +1/x diff order 6 = 5.625000 +sqrt(x) = 1.414214 +sqrt(x) diff order 1 = 0.353553 +sqrt(x) diff order 2 = -0.088388 +sqrt(x) diff order 3 = 0.066291 +sqrt(x) diff order 4 = -0.082864 +sqrt(x) diff order 5 = 0.145012 +sqrt(x) diff order 6 = -0.326277 +log(x) = 0.693147 +log(x) diff order 1 = 0.500000 +log(x) diff order 2 = -0.250000 +log(x) diff order 3 = 0.250000 +log(x) diff order 4 = -0.375000 +log(x) diff order 5 = 0.750000 +log(x) diff order 6 = -1.875000 +exp(x) = 7.389056 +exp(x) diff order 1 = 7.389056 +exp(x) diff order 2 = 7.389056 +exp(x) diff order 3 = 7.389056 +exp(x) diff order 4 = 7.389056 +exp(x) diff order 5 = 7.389056 +exp(x) diff order 6 = 7.389056 +sin(x) = 0.909297 +sin(x) diff order 1 = -0.416147 +sin(x) diff order 2 = -0.909297 +sin(x) diff order 3 = 0.416147 +sin(x) diff order 4 = 0.909297 +sin(x) diff order 5 = -0.416147 +sin(x) diff order 6 = -0.909297 +cos(x) = -0.416147 +cos(x) diff order 1 = -0.909297 +cos(x) diff order 2 = 0.416147 +cos(x) diff order 3 = 0.909297 +cos(x) diff order 4 = -0.416147 +cos(x) diff order 5 = -0.909297 +cos(x) diff order 6 = 0.416147 diff --git a/regression-tests/test-results/gcc-14-c++2b/mixed-bounds-safety-with-assert.cpp.execution b/regression-tests/test-results/gcc-14-c++2b/mixed-bounds-safety-with-assert.cpp.execution index 537e09a0b..4c63abc41 100644 --- a/regression-tests/test-results/gcc-14-c++2b/mixed-bounds-safety-with-assert.cpp.execution +++ b/regression-tests/test-results/gcc-14-c++2b/mixed-bounds-safety-with-assert.cpp.execution @@ -1 +1 @@ -mixed-bounds-safety-with-assert.cpp2(11) void print_subrange(const auto:122&, cpp2::impl::in, cpp2::impl::in) [with auto:122 = std::vector; cpp2::impl::in = const int]: Bounds safety violation +mixed-bounds-safety-with-assert.cpp2(11) void print_subrange(const auto:123&, cpp2::impl::in, cpp2::impl::in) [with auto:123 = std::vector; cpp2::impl::in = const int]: Bounds safety violation diff --git a/regression-tests/test-results/gcc-14-c++2b/mixed-bugfix-for-ufcs-non-local.cpp.output b/regression-tests/test-results/gcc-14-c++2b/mixed-bugfix-for-ufcs-non-local.cpp.output index 7ec15744d..d41c45e6a 100644 --- a/regression-tests/test-results/gcc-14-c++2b/mixed-bugfix-for-ufcs-non-local.cpp.output +++ b/regression-tests/test-results/gcc-14-c++2b/mixed-bugfix-for-ufcs-non-local.cpp.output @@ -1,41 +1,21 @@ In file included from mixed-bugfix-for-ufcs-non-local.cpp:6: -../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type - 2100 | constexpr auto is( X const& x ) -> bool{ - | ^ -../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’ - 2137 | // std::optional is and as - | ^ +../../../include/cpp2util.h:10059:1: error: lambda-expression in template parameter type +../../../include/cpp2util.h:10096:59: note: in expansion of macro ‘CPP2_UFCS_’ mixed-bugfix-for-ufcs-non-local.cpp2:13:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’ mixed-bugfix-for-ufcs-non-local.cpp2:13:36: error: template argument 1 is invalid -../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type - 2100 | constexpr auto is( X const& x ) -> bool{ - | ^ -../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’ - 2137 | // std::optional is and as - | ^ +../../../include/cpp2util.h:10059:1: error: lambda-expression in template parameter type +../../../include/cpp2util.h:10096:59: note: in expansion of macro ‘CPP2_UFCS_’ mixed-bugfix-for-ufcs-non-local.cpp2:21:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’ mixed-bugfix-for-ufcs-non-local.cpp2:21:36: error: template argument 1 is invalid -../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type - 2100 | constexpr auto is( X const& x ) -> bool{ - | ^ -../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’ - 2137 | // std::optional is and as - | ^ +../../../include/cpp2util.h:10059:1: error: lambda-expression in template parameter type +../../../include/cpp2util.h:10096:59: note: in expansion of macro ‘CPP2_UFCS_’ mixed-bugfix-for-ufcs-non-local.cpp2:31:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’ mixed-bugfix-for-ufcs-non-local.cpp2:31:36: error: template argument 1 is invalid -../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type - 2100 | constexpr auto is( X const& x ) -> bool{ - | ^ -../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’ - 2137 | // std::optional is and as - | ^ +../../../include/cpp2util.h:10059:1: error: lambda-expression in template parameter type +../../../include/cpp2util.h:10096:59: note: in expansion of macro ‘CPP2_UFCS_’ mixed-bugfix-for-ufcs-non-local.cpp2:33:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’ mixed-bugfix-for-ufcs-non-local.cpp2:33:36: error: template argument 1 is invalid -../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type - 2100 | constexpr auto is( X const& x ) -> bool{ - | ^ -../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’ - 2137 | // std::optional is and as - | ^ +../../../include/cpp2util.h:10059:1: error: lambda-expression in template parameter type +../../../include/cpp2util.h:10096:59: note: in expansion of macro ‘CPP2_UFCS_’ mixed-bugfix-for-ufcs-non-local.cpp2:21:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’ mixed-bugfix-for-ufcs-non-local.cpp2:21:36: error: template argument 1 is invalid diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-autodiff-higher-order.cpp.execution b/regression-tests/test-results/gcc-14-c++2b/pure2-autodiff-higher-order.cpp.execution new file mode 100644 index 000000000..84a5f58de --- /dev/null +++ b/regression-tests/test-results/gcc-14-c++2b/pure2-autodiff-higher-order.cpp.execution @@ -0,0 +1,240 @@ +diff(x + y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x + y + x) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 7.000000 + d1 = 4.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x - y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = -1.000000 + d1 = -1.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x - y - x) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = -3.000000 + d1 = -2.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x + y - x) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 3.000000 + d1 = 2.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x * y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 6.000000 + d1 = 7.000000 + d2 = 4.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x * y * x) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 12.000000 + d1 = 20.000000 + d2 = 22.000000 + d3 = 12.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x / y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 0.666667 + d1 = -0.111111 + d2 = 0.148148 + d3 = -0.296296 + d4 = 0.790123 + d5 = -2.633745 + d6 = 10.534979 +diff(x / y / y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 0.222222 + d1 = -0.185185 + d2 = 0.296296 + d3 = -0.691358 + d4 = 2.106996 + d5 = -7.901235 + d6 = 35.116598 +diff(x * y / x) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 3.000000 + d1 = 2.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x * (x + y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 10.000000 + d1 = 11.000000 + d2 = 6.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x + x * y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 8.000000 + d1 = 8.000000 + d2 = 4.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(+x + y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(-x + y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 1.000000 + d1 = 1.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x * func(x, y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 10.000000 + d1 = 11.000000 + d2 = 6.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x * func_outer(x, y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 10.000000 + d1 = 11.000000 + d2 = 6.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(sin(x - y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = -0.841471 + d1 = -0.540302 + d2 = 0.841471 + d3 = 0.540302 + d4 = -0.841471 + d5 = -0.540302 + d6 = 0.841471 +diff(if branch) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 2.000000 + d1 = 1.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(if else branch) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 2.000000 + d1 = 1.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(direct return) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(intermediate var) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(intermediate passive var) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(intermediate untyped) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(intermediate default init) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(intermediate no init) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(while loop) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 8.000000 + d1 = 5.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(do while loop) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 8.000000 + d1 = 5.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(for loop) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(tye_outer.a + y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(type_outer.add(y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-autodiff.cpp.execution b/regression-tests/test-results/gcc-14-c++2b/pure2-autodiff.cpp.execution new file mode 100644 index 000000000..863bd6bd5 --- /dev/null +++ b/regression-tests/test-results/gcc-14-c++2b/pure2-autodiff.cpp.execution @@ -0,0 +1,46 @@ +diff(x + y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(x + y + x) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 7.000000, r_d = 4.000000) +diff(x - y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = -1.000000, r_d = -1.000000) +diff(x - y - x) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = -3.000000, r_d = -2.000000) +diff(x + y - x) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 3.000000, r_d = 2.000000) +diff(x * y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 6.000000, r_d = 7.000000) +diff(x * y * x) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 12.000000, r_d = 20.000000) +diff(x / y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 0.666667, r_d = -0.111111) +diff(x / y / y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 0.222222, r_d = -0.185185) +diff(x * y / x) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 3.000000, r_d = 2.000000) +diff(x * (x + y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 10.000000, r_d = 11.000000) +diff(x + x * y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 8.000000, r_d = 8.000000) +diff(+x + y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(-x + y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 1.000000, r_d = 1.000000) +diff(x * func(x, y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 10.000000, r_d = 11.000000) +diff(x * func_outer(x, y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 10.000000, r_d = 11.000000) +diff(sin(x - y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = -0.841471, r_d = -0.540302) +diff(if branch) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 2.000000, r_d = 1.000000) +diff(if else branch) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 2.000000, r_d = 1.000000) +diff(direct return) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(intermediate var) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(intermediate passive var) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(intermediate untyped) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(intermediate default init) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(intermediate no init) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(while loop) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 8.000000, r_d = 5.000000) +diff(do while loop) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 8.000000, r_d = 5.000000) +diff(for loop) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(tye_outer.a + y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(type_outer.add(y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(x + y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 5.000000, x_b = 1.000000, y_b = 1.000000) +diff(x + y + x) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 7.000000, x_b = 2.000000, y_b = 1.000000) +diff(x - y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = -1.000000, x_b = 1.000000, y_b = -1.000000) +diff(x - y - x) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = -3.000000, x_b = 0.000000, y_b = -1.000000) +diff(x + y - x) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 3.000000, x_b = 0.000000, y_b = 1.000000) +diff(x * y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 6.000000, x_b = 3.000000, y_b = 2.000000) +diff(x * y * x) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 12.000000, x_b = 12.000000, y_b = 4.000000) +diff(x / y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 0.666667, x_b = 0.333333, y_b = -0.222222) +diff(x / y / y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 0.222222, x_b = 0.111111, y_b = -0.148148) +diff(x * y / x) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 3.000000, x_b = 0.000000, y_b = 1.000000) +diff(x * (x + y)) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 10.000000, x_b = 7.000000, y_b = 2.000000) +diff(x + x * y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 8.000000, x_b = 4.000000, y_b = 2.000000) +diff(sin(x-y)) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = -0.841471, x_b = 0.540302, y_b = -0.540302) +diff(x * func(x-y)) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 10.000000, x_b = 7.000000, y_b = 2.000000) +diff(x * func_outer(x-y)) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 10.000000, x_b = 7.000000, y_b = 2.000000) +2nd order diff of x*x at 2.000000 = 2.000000 diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-expected-is-as.cpp.execution b/regression-tests/test-results/gcc-14-c++2b/pure2-expected-is-as.cpp.execution new file mode 100644 index 000000000..5483d6cd7 --- /dev/null +++ b/regression-tests/test-results/gcc-14-c++2b/pure2-expected-is-as.cpp.execution @@ -0,0 +1,15 @@ +ex1 is int +ex1 is 123 +ex1 as int = 123 +ex2 is unexpected and error is: -1 +ex2 is 'empty' aka unexpected and error is: -1 +ex2 as std::unexpected and error = -1 + +expected with value + ...integer 123 + +expected with unexpected + ...unexpected -1 + +expected with value + ...string Expect the unexpected diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-function-body-reflection.cpp.execution b/regression-tests/test-results/gcc-14-c++2b/pure2-function-body-reflection.cpp.execution new file mode 100644 index 000000000..d2076f3f7 --- /dev/null +++ b/regression-tests/test-results/gcc-14-c++2b/pure2-function-body-reflection.cpp.execution @@ -0,0 +1 @@ +calling generated function ns::add_1... ns::add_1(42) returned 43 diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex-general.cpp.execution b/regression-tests/test-results/gcc-14-c++2b/pure2-regex-general.cpp.execution new file mode 100644 index 000000000..c44d08490 --- /dev/null +++ b/regression-tests/test-results/gcc-14-c++2b/pure2-regex-general.cpp.execution @@ -0,0 +1,11 @@ +Running tests_01_char_matcher: +Not full match fails: 0 +Full match is ok: 1 +Search finds at position 1: 1 +Search finds at position 3: 3 +Find all finds at position: 1 +Find all finds at position: 4 +Find all finds at position: 7 +Find all found 3 matched: 3 +Find all finds at position: 2 +Find all found 1 match: 1 diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_04_start_end.cpp.execution b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_04_start_end.cpp.execution index 6fef36434..a1e2b9b63 100644 --- a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_04_start_end.cpp.execution +++ b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_04_start_end.cpp.execution @@ -8,4 +8,5 @@ Running tests_04_start_end: 07_y: OK regex: ^ parsed_regex: ^ str: abc result_expr: $& expected_results 08_y: OK regex: $ parsed_regex: $ str: abc result_expr: $& expected_results 09_n: OK regex: $b parsed_regex: $b str: b result_expr: - expected_results - +10_n: OK regex: \GX.*X parsed_regex: \GX.*X str: aaaXbX result_expr: - expected_results - diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_19_lookahead.cpp.execution b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_19_lookahead.cpp.execution index d4c65d951..0f723eb77 100644 --- a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_19_lookahead.cpp.execution +++ b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_19_lookahead.cpp.execution @@ -27,6 +27,14 @@ Running tests_19_lookahead: 26_y: OK regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) parsed_regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) str: aaaaaaaa result_expr: $1 expected_results aaaaaaa 27_y: OK regex: a(?!b(?!c))(..) parsed_regex: a(?!b(?!c))(..) str: abababc result_expr: $1 expected_results bc 28_y: OK regex: a(?!b(?=a))(..) parsed_regex: a(?!b(?=a))(..) str: abababc result_expr: $1 expected_results bc +29_y: OK regex: (?=foo) parsed_regex: (?=foo) str: foo result_expr: @+ expected_results 0 +30_y: OK regex: (?=foo) parsed_regex: (?=foo) str: XfooY result_expr: @+ expected_results 1 +31_y: OK regex: .*(?=foo) parsed_regex: .*(?=foo) str: XfooY result_expr: @+ expected_results 1 +32_y: OK regex: (?=.*P)P parsed_regex: (?=.*P)P str: aP result_expr: @+ expected_results 2 +33_y: OK regex: X(?=foo)f parsed_regex: X(?=foo)f str: ..XfooY.. result_expr: @+ expected_results 4 +34_y: OK regex: X(?=foo) parsed_regex: X(?=foo) str: ..XfooY.. result_expr: @+ expected_results 3 +35_y: OK regex: (?=XY*foo) parsed_regex: (?=XY*foo) str: Xfoo result_expr: @+ expected_results 0 +36_y: OK regex: ^(?=XY*foo) parsed_regex: ^(?=XY*foo) str: Xfoo result_expr: @+ expected_results 0 37_y: OK regex: X(\w+)(?=\s)|X(\w+) parsed_regex: X(\w+)(?=\s)|X(\w+) str: Xab result_expr: [$1-$2] expected_results [-ab] 38_y: OK regex: ^a*(?=b)b parsed_regex: ^a*(?=b)b str: ab result_expr: $& expected_results ab 39_y: OK regex: '(?!\A)x'm parsed_regex: '(?!\A)x'm str: a\nxb\n result_expr: - expected_results - @@ -44,4 +52,6 @@ Running tests_19_lookahead: 51_y: OK regex: ((?s)b.)c(?!\N) parsed_regex: ((?s)b.)c(?!\N) str: a\nb\nc\n result_expr: $1:$& expected_results b\n:b\nc 52_y: OK regex: '(b.)c(?!\N)'s parsed_regex: '(b.)c(?!\N)'s str: a\nb\nc\n result_expr: $1:$& expected_results b\n:b\nc 53_n: OK regex: a*(?!) parsed_regex: a*(?!) str: aaaab result_expr: - expected_results - +54_y: OK regex: (?)foo parsed_regex: (?)foo str: bar>ABCfoo result_expr: $& expected_results foo +55_y: OK regex: (?ABC)foo parsed_regex: (?ABC)foo str: bar>ABCfoo result_expr: $& expected_results ABCfoo diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_20_lookbehind.cpp.execution b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_20_lookbehind.cpp.execution new file mode 100644 index 000000000..cd61d4f56 --- /dev/null +++ b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_20_lookbehind.cpp.execution @@ -0,0 +1,58 @@ +Running tests_20_lookbehind: +01_y: OK regex: (?<=a)b parsed_regex: (?<=a)b str: ab result_expr: $& expected_results b +02_y: OK regex: (?<=af?)b parsed_regex: (?<=af?)b str: ab result_expr: $& expected_results b +03_n: OK regex: (?<=a)b parsed_regex: (?<=a)b str: cb result_expr: - expected_results - +04_n: OK regex: (?<=a(?:fo)?)b parsed_regex: (?<=a(?:fo)?)b str: cb result_expr: - expected_results - +05_n: OK regex: (?<=a)b parsed_regex: (?<=a)b str: b result_expr: - expected_results - +06_n: OK regex: (?<=a(?:foo)?)b parsed_regex: (?<=a(?:foo)?)b str: b result_expr: - expected_results - +07_y: OK regex: (?)foo parsed_regex: (?<=bar>)foo str: bar>foo result_expr: $& expected_results foo +50_n: OK regex: (?)foo parsed_regex: (?)foo str: bar>foo result_expr: - expected_results - +51_y: OK regex: (?<=bar>ABC)foo parsed_regex: (?<=bar>ABC)foo str: bar>ABCfoo result_expr: $& expected_results foo +52_n: OK regex: (?ABC)foo parsed_regex: (?ABC)foo str: bar>ABCfoo result_expr: - expected_results - +53_y: OK regex: (?<=abcd(?<=(aaaabcd))) parsed_regex: (?<=abcd(?<=(aaaabcd))) str: ..aaaabcd.. result_expr: $1 expected_results aaaabcd +54_y: OK regex: (?=xy(?<=(aaxy))) parsed_regex: (?=xy(?<=(aaxy))) str: ..aaxy.. result_expr: $1 expected_results aaxy +55_y: OK regex: (?=xy(?<=(aaxyz?))) parsed_regex: (?=xy(?<=(aaxyz?))) str: ..aaxy.. result_expr: $1 expected_results aaxy +56_y: OK regex: (?<=(?=(aaxy))aa) parsed_regex: (?<=(?=(aaxy))aa) str: ..aaxy.. result_expr: $1 expected_results aaxy + diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_21_atomic_patterns.cpp.execution b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_21_atomic_patterns.cpp.execution new file mode 100644 index 000000000..4812cfbb8 --- /dev/null +++ b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_21_atomic_patterns.cpp.execution @@ -0,0 +1,8 @@ +Running tests_21_atomic_patterns: +01_y: OK regex: (?>a+)b parsed_regex: (?>a+)b str: aaab result_expr: - expected_results - +02_y: OK regex: ((?>a+)b) parsed_regex: ((?>a+)b) str: aaab result_expr: $1 expected_results aaab +03_y: OK regex: (?>(a+))b parsed_regex: (?>(a+))b str: aaab result_expr: $1 expected_results aaa +04_y: OK regex: ((?>[^()]+)|\([^()]*\))+ parsed_regex: ((?>[^()]+)|\([^()]*\))+ str: ((abc(ade)ufh()()x result_expr: $& expected_results abc(ade)ufh()()x +05_y: OK regex: round\(((?>[^()]+))\) parsed_regex: round\(((?>[^()]+))\) str: _I(round(xs * sz),1) result_expr: $1 expected_results xs * sz +06_y: OK regex: ^((?>(?:aa)?b)?) parsed_regex: ^((?>(?:aa)?b)?) str: aab result_expr: $1 expected_results aab + diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-singleton-and-static.cpp.execution b/regression-tests/test-results/gcc-14-c++2b/pure2-singleton-and-static.cpp.execution new file mode 100644 index 000000000..d81cc0710 --- /dev/null +++ b/regression-tests/test-results/gcc-14-c++2b/pure2-singleton-and-static.cpp.execution @@ -0,0 +1 @@ +42 diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-try-catch.cpp.execution b/regression-tests/test-results/gcc-14-c++2b/pure2-try-catch.cpp.execution new file mode 100644 index 000000000..c37cb6b5f --- /dev/null +++ b/regression-tests/test-results/gcc-14-c++2b/pure2-try-catch.cpp.execution @@ -0,0 +1,2 @@ +oh look, a thrown int: 42 +oh look, another exception diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-type-safety-1.cpp.execution b/regression-tests/test-results/gcc-14-c++2b/pure2-type-safety-1.cpp.execution index d1aa6265a..df9d257d3 100644 --- a/regression-tests/test-results/gcc-14-c++2b/pure2-type-safety-1.cpp.execution +++ b/regression-tests/test-results/gcc-14-c++2b/pure2-type-safety-1.cpp.execution @@ -7,3 +7,5 @@ variant is int? true any is int? true optional is int? true +optional is: int +optional<*D> is: *B *D diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp.execution b/regression-tests/test-results/gcc-14-c++2b/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp.execution index 541b2a0d9..371e06b05 100644 --- a/regression-tests/test-results/gcc-14-c++2b/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp.execution +++ b/regression-tests/test-results/gcc-14-c++2b/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp.execution @@ -4,5 +4,4 @@ ctor - from string construct [ Henry | 123 Ford Dr. ] ctor - from string assign [ Clara | 123 Ford Dr. ] ctor - copy (GENERAL) cp-construct [ Clara | 123 Ford Dr. ] <- [ Clara | 123 Ford Dr. ] ctor - move mv-construct [ Clara(CM) | 123 Ford Dr. ] <- [ | ] -ctor - copy (GENERAL) cp-assign [ Clara | 123 Ford Dr. ] <- [ Clara | 123 Ford Dr. ] assign - move mv-assign [ Clara | 123 Ford Dr. ] <- [ | ] diff --git a/regression-tests/test-results/gcc-14-c++2b/run-tests-gcc-14.sh b/regression-tests/test-results/gcc-14-c++2b/run-tests-gcc-14.sh index 562777443..1eefbd0f4 100644 --- a/regression-tests/test-results/gcc-14-c++2b/run-tests-gcc-14.sh +++ b/regression-tests/test-results/gcc-14-c++2b/run-tests-gcc-14.sh @@ -10,7 +10,7 @@ for f in *.cpp do let count=count+1 printf "[%s] Starting gcc 14 %s\n" "$count" "$f" - g++ -I../../../include -std=c++2b -pthread -Wold-style-cast -Wunused-parameter -o test.exe $f > $f.output 2>&1 + g++ -I../../../include -std=c++2b -pthread -Wold-style-cast -Wunused-parameter -Wno-unused-result -o test.exe $f > $f.output 2>&1 rm -f $f if test -f "test.exe"; then let exe_count=exe_count+1 diff --git a/regression-tests/test-results/mixed-autodiff-taylor.cpp b/regression-tests/test-results/mixed-autodiff-taylor.cpp new file mode 100644 index 000000000..0d9798c13 --- /dev/null +++ b/regression-tests/test-results/mixed-autodiff-taylor.cpp @@ -0,0 +1,215 @@ +#include + + +//=== Cpp2 type declarations ==================================================== + + +#include "cpp2util.h" + +#line 1 "mixed-autodiff-taylor.cpp2" + + +//=== Cpp2 type definitions and function declarations =========================== + +#line 1 "mixed-autodiff-taylor.cpp2" + +#line 3 "mixed-autodiff-taylor.cpp2" +int inline constexpr order{ 6 }; +using taylor = cpp2::taylor; + +struct test_add_ret { double y0; taylor y; }; + +#line 6 "mixed-autodiff-taylor.cpp2" +[[nodiscard]] auto test_add(cpp2::impl::in x0, cpp2::impl::in x) -> test_add_ret; +struct test_sub_ret { double y0; taylor y; }; + + + +#line 11 "mixed-autodiff-taylor.cpp2" +[[nodiscard]] auto test_sub(cpp2::impl::in x0, cpp2::impl::in x) -> test_sub_ret; +struct test_mul_ret { double y0; taylor y; }; + + + +#line 19 "mixed-autodiff-taylor.cpp2" +[[nodiscard]] auto test_mul(cpp2::impl::in x0, cpp2::impl::in x) -> test_mul_ret; +struct test_div_ret { double y0; taylor y; }; + + + +#line 30 "mixed-autodiff-taylor.cpp2" +[[nodiscard]] auto test_div(cpp2::impl::in x0, cpp2::impl::in x) -> test_div_ret; +struct test_sqrt_ret { double y0; taylor y; }; + + + +#line 38 "mixed-autodiff-taylor.cpp2" +[[nodiscard]] auto test_sqrt(cpp2::impl::in x0, cpp2::impl::in x) -> test_sqrt_ret; +struct test_log_ret { double y0; taylor y; }; + + + +#line 43 "mixed-autodiff-taylor.cpp2" +[[nodiscard]] auto test_log(cpp2::impl::in x0, cpp2::impl::in x) -> test_log_ret; +struct test_exp_ret { double y0; taylor y; }; + + + +#line 48 "mixed-autodiff-taylor.cpp2" +[[nodiscard]] auto test_exp(cpp2::impl::in x0, cpp2::impl::in x) -> test_exp_ret; +struct test_sin_ret { double y0; taylor y; }; + + + +#line 53 "mixed-autodiff-taylor.cpp2" +[[nodiscard]] auto test_sin(cpp2::impl::in x0, cpp2::impl::in x) -> test_sin_ret; +struct test_cos_ret { double y0; taylor y; }; + + + +#line 58 "mixed-autodiff-taylor.cpp2" +[[nodiscard]] auto test_cos(cpp2::impl::in x0, cpp2::impl::in x) -> test_cos_ret; + +#line 63 "mixed-autodiff-taylor.cpp2" +auto write_output(cpp2::impl::in func, cpp2::impl::in x, cpp2::impl::in x_d, auto const& ret) -> void; + +#line 73 "mixed-autodiff-taylor.cpp2" +auto main() -> int; + +//=== Cpp2 function definitions ================================================= + +#line 1 "mixed-autodiff-taylor.cpp2" + +#line 6 "mixed-autodiff-taylor.cpp2" +[[nodiscard]] auto test_add(cpp2::impl::in x0, cpp2::impl::in x) -> test_add_ret{ + cpp2::impl::deferred_init y0; + cpp2::impl::deferred_init y; +#line 7 "mixed-autodiff-taylor.cpp2" + y.construct(CPP2_UFCS(add)(x, x, x0, x0)); + y0.construct(x0 + x0); +return { std::move(y0.value()), std::move(y.value()) }; } + +#line 11 "mixed-autodiff-taylor.cpp2" +[[nodiscard]] auto test_sub(cpp2::impl::in x0, cpp2::impl::in x) -> test_sub_ret{ + cpp2::impl::deferred_init y0; + cpp2::impl::deferred_init y; +#line 12 "mixed-autodiff-taylor.cpp2" + y0.construct(0.0); + y.construct(taylor()); + + y.value() = CPP2_UFCS(sub)(y.value(), x, y0.value(), x0); + y0.value() = y0.value() - x0; +return { std::move(y0.value()), std::move(y.value()) }; } + +#line 19 "mixed-autodiff-taylor.cpp2" +[[nodiscard]] auto test_mul(cpp2::impl::in x0, cpp2::impl::in x) -> test_mul_ret{ + cpp2::impl::deferred_init y0; + cpp2::impl::deferred_init y; +#line 20 "mixed-autodiff-taylor.cpp2" + y0.construct(x0); + y.construct(x); +{ +auto i{0}; + +#line 24 "mixed-autodiff-taylor.cpp2" + for( ; cpp2::impl::cmp_less(i,6); i += 1 ) { + y.value() = y.value().mul(x, y0.value(), x0); + y0.value() *= x0; + } +} +#line 25 "mixed-autodiff-taylor.cpp2" + return { std::move(y0.value()), std::move(y.value()) }; + +#line 28 "mixed-autodiff-taylor.cpp2" +} + +#line 30 "mixed-autodiff-taylor.cpp2" +[[nodiscard]] auto test_div(cpp2::impl::in x0, cpp2::impl::in x) -> test_div_ret{ + cpp2::impl::deferred_init y0; + cpp2::impl::deferred_init y; +#line 31 "mixed-autodiff-taylor.cpp2" + y0.construct(1.0); + y.construct(taylor()); + + y.value() = CPP2_UFCS(div)(y.value(), x, y0.value(), x0); + y0.value() /= CPP2_ASSERT_NOT_ZERO(CPP2_TYPEOF(y0.value()),x0); +return { std::move(y0.value()), std::move(y.value()) }; } + +#line 38 "mixed-autodiff-taylor.cpp2" +[[nodiscard]] auto test_sqrt(cpp2::impl::in x0, cpp2::impl::in x) -> test_sqrt_ret{ + cpp2::impl::deferred_init y0; + cpp2::impl::deferred_init y; +#line 39 "mixed-autodiff-taylor.cpp2" + y0.construct(sqrt(x0)); + y.construct(CPP2_UFCS(sqrt)(x, x0)); +return { std::move(y0.value()), std::move(y.value()) }; } + +#line 43 "mixed-autodiff-taylor.cpp2" +[[nodiscard]] auto test_log(cpp2::impl::in x0, cpp2::impl::in x) -> test_log_ret{ + cpp2::impl::deferred_init y0; + cpp2::impl::deferred_init y; +#line 44 "mixed-autodiff-taylor.cpp2" + y0.construct(log(x0)); + y.construct(CPP2_UFCS(log)(x, x0)); +return { std::move(y0.value()), std::move(y.value()) }; } + +#line 48 "mixed-autodiff-taylor.cpp2" +[[nodiscard]] auto test_exp(cpp2::impl::in x0, cpp2::impl::in x) -> test_exp_ret{ + cpp2::impl::deferred_init y0; + cpp2::impl::deferred_init y; +#line 49 "mixed-autodiff-taylor.cpp2" + y0.construct(exp(x0)); + y.construct(CPP2_UFCS(exp)(x, x0)); +return { std::move(y0.value()), std::move(y.value()) }; } + +#line 53 "mixed-autodiff-taylor.cpp2" +[[nodiscard]] auto test_sin(cpp2::impl::in x0, cpp2::impl::in x) -> test_sin_ret{ + cpp2::impl::deferred_init y0; + cpp2::impl::deferred_init y; +#line 54 "mixed-autodiff-taylor.cpp2" + y0.construct(sin(x0)); + y.construct(CPP2_UFCS(sin)(x, x0)); +return { std::move(y0.value()), std::move(y.value()) }; } + +#line 58 "mixed-autodiff-taylor.cpp2" +[[nodiscard]] auto test_cos(cpp2::impl::in x0, cpp2::impl::in x) -> test_cos_ret{ + cpp2::impl::deferred_init y0; + cpp2::impl::deferred_init y; +#line 59 "mixed-autodiff-taylor.cpp2" + y0.construct(cos(x0)); + y.construct(CPP2_UFCS(cos)(x, x0)); +return { std::move(y0.value()), std::move(y.value()) }; } + +#line 63 "mixed-autodiff-taylor.cpp2" +auto write_output(cpp2::impl::in func, cpp2::impl::in x, cpp2::impl::in x_d, auto const& ret) -> void{ + static_cast(x); + static_cast(x_d); + std::cout << "" + cpp2::to_string(func) + " = " + cpp2::to_string(ret.y0) + "" << std::endl; +{ +auto i{1}; + +#line 68 "mixed-autodiff-taylor.cpp2" + for( ; cpp2::impl::cmp_less_eq(i,order); i += 1 ) { + std::cout << "" + cpp2::to_string(func) + " diff order " + cpp2::to_string(i) + " = " + cpp2::to_string(CPP2_ASSERT_IN_BOUNDS(ret.y, i)) + "" << std::endl; + } +} +#line 71 "mixed-autodiff-taylor.cpp2" +} + +#line 73 "mixed-autodiff-taylor.cpp2" +auto main() -> int{ + + double x {2.0}; + taylor x_d {1.0}; + + write_output("x + x", x, x_d, test_add(x, x_d)); + write_output("0 - x", x, x_d, test_sub(x, x_d)); + write_output("x^7", x, x_d, test_mul(x, x_d)); + write_output("1/x", x, x_d, test_div(x, x_d)); + write_output("sqrt(x)", x, x_d, test_sqrt(x, x_d)); + write_output("log(x)", x, x_d, test_log(x, x_d)); + write_output("exp(x)", x, x_d, test_exp(x, x_d)); + write_output("sin(x)", x, x_d, test_sin(x, x_d)); + write_output("cos(x)", x, x_d, test_cos(cpp2::move(x), cpp2::move(x_d))); +} + diff --git a/regression-tests/test-results/mixed-autodiff-taylor.cpp2.output b/regression-tests/test-results/mixed-autodiff-taylor.cpp2.output new file mode 100644 index 000000000..20bd4dd08 --- /dev/null +++ b/regression-tests/test-results/mixed-autodiff-taylor.cpp2.output @@ -0,0 +1,2 @@ +mixed-autodiff-taylor.cpp2... ok (mixed Cpp1/Cpp2, Cpp2 code passes safety checks) + diff --git a/regression-tests/test-results/mixed-bounds-check.cpp b/regression-tests/test-results/mixed-bounds-check.cpp index c7e6a43d0..69dfefbd5 100644 --- a/regression-tests/test-results/mixed-bounds-check.cpp +++ b/regression-tests/test-results/mixed-bounds-check.cpp @@ -1,3 +1,5 @@ +#line 2 "mixed-bounds-check.cpp2" +#include //=== Cpp2 type declarations ==================================================== @@ -12,8 +14,6 @@ #line 1 "mixed-bounds-check.cpp2" -#include - #line 4 "mixed-bounds-check.cpp2" [[nodiscard]] auto main() -> int; diff --git a/regression-tests/test-results/mixed-bugfix-for-double-pound-else-error.cpp2.output b/regression-tests/test-results/mixed-bugfix-for-double-pound-else-error.cpp2.output new file mode 100644 index 000000000..43daeb69f --- /dev/null +++ b/regression-tests/test-results/mixed-bugfix-for-double-pound-else-error.cpp2.output @@ -0,0 +1,5 @@ +mixed-bugfix-for-double-pound-else-error.cpp2... +mixed-bugfix-for-double-pound-else-error.cpp2(2,1): error: #else does not match a prior #if +mixed-bugfix-for-double-pound-else-error.cpp2(3,1): error: #else does not match a prior #if +mixed-bugfix-for-double-pound-else-error.cpp2(3,1): error: #else already encountered for this #if + diff --git a/regression-tests/test-results/mixed-bugfix-for-literal-as-nttp.cpp b/regression-tests/test-results/mixed-bugfix-for-literal-as-nttp.cpp index f69922a27..0e7898938 100644 --- a/regression-tests/test-results/mixed-bugfix-for-literal-as-nttp.cpp +++ b/regression-tests/test-results/mixed-bugfix-for-literal-as-nttp.cpp @@ -1,3 +1,4 @@ +#include //=== Cpp2 type declarations ==================================================== @@ -11,7 +12,8 @@ //=== Cpp2 type definitions and function declarations =========================== #line 1 "mixed-bugfix-for-literal-as-nttp.cpp2" -#include + +#line 2 "mixed-bugfix-for-literal-as-nttp.cpp2" auto main() -> int; //=== Cpp2 function definitions ================================================= diff --git a/regression-tests/test-results/mixed-bugfix-for-ufcs-non-local.cpp b/regression-tests/test-results/mixed-bugfix-for-ufcs-non-local.cpp index f77e3ddd3..8ca78c7c3 100644 --- a/regression-tests/test-results/mixed-bugfix-for-ufcs-non-local.cpp +++ b/regression-tests/test-results/mixed-bugfix-for-ufcs-non-local.cpp @@ -14,7 +14,7 @@ namespace ns { class u; -#line 45 "mixed-bugfix-for-ufcs-non-local.cpp2" +#line 46 "mixed-bugfix-for-ufcs-non-local.cpp2" } @@ -62,6 +62,7 @@ auto inline constexpr d{ t() };// Fails on Clang 12 (l class u { public: static const bool b; + // UFCS used in the decltype in the line below causes all compilers to report error/crash public: static const bool c; public: static auto g(auto const& s, auto const& sz) -> void; }; @@ -95,16 +96,17 @@ auto g() -> void{ #line 40 "mixed-bugfix-for-ufcs-non-local.cpp2" inline CPP2_CONSTEXPR bool u::b{ CPP2_UFCS_NONLOCAL(f)(o) }; + inline CPP2_CONSTEXPR bool u::c{ [](auto&& x) -> decltype(auto)// Fails on Clang 12 (lambda in unevaluated context). -#line 42 "mixed-bugfix-for-ufcs-non-local.cpp2" - requires (std::is_convertible_v&>) { return CPP2_FORWARD(x); }(true) }; -#line 42 "mixed-bugfix-for-ufcs-non-local.cpp2" +#line 43 "mixed-bugfix-for-ufcs-non-local.cpp2" + requires (std::is_convertible_v&>) { return CPP2_FORWARD(x); }(true) }; +#line 43 "mixed-bugfix-for-ufcs-non-local.cpp2" auto u::g(auto const& s, auto const& sz) -> void{ if (cpp2::cpp2_default.is_active() && !(CPP2_UFCS(sz)(s) != 0) ) { cpp2::cpp2_default.report_violation(""); }} -#line 45 "mixed-bugfix-for-ufcs-non-local.cpp2" +#line 46 "mixed-bugfix-for-ufcs-non-local.cpp2" } -#line 47 "mixed-bugfix-for-ufcs-non-local.cpp2" +#line 48 "mixed-bugfix-for-ufcs-non-local.cpp2" auto main() -> int{} diff --git a/regression-tests/test-results/mixed-captures-in-expressions-and-postconditions.cpp b/regression-tests/test-results/mixed-captures-in-expressions-and-postconditions.cpp index 50257435e..99e9d280d 100644 --- a/regression-tests/test-results/mixed-captures-in-expressions-and-postconditions.cpp +++ b/regression-tests/test-results/mixed-captures-in-expressions-and-postconditions.cpp @@ -1,3 +1,6 @@ +#line 2 "mixed-captures-in-expressions-and-postconditions.cpp2" +#include +#include //=== Cpp2 type declarations ==================================================== @@ -12,9 +15,6 @@ #line 1 "mixed-captures-in-expressions-and-postconditions.cpp2" -#include -#include - #line 5 "mixed-captures-in-expressions-and-postconditions.cpp2" [[nodiscard]] auto main() -> int; diff --git a/regression-tests/test-results/mixed-fixed-type-aliases.cpp b/regression-tests/test-results/mixed-fixed-type-aliases.cpp index 59344c4b5..018360393 100644 --- a/regression-tests/test-results/mixed-fixed-type-aliases.cpp +++ b/regression-tests/test-results/mixed-fixed-type-aliases.cpp @@ -1,3 +1,6 @@ +#include +#include +#include //=== Cpp2 type declarations ==================================================== @@ -14,9 +17,7 @@ template class mytype; //=== Cpp2 type definitions and function declarations =========================== #line 1 "mixed-fixed-type-aliases.cpp2" -#include -#include -#include +#line 4 "mixed-fixed-type-aliases.cpp2" namespace my { using u16 = float; diff --git a/regression-tests/test-results/mixed-forwarding.cpp b/regression-tests/test-results/mixed-forwarding.cpp index f2139652b..88d3174fd 100644 --- a/regression-tests/test-results/mixed-forwarding.cpp +++ b/regression-tests/test-results/mixed-forwarding.cpp @@ -1,3 +1,5 @@ +#include +#include //=== Cpp2 type declarations ==================================================== @@ -11,8 +13,7 @@ //=== Cpp2 type definitions and function declarations =========================== #line 1 "mixed-forwarding.cpp2" -#include -#include +#line 3 "mixed-forwarding.cpp2" struct X { int i; diff --git a/regression-tests/test-results/mixed-function-expression-and-std-for-each.cpp b/regression-tests/test-results/mixed-function-expression-and-std-for-each.cpp index 2423694b2..eed4511d3 100644 --- a/regression-tests/test-results/mixed-function-expression-and-std-for-each.cpp +++ b/regression-tests/test-results/mixed-function-expression-and-std-for-each.cpp @@ -1,3 +1,8 @@ +#include +#include +#include +#include +#include //=== Cpp2 type declarations ==================================================== @@ -11,11 +16,6 @@ //=== Cpp2 type definitions and function declarations =========================== #line 1 "mixed-function-expression-and-std-for-each.cpp2" -#include -#include -#include -#include -#include #line 7 "mixed-function-expression-and-std-for-each.cpp2" [[nodiscard]] auto main() -> int; diff --git a/regression-tests/test-results/mixed-function-expression-and-std-ranges-for-each-with-capture.cpp b/regression-tests/test-results/mixed-function-expression-and-std-ranges-for-each-with-capture.cpp index ce3c2cf69..a5eb371b0 100644 --- a/regression-tests/test-results/mixed-function-expression-and-std-ranges-for-each-with-capture.cpp +++ b/regression-tests/test-results/mixed-function-expression-and-std-ranges-for-each-with-capture.cpp @@ -1,3 +1,9 @@ +#include +#include +#include +#include +#include +#include //=== Cpp2 type declarations ==================================================== @@ -11,12 +17,6 @@ //=== Cpp2 type definitions and function declarations =========================== #line 1 "mixed-function-expression-and-std-ranges-for-each-with-capture.cpp2" -#include -#include -#include -#include -#include -#include #line 8 "mixed-function-expression-and-std-ranges-for-each-with-capture.cpp2" [[nodiscard]] auto main() -> int; diff --git a/regression-tests/test-results/mixed-function-expression-and-std-ranges-for-each.cpp b/regression-tests/test-results/mixed-function-expression-and-std-ranges-for-each.cpp index ad6c2b662..152769e79 100644 --- a/regression-tests/test-results/mixed-function-expression-and-std-ranges-for-each.cpp +++ b/regression-tests/test-results/mixed-function-expression-and-std-ranges-for-each.cpp @@ -1,3 +1,9 @@ +#include +#include +#include +#include +#include +#include //=== Cpp2 type declarations ==================================================== @@ -11,12 +17,6 @@ //=== Cpp2 type definitions and function declarations =========================== #line 1 "mixed-function-expression-and-std-ranges-for-each.cpp2" -#include -#include -#include -#include -#include -#include #line 8 "mixed-function-expression-and-std-ranges-for-each.cpp2" [[nodiscard]] auto main() -> int; diff --git a/regression-tests/test-results/mixed-function-expression-with-pointer-capture.cpp b/regression-tests/test-results/mixed-function-expression-with-pointer-capture.cpp index 15032c1b9..52ef0a4e5 100644 --- a/regression-tests/test-results/mixed-function-expression-with-pointer-capture.cpp +++ b/regression-tests/test-results/mixed-function-expression-with-pointer-capture.cpp @@ -1,3 +1,9 @@ +#include +#include +#include +#include +#include +#include //=== Cpp2 type declarations ==================================================== @@ -11,12 +17,6 @@ //=== Cpp2 type definitions and function declarations =========================== #line 1 "mixed-function-expression-with-pointer-capture.cpp2" -#include -#include -#include -#include -#include -#include #line 8 "mixed-function-expression-with-pointer-capture.cpp2" [[nodiscard]] auto main() -> int; diff --git a/regression-tests/test-results/mixed-function-expression-with-repeated-capture.cpp b/regression-tests/test-results/mixed-function-expression-with-repeated-capture.cpp index c1b400504..c7a140e3e 100644 --- a/regression-tests/test-results/mixed-function-expression-with-repeated-capture.cpp +++ b/regression-tests/test-results/mixed-function-expression-with-repeated-capture.cpp @@ -1,3 +1,9 @@ +#include +#include +#include +#include +#include +#include //=== Cpp2 type declarations ==================================================== @@ -11,12 +17,6 @@ //=== Cpp2 type definitions and function declarations =========================== #line 1 "mixed-function-expression-with-repeated-capture.cpp2" -#include -#include -#include -#include -#include -#include #line 8 "mixed-function-expression-with-repeated-capture.cpp2" [[nodiscard]] auto main() -> int; diff --git a/regression-tests/test-results/mixed-hello.cpp b/regression-tests/test-results/mixed-hello.cpp index 9f69741ac..e78f42905 100644 --- a/regression-tests/test-results/mixed-hello.cpp +++ b/regression-tests/test-results/mixed-hello.cpp @@ -1,3 +1,6 @@ +#line 2 "mixed-hello.cpp2" +#include +#include //=== Cpp2 type declarations ==================================================== @@ -12,9 +15,6 @@ #line 1 "mixed-hello.cpp2" -#include -#include - #line 5 "mixed-hello.cpp2" [[nodiscard]] auto name() -> std::string; diff --git a/regression-tests/test-results/mixed-initialization-safety-3-contract-violation.cpp b/regression-tests/test-results/mixed-initialization-safety-3-contract-violation.cpp index 4ff7cb41d..de11f8434 100644 --- a/regression-tests/test-results/mixed-initialization-safety-3-contract-violation.cpp +++ b/regression-tests/test-results/mixed-initialization-safety-3-contract-violation.cpp @@ -1,3 +1,6 @@ +#include +#include +#include //=== Cpp2 type declarations ==================================================== @@ -11,9 +14,6 @@ //=== Cpp2 type definitions and function declarations =========================== #line 1 "mixed-initialization-safety-3-contract-violation.cpp2" -#include -#include -#include #line 5 "mixed-initialization-safety-3-contract-violation.cpp2" [[nodiscard]] auto main() -> int; diff --git a/regression-tests/test-results/mixed-initialization-safety-3.cpp b/regression-tests/test-results/mixed-initialization-safety-3.cpp index d4c804681..568830922 100644 --- a/regression-tests/test-results/mixed-initialization-safety-3.cpp +++ b/regression-tests/test-results/mixed-initialization-safety-3.cpp @@ -1,3 +1,6 @@ +#include +#include +#include //=== Cpp2 type declarations ==================================================== @@ -11,9 +14,6 @@ //=== Cpp2 type definitions and function declarations =========================== #line 1 "mixed-initialization-safety-3.cpp2" -#include -#include -#include #line 5 "mixed-initialization-safety-3.cpp2" [[nodiscard]] auto main() -> int; @@ -68,5 +68,5 @@ auto print_decorated(auto const& x) -> void{ } #line 32 "mixed-initialization-safety-3.cpp2" -[[nodiscard]] auto flip_a_coin() -> bool { return std::mt19937()() % 2 == 0; } +[[nodiscard]] auto flip_a_coin() -> bool { return std::mt19937()() % CPP2_ASSERT_NOT_ZERO_LITERAL(CPP2_TYPEOF(std::mt19937()()),2) == 0; } diff --git a/regression-tests/test-results/mixed-inspect-templates.cpp b/regression-tests/test-results/mixed-inspect-templates.cpp index 1a73e8594..84ad31e7f 100644 --- a/regression-tests/test-results/mixed-inspect-templates.cpp +++ b/regression-tests/test-results/mixed-inspect-templates.cpp @@ -1,3 +1,6 @@ +#include +#include +#include //=== Cpp2 type declarations ==================================================== @@ -11,9 +14,7 @@ //=== Cpp2 type definitions and function declarations =========================== #line 1 "mixed-inspect-templates.cpp2" -#include -#include -#include +#line 4 "mixed-inspect-templates.cpp2" template struct my_type {}; diff --git a/regression-tests/test-results/mixed-inspect-values-2.cpp b/regression-tests/test-results/mixed-inspect-values-2.cpp index 8c7f2ddba..6be4a3bbc 100644 --- a/regression-tests/test-results/mixed-inspect-values-2.cpp +++ b/regression-tests/test-results/mixed-inspect-values-2.cpp @@ -1,3 +1,6 @@ +#line 2 "mixed-inspect-values-2.cpp2" +#include +#include //=== Cpp2 type declarations ==================================================== @@ -12,8 +15,7 @@ #line 1 "mixed-inspect-values-2.cpp2" -#include -#include +#line 4 "mixed-inspect-values-2.cpp2" constexpr auto less_than = [](int value) { return [=](auto x) { return x < value;}; diff --git a/regression-tests/test-results/mixed-lifetime-safety-and-null-contracts.cpp b/regression-tests/test-results/mixed-lifetime-safety-and-null-contracts.cpp index 49f00ac40..6b91923ac 100644 --- a/regression-tests/test-results/mixed-lifetime-safety-and-null-contracts.cpp +++ b/regression-tests/test-results/mixed-lifetime-safety-and-null-contracts.cpp @@ -1,3 +1,7 @@ +#line 2 "mixed-lifetime-safety-and-null-contracts.cpp2" +#include +#include +#include //=== Cpp2 type declarations ==================================================== @@ -12,10 +16,6 @@ #line 1 "mixed-lifetime-safety-and-null-contracts.cpp2" -#include -#include -#include - #line 6 "mixed-lifetime-safety-and-null-contracts.cpp2" [[nodiscard]] auto main() -> int; #line 11 "mixed-lifetime-safety-and-null-contracts.cpp2" diff --git a/regression-tests/test-results/mixed-lifetime-safety-pointer-init-4.cpp b/regression-tests/test-results/mixed-lifetime-safety-pointer-init-4.cpp index 0b993ac49..7351d0900 100644 --- a/regression-tests/test-results/mixed-lifetime-safety-pointer-init-4.cpp +++ b/regression-tests/test-results/mixed-lifetime-safety-pointer-init-4.cpp @@ -1,3 +1,6 @@ +#line 2 "mixed-lifetime-safety-pointer-init-4.cpp2" +#include +#include //=== Cpp2 type declarations ==================================================== @@ -12,9 +15,6 @@ #line 1 "mixed-lifetime-safety-pointer-init-4.cpp2" -#include -#include - #line 5 "mixed-lifetime-safety-pointer-init-4.cpp2" [[nodiscard]] auto main() -> int; diff --git a/regression-tests/test-results/mixed-multiple-return-values.cpp b/regression-tests/test-results/mixed-multiple-return-values.cpp index 093dd465f..c168d0b9b 100644 --- a/regression-tests/test-results/mixed-multiple-return-values.cpp +++ b/regression-tests/test-results/mixed-multiple-return-values.cpp @@ -1,3 +1,7 @@ +#line 2 "mixed-multiple-return-values.cpp2" +#include +#include +#include //=== Cpp2 type declarations ==================================================== @@ -12,9 +16,6 @@ #line 1 "mixed-multiple-return-values.cpp2" -#include -#include -#include struct f_ret { int i; std::string s; }; diff --git a/regression-tests/test-results/mixed-out-destruction.cpp b/regression-tests/test-results/mixed-out-destruction.cpp index aab6a59f6..dc38874e6 100644 --- a/regression-tests/test-results/mixed-out-destruction.cpp +++ b/regression-tests/test-results/mixed-out-destruction.cpp @@ -1,3 +1,4 @@ +#include //=== Cpp2 type declarations ==================================================== @@ -11,7 +12,7 @@ //=== Cpp2 type definitions and function declarations =========================== #line 1 "mixed-out-destruction.cpp2" -#include +#line 2 "mixed-out-destruction.cpp2" struct X { inline static int Xnum = 0; diff --git a/regression-tests/test-results/mixed-parameter-passing-generic-out.cpp b/regression-tests/test-results/mixed-parameter-passing-generic-out.cpp index 4b05dc23f..ca2b7e5c1 100644 --- a/regression-tests/test-results/mixed-parameter-passing-generic-out.cpp +++ b/regression-tests/test-results/mixed-parameter-passing-generic-out.cpp @@ -1,3 +1,4 @@ +#include //=== Cpp2 type declarations ==================================================== @@ -11,7 +12,7 @@ //=== Cpp2 type definitions and function declarations =========================== #line 1 "mixed-parameter-passing-generic-out.cpp2" -#include +#line 2 "mixed-parameter-passing-generic-out.cpp2" struct X { X(int) { } diff --git a/regression-tests/test-results/mixed-parameter-passing-with-forward.cpp b/regression-tests/test-results/mixed-parameter-passing-with-forward.cpp index 64150d01a..815ce90c5 100644 --- a/regression-tests/test-results/mixed-parameter-passing-with-forward.cpp +++ b/regression-tests/test-results/mixed-parameter-passing-with-forward.cpp @@ -1,3 +1,7 @@ +#line 2 "mixed-parameter-passing-with-forward.cpp2" +#include +#include +#include //=== Cpp2 type declarations ==================================================== @@ -12,10 +16,6 @@ #line 1 "mixed-parameter-passing-with-forward.cpp2" -#include -#include -#include - #line 6 "mixed-parameter-passing-with-forward.cpp2" auto copy_from([[maybe_unused]] auto unnamed_param_1) -> void; @@ -56,7 +56,7 @@ requires (std::is_convertible_v&>) ++z; b += "plugh"; - if (std::rand() % 2) { + if (std::rand() % CPP2_ASSERT_NOT_ZERO_LITERAL(CPP2_TYPEOF(std::rand()),2)) { ++z; copy_from(cpp2::move(b));// definite last use } @@ -71,7 +71,7 @@ requires (std::is_convertible_v&>) copy_from(z); - if (std::time(nullptr) % 2 == 0) { + if (std::time(nullptr) % CPP2_ASSERT_NOT_ZERO_LITERAL(CPP2_TYPEOF(std::time(nullptr)),2) == 0) { copy_from(cpp2::move(z)); } diff --git a/regression-tests/test-results/mixed-parameter-passing.cpp b/regression-tests/test-results/mixed-parameter-passing.cpp index 8056cdc8e..138eb8993 100644 --- a/regression-tests/test-results/mixed-parameter-passing.cpp +++ b/regression-tests/test-results/mixed-parameter-passing.cpp @@ -1,3 +1,7 @@ +#line 2 "mixed-parameter-passing.cpp2" +#include +#include +#include //=== Cpp2 type declarations ==================================================== @@ -15,10 +19,6 @@ template class container; #line 1 "mixed-parameter-passing.cpp2" -#include -#include -#include - #line 6 "mixed-parameter-passing.cpp2" auto copy_from([[maybe_unused]] auto unnamed_param_1) -> void; @@ -69,7 +69,7 @@ auto parameter_styles( ++z; b += "plugh"; - if (std::rand() % 2) { + if (std::rand() % CPP2_ASSERT_NOT_ZERO_LITERAL(CPP2_TYPEOF(std::rand()),2)) { ++z; copy_from(cpp2::move(b));// definite last use } @@ -83,7 +83,7 @@ auto parameter_styles( copy_from(z); - if (std::time(nullptr) % 2 == 0) { + if (std::time(nullptr) % CPP2_ASSERT_NOT_ZERO_LITERAL(CPP2_TYPEOF(std::time(nullptr)),2) == 0) { copy_from(cpp2::move(z)); } diff --git a/regression-tests/test-results/mixed-postexpression-with-capture.cpp b/regression-tests/test-results/mixed-postexpression-with-capture.cpp index 1d1844443..041fe73eb 100644 --- a/regression-tests/test-results/mixed-postexpression-with-capture.cpp +++ b/regression-tests/test-results/mixed-postexpression-with-capture.cpp @@ -1,3 +1,9 @@ +#include +#include +#include +#include +#include +#include //=== Cpp2 type declarations ==================================================== @@ -11,12 +17,6 @@ //=== Cpp2 type definitions and function declarations =========================== #line 1 "mixed-postexpression-with-capture.cpp2" -#include -#include -#include -#include -#include -#include #line 8 "mixed-postexpression-with-capture.cpp2" [[nodiscard]] auto main() -> int; diff --git a/regression-tests/test-results/mixed-string-interpolation.cpp b/regression-tests/test-results/mixed-string-interpolation.cpp index 737170987..a09947671 100644 --- a/regression-tests/test-results/mixed-string-interpolation.cpp +++ b/regression-tests/test-results/mixed-string-interpolation.cpp @@ -1,3 +1,7 @@ +#include +#include +#include +#include //=== Cpp2 type declarations ==================================================== @@ -11,10 +15,7 @@ //=== Cpp2 type definitions and function declarations =========================== #line 1 "mixed-string-interpolation.cpp2" -#include -#include -#include -#include +#line 5 "mixed-string-interpolation.cpp2" struct custom_struct_with_no_stringize_customization { } custom; diff --git a/regression-tests/test-results/mixed-test-parens.cpp b/regression-tests/test-results/mixed-test-parens.cpp index c1712daf9..4f6bf8820 100644 --- a/regression-tests/test-results/mixed-test-parens.cpp +++ b/regression-tests/test-results/mixed-test-parens.cpp @@ -1,3 +1,4 @@ +#include //=== Cpp2 type declarations ==================================================== @@ -11,7 +12,7 @@ //=== Cpp2 type definitions and function declarations =========================== #line 1 "mixed-test-parens.cpp2" -#include +#line 2 "mixed-test-parens.cpp2" template auto f(auto, auto) -> void { } diff --git a/regression-tests/test-results/mixed-type-safety-1.cpp b/regression-tests/test-results/mixed-type-safety-1.cpp index 654f4ccf5..d779ae66a 100644 --- a/regression-tests/test-results/mixed-type-safety-1.cpp +++ b/regression-tests/test-results/mixed-type-safety-1.cpp @@ -1,3 +1,8 @@ +#include +#include +#include +#include +#include //=== Cpp2 type declarations ==================================================== @@ -11,11 +16,7 @@ //=== Cpp2 type definitions and function declarations =========================== #line 1 "mixed-type-safety-1.cpp2" -#include -#include -#include -#include -#include +#line 6 "mixed-type-safety-1.cpp2" class Shape { public: virtual ~Shape() { } }; class Circle : public Shape { }; diff --git a/regression-tests/test-results/mixed-ufcs-multiple-template-arguments.cpp b/regression-tests/test-results/mixed-ufcs-multiple-template-arguments.cpp index b29bb532a..ed572cc66 100644 --- a/regression-tests/test-results/mixed-ufcs-multiple-template-arguments.cpp +++ b/regression-tests/test-results/mixed-ufcs-multiple-template-arguments.cpp @@ -1,3 +1,5 @@ +#include +#include //=== Cpp2 type declarations ==================================================== @@ -11,8 +13,7 @@ //=== Cpp2 type definitions and function declarations =========================== #line 1 "mixed-ufcs-multiple-template-arguments.cpp2" -#include -#include +#line 3 "mixed-ufcs-multiple-template-arguments.cpp2" template auto substr(const std::string& input) -> std::string { diff --git a/regression-tests/test-results/msvc-2022-c++20/mixed-parameter-passing.cpp.output b/regression-tests/test-results/msvc-2022-c++20/mixed-parameter-passing.cpp.output index 195c5a96b..5ca28db9b 100644 --- a/regression-tests/test-results/msvc-2022-c++20/mixed-parameter-passing.cpp.output +++ b/regression-tests/test-results/msvc-2022-c++20/mixed-parameter-passing.cpp.output @@ -1 +1,8 @@ mixed-parameter-passing.cpp +mixed-parameter-passing.cpp2(44): error C2079: 'container::buf' uses undefined class 'std::array' + with + [ + T=int + ] +mixed-parameter-passing.cpp2(44): note: the template instantiation context (the oldest one first) is +mixed-parameter-passing.cpp2(54): note: see reference to class template instantiation 'container' being compiled diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-assert-expected-not-null.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-assert-expected-not-null.cpp.output index 5e8348010..625c578d5 100644 --- a/regression-tests/test-results/msvc-2022-c++20/pure2-assert-expected-not-null.cpp.output +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-assert-expected-not-null.cpp.output @@ -1,22 +1,22 @@ pure2-assert-expected-not-null.cpp pure2-assert-expected-not-null.cpp2(7): error C2039: 'expected': is not a member of 'std' -predefined C++ types (compiler internal)(347): note: see declaration of 'std' +predefined C++ types (compiler internal)(357): note: see declaration of 'std' pure2-assert-expected-not-null.cpp2(7): error C2062: type 'int' unexpected pure2-assert-expected-not-null.cpp2(7): error C2143: syntax error: missing ';' before '{' pure2-assert-expected-not-null.cpp2(7): error C2143: syntax error: missing ';' before '}' pure2-assert-expected-not-null.cpp2(9): error C2065: 'ex': undeclared identifier pure2-assert-expected-not-null.cpp2(9): error C2672: 'cpp2::impl::assert_not_null': no matching overloaded function found -..\..\..\include\cpp2util.h(999): note: could be 'decltype(auto) cpp2::impl::assert_not_null(_T0 &&,std::source_location)' +..\..\..\include\cpp2util.h(1132): note: could be 'decltype(auto) cpp2::impl::assert_not_null(_T0 &&,std::source_location)' pure2-assert-expected-not-null.cpp2(14): error C2039: 'expected': is not a member of 'std' -predefined C++ types (compiler internal)(347): note: see declaration of 'std' +predefined C++ types (compiler internal)(357): note: see declaration of 'std' pure2-assert-expected-not-null.cpp2(14): error C2062: type 'int' unexpected pure2-assert-expected-not-null.cpp2(14): error C2143: syntax error: missing ';' before '{' pure2-assert-expected-not-null.cpp2(14): error C2039: 'unexpected': is not a member of 'std' -predefined C++ types (compiler internal)(347): note: see declaration of 'std' +predefined C++ types (compiler internal)(357): note: see declaration of 'std' pure2-assert-expected-not-null.cpp2(14): error C2660: 'unexpected': function does not take 1 arguments -C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.41.34120\include\eh.h(33): note: see declaration of 'unexpected' +C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\include\eh.h(33): note: see declaration of 'unexpected' pure2-assert-expected-not-null.cpp2(14): note: while trying to match the argument list '(bool)' pure2-assert-expected-not-null.cpp2(14): error C2143: syntax error: missing ';' before '}' pure2-assert-expected-not-null.cpp2(15): error C2065: 'ex': undeclared identifier pure2-assert-expected-not-null.cpp2(15): error C2672: 'cpp2::impl::assert_not_null': no matching overloaded function found -..\..\..\include\cpp2util.h(999): note: could be 'decltype(auto) cpp2::impl::assert_not_null(_T0 &&,std::source_location)' +..\..\..\include\cpp2util.h(1132): note: could be 'decltype(auto) cpp2::impl::assert_not_null(_T0 &&,std::source_location)' diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-bugfix-for-late-comments.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-bugfix-for-late-comments.cpp.output new file mode 100644 index 000000000..f6608912d --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-bugfix-for-late-comments.cpp.output @@ -0,0 +1 @@ +pure2-bugfix-for-late-comments.cpp diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-expected-is-as.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-expected-is-as.cpp.output new file mode 100644 index 000000000..a31340a04 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-expected-is-as.cpp.output @@ -0,0 +1,67 @@ +pure2-expected-is-as.cpp +pure2-expected-is-as.cpp2(7): error C2039: 'expected': is not a member of 'std' +predefined C++ types (compiler internal)(357): note: see declaration of 'std' +pure2-expected-is-as.cpp2(7): error C2062: type 'int' unexpected +pure2-expected-is-as.cpp2(7): error C2143: syntax error: missing ';' before '{' +pure2-expected-is-as.cpp2(7): error C2143: syntax error: missing ';' before '}' +pure2-expected-is-as.cpp2(8): error C2039: 'expected': is not a member of 'std' +predefined C++ types (compiler internal)(357): note: see declaration of 'std' +pure2-expected-is-as.cpp2(8): error C2062: type 'int' unexpected +pure2-expected-is-as.cpp2(8): error C2143: syntax error: missing ';' before '{' +pure2-expected-is-as.cpp2(8): error C2039: 'unexpected': is not a member of 'std' +predefined C++ types (compiler internal)(357): note: see declaration of 'std' +pure2-expected-is-as.cpp2(8): error C2660: 'unexpected': function does not take 1 arguments +C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\include\eh.h(33): note: see declaration of 'unexpected' +pure2-expected-is-as.cpp2(8): note: while trying to match the argument list '(int)' +pure2-expected-is-as.cpp2(8): error C2143: syntax error: missing ';' before '}' +pure2-expected-is-as.cpp2(9): error C2039: 'expected': is not a member of 'std' +predefined C++ types (compiler internal)(357): note: see declaration of 'std' +pure2-expected-is-as.cpp2(9): error C2275: 'std::string': expected an expression instead of a type +pure2-expected-is-as.cpp2(9): error C2065: 'ex3': undeclared identifier +pure2-expected-is-as.cpp2(9): error C2275: 'size_t': expected an expression instead of a type +pure2-expected-is-as.cpp2(11): error C2065: 'ex1': undeclared identifier +pure2-expected-is-as.cpp2(15): error C2065: 'ex1': undeclared identifier +pure2-expected-is-as.cpp2(20): error C2065: 'ex1': undeclared identifier +pure2-expected-is-as.cpp2(25): error C2039: 'unexpected': is not a member of 'std' +predefined C++ types (compiler internal)(357): note: see declaration of 'std' +pure2-expected-is-as.cpp2(25): error C2062: type 'int' unexpected +pure2-expected-is-as.cpp2(25): error C2059: syntax error: '>' +pure2-expected-is-as.cpp2(25): error C2143: syntax error: missing ';' before '{' +pure2-expected-is-as.cpp2(30): error C2065: 'ex1': undeclared identifier +pure2-expected-is-as.cpp2(34): error C2065: 'ex1': undeclared identifier +pure2-expected-is-as.cpp2(39): error C2065: 'ex1': undeclared identifier +pure2-expected-is-as.cpp2(39): error C2119: 'val1': the type for 'auto' cannot be deduced from an empty initializer +pure2-expected-is-as.cpp2(42): error C2065: 'ex2': undeclared identifier +pure2-expected-is-as.cpp2(47): error C2065: 'ex2': undeclared identifier +pure2-expected-is-as.cpp2(52): error C2065: 'ex2': undeclared identifier +pure2-expected-is-as.cpp2(57): error C2039: 'unexpected': is not a member of 'std' +predefined C++ types (compiler internal)(357): note: see declaration of 'std' +pure2-expected-is-as.cpp2(57): error C2062: type 'int' unexpected +pure2-expected-is-as.cpp2(57): error C2059: syntax error: '>' +pure2-expected-is-as.cpp2(57): error C2143: syntax error: missing ';' before '{' +pure2-expected-is-as.cpp2(58): error C2065: 'ex2': undeclared identifier +pure2-expected-is-as.cpp2(61): error C2065: 'ex2': undeclared identifier +pure2-expected-is-as.cpp2(62): error C2065: 'ex2': undeclared identifier +pure2-expected-is-as.cpp2(65): error C2039: 'unexpected': is not a member of 'std' +predefined C++ types (compiler internal)(357): note: see declaration of 'std' +pure2-expected-is-as.cpp2(65): error C2062: type 'int' unexpected +pure2-expected-is-as.cpp2(65): error C2062: type 'unknown-type' unexpected +pure2-expected-is-as.cpp2(65): error C2143: syntax error: missing ';' before '}' +pure2-expected-is-as.cpp2(66): error C2143: syntax error: missing ';' before '<<' +pure2-expected-is-as.cpp2(66): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int +pure2-expected-is-as.cpp2(66): error C2371: 'std::cout': redefinition; different basic types +C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\include\iostream(40): note: see declaration of 'std::cout' +pure2-expected-is-as.cpp2(66): error C2059: syntax error: '<<' +pure2-expected-is-as.cpp2(66): error C2143: syntax error: missing ';' before '{' +pure2-expected-is-as.cpp2(66): error C2447: '{': missing function header (old-style formal list?) +pure2-expected-is-as.cpp2(66): error C2059: syntax error: '||' +pure2-expected-is-as.cpp2(66): error C2065: 'Obj': undeclared identifier +pure2-expected-is-as.cpp2(66): error C2065: 'Params': undeclared identifier +pure2-expected-is-as.cpp2(66): error C2059: syntax error: '}' +pure2-expected-is-as.cpp2(66): error C2143: syntax error: missing ')' before ';' +pure2-expected-is-as.cpp2(66): error C2059: syntax error: 'requires' +pure2-expected-is-as.cpp2(66): error C2059: syntax error: ')' +pure2-expected-is-as.cpp2(66): error C2065: 'obj': undeclared identifier +pure2-expected-is-as.cpp2(66): error C3553: decltype expects an expression not a type +pure2-expected-is-as.cpp2(66): error C2065: 'params': undeclared identifier +pure2-expected-is-as.cpp2(66): fatal error C1003: error count exceeds 100; stopping compilation diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-function-single-expression-body-default-return.cpp.execution b/regression-tests/test-results/msvc-2022-c++20/pure2-function-single-expression-body-default-return.cpp.execution new file mode 100644 index 000000000..30f4cb910 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-function-single-expression-body-default-return.cpp.execution @@ -0,0 +1 @@ +hi ho hum \ No newline at end of file diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-function-single-expression-body-default-return.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-function-single-expression-body-default-return.cpp.output new file mode 100644 index 000000000..05d88cb45 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-function-single-expression-body-default-return.cpp.output @@ -0,0 +1 @@ +pure2-function-single-expression-body-default-return.cpp diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-hashable.cpp.execution b/regression-tests/test-results/msvc-2022-c++20/pure2-hashable.cpp.execution new file mode 100644 index 000000000..cc5315af6 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-hashable.cpp.execution @@ -0,0 +1 @@ +13929407477532509065 \ No newline at end of file diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-hashable.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-hashable.cpp.output new file mode 100644 index 000000000..51f787459 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-hashable.cpp.output @@ -0,0 +1 @@ +pure2-hashable.cpp diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-last-use.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-last-use.cpp.output index 09c3c8f64..68eb47f77 100644 --- a/regression-tests/test-results/msvc-2022-c++20/pure2-last-use.cpp.output +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-last-use.cpp.output @@ -1,13 +1,110 @@ pure2-last-use.cpp pure2-last-use.cpp2(274): error C2039: 'move_only_function': is not a member of 'std' -predefined C++ types (compiler internal)(347): note: see declaration of 'std' +predefined C++ types (compiler internal)(357): note: see declaration of 'std' pure2-last-use.cpp2(274): error C7568: argument list missing after assumed function template 'move_only_function' pure2-last-use.cpp2(274): error C2062: type 'unknown-type' unexpected pure2-last-use.cpp2(274): error C2238: unexpected token(s) preceding ';' pure2-last-use.cpp2(275): error C2039: 'move_only_function': is not a member of 'std' -predefined C++ types (compiler internal)(347): note: see declaration of 'std' +predefined C++ types (compiler internal)(357): note: see declaration of 'std' pure2-last-use.cpp2(275): error C7568: argument list missing after assumed function template 'move_only_function' pure2-last-use.cpp2(275): error C2062: type 'unknown-type' unexpected pure2-last-use.cpp2(275): error C2238: unexpected token(s) preceding ';' pure2-last-use.cpp2(277): error C2760: syntax error: '>' was unexpected here; expected 'expression' -pure2-last-use.cpp2(276): fatal error C1907: unable to recover from previous error(s); stopping compilation +pure2-last-use.cpp2(277): error C2760: syntax error: '>' was unexpected here; expected ';' +pure2-last-use.cpp2(277): error C2059: syntax error: '>' +pure2-last-use.cpp2(344): error C2039: 'move_only_function': is not a member of 'std' +predefined C++ types (compiler internal)(357): note: see declaration of 'std' +pure2-last-use.cpp2(344): error C7568: argument list missing after assumed function template 'move_only_function' +pure2-last-use.cpp2(344): error C2062: type 'unknown-type' unexpected +pure2-last-use.cpp2(344): error C2238: unexpected token(s) preceding ';' +pure2-last-use.cpp2(348): error C2760: syntax error: '>' was unexpected here; expected 'expression' +pure2-last-use.cpp2(348): error C2760: syntax error: '>' was unexpected here; expected ';' +pure2-last-use.cpp2(348): error C2059: syntax error: '>' +pure2-last-use.cpp2(773): error C2039: 'move_only_function': is not a member of 'std' +predefined C++ types (compiler internal)(357): note: see declaration of 'std' +pure2-last-use.cpp2(773): error C2061: syntax error: identifier 'move_only_function' +pure2-last-use.cpp2(279): error C2760: syntax error: '>' was unexpected here; expected 'expression' +pure2-last-use.cpp2(278): error C2244: 'issue_857_4::{ctor}': unable to match function definition to an existing declaration +pure2-last-use.cpp2(278): note: see declaration of 'issue_857_4::{ctor}' +pure2-last-use.cpp2(278): note: definition +pure2-last-use.cpp2(278): note: 'void issue_857_4::{ctor}(_T0 &&,_T1 &&,_T2 &&,_T3 &&)' +pure2-last-use.cpp2(278): note: existing declarations +pure2-last-use.cpp2(329): note: 'issue_857_4::issue_857_4(issue_857_4 &&)' +pure2-last-use.cpp2(329): note: 'issue_857_4::issue_857_4(const issue_857_4 &)' +pure2-last-use.cpp2(276): note: 'issue_857_4::issue_857_4(_T0 &&,_T1 &&,_T2 &&,_T3 &&)' +pure2-last-use.cpp2(279): error C2760: syntax error: '>' was unexpected here; expected ';' +pure2-last-use.cpp2(279): error C2059: syntax error: '>' +pure2-last-use.cpp2(279): error C2065: 'mg_': undeclared identifier +pure2-last-use.cpp2(279): error C3553: decltype expects an expression not a type +pure2-last-use.cpp2(279): error C2039: 'move_only_function': is not a member of 'std' +predefined C++ types (compiler internal)(357): note: see declaration of 'std' +pure2-last-use.cpp2(279): error C2143: syntax error: missing ')' before 'attribute specifier' +pure2-last-use.cpp2(279): error C2065: 'move_only_function': undeclared identifier +pure2-last-use.cpp2(279): error C2059: syntax error: 'attribute specifier' +pure2-last-use.cpp2(279): error C2947: expecting '>' to terminate template-argument-list, found '>>' +pure2-last-use.cpp2(279): error C2059: syntax error: ')' +pure2-last-use.cpp2(280): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int +pure2-last-use.cpp2(280): error C2065: 'f_': undeclared identifier +pure2-last-use.cpp2(280): error C3553: decltype expects an expression not a type +pure2-last-use.cpp2(281): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int +pure2-last-use.cpp2(281): error C2065: 'g_': undeclared identifier +pure2-last-use.cpp2(281): error C3553: decltype expects an expression not a type +pure2-last-use.cpp2(282): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int +pure2-last-use.cpp2(282): error C2065: 'mf_': undeclared identifier +pure2-last-use.cpp2(282): error C3553: decltype expects an expression not a type +pure2-last-use.cpp2(283): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int +pure2-last-use.cpp2(283): error C2065: 'mg_': undeclared identifier +pure2-last-use.cpp2(283): error C3553: decltype expects an expression not a type +pure2-last-use.cpp2(283): error C2059: syntax error: '{' +pure2-last-use.cpp2(283): error C2143: syntax error: missing ';' before '{' +pure2-last-use.cpp2(283): error C2447: '{': missing function header (old-style formal list?) +pure2-last-use.cpp2(349): error C2760: syntax error: '>' was unexpected here; expected 'expression' +pure2-last-use.cpp2(348): error C2244: 'issue_857_8::{ctor}': unable to match function definition to an existing declaration +pure2-last-use.cpp2(348): note: see declaration of 'issue_857_8::{ctor}' +pure2-last-use.cpp2(348): note: definition +pure2-last-use.cpp2(348): note: 'void issue_857_8::{ctor}(_T0 &&,_T1 &&,_T2 &&)' +pure2-last-use.cpp2(348): note: existing declarations +pure2-last-use.cpp2(347): note: 'issue_857_8::issue_857_8(issue_857_8 &&)' +pure2-last-use.cpp2(347): note: 'issue_857_8::issue_857_8(const issue_857_8 &)' +pure2-last-use.cpp2(347): note: 'issue_857_8::issue_857_8(_T0 &&,_T1 &&,_T2 &&)' +pure2-last-use.cpp2(349): error C2760: syntax error: '>' was unexpected here; expected ';' +pure2-last-use.cpp2(349): error C2059: syntax error: '>' +pure2-last-use.cpp2(349): error C2065: 'c_': undeclared identifier +pure2-last-use.cpp2(349): error C3553: decltype expects an expression not a type +pure2-last-use.cpp2(349): error C2059: syntax error: ')' +pure2-last-use.cpp2(350): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int +pure2-last-use.cpp2(350): error C2065: 'a_': undeclared identifier +pure2-last-use.cpp2(350): error C3553: decltype expects an expression not a type +pure2-last-use.cpp2(351): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int +pure2-last-use.cpp2(351): error C2065: 'b_': undeclared identifier +pure2-last-use.cpp2(351): error C3553: decltype expects an expression not a type +pure2-last-use.cpp2(352): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int +pure2-last-use.cpp2(352): error C2065: 'c_': undeclared identifier +pure2-last-use.cpp2(352): error C3553: decltype expects an expression not a type +pure2-last-use.cpp2(352): error C2059: syntax error: '{' +pure2-last-use.cpp2(352): error C2143: syntax error: missing ';' before '{' +pure2-last-use.cpp2(352): error C2447: '{': missing function header (old-style formal list?) +pure2-last-use.cpp2(773): error C2039: 'move_only_function': is not a member of 'std' +predefined C++ types (compiler internal)(357): note: see declaration of 'std' +pure2-last-use.cpp2(773): error C2061: syntax error: identifier 'move_only_function' +pure2-last-use.cpp2(774): error C3861: 'size': identifier not found +pure2-last-use.cpp2(774): note: This diagnostic occurred in the compiler generated function 'decltype(auto) issue_888_1::::operator ()(Obj &&,Params ...) noexcept() const' +pure2-last-use.cpp2(774): error C2065: 'size': undeclared identifier +pure2-last-use.cpp2(774): note: This diagnostic occurred in the compiler generated function 'decltype(auto) issue_888_1::::operator ()(Obj &&,Params ...) noexcept() const' +pure2-last-use.cpp2(774): error C2338: static_assert failed: 'this function call syntax tries 'obj.func(...)', then 'func(obj,...);', but both failed - if this function call is passing a local variable that will be modified by the function, but that variable is never used again in the function so the new value is never used, that's likely the problem - if that's what you intended, add another line '_ = obj;' afterward to explicitly discard the new value of the object' +pure2-last-use.cpp2(774): note: the template instantiation context (the oldest one first) is +pure2-last-use.cpp2(774): note: see reference to function template instantiation 'decltype(auto) issue_888_1::::operator ()(Obj &&) noexcept(false) const' being compiled + with + [ + Obj=int + ] +pure2-last-use.cpp2(790): error C2039: 'move_only_function': is not a member of 'std' +predefined C++ types (compiler internal)(357): note: see declaration of 'std' +pure2-last-use.cpp2(790): error C2143: syntax error: missing ')' before 'attribute specifier' +pure2-last-use.cpp2(790): error C2065: 'move_only_function': undeclared identifier +pure2-last-use.cpp2(790): error C2143: syntax error: missing ';' before 'attribute specifier' +pure2-last-use.cpp2(790): error C2059: syntax error: ')' +pure2-last-use.cpp2(790): error C2734: 'unnamed_param_1': 'const' object must be initialized if not 'extern' +pure2-last-use.cpp2(790): error C2143: syntax error: missing ';' before '>' +pure2-last-use.cpp2(790): error C2059: syntax error: '>' +pure2-last-use.cpp2(790): fatal error C1003: error count exceeds 100; stopping compilation diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex-general.cpp.execution b/regression-tests/test-results/msvc-2022-c++20/pure2-regex-general.cpp.execution new file mode 100644 index 000000000..c44d08490 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex-general.cpp.execution @@ -0,0 +1,11 @@ +Running tests_01_char_matcher: +Not full match fails: 0 +Full match is ok: 1 +Search finds at position 1: 1 +Search finds at position 3: 3 +Find all finds at position: 1 +Find all finds at position: 4 +Find all finds at position: 7 +Find all found 3 matched: 3 +Find all finds at position: 2 +Find all found 1 match: 1 diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex-general.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-regex-general.cpp.output new file mode 100644 index 000000000..e8e495e81 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex-general.cpp.output @@ -0,0 +1 @@ +pure2-regex-general.cpp diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_04_start_end.cpp.execution b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_04_start_end.cpp.execution index 6fef36434..a1e2b9b63 100644 --- a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_04_start_end.cpp.execution +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_04_start_end.cpp.execution @@ -8,4 +8,5 @@ Running tests_04_start_end: 07_y: OK regex: ^ parsed_regex: ^ str: abc result_expr: $& expected_results 08_y: OK regex: $ parsed_regex: $ str: abc result_expr: $& expected_results 09_n: OK regex: $b parsed_regex: $b str: b result_expr: - expected_results - +10_n: OK regex: \GX.*X parsed_regex: \GX.*X str: aaaXbX result_expr: - expected_results - diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_19_lookahead.cpp.execution b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_19_lookahead.cpp.execution index d4c65d951..0f723eb77 100644 --- a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_19_lookahead.cpp.execution +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_19_lookahead.cpp.execution @@ -27,6 +27,14 @@ Running tests_19_lookahead: 26_y: OK regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) parsed_regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) str: aaaaaaaa result_expr: $1 expected_results aaaaaaa 27_y: OK regex: a(?!b(?!c))(..) parsed_regex: a(?!b(?!c))(..) str: abababc result_expr: $1 expected_results bc 28_y: OK regex: a(?!b(?=a))(..) parsed_regex: a(?!b(?=a))(..) str: abababc result_expr: $1 expected_results bc +29_y: OK regex: (?=foo) parsed_regex: (?=foo) str: foo result_expr: @+ expected_results 0 +30_y: OK regex: (?=foo) parsed_regex: (?=foo) str: XfooY result_expr: @+ expected_results 1 +31_y: OK regex: .*(?=foo) parsed_regex: .*(?=foo) str: XfooY result_expr: @+ expected_results 1 +32_y: OK regex: (?=.*P)P parsed_regex: (?=.*P)P str: aP result_expr: @+ expected_results 2 +33_y: OK regex: X(?=foo)f parsed_regex: X(?=foo)f str: ..XfooY.. result_expr: @+ expected_results 4 +34_y: OK regex: X(?=foo) parsed_regex: X(?=foo) str: ..XfooY.. result_expr: @+ expected_results 3 +35_y: OK regex: (?=XY*foo) parsed_regex: (?=XY*foo) str: Xfoo result_expr: @+ expected_results 0 +36_y: OK regex: ^(?=XY*foo) parsed_regex: ^(?=XY*foo) str: Xfoo result_expr: @+ expected_results 0 37_y: OK regex: X(\w+)(?=\s)|X(\w+) parsed_regex: X(\w+)(?=\s)|X(\w+) str: Xab result_expr: [$1-$2] expected_results [-ab] 38_y: OK regex: ^a*(?=b)b parsed_regex: ^a*(?=b)b str: ab result_expr: $& expected_results ab 39_y: OK regex: '(?!\A)x'm parsed_regex: '(?!\A)x'm str: a\nxb\n result_expr: - expected_results - @@ -44,4 +52,6 @@ Running tests_19_lookahead: 51_y: OK regex: ((?s)b.)c(?!\N) parsed_regex: ((?s)b.)c(?!\N) str: a\nb\nc\n result_expr: $1:$& expected_results b\n:b\nc 52_y: OK regex: '(b.)c(?!\N)'s parsed_regex: '(b.)c(?!\N)'s str: a\nb\nc\n result_expr: $1:$& expected_results b\n:b\nc 53_n: OK regex: a*(?!) parsed_regex: a*(?!) str: aaaab result_expr: - expected_results - +54_y: OK regex: (?)foo parsed_regex: (?)foo str: bar>ABCfoo result_expr: $& expected_results foo +55_y: OK regex: (?ABC)foo parsed_regex: (?ABC)foo str: bar>ABCfoo result_expr: $& expected_results ABCfoo diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_21_atomic_patterns.cpp.execution b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_21_atomic_patterns.cpp.execution new file mode 100644 index 000000000..4812cfbb8 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_21_atomic_patterns.cpp.execution @@ -0,0 +1,8 @@ +Running tests_21_atomic_patterns: +01_y: OK regex: (?>a+)b parsed_regex: (?>a+)b str: aaab result_expr: - expected_results - +02_y: OK regex: ((?>a+)b) parsed_regex: ((?>a+)b) str: aaab result_expr: $1 expected_results aaab +03_y: OK regex: (?>(a+))b parsed_regex: (?>(a+))b str: aaab result_expr: $1 expected_results aaa +04_y: OK regex: ((?>[^()]+)|\([^()]*\))+ parsed_regex: ((?>[^()]+)|\([^()]*\))+ str: ((abc(ade)ufh()()x result_expr: $& expected_results abc(ade)ufh()()x +05_y: OK regex: round\(((?>[^()]+))\) parsed_regex: round\(((?>[^()]+))\) str: _I(round(xs * sz),1) result_expr: $1 expected_results xs * sz +06_y: OK regex: ^((?>(?:aa)?b)?) parsed_regex: ^((?>(?:aa)?b)?) str: aab result_expr: $1 expected_results aab + diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_21_atomic_patterns.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_21_atomic_patterns.cpp.output new file mode 100644 index 000000000..3d25e7661 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_21_atomic_patterns.cpp.output @@ -0,0 +1 @@ +pure2-regex_21_atomic_patterns.cpp diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-type-safety-1.cpp.execution b/regression-tests/test-results/msvc-2022-c++20/pure2-type-safety-1.cpp.execution index d1aa6265a..df9d257d3 100644 --- a/regression-tests/test-results/msvc-2022-c++20/pure2-type-safety-1.cpp.execution +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-type-safety-1.cpp.execution @@ -7,3 +7,5 @@ variant is int? true any is int? true optional is int? true +optional is: int +optional<*D> is: *B *D diff --git a/regression-tests/test-results/msvc-2022-c++latest/MSVC-version.output b/regression-tests/test-results/msvc-2022-c++latest/MSVC-version.output index 6c92c9d8d..a157853dd 100644 --- a/regression-tests/test-results/msvc-2022-c++latest/MSVC-version.output +++ b/regression-tests/test-results/msvc-2022-c++latest/MSVC-version.output @@ -1,3 +1,3 @@ -Microsoft (R) C/C++ Optimizing Compiler Version 19.40.33812 for x64 +Microsoft (R) C/C++ Optimizing Compiler Version 19.50.35722 for x64 Copyright (C) Microsoft Corporation. All rights reserved. diff --git a/regression-tests/test-results/msvc-2022-c++latest/mixed-autodiff-taylor.cpp.execution b/regression-tests/test-results/msvc-2022-c++latest/mixed-autodiff-taylor.cpp.execution new file mode 100644 index 000000000..0a486b06f --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++latest/mixed-autodiff-taylor.cpp.execution @@ -0,0 +1,63 @@ +x + x = 4.000000 +x + x diff order 1 = 2.000000 +x + x diff order 2 = 0.000000 +x + x diff order 3 = 0.000000 +x + x diff order 4 = 0.000000 +x + x diff order 5 = 0.000000 +x + x diff order 6 = 0.000000 +0 - x = -2.000000 +0 - x diff order 1 = -1.000000 +0 - x diff order 2 = 0.000000 +0 - x diff order 3 = 0.000000 +0 - x diff order 4 = 0.000000 +0 - x diff order 5 = 0.000000 +0 - x diff order 6 = 0.000000 +x^7 = 128.000000 +x^7 diff order 1 = 448.000000 +x^7 diff order 2 = 1344.000000 +x^7 diff order 3 = 3360.000000 +x^7 diff order 4 = 6720.000000 +x^7 diff order 5 = 10080.000000 +x^7 diff order 6 = 10080.000000 +1/x = 0.500000 +1/x diff order 1 = -0.250000 +1/x diff order 2 = 0.250000 +1/x diff order 3 = -0.375000 +1/x diff order 4 = 0.750000 +1/x diff order 5 = -1.875000 +1/x diff order 6 = 5.625000 +sqrt(x) = 1.414214 +sqrt(x) diff order 1 = 0.353553 +sqrt(x) diff order 2 = -0.088388 +sqrt(x) diff order 3 = 0.066291 +sqrt(x) diff order 4 = -0.082864 +sqrt(x) diff order 5 = 0.145012 +sqrt(x) diff order 6 = -0.326277 +log(x) = 0.693147 +log(x) diff order 1 = 0.500000 +log(x) diff order 2 = -0.250000 +log(x) diff order 3 = 0.250000 +log(x) diff order 4 = -0.375000 +log(x) diff order 5 = 0.750000 +log(x) diff order 6 = -1.875000 +exp(x) = 7.389056 +exp(x) diff order 1 = 7.389056 +exp(x) diff order 2 = 7.389056 +exp(x) diff order 3 = 7.389056 +exp(x) diff order 4 = 7.389056 +exp(x) diff order 5 = 7.389056 +exp(x) diff order 6 = 7.389056 +sin(x) = 0.909297 +sin(x) diff order 1 = -0.416147 +sin(x) diff order 2 = -0.909297 +sin(x) diff order 3 = 0.416147 +sin(x) diff order 4 = 0.909297 +sin(x) diff order 5 = -0.416147 +sin(x) diff order 6 = -0.909297 +cos(x) = -0.416147 +cos(x) diff order 1 = -0.909297 +cos(x) diff order 2 = 0.416147 +cos(x) diff order 3 = 0.909297 +cos(x) diff order 4 = -0.416147 +cos(x) diff order 5 = -0.909297 +cos(x) diff order 6 = 0.416147 diff --git a/regression-tests/test-results/msvc-2022-c++latest/mixed-autodiff-taylor.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/mixed-autodiff-taylor.cpp.output new file mode 100644 index 000000000..fac16efc8 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++latest/mixed-autodiff-taylor.cpp.output @@ -0,0 +1 @@ +mixed-autodiff-taylor.cpp diff --git a/regression-tests/test-results/msvc-2022-c++latest/mixed-bugfix-for-ufcs-non-local.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/mixed-bugfix-for-ufcs-non-local.cpp.output index 56127acb5..f3f5e9025 100644 --- a/regression-tests/test-results/msvc-2022-c++latest/mixed-bugfix-for-ufcs-non-local.cpp.output +++ b/regression-tests/test-results/msvc-2022-c++latest/mixed-bugfix-for-ufcs-non-local.cpp.output @@ -1,10 +1 @@ mixed-bugfix-for-ufcs-non-local.cpp -mixed-bugfix-for-ufcs-non-local.cpp2(42): fatal error C1001: Internal compiler error. -(compiler file 'msc1.cpp', line 1593) - To work around this problem, try simplifying or changing the program near the locations listed above. -If possible please provide a repro here: https://developercommunity.visualstudio.com -Please choose the Technical Support command on the Visual C++ - Help menu, or open the Technical Support help file for more information -INTERNAL COMPILER ERROR in 'C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\bin\HostX64\x64\cl.exe' - Please choose the Technical Support command on the Visual C++ - Help menu, or open the Technical Support help file for more information diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-autodiff-higher-order.cpp.execution b/regression-tests/test-results/msvc-2022-c++latest/pure2-autodiff-higher-order.cpp.execution new file mode 100644 index 000000000..84a5f58de --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-autodiff-higher-order.cpp.execution @@ -0,0 +1,240 @@ +diff(x + y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x + y + x) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 7.000000 + d1 = 4.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x - y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = -1.000000 + d1 = -1.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x - y - x) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = -3.000000 + d1 = -2.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x + y - x) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 3.000000 + d1 = 2.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x * y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 6.000000 + d1 = 7.000000 + d2 = 4.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x * y * x) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 12.000000 + d1 = 20.000000 + d2 = 22.000000 + d3 = 12.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x / y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 0.666667 + d1 = -0.111111 + d2 = 0.148148 + d3 = -0.296296 + d4 = 0.790123 + d5 = -2.633745 + d6 = 10.534979 +diff(x / y / y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 0.222222 + d1 = -0.185185 + d2 = 0.296296 + d3 = -0.691358 + d4 = 2.106996 + d5 = -7.901235 + d6 = 35.116598 +diff(x * y / x) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 3.000000 + d1 = 2.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x * (x + y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 10.000000 + d1 = 11.000000 + d2 = 6.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x + x * y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 8.000000 + d1 = 8.000000 + d2 = 4.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(+x + y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(-x + y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 1.000000 + d1 = 1.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x * func(x, y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 10.000000 + d1 = 11.000000 + d2 = 6.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x * func_outer(x, y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 10.000000 + d1 = 11.000000 + d2 = 6.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(sin(x - y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = -0.841471 + d1 = -0.540302 + d2 = 0.841471 + d3 = 0.540302 + d4 = -0.841471 + d5 = -0.540302 + d6 = 0.841471 +diff(if branch) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 2.000000 + d1 = 1.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(if else branch) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 2.000000 + d1 = 1.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(direct return) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(intermediate var) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(intermediate passive var) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(intermediate untyped) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(intermediate default init) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(intermediate no init) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(while loop) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 8.000000 + d1 = 5.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(do while loop) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 8.000000 + d1 = 5.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(for loop) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(tye_outer.a + y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(type_outer.add(y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-autodiff-higher-order.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-autodiff-higher-order.cpp.output new file mode 100644 index 000000000..1455f82b9 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-autodiff-higher-order.cpp.output @@ -0,0 +1 @@ +pure2-autodiff-higher-order.cpp diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-autodiff.cpp.execution b/regression-tests/test-results/msvc-2022-c++latest/pure2-autodiff.cpp.execution new file mode 100644 index 000000000..863bd6bd5 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-autodiff.cpp.execution @@ -0,0 +1,46 @@ +diff(x + y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(x + y + x) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 7.000000, r_d = 4.000000) +diff(x - y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = -1.000000, r_d = -1.000000) +diff(x - y - x) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = -3.000000, r_d = -2.000000) +diff(x + y - x) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 3.000000, r_d = 2.000000) +diff(x * y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 6.000000, r_d = 7.000000) +diff(x * y * x) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 12.000000, r_d = 20.000000) +diff(x / y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 0.666667, r_d = -0.111111) +diff(x / y / y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 0.222222, r_d = -0.185185) +diff(x * y / x) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 3.000000, r_d = 2.000000) +diff(x * (x + y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 10.000000, r_d = 11.000000) +diff(x + x * y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 8.000000, r_d = 8.000000) +diff(+x + y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(-x + y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 1.000000, r_d = 1.000000) +diff(x * func(x, y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 10.000000, r_d = 11.000000) +diff(x * func_outer(x, y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 10.000000, r_d = 11.000000) +diff(sin(x - y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = -0.841471, r_d = -0.540302) +diff(if branch) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 2.000000, r_d = 1.000000) +diff(if else branch) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 2.000000, r_d = 1.000000) +diff(direct return) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(intermediate var) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(intermediate passive var) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(intermediate untyped) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(intermediate default init) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(intermediate no init) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(while loop) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 8.000000, r_d = 5.000000) +diff(do while loop) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 8.000000, r_d = 5.000000) +diff(for loop) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(tye_outer.a + y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(type_outer.add(y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(x + y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 5.000000, x_b = 1.000000, y_b = 1.000000) +diff(x + y + x) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 7.000000, x_b = 2.000000, y_b = 1.000000) +diff(x - y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = -1.000000, x_b = 1.000000, y_b = -1.000000) +diff(x - y - x) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = -3.000000, x_b = 0.000000, y_b = -1.000000) +diff(x + y - x) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 3.000000, x_b = 0.000000, y_b = 1.000000) +diff(x * y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 6.000000, x_b = 3.000000, y_b = 2.000000) +diff(x * y * x) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 12.000000, x_b = 12.000000, y_b = 4.000000) +diff(x / y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 0.666667, x_b = 0.333333, y_b = -0.222222) +diff(x / y / y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 0.222222, x_b = 0.111111, y_b = -0.148148) +diff(x * y / x) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 3.000000, x_b = 0.000000, y_b = 1.000000) +diff(x * (x + y)) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 10.000000, x_b = 7.000000, y_b = 2.000000) +diff(x + x * y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 8.000000, x_b = 4.000000, y_b = 2.000000) +diff(sin(x-y)) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = -0.841471, x_b = 0.540302, y_b = -0.540302) +diff(x * func(x-y)) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 10.000000, x_b = 7.000000, y_b = 2.000000) +diff(x * func_outer(x-y)) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 10.000000, x_b = 7.000000, y_b = 2.000000) +2nd order diff of x*x at 2.000000 = 2.000000 diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-autodiff.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-autodiff.cpp.output new file mode 100644 index 000000000..32eadc310 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-autodiff.cpp.output @@ -0,0 +1 @@ +pure2-autodiff.cpp diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-bugfix-for-late-comments.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-bugfix-for-late-comments.cpp.output new file mode 100644 index 000000000..f6608912d --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-bugfix-for-late-comments.cpp.output @@ -0,0 +1 @@ +pure2-bugfix-for-late-comments.cpp diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-default-arguments.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-default-arguments.cpp.output index f1128b42d..634011b23 100644 --- a/regression-tests/test-results/msvc-2022-c++latest/pure2-default-arguments.cpp.output +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-default-arguments.cpp.output @@ -1 +1,2 @@ pure2-default-arguments.cpp +pure2-default-arguments.cpp2(6): error C7595: 'std::source_location::current': call to immediate function is not a constant expression diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-expected-is-as.cpp.execution b/regression-tests/test-results/msvc-2022-c++latest/pure2-expected-is-as.cpp.execution new file mode 100644 index 000000000..5483d6cd7 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-expected-is-as.cpp.execution @@ -0,0 +1,15 @@ +ex1 is int +ex1 is 123 +ex1 as int = 123 +ex2 is unexpected and error is: -1 +ex2 is 'empty' aka unexpected and error is: -1 +ex2 as std::unexpected and error = -1 + +expected with value + ...integer 123 + +expected with unexpected + ...unexpected -1 + +expected with value + ...string Expect the unexpected diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-expected-is-as.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-expected-is-as.cpp.output new file mode 100644 index 000000000..6e7839bd6 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-expected-is-as.cpp.output @@ -0,0 +1 @@ +pure2-expected-is-as.cpp diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-function-body-reflection.cpp.execution b/regression-tests/test-results/msvc-2022-c++latest/pure2-function-body-reflection.cpp.execution new file mode 100644 index 000000000..d2076f3f7 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-function-body-reflection.cpp.execution @@ -0,0 +1 @@ +calling generated function ns::add_1... ns::add_1(42) returned 43 diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-function-body-reflection.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-function-body-reflection.cpp.output new file mode 100644 index 000000000..3cecf4b73 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-function-body-reflection.cpp.output @@ -0,0 +1 @@ +pure2-function-body-reflection.cpp diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex-general.cpp.execution b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex-general.cpp.execution new file mode 100644 index 000000000..c44d08490 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex-general.cpp.execution @@ -0,0 +1,11 @@ +Running tests_01_char_matcher: +Not full match fails: 0 +Full match is ok: 1 +Search finds at position 1: 1 +Search finds at position 3: 3 +Find all finds at position: 1 +Find all finds at position: 4 +Find all finds at position: 7 +Find all found 3 matched: 3 +Find all finds at position: 2 +Find all found 1 match: 1 diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex-general.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex-general.cpp.output new file mode 100644 index 000000000..e8e495e81 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex-general.cpp.output @@ -0,0 +1 @@ +pure2-regex-general.cpp diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_04_start_end.cpp.execution b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_04_start_end.cpp.execution index 6fef36434..a1e2b9b63 100644 --- a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_04_start_end.cpp.execution +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_04_start_end.cpp.execution @@ -8,4 +8,5 @@ Running tests_04_start_end: 07_y: OK regex: ^ parsed_regex: ^ str: abc result_expr: $& expected_results 08_y: OK regex: $ parsed_regex: $ str: abc result_expr: $& expected_results 09_n: OK regex: $b parsed_regex: $b str: b result_expr: - expected_results - +10_n: OK regex: \GX.*X parsed_regex: \GX.*X str: aaaXbX result_expr: - expected_results - diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_19_lookahead.cpp.execution b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_19_lookahead.cpp.execution index d4c65d951..0f723eb77 100644 --- a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_19_lookahead.cpp.execution +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_19_lookahead.cpp.execution @@ -27,6 +27,14 @@ Running tests_19_lookahead: 26_y: OK regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) parsed_regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) str: aaaaaaaa result_expr: $1 expected_results aaaaaaa 27_y: OK regex: a(?!b(?!c))(..) parsed_regex: a(?!b(?!c))(..) str: abababc result_expr: $1 expected_results bc 28_y: OK regex: a(?!b(?=a))(..) parsed_regex: a(?!b(?=a))(..) str: abababc result_expr: $1 expected_results bc +29_y: OK regex: (?=foo) parsed_regex: (?=foo) str: foo result_expr: @+ expected_results 0 +30_y: OK regex: (?=foo) parsed_regex: (?=foo) str: XfooY result_expr: @+ expected_results 1 +31_y: OK regex: .*(?=foo) parsed_regex: .*(?=foo) str: XfooY result_expr: @+ expected_results 1 +32_y: OK regex: (?=.*P)P parsed_regex: (?=.*P)P str: aP result_expr: @+ expected_results 2 +33_y: OK regex: X(?=foo)f parsed_regex: X(?=foo)f str: ..XfooY.. result_expr: @+ expected_results 4 +34_y: OK regex: X(?=foo) parsed_regex: X(?=foo) str: ..XfooY.. result_expr: @+ expected_results 3 +35_y: OK regex: (?=XY*foo) parsed_regex: (?=XY*foo) str: Xfoo result_expr: @+ expected_results 0 +36_y: OK regex: ^(?=XY*foo) parsed_regex: ^(?=XY*foo) str: Xfoo result_expr: @+ expected_results 0 37_y: OK regex: X(\w+)(?=\s)|X(\w+) parsed_regex: X(\w+)(?=\s)|X(\w+) str: Xab result_expr: [$1-$2] expected_results [-ab] 38_y: OK regex: ^a*(?=b)b parsed_regex: ^a*(?=b)b str: ab result_expr: $& expected_results ab 39_y: OK regex: '(?!\A)x'm parsed_regex: '(?!\A)x'm str: a\nxb\n result_expr: - expected_results - @@ -44,4 +52,6 @@ Running tests_19_lookahead: 51_y: OK regex: ((?s)b.)c(?!\N) parsed_regex: ((?s)b.)c(?!\N) str: a\nb\nc\n result_expr: $1:$& expected_results b\n:b\nc 52_y: OK regex: '(b.)c(?!\N)'s parsed_regex: '(b.)c(?!\N)'s str: a\nb\nc\n result_expr: $1:$& expected_results b\n:b\nc 53_n: OK regex: a*(?!) parsed_regex: a*(?!) str: aaaab result_expr: - expected_results - +54_y: OK regex: (?)foo parsed_regex: (?)foo str: bar>ABCfoo result_expr: $& expected_results foo +55_y: OK regex: (?ABC)foo parsed_regex: (?ABC)foo str: bar>ABCfoo result_expr: $& expected_results ABCfoo diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_20_lookbehind.cpp.execution b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_20_lookbehind.cpp.execution new file mode 100644 index 000000000..cd61d4f56 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_20_lookbehind.cpp.execution @@ -0,0 +1,58 @@ +Running tests_20_lookbehind: +01_y: OK regex: (?<=a)b parsed_regex: (?<=a)b str: ab result_expr: $& expected_results b +02_y: OK regex: (?<=af?)b parsed_regex: (?<=af?)b str: ab result_expr: $& expected_results b +03_n: OK regex: (?<=a)b parsed_regex: (?<=a)b str: cb result_expr: - expected_results - +04_n: OK regex: (?<=a(?:fo)?)b parsed_regex: (?<=a(?:fo)?)b str: cb result_expr: - expected_results - +05_n: OK regex: (?<=a)b parsed_regex: (?<=a)b str: b result_expr: - expected_results - +06_n: OK regex: (?<=a(?:foo)?)b parsed_regex: (?<=a(?:foo)?)b str: b result_expr: - expected_results - +07_y: OK regex: (?)foo parsed_regex: (?<=bar>)foo str: bar>foo result_expr: $& expected_results foo +50_n: OK regex: (?)foo parsed_regex: (?)foo str: bar>foo result_expr: - expected_results - +51_y: OK regex: (?<=bar>ABC)foo parsed_regex: (?<=bar>ABC)foo str: bar>ABCfoo result_expr: $& expected_results foo +52_n: OK regex: (?ABC)foo parsed_regex: (?ABC)foo str: bar>ABCfoo result_expr: - expected_results - +53_y: OK regex: (?<=abcd(?<=(aaaabcd))) parsed_regex: (?<=abcd(?<=(aaaabcd))) str: ..aaaabcd.. result_expr: $1 expected_results aaaabcd +54_y: OK regex: (?=xy(?<=(aaxy))) parsed_regex: (?=xy(?<=(aaxy))) str: ..aaxy.. result_expr: $1 expected_results aaxy +55_y: OK regex: (?=xy(?<=(aaxyz?))) parsed_regex: (?=xy(?<=(aaxyz?))) str: ..aaxy.. result_expr: $1 expected_results aaxy +56_y: OK regex: (?<=(?=(aaxy))aa) parsed_regex: (?<=(?=(aaxy))aa) str: ..aaxy.. result_expr: $1 expected_results aaxy + diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_20_lookbehind.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_20_lookbehind.cpp.output new file mode 100644 index 000000000..14196f2d8 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_20_lookbehind.cpp.output @@ -0,0 +1 @@ +pure2-regex_20_lookbehind.cpp diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_21_atomic_patterns.cpp.execution b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_21_atomic_patterns.cpp.execution new file mode 100644 index 000000000..4812cfbb8 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_21_atomic_patterns.cpp.execution @@ -0,0 +1,8 @@ +Running tests_21_atomic_patterns: +01_y: OK regex: (?>a+)b parsed_regex: (?>a+)b str: aaab result_expr: - expected_results - +02_y: OK regex: ((?>a+)b) parsed_regex: ((?>a+)b) str: aaab result_expr: $1 expected_results aaab +03_y: OK regex: (?>(a+))b parsed_regex: (?>(a+))b str: aaab result_expr: $1 expected_results aaa +04_y: OK regex: ((?>[^()]+)|\([^()]*\))+ parsed_regex: ((?>[^()]+)|\([^()]*\))+ str: ((abc(ade)ufh()()x result_expr: $& expected_results abc(ade)ufh()()x +05_y: OK regex: round\(((?>[^()]+))\) parsed_regex: round\(((?>[^()]+))\) str: _I(round(xs * sz),1) result_expr: $1 expected_results xs * sz +06_y: OK regex: ^((?>(?:aa)?b)?) parsed_regex: ^((?>(?:aa)?b)?) str: aab result_expr: $1 expected_results aab + diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_21_atomic_patterns.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_21_atomic_patterns.cpp.output new file mode 100644 index 000000000..3d25e7661 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_21_atomic_patterns.cpp.output @@ -0,0 +1 @@ +pure2-regex_21_atomic_patterns.cpp diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-singleton-and-static.cpp.execution b/regression-tests/test-results/msvc-2022-c++latest/pure2-singleton-and-static.cpp.execution new file mode 100644 index 000000000..d81cc0710 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-singleton-and-static.cpp.execution @@ -0,0 +1 @@ +42 diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-singleton-and-static.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-singleton-and-static.cpp.output new file mode 100644 index 000000000..d9a75d655 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-singleton-and-static.cpp.output @@ -0,0 +1 @@ +pure2-singleton-and-static.cpp diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-try-catch.cpp.execution b/regression-tests/test-results/msvc-2022-c++latest/pure2-try-catch.cpp.execution new file mode 100644 index 000000000..c37cb6b5f --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-try-catch.cpp.execution @@ -0,0 +1,2 @@ +oh look, a thrown int: 42 +oh look, another exception diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-try-catch.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-try-catch.cpp.output new file mode 100644 index 000000000..75d9a670f --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-try-catch.cpp.output @@ -0,0 +1 @@ +pure2-try-catch.cpp diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-type-safety-1.cpp.execution b/regression-tests/test-results/msvc-2022-c++latest/pure2-type-safety-1.cpp.execution index d1aa6265a..df9d257d3 100644 --- a/regression-tests/test-results/msvc-2022-c++latest/pure2-type-safety-1.cpp.execution +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-type-safety-1.cpp.execution @@ -7,3 +7,5 @@ variant is int? true any is int? true optional is int? true +optional is: int +optional<*D> is: *B *D diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp.execution b/regression-tests/test-results/msvc-2022-c++latest/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp.execution index 541b2a0d9..371e06b05 100644 --- a/regression-tests/test-results/msvc-2022-c++latest/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp.execution +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp.execution @@ -4,5 +4,4 @@ ctor - from string construct [ Henry | 123 Ford Dr. ] ctor - from string assign [ Clara | 123 Ford Dr. ] ctor - copy (GENERAL) cp-construct [ Clara | 123 Ford Dr. ] <- [ Clara | 123 Ford Dr. ] ctor - move mv-construct [ Clara(CM) | 123 Ford Dr. ] <- [ | ] -ctor - copy (GENERAL) cp-assign [ Clara | 123 Ford Dr. ] <- [ Clara | 123 Ford Dr. ] assign - move mv-assign [ Clara | 123 Ford Dr. ] <- [ | ] diff --git a/regression-tests/test-results/pure2-assert-expected-not-null.cpp b/regression-tests/test-results/pure2-assert-expected-not-null.cpp index 9f6acff70..a76a181e9 100644 --- a/regression-tests/test-results/pure2-assert-expected-not-null.cpp +++ b/regression-tests/test-results/pure2-assert-expected-not-null.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-assert-optional-not-null.cpp b/regression-tests/test-results/pure2-assert-optional-not-null.cpp index 5b3afce33..656d4f62c 100644 --- a/regression-tests/test-results/pure2-assert-optional-not-null.cpp +++ b/regression-tests/test-results/pure2-assert-optional-not-null.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-assert-shared-ptr-not-null.cpp b/regression-tests/test-results/pure2-assert-shared-ptr-not-null.cpp index 9f78b9db7..742a8b858 100644 --- a/regression-tests/test-results/pure2-assert-shared-ptr-not-null.cpp +++ b/regression-tests/test-results/pure2-assert-shared-ptr-not-null.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-assert-unique-ptr-not-null.cpp b/regression-tests/test-results/pure2-assert-unique-ptr-not-null.cpp index 2446af71d..9d5c2501a 100644 --- a/regression-tests/test-results/pure2-assert-unique-ptr-not-null.cpp +++ b/regression-tests/test-results/pure2-assert-unique-ptr-not-null.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-autodiff-higher-order.cpp b/regression-tests/test-results/pure2-autodiff-higher-order.cpp new file mode 100644 index 000000000..282c36129 --- /dev/null +++ b/regression-tests/test-results/pure2-autodiff-higher-order.cpp @@ -0,0 +1,1079 @@ + +#define CPP2_INCLUDE_STD Yes +#include "cpp2taylor.h" + +//=== Cpp2 type declarations ==================================================== + + +#include "cpp2util.h" + +#line 1 "pure2-autodiff-higher-order.cpp2" + +#line 4 "pure2-autodiff-higher-order.cpp2" +namespace ad_name { + +#line 10 "pure2-autodiff-higher-order.cpp2" +class type_outer; + + class type_outer_d; + + +#line 18 "pure2-autodiff-higher-order.cpp2" +class ad_test; + +#line 196 "pure2-autodiff-higher-order.cpp2" +} + + +//=== Cpp2 type definitions and function declarations =========================== + +#line 1 "pure2-autodiff-higher-order.cpp2" +int inline constexpr ad_order{ 6 }; +#line 2 "pure2-autodiff-higher-order.cpp2" +using ad_type = cpp2::taylor; + +namespace ad_name { +using func_outer_ret = double; + + +#line 6 "pure2-autodiff-higher-order.cpp2" +[[nodiscard]] auto func_outer(cpp2::impl::in x, cpp2::impl::in y) -> func_outer_ret; + +#line 10 "pure2-autodiff-higher-order.cpp2" +class type_outer { + public: double a {0.0}; + + public: [[nodiscard]] auto add(cpp2::impl::in b) const& -> double; +struct add_d_ret { double r; cpp2::taylor r_d; }; + + + public: [[nodiscard]] auto add_d(cpp2::impl::in this_d, cpp2::impl::in b, cpp2::impl::in> b_d) const& -> add_d_ret; + + public: type_outer() = default; + public: type_outer(type_outer const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(type_outer const&) -> void = delete; + + +#line 16 "pure2-autodiff-higher-order.cpp2" +}; + +struct func_outer_d_ret { double ret; cpp2::taylor ret_d; }; + + +[[nodiscard]] auto func_outer_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> func_outer_d_ret; +class type_outer_d { +public: cpp2::taylor a_d {}; + public: type_outer_d() = default; + public: type_outer_d(type_outer_d const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(type_outer_d const&) -> void = delete; + +}; + +#line 18 "pure2-autodiff-higher-order.cpp2" +class ad_test { +using add_1_ret = double; + + +#line 20 "pure2-autodiff-higher-order.cpp2" + public: [[nodiscard]] static auto add_1(cpp2::impl::in x, cpp2::impl::in y) -> add_1_ret; +using add_2_ret = double; + + +#line 24 "pure2-autodiff-higher-order.cpp2" + public: [[nodiscard]] static auto add_2(cpp2::impl::in x, cpp2::impl::in y) -> add_2_ret; +using sub_1_ret = double; + + +#line 28 "pure2-autodiff-higher-order.cpp2" + public: [[nodiscard]] static auto sub_1(cpp2::impl::in x, cpp2::impl::in y) -> sub_1_ret; +using sub_2_ret = double; + + +#line 32 "pure2-autodiff-higher-order.cpp2" + public: [[nodiscard]] static auto sub_2(cpp2::impl::in x, cpp2::impl::in y) -> sub_2_ret; +using add_sub_2_ret = double; + + +#line 36 "pure2-autodiff-higher-order.cpp2" + public: [[nodiscard]] static auto add_sub_2(cpp2::impl::in x, cpp2::impl::in y) -> add_sub_2_ret; +using mul_1_ret = double; + + +#line 40 "pure2-autodiff-higher-order.cpp2" + public: [[nodiscard]] static auto mul_1(cpp2::impl::in x, cpp2::impl::in y) -> mul_1_ret; +using mul_2_ret = double; + + +#line 44 "pure2-autodiff-higher-order.cpp2" + public: [[nodiscard]] static auto mul_2(cpp2::impl::in x, cpp2::impl::in y) -> mul_2_ret; +using div_1_ret = double; + + +#line 48 "pure2-autodiff-higher-order.cpp2" + public: [[nodiscard]] static auto div_1(cpp2::impl::in x, cpp2::impl::in y) -> div_1_ret; +using div_2_ret = double; + + +#line 52 "pure2-autodiff-higher-order.cpp2" + public: [[nodiscard]] static auto div_2(cpp2::impl::in x, cpp2::impl::in y) -> div_2_ret; +using mul_div_2_ret = double; + + +#line 56 "pure2-autodiff-higher-order.cpp2" + public: [[nodiscard]] static auto mul_div_2(cpp2::impl::in x, cpp2::impl::in y) -> mul_div_2_ret; +using mul_add_ret = double; + + +#line 60 "pure2-autodiff-higher-order.cpp2" + public: [[nodiscard]] static auto mul_add(cpp2::impl::in x, cpp2::impl::in y) -> mul_add_ret; +using add_mul_ret = double; + + +#line 64 "pure2-autodiff-higher-order.cpp2" + public: [[nodiscard]] static auto add_mul(cpp2::impl::in x, cpp2::impl::in y) -> add_mul_ret; +using prefix_add_ret = double; + + +#line 68 "pure2-autodiff-higher-order.cpp2" + public: [[nodiscard]] static auto prefix_add(cpp2::impl::in x, cpp2::impl::in y) -> prefix_add_ret; +using prefix_sub_ret = double; + + +#line 72 "pure2-autodiff-higher-order.cpp2" + public: [[nodiscard]] static auto prefix_sub(cpp2::impl::in x, cpp2::impl::in y) -> prefix_sub_ret; +using func_ret = double; + + +#line 76 "pure2-autodiff-higher-order.cpp2" + public: [[nodiscard]] static auto func(cpp2::impl::in x, cpp2::impl::in y) -> func_ret; +using func_call_ret = double; + + +#line 80 "pure2-autodiff-higher-order.cpp2" + public: [[nodiscard]] static auto func_call(cpp2::impl::in x, cpp2::impl::in y) -> func_call_ret; +using func_outer_call_ret = double; + + +#line 84 "pure2-autodiff-higher-order.cpp2" + public: [[nodiscard]] static auto func_outer_call(cpp2::impl::in x, cpp2::impl::in y) -> func_outer_call_ret; +using sin_call_ret = double; + + +#line 88 "pure2-autodiff-higher-order.cpp2" + public: [[nodiscard]] static auto sin_call(cpp2::impl::in x, cpp2::impl::in y) -> sin_call_ret; +using if_branch_ret = double; + + +#line 92 "pure2-autodiff-higher-order.cpp2" + public: [[nodiscard]] static auto if_branch(cpp2::impl::in x, cpp2::impl::in y) -> if_branch_ret; +using if_else_branch_ret = double; + + +#line 100 "pure2-autodiff-higher-order.cpp2" + public: [[nodiscard]] static auto if_else_branch(cpp2::impl::in x, cpp2::impl::in y) -> if_else_branch_ret; + +#line 109 "pure2-autodiff-higher-order.cpp2" + public: [[nodiscard]] static auto direct_return(cpp2::impl::in x, cpp2::impl::in y) -> double; +using intermediate_var_ret = double; + + +#line 113 "pure2-autodiff-higher-order.cpp2" + public: [[nodiscard]] static auto intermediate_var(cpp2::impl::in x, cpp2::impl::in y) -> intermediate_var_ret; +using intermediate_passive_var_ret = double; + + +#line 119 "pure2-autodiff-higher-order.cpp2" + public: [[nodiscard]] static auto intermediate_passive_var(cpp2::impl::in x, cpp2::impl::in y) -> intermediate_passive_var_ret; +using intermediate_untyped_ret = double; + + +#line 127 "pure2-autodiff-higher-order.cpp2" + public: [[nodiscard]] static auto intermediate_untyped(cpp2::impl::in x, cpp2::impl::in y) -> intermediate_untyped_ret; +using intermediate_default_init_ret = double; + + +#line 134 "pure2-autodiff-higher-order.cpp2" + public: [[nodiscard]] static auto intermediate_default_init(cpp2::impl::in x, cpp2::impl::in y) -> intermediate_default_init_ret; +using intermediate_no_init_ret = double; + + +#line 141 "pure2-autodiff-higher-order.cpp2" + public: [[nodiscard]] static auto intermediate_no_init(cpp2::impl::in x, cpp2::impl::in y) -> intermediate_no_init_ret; +using while_loop_ret = double; + + +#line 148 "pure2-autodiff-higher-order.cpp2" + public: [[nodiscard]] static auto while_loop(cpp2::impl::in x, cpp2::impl::in y) -> while_loop_ret; +using do_while_loop_ret = double; + + +#line 157 "pure2-autodiff-higher-order.cpp2" + public: [[nodiscard]] static auto do_while_loop(cpp2::impl::in x, cpp2::impl::in y) -> do_while_loop_ret; +using for_loop_ret = double; + + +#line 168 "pure2-autodiff-higher-order.cpp2" + public: [[nodiscard]] static auto for_loop(cpp2::impl::in x, cpp2::impl::in y) -> for_loop_ret; +using type_outer_use_ret = double; + + +#line 182 "pure2-autodiff-higher-order.cpp2" + public: [[nodiscard]] static auto type_outer_use(cpp2::impl::in x, cpp2::impl::in y) -> type_outer_use_ret; +using type_outer_call_ret = double; + + +#line 189 "pure2-autodiff-higher-order.cpp2" + public: [[nodiscard]] static auto type_outer_call(cpp2::impl::in x, cpp2::impl::in y) -> type_outer_call_ret; +struct add_1_d_ret { double r; cpp2::taylor r_d; }; + + + public: [[nodiscard]] static auto add_1_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> add_1_d_ret; + +struct add_2_d_ret { double r; cpp2::taylor r_d; }; + +public: [[nodiscard]] static auto add_2_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> add_2_d_ret; + +struct sub_1_d_ret { double r; cpp2::taylor r_d; }; + +public: [[nodiscard]] static auto sub_1_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> sub_1_d_ret; + +struct sub_2_d_ret { double r; cpp2::taylor r_d; }; + +public: [[nodiscard]] static auto sub_2_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> sub_2_d_ret; + +struct add_sub_2_d_ret { double r; cpp2::taylor r_d; }; + +public: [[nodiscard]] static auto add_sub_2_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> add_sub_2_d_ret; + +struct mul_1_d_ret { double r; cpp2::taylor r_d; }; + +public: [[nodiscard]] static auto mul_1_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> mul_1_d_ret; + +struct mul_2_d_ret { double r; cpp2::taylor r_d; }; + +public: [[nodiscard]] static auto mul_2_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> mul_2_d_ret; + +struct div_1_d_ret { double r; cpp2::taylor r_d; }; + +public: [[nodiscard]] static auto div_1_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> div_1_d_ret; + +struct div_2_d_ret { double r; cpp2::taylor r_d; }; + +public: [[nodiscard]] static auto div_2_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> div_2_d_ret; + +struct mul_div_2_d_ret { double r; cpp2::taylor r_d; }; + +public: [[nodiscard]] static auto mul_div_2_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> mul_div_2_d_ret; + +struct mul_add_d_ret { double r; cpp2::taylor r_d; }; + +public: [[nodiscard]] static auto mul_add_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> mul_add_d_ret; + +struct add_mul_d_ret { double r; cpp2::taylor r_d; }; + +public: [[nodiscard]] static auto add_mul_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> add_mul_d_ret; + +struct prefix_add_d_ret { double r; cpp2::taylor r_d; }; + +public: [[nodiscard]] static auto prefix_add_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> prefix_add_d_ret; + +struct prefix_sub_d_ret { double r; cpp2::taylor r_d; }; + +public: [[nodiscard]] static auto prefix_sub_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> prefix_sub_d_ret; + +struct func_d_ret { double ret; cpp2::taylor ret_d; }; + +public: [[nodiscard]] static auto func_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> func_d_ret; + +struct func_call_d_ret { double r; cpp2::taylor r_d; }; + +public: [[nodiscard]] static auto func_call_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> func_call_d_ret; + +struct func_outer_call_d_ret { double r; cpp2::taylor r_d; }; + +public: [[nodiscard]] static auto func_outer_call_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> func_outer_call_d_ret; + +struct sin_call_d_ret { double r; cpp2::taylor r_d; }; + +public: [[nodiscard]] static auto sin_call_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> sin_call_d_ret; + +struct if_branch_d_ret { double r; cpp2::taylor r_d; }; + +public: [[nodiscard]] static auto if_branch_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> if_branch_d_ret; + +struct if_else_branch_d_ret { double r; cpp2::taylor r_d; }; + +public: [[nodiscard]] static auto if_else_branch_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> if_else_branch_d_ret; + +struct direct_return_d_ret { double r; cpp2::taylor r_d; }; + +public: [[nodiscard]] static auto direct_return_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> direct_return_d_ret; + +struct intermediate_var_d_ret { double r; cpp2::taylor r_d; }; + +public: [[nodiscard]] static auto intermediate_var_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> intermediate_var_d_ret; + +struct intermediate_passive_var_d_ret { double r; cpp2::taylor r_d; }; + +public: [[nodiscard]] static auto intermediate_passive_var_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> intermediate_passive_var_d_ret; + +struct intermediate_untyped_d_ret { double r; cpp2::taylor r_d; }; + +public: [[nodiscard]] static auto intermediate_untyped_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> intermediate_untyped_d_ret; + +struct intermediate_default_init_d_ret { double r; cpp2::taylor r_d; }; + +public: [[nodiscard]] static auto intermediate_default_init_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> intermediate_default_init_d_ret; + +struct intermediate_no_init_d_ret { double r; cpp2::taylor r_d; }; + +public: [[nodiscard]] static auto intermediate_no_init_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> intermediate_no_init_d_ret; + +struct while_loop_d_ret { double r; cpp2::taylor r_d; }; + +public: [[nodiscard]] static auto while_loop_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> while_loop_d_ret; + +struct do_while_loop_d_ret { double r; cpp2::taylor r_d; }; + +public: [[nodiscard]] static auto do_while_loop_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> do_while_loop_d_ret; + +struct for_loop_d_ret { double r; cpp2::taylor r_d; }; + +public: [[nodiscard]] static auto for_loop_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> for_loop_d_ret; + +struct type_outer_use_d_ret { double r; cpp2::taylor r_d; }; + +public: [[nodiscard]] static auto type_outer_use_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> type_outer_use_d_ret; + +struct type_outer_call_d_ret { double r; cpp2::taylor r_d; }; + +public: [[nodiscard]] static auto type_outer_call_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> type_outer_call_d_ret; + + public: ad_test() = default; + public: ad_test(ad_test const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(ad_test const&) -> void = delete; + + +#line 195 "pure2-autodiff-higher-order.cpp2" +}; +} + +auto write_output(cpp2::impl::in func, cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d, auto const& ret) -> void; + +#line 207 "pure2-autodiff-higher-order.cpp2" +auto main() -> int; + +//=== Cpp2 function definitions ================================================= + +#line 1 "pure2-autodiff-higher-order.cpp2" + +#line 4 "pure2-autodiff-higher-order.cpp2" +namespace ad_name { + +#line 6 "pure2-autodiff-higher-order.cpp2" +[[nodiscard]] auto func_outer(cpp2::impl::in x, cpp2::impl::in y) -> func_outer_ret{ + cpp2::impl::deferred_init ret; +#line 7 "pure2-autodiff-higher-order.cpp2" + ret.construct(x + y); +return std::move(ret.value()); } + +#line 13 "pure2-autodiff-higher-order.cpp2" + [[nodiscard]] auto type_outer::add(cpp2::impl::in b) const& -> double{ + return a + b; + } + + [[nodiscard]] auto type_outer::add_d(cpp2::impl::in this_d, cpp2::impl::in b, cpp2::impl::in> b_d) const& -> add_d_ret{ + double r {}; + cpp2::taylor r_d {};r_d = this_d.a_d + b_d; + r = a + b; + return { std::move(r), std::move(r_d) }; } + + [[nodiscard]] auto func_outer_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> func_outer_d_ret{ + double ret {0.0}; + cpp2::taylor ret_d {0.0};ret_d = x_d + y_d; + ret = x + y; + return { std::move(ret), std::move(ret_d) }; + } + + + +#line 20 "pure2-autodiff-higher-order.cpp2" + [[nodiscard]] auto ad_test::add_1(cpp2::impl::in x, cpp2::impl::in y) -> add_1_ret{ + cpp2::impl::deferred_init r; +#line 21 "pure2-autodiff-higher-order.cpp2" + r.construct(x + y); + return std::move(r.value()); } + +#line 24 "pure2-autodiff-higher-order.cpp2" + [[nodiscard]] auto ad_test::add_2(cpp2::impl::in x, cpp2::impl::in y) -> add_2_ret{ + cpp2::impl::deferred_init r; +#line 25 "pure2-autodiff-higher-order.cpp2" + r.construct(x + y + x); + return std::move(r.value()); } + +#line 28 "pure2-autodiff-higher-order.cpp2" + [[nodiscard]] auto ad_test::sub_1(cpp2::impl::in x, cpp2::impl::in y) -> sub_1_ret{ + cpp2::impl::deferred_init r; +#line 29 "pure2-autodiff-higher-order.cpp2" + r.construct(x - y); + return std::move(r.value()); } + +#line 32 "pure2-autodiff-higher-order.cpp2" + [[nodiscard]] auto ad_test::sub_2(cpp2::impl::in x, cpp2::impl::in y) -> sub_2_ret{ + cpp2::impl::deferred_init r; +#line 33 "pure2-autodiff-higher-order.cpp2" + r.construct(x - y - x); + return std::move(r.value()); } + +#line 36 "pure2-autodiff-higher-order.cpp2" + [[nodiscard]] auto ad_test::add_sub_2(cpp2::impl::in x, cpp2::impl::in y) -> add_sub_2_ret{ + cpp2::impl::deferred_init r; +#line 37 "pure2-autodiff-higher-order.cpp2" + r.construct(x + y - x); + return std::move(r.value()); } + +#line 40 "pure2-autodiff-higher-order.cpp2" + [[nodiscard]] auto ad_test::mul_1(cpp2::impl::in x, cpp2::impl::in y) -> mul_1_ret{ + cpp2::impl::deferred_init r; +#line 41 "pure2-autodiff-higher-order.cpp2" + r.construct(x * y); + return std::move(r.value()); } + +#line 44 "pure2-autodiff-higher-order.cpp2" + [[nodiscard]] auto ad_test::mul_2(cpp2::impl::in x, cpp2::impl::in y) -> mul_2_ret{ + cpp2::impl::deferred_init r; +#line 45 "pure2-autodiff-higher-order.cpp2" + r.construct(x * y * x); + return std::move(r.value()); } + +#line 48 "pure2-autodiff-higher-order.cpp2" + [[nodiscard]] auto ad_test::div_1(cpp2::impl::in x, cpp2::impl::in y) -> div_1_ret{ + cpp2::impl::deferred_init r; +#line 49 "pure2-autodiff-higher-order.cpp2" + r.construct(x / CPP2_ASSERT_NOT_ZERO(CPP2_TYPEOF(x),y)); + return std::move(r.value()); } + +#line 52 "pure2-autodiff-higher-order.cpp2" + [[nodiscard]] auto ad_test::div_2(cpp2::impl::in x, cpp2::impl::in y) -> div_2_ret{ + cpp2::impl::deferred_init r; +#line 53 "pure2-autodiff-higher-order.cpp2" + r.construct(x / CPP2_ASSERT_NOT_ZERO(CPP2_TYPEOF(x),y) / CPP2_ASSERT_NOT_ZERO(CPP2_TYPEOF(y),y)); + return std::move(r.value()); } + +#line 56 "pure2-autodiff-higher-order.cpp2" + [[nodiscard]] auto ad_test::mul_div_2(cpp2::impl::in x, cpp2::impl::in y) -> mul_div_2_ret{ + cpp2::impl::deferred_init r; +#line 57 "pure2-autodiff-higher-order.cpp2" + r.construct(x * y / CPP2_ASSERT_NOT_ZERO(CPP2_TYPEOF(y),x)); + return std::move(r.value()); } + +#line 60 "pure2-autodiff-higher-order.cpp2" + [[nodiscard]] auto ad_test::mul_add(cpp2::impl::in x, cpp2::impl::in y) -> mul_add_ret{ + cpp2::impl::deferred_init r; +#line 61 "pure2-autodiff-higher-order.cpp2" + r.construct(x * (x + y)); + return std::move(r.value()); } + +#line 64 "pure2-autodiff-higher-order.cpp2" + [[nodiscard]] auto ad_test::add_mul(cpp2::impl::in x, cpp2::impl::in y) -> add_mul_ret{ + cpp2::impl::deferred_init r; +#line 65 "pure2-autodiff-higher-order.cpp2" + r.construct(x + x * y); + return std::move(r.value()); } + +#line 68 "pure2-autodiff-higher-order.cpp2" + [[nodiscard]] auto ad_test::prefix_add(cpp2::impl::in x, cpp2::impl::in y) -> prefix_add_ret{ + cpp2::impl::deferred_init r; +#line 69 "pure2-autodiff-higher-order.cpp2" + r.construct(+x + y); + return std::move(r.value()); } + +#line 72 "pure2-autodiff-higher-order.cpp2" + [[nodiscard]] auto ad_test::prefix_sub(cpp2::impl::in x, cpp2::impl::in y) -> prefix_sub_ret{ + cpp2::impl::deferred_init r; +#line 73 "pure2-autodiff-higher-order.cpp2" + r.construct(-x + y); + return std::move(r.value()); } + +#line 76 "pure2-autodiff-higher-order.cpp2" + [[nodiscard]] auto ad_test::func(cpp2::impl::in x, cpp2::impl::in y) -> func_ret{ + cpp2::impl::deferred_init ret; +#line 77 "pure2-autodiff-higher-order.cpp2" + ret.construct(x + y); + return std::move(ret.value()); } + +#line 80 "pure2-autodiff-higher-order.cpp2" + [[nodiscard]] auto ad_test::func_call(cpp2::impl::in x, cpp2::impl::in y) -> func_call_ret{ + cpp2::impl::deferred_init r; +#line 81 "pure2-autodiff-higher-order.cpp2" + r.construct(x * func(x, y)); + return std::move(r.value()); } + +#line 84 "pure2-autodiff-higher-order.cpp2" + [[nodiscard]] auto ad_test::func_outer_call(cpp2::impl::in x, cpp2::impl::in y) -> func_outer_call_ret{ + cpp2::impl::deferred_init r; +#line 85 "pure2-autodiff-higher-order.cpp2" + r.construct(x * func_outer(x, y)); + return std::move(r.value()); } + +#line 88 "pure2-autodiff-higher-order.cpp2" + [[nodiscard]] auto ad_test::sin_call(cpp2::impl::in x, cpp2::impl::in y) -> sin_call_ret{ + cpp2::impl::deferred_init r; +#line 89 "pure2-autodiff-higher-order.cpp2" + r.construct(sin(x - y)); + return std::move(r.value()); } + +#line 92 "pure2-autodiff-higher-order.cpp2" + [[nodiscard]] auto ad_test::if_branch(cpp2::impl::in x, cpp2::impl::in y) -> if_branch_ret{ + cpp2::impl::deferred_init r; +#line 93 "pure2-autodiff-higher-order.cpp2" + r.construct(x); + + if (cpp2::impl::cmp_less(x,0.0)) { + r.value() = y; + }return std::move(r.value()); + } + +#line 100 "pure2-autodiff-higher-order.cpp2" + [[nodiscard]] auto ad_test::if_else_branch(cpp2::impl::in x, cpp2::impl::in y) -> if_else_branch_ret{ + cpp2::impl::deferred_init r; +#line 101 "pure2-autodiff-higher-order.cpp2" + if (cpp2::impl::cmp_less(x,0.0)) { + r.construct(y); + } + else { + r.construct(x); + }return std::move(r.value()); + } + +#line 109 "pure2-autodiff-higher-order.cpp2" + [[nodiscard]] auto ad_test::direct_return(cpp2::impl::in x, cpp2::impl::in y) -> double{ + return x + y; + } + +#line 113 "pure2-autodiff-higher-order.cpp2" + [[nodiscard]] auto ad_test::intermediate_var(cpp2::impl::in x, cpp2::impl::in y) -> intermediate_var_ret{ + cpp2::impl::deferred_init r; +#line 114 "pure2-autodiff-higher-order.cpp2" + double t {x + y}; + + r.construct(cpp2::move(t)); + return std::move(r.value()); } + +#line 119 "pure2-autodiff-higher-order.cpp2" + [[nodiscard]] auto ad_test::intermediate_passive_var(cpp2::impl::in x, cpp2::impl::in y) -> intermediate_passive_var_ret{ + cpp2::impl::deferred_init r; +#line 120 "pure2-autodiff-higher-order.cpp2" + int i {}; // TODO: Handle as passive when type information on call side is available. + r.construct(x + y); + i = 2; + + static_cast(cpp2::move(i)); + return std::move(r.value()); } + +#line 127 "pure2-autodiff-higher-order.cpp2" + [[nodiscard]] auto ad_test::intermediate_untyped(cpp2::impl::in x, cpp2::impl::in y) -> intermediate_untyped_ret{ + cpp2::impl::deferred_init r; +#line 128 "pure2-autodiff-higher-order.cpp2" + auto t {0.0}; + t = x + y; + + r.construct(cpp2::move(t)); + return std::move(r.value()); } + +#line 134 "pure2-autodiff-higher-order.cpp2" + [[nodiscard]] auto ad_test::intermediate_default_init(cpp2::impl::in x, cpp2::impl::in y) -> intermediate_default_init_ret{ + cpp2::impl::deferred_init r; +#line 135 "pure2-autodiff-higher-order.cpp2" + double t {}; + t = x + y; + + r.construct(cpp2::move(t)); + return std::move(r.value()); } + +#line 141 "pure2-autodiff-higher-order.cpp2" + [[nodiscard]] auto ad_test::intermediate_no_init(cpp2::impl::in x, cpp2::impl::in y) -> intermediate_no_init_ret{ + cpp2::impl::deferred_init r; +#line 142 "pure2-autodiff-higher-order.cpp2" + cpp2::impl::deferred_init t; + t.construct(x + y); + + r.construct(cpp2::move(t.value())); + return std::move(r.value()); } + +#line 148 "pure2-autodiff-higher-order.cpp2" + [[nodiscard]] auto ad_test::while_loop(cpp2::impl::in x, cpp2::impl::in y) -> while_loop_ret{ + cpp2::impl::deferred_init r; +#line 149 "pure2-autodiff-higher-order.cpp2" + int i {0}; + + r.construct(x); + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + r.value() = r.value() + y; + }return std::move(r.value()); + } + +#line 157 "pure2-autodiff-higher-order.cpp2" + [[nodiscard]] auto ad_test::do_while_loop(cpp2::impl::in x, cpp2::impl::in y) -> do_while_loop_ret{ + cpp2::impl::deferred_init r; +#line 158 "pure2-autodiff-higher-order.cpp2" + int i {0}; + + r.construct(x); + do { + r.value() = r.value() + y; + } while ( [&]{ + (i += 1) ; return true; }() && + cpp2::impl::cmp_less(i,2));return std::move(r.value()); + } + +#line 168 "pure2-autodiff-higher-order.cpp2" + [[nodiscard]] auto ad_test::for_loop(cpp2::impl::in x, cpp2::impl::in y) -> for_loop_ret{ + cpp2::impl::deferred_init r; +#line 169 "pure2-autodiff-higher-order.cpp2" + std::vector v {}; + + CPP2_UFCS(push_back)(v, x); + CPP2_UFCS(push_back)(v, y); + + r.construct(0.0); + for ( + auto const& t : cpp2::move(v) ) + { + r.value() = r.value() + t; + }return std::move(r.value()); + } + +#line 182 "pure2-autodiff-higher-order.cpp2" + [[nodiscard]] auto ad_test::type_outer_use(cpp2::impl::in x, cpp2::impl::in y) -> type_outer_use_ret{ + cpp2::impl::deferred_init r; +#line 183 "pure2-autodiff-higher-order.cpp2" + type_outer t {}; + t.a = x; + + r.construct(cpp2::move(t).a + y); + return std::move(r.value()); } + +#line 189 "pure2-autodiff-higher-order.cpp2" + [[nodiscard]] auto ad_test::type_outer_call(cpp2::impl::in x, cpp2::impl::in y) -> type_outer_call_ret{ + cpp2::impl::deferred_init r; +#line 190 "pure2-autodiff-higher-order.cpp2" + type_outer t {}; + t.a = x; + + r.construct(CPP2_UFCS(add)(cpp2::move(t), y)); + return std::move(r.value()); } + + [[nodiscard]] auto ad_test::add_1_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> add_1_d_ret{ + double r {0.0}; + cpp2::taylor r_d {0.0};r_d = x_d + y_d; + r = x + y; + return { std::move(r), std::move(r_d) }; + } + + [[nodiscard]] auto ad_test::add_2_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> add_2_d_ret{ + double r {0.0}; + cpp2::taylor r_d {0.0};r_d = x_d + y_d + x_d; + r = x + y + x; + return { std::move(r), std::move(r_d) }; + } + + [[nodiscard]] auto ad_test::sub_1_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> sub_1_d_ret{ + double r {0.0}; + cpp2::taylor r_d {0.0};r_d = x_d - y_d; + r = x - y; + return { std::move(r), std::move(r_d) }; + } + + [[nodiscard]] auto ad_test::sub_2_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> sub_2_d_ret{ + double r {0.0}; + cpp2::taylor r_d {0.0};r_d = x_d - y_d - x_d; + r = x - y - x; + return { std::move(r), std::move(r_d) }; + } + + [[nodiscard]] auto ad_test::add_sub_2_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> add_sub_2_d_ret{ + double r {0.0}; + cpp2::taylor r_d {0.0};r_d = x_d + y_d - x_d; + r = x + y - x; + return { std::move(r), std::move(r_d) }; + } + + [[nodiscard]] auto ad_test::mul_1_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> mul_1_d_ret{ + double r {0.0}; + cpp2::taylor r_d {0.0};r_d = x_d.mul(y_d, x, y); + r = x * y; + return { std::move(r), std::move(r_d) }; + } + + [[nodiscard]] auto ad_test::mul_2_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> mul_2_d_ret{ + double r {0.0}; + cpp2::taylor r_d {0.0}; +auto temp_1_d {x_d.mul(y_d, x, y)}; + + auto temp_1 {x * y}; + r_d = cpp2::move(temp_1_d).mul(x_d, temp_1, x); + r = cpp2::move(temp_1) * x; + return { std::move(r), std::move(r_d) }; + } + + [[nodiscard]] auto ad_test::div_1_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> div_1_d_ret{ + double r {0.0}; + cpp2::taylor r_d {0.0};r_d = CPP2_UFCS(div)(x_d, y_d, x, y); + r = x / CPP2_ASSERT_NOT_ZERO(CPP2_TYPEOF(x),y); + return { std::move(r), std::move(r_d) }; + } + + [[nodiscard]] auto ad_test::div_2_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> div_2_d_ret{ + double r {0.0}; + cpp2::taylor r_d {0.0}; +auto temp_1_d {CPP2_UFCS(div)(x_d, y_d, x, y)}; + + auto temp_1 {x / CPP2_ASSERT_NOT_ZERO(CPP2_TYPEOF(x),y)}; + r_d = CPP2_UFCS(div)(cpp2::move(temp_1_d), y_d, temp_1, y); + r = cpp2::move(temp_1) / CPP2_ASSERT_NOT_ZERO(CPP2_TYPEOF(cpp2::move(temp_1)),y); + return { std::move(r), std::move(r_d) }; + } + + [[nodiscard]] auto ad_test::mul_div_2_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> mul_div_2_d_ret{ + double r {0.0}; + cpp2::taylor r_d {0.0}; +auto temp_1_d {x_d.mul(y_d, x, y)}; + + auto temp_1 {x * y}; + r_d = CPP2_UFCS(div)(cpp2::move(temp_1_d), x_d, temp_1, x); + r = cpp2::move(temp_1) / CPP2_ASSERT_NOT_ZERO(CPP2_TYPEOF(cpp2::move(temp_1)),x); + return { std::move(r), std::move(r_d) }; + } + + [[nodiscard]] auto ad_test::mul_add_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> mul_add_d_ret{ + double r {0.0}; + cpp2::taylor r_d {0.0}; +cpp2::taylor temp_1_d {x_d + y_d}; + + double temp_1 {x + y}; + r_d = x_d.mul(cpp2::move(temp_1_d), x, temp_1); + r = x * cpp2::move(temp_1); + return { std::move(r), std::move(r_d) }; + } + + [[nodiscard]] auto ad_test::add_mul_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> add_mul_d_ret{ + double r {0.0}; + cpp2::taylor r_d {0.0}; +cpp2::taylor temp_1_d {x_d.mul(y_d, x, y)}; + + double temp_1 {x * y}; + r_d = x_d + cpp2::move(temp_1_d); + r = x + cpp2::move(temp_1); + return { std::move(r), std::move(r_d) }; + } + + [[nodiscard]] auto ad_test::prefix_add_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> prefix_add_d_ret{ + double r {0.0}; + cpp2::taylor r_d {0.0}; +cpp2::taylor temp_1_d {+x_d}; + + double temp_1 {+x}; + r_d = cpp2::move(temp_1_d) + y_d; + r = cpp2::move(temp_1) + y; + return { std::move(r), std::move(r_d) }; + } + + [[nodiscard]] auto ad_test::prefix_sub_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> prefix_sub_d_ret{ + double r {0.0}; + cpp2::taylor r_d {0.0}; +cpp2::taylor temp_1_d {-x_d}; + + double temp_1 {-x}; + r_d = cpp2::move(temp_1_d) + y_d; + r = cpp2::move(temp_1) + y; + return { std::move(r), std::move(r_d) }; + } + + [[nodiscard]] auto ad_test::func_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> func_d_ret{ + double ret {0.0}; + cpp2::taylor ret_d {0.0};ret_d = x_d + y_d; + ret = x + y; + return { std::move(ret), std::move(ret_d) }; + } + + [[nodiscard]] auto ad_test::func_call_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> func_call_d_ret{ + double r {0.0}; + cpp2::taylor r_d {0.0}; +auto temp_1 {func_d(x, x_d, y, y_d)}; + + cpp2::taylor temp_2_d {cpp2::move(temp_1).ret_d}; + + double temp_2 {func(x, y)}; + r_d = x_d.mul(cpp2::move(temp_2_d), x, temp_2); + r = x * cpp2::move(temp_2); + return { std::move(r), std::move(r_d) }; + } + + [[nodiscard]] auto ad_test::func_outer_call_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> func_outer_call_d_ret{ + double r {0.0}; + cpp2::taylor r_d {0.0}; +auto temp_1 {func_outer_d(x, x_d, y, y_d)}; + + cpp2::taylor temp_2_d {cpp2::move(temp_1).ret_d}; + + double temp_2 {func_outer(x, y)}; + r_d = x_d.mul(cpp2::move(temp_2_d), x, temp_2); + r = x * cpp2::move(temp_2); + return { std::move(r), std::move(r_d) }; + } + + [[nodiscard]] auto ad_test::sin_call_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> sin_call_d_ret{ + double r {0.0}; + cpp2::taylor r_d {0.0}; +cpp2::taylor temp_1_d {x_d - y_d}; + + double temp_1 {x - y}; + r_d = CPP2_UFCS(sin)(cpp2::move(temp_1_d), temp_1); + r = sin(cpp2::move(temp_1)); + return { std::move(r), std::move(r_d) }; + } + + [[nodiscard]] auto ad_test::if_branch_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> if_branch_d_ret{ + double r {0.0}; + cpp2::taylor r_d {0.0};r_d = x_d; + r = x; + if (cpp2::impl::cmp_less(x,0.0)) { + r_d = y_d; + r = y; + } + else { + } + return { std::move(r), std::move(r_d) }; + } + + [[nodiscard]] auto ad_test::if_else_branch_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> if_else_branch_d_ret{ + double r {0.0}; + cpp2::taylor r_d {0.0};if (cpp2::impl::cmp_less(x,0.0)) { + r_d = y_d; + r = y; + } + else { + r_d = x_d; + r = x; + } + return { std::move(r), std::move(r_d) }; + } + + [[nodiscard]] auto ad_test::direct_return_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> direct_return_d_ret{ + double r {}; + cpp2::taylor r_d {};r_d = x_d + y_d; + r = x + y; + return { std::move(r), std::move(r_d) }; } + + [[nodiscard]] auto ad_test::intermediate_var_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> intermediate_var_d_ret{ + double r {0.0}; + cpp2::taylor r_d {0.0}; +cpp2::taylor t_d {x_d + y_d}; + + double t {x + y}; + r_d = cpp2::move(t_d); + r = cpp2::move(t); + return { std::move(r), std::move(r_d) }; + } + + [[nodiscard]] auto ad_test::intermediate_passive_var_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> intermediate_passive_var_d_ret{ + double r {0.0}; + cpp2::taylor r_d {0.0}; +int i {}; + r_d = x_d + y_d; + r = x + y; + i = 2; + static_cast(cpp2::move(i)); + return { std::move(r), std::move(r_d) }; + } + + [[nodiscard]] auto ad_test::intermediate_untyped_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> intermediate_untyped_d_ret{ + double r {0.0}; + cpp2::taylor r_d {0.0}; +auto t_d {cpp2::taylor()}; + + auto t {0.0}; + t_d = x_d + y_d; + t = x + y; + r_d = cpp2::move(t_d); + r = cpp2::move(t); + return { std::move(r), std::move(r_d) }; + } + + [[nodiscard]] auto ad_test::intermediate_default_init_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> intermediate_default_init_d_ret{ + double r {0.0}; + cpp2::taylor r_d {0.0}; +cpp2::taylor t_d {}; + + double t {}; + t_d = x_d + y_d; + t = x + y; + r_d = cpp2::move(t_d); + r = cpp2::move(t); + return { std::move(r), std::move(r_d) }; + } + + [[nodiscard]] auto ad_test::intermediate_no_init_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> intermediate_no_init_d_ret{ + double r {0.0}; + cpp2::taylor r_d {0.0}; +cpp2::impl::deferred_init> t_d; + + cpp2::impl::deferred_init t; + t_d.construct(x_d + y_d); + t.construct(x + y); + r_d = cpp2::move(t_d.value()); + r = cpp2::move(t.value()); + return { std::move(r), std::move(r_d) }; + } + + [[nodiscard]] auto ad_test::while_loop_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> while_loop_d_ret{ + double r {0.0}; + cpp2::taylor r_d {0.0}; +int i {0}; + r_d = x_d; + r = x; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + r_d = r_d + y_d; + r = r + y; + } + return { std::move(r), std::move(r_d) }; + } + + [[nodiscard]] auto ad_test::do_while_loop_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> do_while_loop_d_ret{ + double r {0.0}; + cpp2::taylor r_d {0.0}; +int i {0}; + r_d = x_d; + r = x; + do { + r_d = r_d + y_d; + r = r + y; + } + while ( [&]{ + (i += 1) + ; return true; }() && + cpp2::impl::cmp_less(i,2) + ); + return { std::move(r), std::move(r_d) }; + } + + [[nodiscard]] auto ad_test::for_loop_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> for_loop_d_ret{ + double r {0.0}; + cpp2::taylor r_d {0.0}; +std::vector> v_d {}; + + std::vector v {}; + CPP2_UFCS(push_back)(v_d, x_d); + CPP2_UFCS(push_back)(v, x); + CPP2_UFCS(push_back)(v_d, y_d); + CPP2_UFCS(push_back)(v, y); + r_d = { }; + r = 0.0; +{ +auto t_d_iter{CPP2_UFCS(begin)(cpp2::move(v_d))}; + for ( auto const& t : cpp2::move(v) ) { do { +{ +auto const& t_d{*cpp2::impl::assert_not_null(t_d_iter)}; + { + r_d = r_d + t_d; + r = r + t; + } +} + } + while (false); (++t_d_iter); } +} + return { std::move(r), std::move(r_d) }; + } + + [[nodiscard]] auto ad_test::type_outer_use_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> type_outer_use_d_ret{ + double r {0.0}; + cpp2::taylor r_d {0.0}; +type_outer_d t_d {}; + + type_outer t {}; + t_d.a_d = x_d; + t.a = x; + + cpp2::taylor temp_1_d {cpp2::move(t_d).a_d}; + + double temp_1 {cpp2::move(t).a}; + r_d = cpp2::move(temp_1_d) + y_d; + r = cpp2::move(temp_1) + y; + return { std::move(r), std::move(r_d) }; + } + + [[nodiscard]] auto ad_test::type_outer_call_d(cpp2::impl::in x, cpp2::impl::in> x_d, cpp2::impl::in y, cpp2::impl::in> y_d) -> type_outer_call_d_ret{ + double r {0.0}; + cpp2::taylor r_d {0.0}; +type_outer_d t_d {}; + + type_outer t {}; + t_d.a_d = x_d; + t.a = x; + + auto temp_1 {CPP2_UFCS(add_d)(t, cpp2::move(t_d), y, y_d)}; + r_d = cpp2::move(temp_1).r_d; + r = CPP2_UFCS(add)(cpp2::move(t), y); + return { std::move(r), std::move(r_d) }; + } + +#line 196 "pure2-autodiff-higher-order.cpp2" +} + +#line 198 "pure2-autodiff-higher-order.cpp2" +auto write_output(cpp2::impl::in func, cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d, auto const& ret) -> void{ + std::cout << "diff(" + cpp2::to_string(func) + ") at (x = " + cpp2::to_string(x) + ", x_d = " + cpp2::to_string(x_d) + ", y = " + cpp2::to_string(y) + ", y_d = " + cpp2::to_string(y_d) + "):" << std::endl; + std::cout << " r = " + cpp2::to_string(ret.r) + "" << std::endl; +{ +auto i{1}; + +#line 202 "pure2-autodiff-higher-order.cpp2" + for( ; cpp2::impl::cmp_less_eq(i,ad_order); i += 1 ) { + std::cout << " d" + cpp2::to_string(i) + " = " + cpp2::to_string(CPP2_ASSERT_IN_BOUNDS(ret.r_d, i)) + "" << std::endl; + } +} +#line 205 "pure2-autodiff-higher-order.cpp2" +} + +#line 207 "pure2-autodiff-higher-order.cpp2" +auto main() -> int{ + +#line 210 "pure2-autodiff-higher-order.cpp2" + double x {2.0}; + ad_type x_d {1.0}; + double y {3.0}; + ad_type y_d {2.0}; + + write_output("x + y", x, x_d, y, y_d, ad_name::ad_test::add_1_d(x, x_d, y, y_d)); + write_output("x + y + x", x, x_d, y, y_d, ad_name::ad_test::add_2_d(x, x_d, y, y_d)); + write_output("x - y", x, x_d, y, y_d, ad_name::ad_test::sub_1_d(x, x_d, y, y_d)); + write_output("x - y - x", x, x_d, y, y_d, ad_name::ad_test::sub_2_d(x, x_d, y, y_d)); + write_output("x + y - x", x, x_d, y, y_d, ad_name::ad_test::add_sub_2_d(x, x_d, y, y_d)); + write_output("x * y", x, x_d, y, y_d, ad_name::ad_test::mul_1_d(x, x_d, y, y_d)); + write_output("x * y * x", x, x_d, y, y_d, ad_name::ad_test::mul_2_d(x, x_d, y, y_d)); + write_output("x / y", x, x_d, y, y_d, ad_name::ad_test::div_1_d(x, x_d, y, y_d)); + write_output("x / y / y", x, x_d, y, y_d, ad_name::ad_test::div_2_d(x, x_d, y, y_d)); + write_output("x * y / x", x, x_d, y, y_d, ad_name::ad_test::mul_div_2_d(x, x_d, y, y_d)); + write_output("x * (x + y)", x, x_d, y, y_d, ad_name::ad_test::mul_add_d(x, x_d, y, y_d)); + write_output("x + x * y", x, x_d, y, y_d, ad_name::ad_test::add_mul_d(x, x_d, y, y_d)); + write_output("+x + y)", x, x_d, y, y_d, ad_name::ad_test::prefix_add_d(x, x_d, y, y_d)); + write_output("-x + y)", x, x_d, y, y_d, ad_name::ad_test::prefix_sub_d(x, x_d, y, y_d)); + write_output("x * func(x, y)", x, x_d, y, y_d, ad_name::ad_test::func_call_d(x, x_d, y, y_d)); + write_output("x * func_outer(x, y)", x, x_d, y, y_d, ad_name::ad_test::func_outer_call_d(x, x_d, y, y_d)); + write_output("sin(x - y)", x, x_d, y, y_d, ad_name::ad_test::sin_call_d(x, x_d, y, y_d)); + write_output("if branch", x, x_d, y, y_d, ad_name::ad_test::if_branch_d(x, x_d, y, y_d)); + write_output("if else branch", x, x_d, y, y_d, ad_name::ad_test::if_else_branch_d(x, x_d, y, y_d)); + write_output("direct return", x, x_d, y, y_d, ad_name::ad_test::direct_return_d(x, x_d, y, y_d)); + write_output("intermediate var", x, x_d, y, y_d, ad_name::ad_test::intermediate_var_d(x, x_d, y, y_d)); + write_output("intermediate passive var", x, x_d, y, y_d, ad_name::ad_test::intermediate_passive_var_d(x, x_d, y, y_d)); + write_output("intermediate untyped", x, x_d, y, y_d, ad_name::ad_test::intermediate_untyped_d(x, x_d, y, y_d)); + write_output("intermediate default init", x, x_d, y, y_d, ad_name::ad_test::intermediate_default_init_d(x, x_d, y, y_d)); + write_output("intermediate no init", x, x_d, y, y_d, ad_name::ad_test::intermediate_no_init_d(x, x_d, y, y_d)); + write_output("while loop", x, x_d, y, y_d, ad_name::ad_test::while_loop_d(x, x_d, y, y_d)); + write_output("do while loop", x, x_d, y, y_d, ad_name::ad_test::do_while_loop_d(x, x_d, y, y_d)); + write_output("for loop", x, x_d, y, y_d, ad_name::ad_test::for_loop_d(x, x_d, y, y_d)); + write_output("tye_outer.a + y", x, x_d, y, y_d, ad_name::ad_test::type_outer_use_d(x, x_d, y, y_d)); + write_output("type_outer.add(y)", x, x_d, y, y_d, ad_name::ad_test::type_outer_call_d(cpp2::move(x), cpp2::move(x_d), cpp2::move(y), cpp2::move(y_d))); +} + diff --git a/regression-tests/test-results/pure2-autodiff-higher-order.cpp2.output b/regression-tests/test-results/pure2-autodiff-higher-order.cpp2.output new file mode 100644 index 000000000..17c5f140c --- /dev/null +++ b/regression-tests/test-results/pure2-autodiff-higher-order.cpp2.output @@ -0,0 +1,893 @@ +pure2-autodiff-higher-order.cpp2... + +ad_test:/* @autodiff<"order=6"> @print */ type = +{ + add_1:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + r = x + y; + return; + } + + add_2:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + r = x + y + x; + return; + } + + sub_1:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + r = x - y; + return; + } + + sub_2:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + r = x - y - x; + return; + } + + add_sub_2:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + r = x + y - x; + return; + } + + mul_1:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + r = x * y; + return; + } + + mul_2:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + r = x * y * x; + return; + } + + div_1:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + r = x / y; + return; + } + + div_2:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + r = x / y / y; + return; + } + + mul_div_2:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + r = x * y / x; + return; + } + + mul_add:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + r = x * (x + y); + return; + } + + add_mul:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + r = x + x * y; + return; + } + + prefix_add:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + r = +x + y; + return; + } + + prefix_sub:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + r = -x + y; + return; + } + + func:( + in x: double, + in y: double, + ) -> (out ret: double, ) = + { + ret = x + y; + return; + } + + func_call:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + r = x * func(x, y); + return; + } + + func_outer_call:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + r = x * func_outer(x, y); + return; + } + + sin_call:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + r = sin(x - y); + return; + } + + if_branch:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + r = x; + if x < 0.0 + { + r = y; + } + return; + } + + if_else_branch:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + if x < 0.0 + { + r = y; + } + else + { + r = x; + } + return; + } + + direct_return:( + in x: double, + in y: double, + ) -> move double = + { + return x + y; + } + + intermediate_var:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + t: double = x + y; + r = t; + return; + } + + intermediate_passive_var:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + i: int = (); + r = x + y; + i = 2; + _ = i; + return; + } + + intermediate_untyped:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + t: _ = 0.0; + t = x + y; + r = t; + return; + } + + intermediate_default_init:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + t: double = (); + t = x + y; + r = t; + return; + } + + intermediate_no_init:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + t: double; + t = x + y; + r = t; + return; + } + + while_loop:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + i: int = 0; + r = x; + while i < 2 + next (i += 1) + { + r = r + y; + } + return; + } + + do_while_loop:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + i: int = 0; + r = x; + do + { + r = r + y; + } + next (i += 1) + while i < 2; + return; + } + + for_loop:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + v: std::vector = (); + v.push_back(x); + v.push_back(y); + r = 0.0; + for v + do (in t: _) + { + r = r + t; + } + return; + } + + type_outer_use:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + t: type_outer = (); + t.a = x; + r = t.a + y; + return; + } + + type_outer_call:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + t: type_outer = (); + t.a = x; + r = t.add(y); + return; + } + + add_1_d:( + in x: double, + in x_d: cpp2::taylor, + in y: double, + in y_d: cpp2::taylor, + ) -> ( + out r: double = 0.0, + out r_d: cpp2::taylor = 0.0, + ) = + { + r_d = x_d + y_d; + r = x + y; + return; + } + + add_2_d:( + in x: double, + in x_d: cpp2::taylor, + in y: double, + in y_d: cpp2::taylor, + ) -> ( + out r: double = 0.0, + out r_d: cpp2::taylor = 0.0, + ) = + { + r_d = x_d + y_d + x_d; + r = x + y + x; + return; + } + + sub_1_d:( + in x: double, + in x_d: cpp2::taylor, + in y: double, + in y_d: cpp2::taylor, + ) -> ( + out r: double = 0.0, + out r_d: cpp2::taylor = 0.0, + ) = + { + r_d = x_d - y_d; + r = x - y; + return; + } + + sub_2_d:( + in x: double, + in x_d: cpp2::taylor, + in y: double, + in y_d: cpp2::taylor, + ) -> ( + out r: double = 0.0, + out r_d: cpp2::taylor = 0.0, + ) = + { + r_d = x_d - y_d - x_d; + r = x - y - x; + return; + } + + add_sub_2_d:( + in x: double, + in x_d: cpp2::taylor, + in y: double, + in y_d: cpp2::taylor, + ) -> ( + out r: double = 0.0, + out r_d: cpp2::taylor = 0.0, + ) = + { + r_d = x_d + y_d - x_d; + r = x + y - x; + return; + } + + mul_1_d:( + in x: double, + in x_d: cpp2::taylor, + in y: double, + in y_d: cpp2::taylor, + ) -> ( + out r: double = 0.0, + out r_d: cpp2::taylor = 0.0, + ) = + { + r_d = x_d..mul(y_d, x, y); + r = x * y; + return; + } + + mul_2_d:( + in x: double, + in x_d: cpp2::taylor, + in y: double, + in y_d: cpp2::taylor, + ) -> ( + out r: double = 0.0, + out r_d: cpp2::taylor = 0.0, + ) = + { + temp_1_d: _ = x_d..mul(y_d, x, y); + temp_1: _ = x * y; + r_d = temp_1_d..mul(x_d, temp_1, x); + r = temp_1 * x; + return; + } + + div_1_d:( + in x: double, + in x_d: cpp2::taylor, + in y: double, + in y_d: cpp2::taylor, + ) -> ( + out r: double = 0.0, + out r_d: cpp2::taylor = 0.0, + ) = + { + r_d = x_d.div(y_d, x, y); + r = x / y; + return; + } + + div_2_d:( + in x: double, + in x_d: cpp2::taylor, + in y: double, + in y_d: cpp2::taylor, + ) -> ( + out r: double = 0.0, + out r_d: cpp2::taylor = 0.0, + ) = + { + temp_1_d: _ = x_d.div(y_d, x, y); + temp_1: _ = x / y; + r_d = temp_1_d.div(y_d, temp_1, y); + r = temp_1 / y; + return; + } + + mul_div_2_d:( + in x: double, + in x_d: cpp2::taylor, + in y: double, + in y_d: cpp2::taylor, + ) -> ( + out r: double = 0.0, + out r_d: cpp2::taylor = 0.0, + ) = + { + temp_1_d: _ = x_d..mul(y_d, x, y); + temp_1: _ = x * y; + r_d = temp_1_d.div(x_d, temp_1, x); + r = temp_1 / x; + return; + } + + mul_add_d:( + in x: double, + in x_d: cpp2::taylor, + in y: double, + in y_d: cpp2::taylor, + ) -> ( + out r: double = 0.0, + out r_d: cpp2::taylor = 0.0, + ) = + { + temp_1_d: cpp2::taylor = x_d + y_d; + temp_1: double = x + y; + r_d = x_d..mul(temp_1_d, x, temp_1); + r = x * temp_1; + return; + } + + add_mul_d:( + in x: double, + in x_d: cpp2::taylor, + in y: double, + in y_d: cpp2::taylor, + ) -> ( + out r: double = 0.0, + out r_d: cpp2::taylor = 0.0, + ) = + { + temp_1_d: cpp2::taylor = x_d..mul(y_d, x, y); + temp_1: double = x * y; + r_d = x_d + temp_1_d; + r = x + temp_1; + return; + } + + prefix_add_d:( + in x: double, + in x_d: cpp2::taylor, + in y: double, + in y_d: cpp2::taylor, + ) -> ( + out r: double = 0.0, + out r_d: cpp2::taylor = 0.0, + ) = + { + temp_1_d: cpp2::taylor = +x_d; + temp_1: double = +x; + r_d = temp_1_d + y_d; + r = temp_1 + y; + return; + } + + prefix_sub_d:( + in x: double, + in x_d: cpp2::taylor, + in y: double, + in y_d: cpp2::taylor, + ) -> ( + out r: double = 0.0, + out r_d: cpp2::taylor = 0.0, + ) = + { + temp_1_d: cpp2::taylor = -x_d; + temp_1: double = -x; + r_d = temp_1_d + y_d; + r = temp_1 + y; + return; + } + + func_d:( + in x: double, + in x_d: cpp2::taylor, + in y: double, + in y_d: cpp2::taylor, + ) -> ( + out ret: double = 0.0, + out ret_d: cpp2::taylor = 0.0, + ) = + { + ret_d = x_d + y_d; + ret = x + y; + return; + } + + func_call_d:( + in x: double, + in x_d: cpp2::taylor, + in y: double, + in y_d: cpp2::taylor, + ) -> ( + out r: double = 0.0, + out r_d: cpp2::taylor = 0.0, + ) = + { + temp_1: _ = func_d(x, x_d, y, y_d); + temp_2_d: cpp2::taylor = temp_1.ret_d; + temp_2: double = func(x, y); + r_d = x_d..mul(temp_2_d, x, temp_2); + r = x * temp_2; + return; + } + + func_outer_call_d:( + in x: double, + in x_d: cpp2::taylor, + in y: double, + in y_d: cpp2::taylor, + ) -> ( + out r: double = 0.0, + out r_d: cpp2::taylor = 0.0, + ) = + { + temp_1: _ = func_outer_d(x, x_d, y, y_d); + temp_2_d: cpp2::taylor = temp_1.ret_d; + temp_2: double = func_outer(x, y); + r_d = x_d..mul(temp_2_d, x, temp_2); + r = x * temp_2; + return; + } + + sin_call_d:( + in x: double, + in x_d: cpp2::taylor, + in y: double, + in y_d: cpp2::taylor, + ) -> ( + out r: double = 0.0, + out r_d: cpp2::taylor = 0.0, + ) = + { + temp_1_d: cpp2::taylor = x_d - y_d; + temp_1: double = x - y; + r_d = temp_1_d.sin(temp_1); + r = sin(temp_1); + return; + } + + if_branch_d:( + in x: double, + in x_d: cpp2::taylor, + in y: double, + in y_d: cpp2::taylor, + ) -> ( + out r: double = 0.0, + out r_d: cpp2::taylor = 0.0, + ) = + { + r_d = x_d; + r = x; + if x < 0.0 + { + r_d = y_d; + r = y; + } + else + { + } + return; + } + + if_else_branch_d:( + in x: double, + in x_d: cpp2::taylor, + in y: double, + in y_d: cpp2::taylor, + ) -> ( + out r: double = 0.0, + out r_d: cpp2::taylor = 0.0, + ) = + { + if x < 0.0 + { + r_d = y_d; + r = y; + } + else + { + r_d = x_d; + r = x; + } + return; + } + + direct_return_d:( + in x: double, + in x_d: cpp2::taylor, + in y: double, + in y_d: cpp2::taylor, + ) -> ( + out r: double = (), + out r_d: cpp2::taylor = (), + ) = + { + r_d = x_d + y_d; + r = x + y; + return; + } + + intermediate_var_d:( + in x: double, + in x_d: cpp2::taylor, + in y: double, + in y_d: cpp2::taylor, + ) -> ( + out r: double = 0.0, + out r_d: cpp2::taylor = 0.0, + ) = + { + t_d: cpp2::taylor = x_d + y_d; + t: double = x + y; + r_d = t_d; + r = t; + return; + } + + intermediate_passive_var_d:( + in x: double, + in x_d: cpp2::taylor, + in y: double, + in y_d: cpp2::taylor, + ) -> ( + out r: double = 0.0, + out r_d: cpp2::taylor = 0.0, + ) = + { + i: int = (); + r_d = x_d + y_d; + r = x + y; + i = 2; + _ = i; + return; + } + + intermediate_untyped_d:( + in x: double, + in x_d: cpp2::taylor, + in y: double, + in y_d: cpp2::taylor, + ) -> ( + out r: double = 0.0, + out r_d: cpp2::taylor = 0.0, + ) = + { + t_d: _ = cpp2::taylor(); + t: _ = 0.0; + t_d = x_d + y_d; + t = x + y; + r_d = t_d; + r = t; + return; + } + + intermediate_default_init_d:( + in x: double, + in x_d: cpp2::taylor, + in y: double, + in y_d: cpp2::taylor, + ) -> ( + out r: double = 0.0, + out r_d: cpp2::taylor = 0.0, + ) = + { + t_d: cpp2::taylor = (); + t: double = (); + t_d = x_d + y_d; + t = x + y; + r_d = t_d; + r = t; + return; + } + + intermediate_no_init_d:( + in x: double, + in x_d: cpp2::taylor, + in y: double, + in y_d: cpp2::taylor, + ) -> ( + out r: double = 0.0, + out r_d: cpp2::taylor = 0.0, + ) = + { + t_d: cpp2::taylor; + t: double; + t_d = x_d + y_d; + t = x + y; + r_d = t_d; + r = t; + return; + } + + while_loop_d:( + in x: double, + in x_d: cpp2::taylor, + in y: double, + in y_d: cpp2::taylor, + ) -> ( + out r: double = 0.0, + out r_d: cpp2::taylor = 0.0, + ) = + { + i: int = 0; + r_d = x_d; + r = x; + while i < 2 + next (i += 1) + { + r_d = r_d + y_d; + r = r + y; + } + return; + } + + do_while_loop_d:( + in x: double, + in x_d: cpp2::taylor, + in y: double, + in y_d: cpp2::taylor, + ) -> ( + out r: double = 0.0, + out r_d: cpp2::taylor = 0.0, + ) = + { + i: int = 0; + r_d = x_d; + r = x; + do + { + r_d = r_d + y_d; + r = r + y; + } + next (i += 1) + while i < 2; + return; + } + + for_loop_d:( + in x: double, + in x_d: cpp2::taylor, + in y: double, + in y_d: cpp2::taylor, + ) -> ( + out r: double = 0.0, + out r_d: cpp2::taylor = 0.0, + ) = + { + v_d: std::vector> = (); + v: std::vector = (); + v_d.push_back(x_d); + v.push_back(x); + v_d.push_back(y_d); + v.push_back(y); + r_d = (); + r = 0.0; + (copy t_d_iter: _ = v_d.begin(), ) + for v + next (t_d_iter++) + do (in t: _) + { + (in t_d: _ = t_d_iter*, ) + { + r_d = r_d + t_d; + r = r + t; + } + } + return; + } + + type_outer_use_d:( + in x: double, + in x_d: cpp2::taylor, + in y: double, + in y_d: cpp2::taylor, + ) -> ( + out r: double = 0.0, + out r_d: cpp2::taylor = 0.0, + ) = + { + t_d: type_outer_d = (); + t: type_outer = (); + t_d.a_d = x_d; + t.a = x; + temp_1_d: cpp2::taylor = t_d.a_d; + temp_1: double = t.a; + r_d = temp_1_d + y_d; + r = temp_1 + y; + return; + } + + type_outer_call_d:( + in x: double, + in x_d: cpp2::taylor, + in y: double, + in y_d: cpp2::taylor, + ) -> ( + out r: double = 0.0, + out r_d: cpp2::taylor = 0.0, + ) = + { + t_d: type_outer_d = (); + t: type_outer = (); + t_d.a_d = x_d; + t.a = x; + temp_1: _ = t.add_d(t_d, y, y_d); + r_d = temp_1.r_d; + r = t.add(y); + return; + } +} + ok (all Cpp2, passes safety checks) + diff --git a/regression-tests/test-results/pure2-autodiff.cpp b/regression-tests/test-results/pure2-autodiff.cpp new file mode 100644 index 000000000..02c385c88 --- /dev/null +++ b/regression-tests/test-results/pure2-autodiff.cpp @@ -0,0 +1,1693 @@ + +#define CPP2_INCLUDE_STD Yes +#include "cpp2ad_stack.h" +#include "cpp2taylor.h" + +//=== Cpp2 type declarations ==================================================== + + +#include "cpp2util.h" + +#line 1 "pure2-autodiff.cpp2" +namespace ad_name { + +#line 7 "pure2-autodiff.cpp2" +class type_outer; + + class type_outer_d; + + +#line 15 "pure2-autodiff.cpp2" +class ad_test; + +#line 195 "pure2-autodiff.cpp2" +class ad_test_reverse; + +#line 261 "pure2-autodiff.cpp2" +} + +class ad_test_twice; + + +#line 280 "pure2-autodiff.cpp2" +class ad_test_2; + + +//=== Cpp2 type definitions and function declarations =========================== + +#line 1 "pure2-autodiff.cpp2" +namespace ad_name { +using func_outer_ret = double; + + +#line 3 "pure2-autodiff.cpp2" +[[nodiscard]] auto func_outer(cpp2::impl::in x, cpp2::impl::in y) -> func_outer_ret; + +#line 7 "pure2-autodiff.cpp2" +class type_outer { + public: double a {0.0}; + + public: [[nodiscard]] auto add(cpp2::impl::in b) const& -> double; +struct add_d_ret { double r; double r_d; }; + + + public: [[nodiscard]] auto add_d(cpp2::impl::in this_d, cpp2::impl::in b, cpp2::impl::in b_d) const& -> add_d_ret; + + public: type_outer() = default; + public: type_outer(type_outer const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(type_outer const&) -> void = delete; + + +#line 13 "pure2-autodiff.cpp2" +}; + +struct func_outer_d_ret { double ret; double ret_d; }; + + +[[nodiscard]] auto func_outer_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> func_outer_d_ret; +class type_outer_d { +public: double a_d {}; + public: type_outer_d() = default; + public: type_outer_d(type_outer_d const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(type_outer_d const&) -> void = delete; + +}; + +#line 15 "pure2-autodiff.cpp2" +class ad_test { +using add_1_ret = double; + + +#line 17 "pure2-autodiff.cpp2" + public: [[nodiscard]] static auto add_1(cpp2::impl::in x, cpp2::impl::in y) -> add_1_ret; +using add_2_ret = double; + + +#line 21 "pure2-autodiff.cpp2" + public: [[nodiscard]] static auto add_2(cpp2::impl::in x, cpp2::impl::in y) -> add_2_ret; +using sub_1_ret = double; + + +#line 25 "pure2-autodiff.cpp2" + public: [[nodiscard]] static auto sub_1(cpp2::impl::in x, cpp2::impl::in y) -> sub_1_ret; +using sub_2_ret = double; + + +#line 29 "pure2-autodiff.cpp2" + public: [[nodiscard]] static auto sub_2(cpp2::impl::in x, cpp2::impl::in y) -> sub_2_ret; +using add_sub_2_ret = double; + + +#line 33 "pure2-autodiff.cpp2" + public: [[nodiscard]] static auto add_sub_2(cpp2::impl::in x, cpp2::impl::in y) -> add_sub_2_ret; +using mul_1_ret = double; + + +#line 37 "pure2-autodiff.cpp2" + public: [[nodiscard]] static auto mul_1(cpp2::impl::in x, cpp2::impl::in y) -> mul_1_ret; +using mul_2_ret = double; + + +#line 41 "pure2-autodiff.cpp2" + public: [[nodiscard]] static auto mul_2(cpp2::impl::in x, cpp2::impl::in y) -> mul_2_ret; +using div_1_ret = double; + + +#line 45 "pure2-autodiff.cpp2" + public: [[nodiscard]] static auto div_1(cpp2::impl::in x, cpp2::impl::in y) -> div_1_ret; +using div_2_ret = double; + + +#line 49 "pure2-autodiff.cpp2" + public: [[nodiscard]] static auto div_2(cpp2::impl::in x, cpp2::impl::in y) -> div_2_ret; +using mul_div_2_ret = double; + + +#line 53 "pure2-autodiff.cpp2" + public: [[nodiscard]] static auto mul_div_2(cpp2::impl::in x, cpp2::impl::in y) -> mul_div_2_ret; +using mul_add_ret = double; + + +#line 57 "pure2-autodiff.cpp2" + public: [[nodiscard]] static auto mul_add(cpp2::impl::in x, cpp2::impl::in y) -> mul_add_ret; +using add_mul_ret = double; + + +#line 61 "pure2-autodiff.cpp2" + public: [[nodiscard]] static auto add_mul(cpp2::impl::in x, cpp2::impl::in y) -> add_mul_ret; +using prefix_add_ret = double; + + +#line 65 "pure2-autodiff.cpp2" + public: [[nodiscard]] static auto prefix_add(cpp2::impl::in x, cpp2::impl::in y) -> prefix_add_ret; +using prefix_sub_ret = double; + + +#line 69 "pure2-autodiff.cpp2" + public: [[nodiscard]] static auto prefix_sub(cpp2::impl::in x, cpp2::impl::in y) -> prefix_sub_ret; +using func_ret = double; + + +#line 73 "pure2-autodiff.cpp2" + public: [[nodiscard]] static auto func(cpp2::impl::in x, cpp2::impl::in y) -> func_ret; +using func_call_ret = double; + + +#line 77 "pure2-autodiff.cpp2" + public: [[nodiscard]] static auto func_call(cpp2::impl::in x, cpp2::impl::in y) -> func_call_ret; +using func_outer_call_ret = double; + + +#line 81 "pure2-autodiff.cpp2" + public: [[nodiscard]] static auto func_outer_call(cpp2::impl::in x, cpp2::impl::in y) -> func_outer_call_ret; +using sin_call_ret = double; + + +#line 85 "pure2-autodiff.cpp2" + public: [[nodiscard]] static auto sin_call(cpp2::impl::in x, cpp2::impl::in y) -> sin_call_ret; +using if_branch_ret = double; + + +#line 89 "pure2-autodiff.cpp2" + public: [[nodiscard]] static auto if_branch(cpp2::impl::in x, cpp2::impl::in y) -> if_branch_ret; +using if_else_branch_ret = double; + + +#line 97 "pure2-autodiff.cpp2" + public: [[nodiscard]] static auto if_else_branch(cpp2::impl::in x, cpp2::impl::in y) -> if_else_branch_ret; + +#line 106 "pure2-autodiff.cpp2" + public: [[nodiscard]] static auto direct_return(cpp2::impl::in x, cpp2::impl::in y) -> double; +using intermediate_var_ret = double; + + +#line 110 "pure2-autodiff.cpp2" + public: [[nodiscard]] static auto intermediate_var(cpp2::impl::in x, cpp2::impl::in y) -> intermediate_var_ret; +using intermediate_passive_var_ret = double; + + +#line 116 "pure2-autodiff.cpp2" + public: [[nodiscard]] static auto intermediate_passive_var(cpp2::impl::in x, cpp2::impl::in y) -> intermediate_passive_var_ret; +using intermediate_untyped_ret = double; + + +#line 124 "pure2-autodiff.cpp2" + public: [[nodiscard]] static auto intermediate_untyped(cpp2::impl::in x, cpp2::impl::in y) -> intermediate_untyped_ret; +using intermediate_default_init_ret = double; + + +#line 131 "pure2-autodiff.cpp2" + public: [[nodiscard]] static auto intermediate_default_init(cpp2::impl::in x, cpp2::impl::in y) -> intermediate_default_init_ret; +using intermediate_no_init_ret = double; + + +#line 138 "pure2-autodiff.cpp2" + public: [[nodiscard]] static auto intermediate_no_init(cpp2::impl::in x, cpp2::impl::in y) -> intermediate_no_init_ret; +using while_loop_ret = double; + + +#line 145 "pure2-autodiff.cpp2" + public: [[nodiscard]] static auto while_loop(cpp2::impl::in x, cpp2::impl::in y) -> while_loop_ret; +using do_while_loop_ret = double; + + +#line 155 "pure2-autodiff.cpp2" + public: [[nodiscard]] static auto do_while_loop(cpp2::impl::in x, cpp2::impl::in y) -> do_while_loop_ret; +using for_loop_ret = double; + + +#line 166 "pure2-autodiff.cpp2" + public: [[nodiscard]] static auto for_loop(cpp2::impl::in x, cpp2::impl::in y) -> for_loop_ret; +using type_outer_use_ret = double; + + +#line 180 "pure2-autodiff.cpp2" + public: [[nodiscard]] static auto type_outer_use(cpp2::impl::in x, cpp2::impl::in y) -> type_outer_use_ret; +using type_outer_call_ret = double; + + +#line 187 "pure2-autodiff.cpp2" + public: [[nodiscard]] static auto type_outer_call(cpp2::impl::in x, cpp2::impl::in y) -> type_outer_call_ret; +struct add_1_d_ret { double r; double r_d; }; + + + public: [[nodiscard]] static auto add_1_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> add_1_d_ret; + +struct add_2_d_ret { double r; double r_d; }; + +public: [[nodiscard]] static auto add_2_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> add_2_d_ret; + +struct sub_1_d_ret { double r; double r_d; }; + +public: [[nodiscard]] static auto sub_1_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> sub_1_d_ret; + +struct sub_2_d_ret { double r; double r_d; }; + +public: [[nodiscard]] static auto sub_2_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> sub_2_d_ret; + +struct add_sub_2_d_ret { double r; double r_d; }; + +public: [[nodiscard]] static auto add_sub_2_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> add_sub_2_d_ret; + +struct mul_1_d_ret { double r; double r_d; }; + +public: [[nodiscard]] static auto mul_1_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> mul_1_d_ret; + +struct mul_2_d_ret { double r; double r_d; }; + +public: [[nodiscard]] static auto mul_2_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> mul_2_d_ret; + +struct div_1_d_ret { double r; double r_d; }; + +public: [[nodiscard]] static auto div_1_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> div_1_d_ret; + +struct div_2_d_ret { double r; double r_d; }; + +public: [[nodiscard]] static auto div_2_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> div_2_d_ret; + +struct mul_div_2_d_ret { double r; double r_d; }; + +public: [[nodiscard]] static auto mul_div_2_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> mul_div_2_d_ret; + +struct mul_add_d_ret { double r; double r_d; }; + +public: [[nodiscard]] static auto mul_add_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> mul_add_d_ret; + +struct add_mul_d_ret { double r; double r_d; }; + +public: [[nodiscard]] static auto add_mul_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> add_mul_d_ret; + +struct prefix_add_d_ret { double r; double r_d; }; + +public: [[nodiscard]] static auto prefix_add_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> prefix_add_d_ret; + +struct prefix_sub_d_ret { double r; double r_d; }; + +public: [[nodiscard]] static auto prefix_sub_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> prefix_sub_d_ret; + +struct func_d_ret { double ret; double ret_d; }; + +public: [[nodiscard]] static auto func_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> func_d_ret; + +struct func_call_d_ret { double r; double r_d; }; + +public: [[nodiscard]] static auto func_call_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> func_call_d_ret; + +struct func_outer_call_d_ret { double r; double r_d; }; + +public: [[nodiscard]] static auto func_outer_call_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> func_outer_call_d_ret; + +struct sin_call_d_ret { double r; double r_d; }; + +public: [[nodiscard]] static auto sin_call_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> sin_call_d_ret; + +struct if_branch_d_ret { double r; double r_d; }; + +public: [[nodiscard]] static auto if_branch_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> if_branch_d_ret; + +struct if_else_branch_d_ret { double r; double r_d; }; + +public: [[nodiscard]] static auto if_else_branch_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> if_else_branch_d_ret; + +struct direct_return_d_ret { double r; double r_d; }; + +public: [[nodiscard]] static auto direct_return_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> direct_return_d_ret; + +struct intermediate_var_d_ret { double r; double r_d; }; + +public: [[nodiscard]] static auto intermediate_var_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> intermediate_var_d_ret; + +struct intermediate_passive_var_d_ret { double r; double r_d; }; + +public: [[nodiscard]] static auto intermediate_passive_var_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> intermediate_passive_var_d_ret; + +struct intermediate_untyped_d_ret { double r; double r_d; }; + +public: [[nodiscard]] static auto intermediate_untyped_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> intermediate_untyped_d_ret; + +struct intermediate_default_init_d_ret { double r; double r_d; }; + +public: [[nodiscard]] static auto intermediate_default_init_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> intermediate_default_init_d_ret; + +struct intermediate_no_init_d_ret { double r; double r_d; }; + +public: [[nodiscard]] static auto intermediate_no_init_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> intermediate_no_init_d_ret; + +struct while_loop_d_ret { double r; double r_d; }; + +public: [[nodiscard]] static auto while_loop_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> while_loop_d_ret; + +struct do_while_loop_d_ret { double r; double r_d; }; + +public: [[nodiscard]] static auto do_while_loop_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> do_while_loop_d_ret; + +struct for_loop_d_ret { double r; double r_d; }; + +public: [[nodiscard]] static auto for_loop_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> for_loop_d_ret; + +struct type_outer_use_d_ret { double r; double r_d; }; + +public: [[nodiscard]] static auto type_outer_use_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> type_outer_use_d_ret; + +struct type_outer_call_d_ret { double r; double r_d; }; + +public: [[nodiscard]] static auto type_outer_call_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> type_outer_call_d_ret; + + public: ad_test() = default; + public: ad_test(ad_test const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(ad_test const&) -> void = delete; + + +#line 193 "pure2-autodiff.cpp2" +}; + +using func_outer_b_ret = double; + +[[nodiscard]] auto func_outer_b(cpp2::impl::in x, double& x_b, cpp2::impl::in y, double& y_b, double& ret_b) -> func_outer_b_ret; + +#line 195 "pure2-autodiff.cpp2" +class ad_test_reverse { +using add_1_ret = double; + + +#line 197 "pure2-autodiff.cpp2" + public: [[nodiscard]] static auto add_1(cpp2::impl::in x, cpp2::impl::in y) -> add_1_ret; +using add_2_ret = double; + + +#line 201 "pure2-autodiff.cpp2" + public: [[nodiscard]] static auto add_2(cpp2::impl::in x, cpp2::impl::in y) -> add_2_ret; +using sub_1_ret = double; + + +#line 205 "pure2-autodiff.cpp2" + public: [[nodiscard]] static auto sub_1(cpp2::impl::in x, cpp2::impl::in y) -> sub_1_ret; +using sub_2_ret = double; + + +#line 209 "pure2-autodiff.cpp2" + public: [[nodiscard]] static auto sub_2(cpp2::impl::in x, cpp2::impl::in y) -> sub_2_ret; +using add_sub_2_ret = double; + + +#line 213 "pure2-autodiff.cpp2" + public: [[nodiscard]] static auto add_sub_2(cpp2::impl::in x, cpp2::impl::in y) -> add_sub_2_ret; +using mul_1_ret = double; + + +#line 217 "pure2-autodiff.cpp2" + public: [[nodiscard]] static auto mul_1(cpp2::impl::in x, cpp2::impl::in y) -> mul_1_ret; +using mul_2_ret = double; + + +#line 221 "pure2-autodiff.cpp2" + public: [[nodiscard]] static auto mul_2(cpp2::impl::in x, cpp2::impl::in y) -> mul_2_ret; +using div_1_ret = double; + + +#line 225 "pure2-autodiff.cpp2" + public: [[nodiscard]] static auto div_1(cpp2::impl::in x, cpp2::impl::in y) -> div_1_ret; +using div_2_ret = double; + + +#line 229 "pure2-autodiff.cpp2" + public: [[nodiscard]] static auto div_2(cpp2::impl::in x, cpp2::impl::in y) -> div_2_ret; +using mul_div_2_ret = double; + + +#line 233 "pure2-autodiff.cpp2" + public: [[nodiscard]] static auto mul_div_2(cpp2::impl::in x, cpp2::impl::in y) -> mul_div_2_ret; +using mul_add_ret = double; + + +#line 237 "pure2-autodiff.cpp2" + public: [[nodiscard]] static auto mul_add(cpp2::impl::in x, cpp2::impl::in y) -> mul_add_ret; +using add_mul_ret = double; + + +#line 241 "pure2-autodiff.cpp2" + public: [[nodiscard]] static auto add_mul(cpp2::impl::in x, cpp2::impl::in y) -> add_mul_ret; +using sin_call_ret = double; + + +#line 245 "pure2-autodiff.cpp2" + public: [[nodiscard]] static auto sin_call(cpp2::impl::in x, cpp2::impl::in y) -> sin_call_ret; +using func_ret = double; + + +#line 249 "pure2-autodiff.cpp2" + public: [[nodiscard]] static auto func(cpp2::impl::in x, cpp2::impl::in y) -> func_ret; +using func_call_ret = double; + + +#line 253 "pure2-autodiff.cpp2" + public: [[nodiscard]] static auto func_call(cpp2::impl::in x, cpp2::impl::in y) -> func_call_ret; +using func_outer_call_ret = double; + + +#line 257 "pure2-autodiff.cpp2" + public: [[nodiscard]] static auto func_outer_call(cpp2::impl::in x, cpp2::impl::in y) -> func_outer_call_ret; +using add_1_b_ret = double; + + public: [[nodiscard]] static auto add_1_b(cpp2::impl::in x, double& x_b, cpp2::impl::in y, double& y_b, double& r_b) -> add_1_b_ret; + +using add_2_b_ret = double; +public: [[nodiscard]] static auto add_2_b(cpp2::impl::in x, double& x_b, cpp2::impl::in y, double& y_b, double& r_b) -> add_2_b_ret; + +using sub_1_b_ret = double; +public: [[nodiscard]] static auto sub_1_b(cpp2::impl::in x, double& x_b, cpp2::impl::in y, double& y_b, double& r_b) -> sub_1_b_ret; + +using sub_2_b_ret = double; +public: [[nodiscard]] static auto sub_2_b(cpp2::impl::in x, double& x_b, cpp2::impl::in y, double& y_b, double& r_b) -> sub_2_b_ret; + +using add_sub_2_b_ret = double; +public: [[nodiscard]] static auto add_sub_2_b(cpp2::impl::in x, double& x_b, cpp2::impl::in y, double& y_b, double& r_b) -> add_sub_2_b_ret; + +using mul_1_b_ret = double; +public: [[nodiscard]] static auto mul_1_b(cpp2::impl::in x, double& x_b, cpp2::impl::in y, double& y_b, double& r_b) -> mul_1_b_ret; + +using mul_2_b_ret = double; +public: [[nodiscard]] static auto mul_2_b(cpp2::impl::in x, double& x_b, cpp2::impl::in y, double& y_b, double& r_b) -> mul_2_b_ret; + +using div_1_b_ret = double; +public: [[nodiscard]] static auto div_1_b(cpp2::impl::in x, double& x_b, cpp2::impl::in y, double& y_b, double& r_b) -> div_1_b_ret; + +using div_2_b_ret = double; +public: [[nodiscard]] static auto div_2_b(cpp2::impl::in x, double& x_b, cpp2::impl::in y, double& y_b, double& r_b) -> div_2_b_ret; + +using mul_div_2_b_ret = double; +public: [[nodiscard]] static auto mul_div_2_b(cpp2::impl::in x, double& x_b, cpp2::impl::in y, double& y_b, double& r_b) -> mul_div_2_b_ret; + +using mul_add_b_ret = double; +public: [[nodiscard]] static auto mul_add_b(cpp2::impl::in x, double& x_b, cpp2::impl::in y, double& y_b, double& r_b) -> mul_add_b_ret; + +using add_mul_b_ret = double; +public: [[nodiscard]] static auto add_mul_b(cpp2::impl::in x, double& x_b, cpp2::impl::in y, double& y_b, double& r_b) -> add_mul_b_ret; + +using sin_call_b_ret = double; +public: [[nodiscard]] static auto sin_call_b(cpp2::impl::in x, double& x_b, cpp2::impl::in y, double& y_b, double& r_b) -> sin_call_b_ret; + +using func_b_ret = double; +public: [[nodiscard]] static auto func_b(cpp2::impl::in x, double& x_b, cpp2::impl::in y, double& y_b, double& ret_b) -> func_b_ret; + +using func_call_b_ret = double; +public: [[nodiscard]] static auto func_call_b(cpp2::impl::in x, double& x_b, cpp2::impl::in y, double& y_b, double& r_b) -> func_call_b_ret; + +using func_outer_call_b_ret = double; +public: [[nodiscard]] static auto func_outer_call_b(cpp2::impl::in x, double& x_b, cpp2::impl::in y, double& y_b, double& r_b) -> func_outer_call_b_ret; + + public: ad_test_reverse() = default; + public: ad_test_reverse(ad_test_reverse const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(ad_test_reverse const&) -> void = delete; + + +#line 260 "pure2-autodiff.cpp2" +}; +} + +class ad_test_twice { +using mul_1_ret = double; + +#line 264 "pure2-autodiff.cpp2" + public: [[nodiscard]] static auto mul_1(cpp2::impl::in x) -> mul_1_ret; +struct mul_1_d_ret { double r; double r_d; }; + + + public: [[nodiscard]] static auto mul_1_d(cpp2::impl::in x, cpp2::impl::in x_d) -> mul_1_d_ret; + +struct mul_1_d2_ret { double r; double r_d2; }; + +public: [[nodiscard]] static auto mul_1_d2(cpp2::impl::in x, cpp2::impl::in x_d2) -> mul_1_d2_ret; + +struct mul_1_d_d2_ret { double r; double r_d2; double r_d; double r_d_d2; }; + +public: [[nodiscard]] static auto mul_1_d_d2(cpp2::impl::in x, cpp2::impl::in x_d2, cpp2::impl::in x_d, cpp2::impl::in x_d_d2) -> mul_1_d_d2_ret; + + public: ad_test_twice() = default; + public: ad_test_twice(ad_test_twice const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(ad_test_twice const&) -> void = delete; + + +#line 267 "pure2-autodiff.cpp2" +}; + +auto write_output(cpp2::impl::in func, cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d, auto const& ret) -> void; + +#line 273 "pure2-autodiff.cpp2" +auto write_output_reverse(cpp2::impl::in func, cpp2::impl::in x, double& x_b, cpp2::impl::in y, double& y_b, double& r_b, auto const& ret) -> void; + +#line 280 "pure2-autodiff.cpp2" +class ad_test_2 { +using f_ret = double; + +#line 281 "pure2-autodiff.cpp2" + public: [[nodiscard]] static auto f(cpp2::impl::in x) -> f_ret; +struct f_d_ret { double y; cpp2::taylor y_d; }; + + + public: [[nodiscard]] static auto f_d(cpp2::impl::in x, cpp2::impl::in> x_d) -> f_d_ret; + + public: ad_test_2() = default; + public: ad_test_2(ad_test_2 const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(ad_test_2 const&) -> void = delete; + + +#line 295 "pure2-autodiff.cpp2" +}; + +auto main() -> int; + +//=== Cpp2 function definitions ================================================= + +#line 1 "pure2-autodiff.cpp2" +namespace ad_name { + +#line 3 "pure2-autodiff.cpp2" +[[nodiscard]] auto func_outer(cpp2::impl::in x, cpp2::impl::in y) -> func_outer_ret{ + cpp2::impl::deferred_init ret; +#line 4 "pure2-autodiff.cpp2" + ret.construct(x + y); +return std::move(ret.value()); } + +#line 10 "pure2-autodiff.cpp2" + [[nodiscard]] auto type_outer::add(cpp2::impl::in b) const& -> double{ + return a + b; + } + + [[nodiscard]] auto type_outer::add_d(cpp2::impl::in this_d, cpp2::impl::in b, cpp2::impl::in b_d) const& -> add_d_ret{ + double r {}; + double r_d {};r_d = this_d.a_d + b_d; + r = a + b; + return { std::move(r), std::move(r_d) }; } + + [[nodiscard]] auto func_outer_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> func_outer_d_ret{ + double ret {0.0}; + double ret_d {0.0};ret_d = x_d + y_d; + ret = x + y; + return { std::move(ret), std::move(ret_d) }; + } + + + +#line 17 "pure2-autodiff.cpp2" + [[nodiscard]] auto ad_test::add_1(cpp2::impl::in x, cpp2::impl::in y) -> add_1_ret{ + cpp2::impl::deferred_init r; +#line 18 "pure2-autodiff.cpp2" + r.construct(x + y); + return std::move(r.value()); } + +#line 21 "pure2-autodiff.cpp2" + [[nodiscard]] auto ad_test::add_2(cpp2::impl::in x, cpp2::impl::in y) -> add_2_ret{ + cpp2::impl::deferred_init r; +#line 22 "pure2-autodiff.cpp2" + r.construct(x + y + x); + return std::move(r.value()); } + +#line 25 "pure2-autodiff.cpp2" + [[nodiscard]] auto ad_test::sub_1(cpp2::impl::in x, cpp2::impl::in y) -> sub_1_ret{ + cpp2::impl::deferred_init r; +#line 26 "pure2-autodiff.cpp2" + r.construct(x - y); + return std::move(r.value()); } + +#line 29 "pure2-autodiff.cpp2" + [[nodiscard]] auto ad_test::sub_2(cpp2::impl::in x, cpp2::impl::in y) -> sub_2_ret{ + cpp2::impl::deferred_init r; +#line 30 "pure2-autodiff.cpp2" + r.construct(x - y - x); + return std::move(r.value()); } + +#line 33 "pure2-autodiff.cpp2" + [[nodiscard]] auto ad_test::add_sub_2(cpp2::impl::in x, cpp2::impl::in y) -> add_sub_2_ret{ + cpp2::impl::deferred_init r; +#line 34 "pure2-autodiff.cpp2" + r.construct(x + y - x); + return std::move(r.value()); } + +#line 37 "pure2-autodiff.cpp2" + [[nodiscard]] auto ad_test::mul_1(cpp2::impl::in x, cpp2::impl::in y) -> mul_1_ret{ + cpp2::impl::deferred_init r; +#line 38 "pure2-autodiff.cpp2" + r.construct(x * y); + return std::move(r.value()); } + +#line 41 "pure2-autodiff.cpp2" + [[nodiscard]] auto ad_test::mul_2(cpp2::impl::in x, cpp2::impl::in y) -> mul_2_ret{ + cpp2::impl::deferred_init r; +#line 42 "pure2-autodiff.cpp2" + r.construct(x * y * x); + return std::move(r.value()); } + +#line 45 "pure2-autodiff.cpp2" + [[nodiscard]] auto ad_test::div_1(cpp2::impl::in x, cpp2::impl::in y) -> div_1_ret{ + cpp2::impl::deferred_init r; +#line 46 "pure2-autodiff.cpp2" + r.construct(x / CPP2_ASSERT_NOT_ZERO(CPP2_TYPEOF(x),y)); + return std::move(r.value()); } + +#line 49 "pure2-autodiff.cpp2" + [[nodiscard]] auto ad_test::div_2(cpp2::impl::in x, cpp2::impl::in y) -> div_2_ret{ + cpp2::impl::deferred_init r; +#line 50 "pure2-autodiff.cpp2" + r.construct(x / CPP2_ASSERT_NOT_ZERO(CPP2_TYPEOF(x),y) / CPP2_ASSERT_NOT_ZERO(CPP2_TYPEOF(y),y)); + return std::move(r.value()); } + +#line 53 "pure2-autodiff.cpp2" + [[nodiscard]] auto ad_test::mul_div_2(cpp2::impl::in x, cpp2::impl::in y) -> mul_div_2_ret{ + cpp2::impl::deferred_init r; +#line 54 "pure2-autodiff.cpp2" + r.construct(x * y / CPP2_ASSERT_NOT_ZERO(CPP2_TYPEOF(y),x)); + return std::move(r.value()); } + +#line 57 "pure2-autodiff.cpp2" + [[nodiscard]] auto ad_test::mul_add(cpp2::impl::in x, cpp2::impl::in y) -> mul_add_ret{ + cpp2::impl::deferred_init r; +#line 58 "pure2-autodiff.cpp2" + r.construct(x * (x + y)); + return std::move(r.value()); } + +#line 61 "pure2-autodiff.cpp2" + [[nodiscard]] auto ad_test::add_mul(cpp2::impl::in x, cpp2::impl::in y) -> add_mul_ret{ + cpp2::impl::deferred_init r; +#line 62 "pure2-autodiff.cpp2" + r.construct(x + x * y); + return std::move(r.value()); } + +#line 65 "pure2-autodiff.cpp2" + [[nodiscard]] auto ad_test::prefix_add(cpp2::impl::in x, cpp2::impl::in y) -> prefix_add_ret{ + cpp2::impl::deferred_init r; +#line 66 "pure2-autodiff.cpp2" + r.construct(+x + y); + return std::move(r.value()); } + +#line 69 "pure2-autodiff.cpp2" + [[nodiscard]] auto ad_test::prefix_sub(cpp2::impl::in x, cpp2::impl::in y) -> prefix_sub_ret{ + cpp2::impl::deferred_init r; +#line 70 "pure2-autodiff.cpp2" + r.construct(-x + y); + return std::move(r.value()); } + +#line 73 "pure2-autodiff.cpp2" + [[nodiscard]] auto ad_test::func(cpp2::impl::in x, cpp2::impl::in y) -> func_ret{ + cpp2::impl::deferred_init ret; +#line 74 "pure2-autodiff.cpp2" + ret.construct(x + y); + return std::move(ret.value()); } + +#line 77 "pure2-autodiff.cpp2" + [[nodiscard]] auto ad_test::func_call(cpp2::impl::in x, cpp2::impl::in y) -> func_call_ret{ + cpp2::impl::deferred_init r; +#line 78 "pure2-autodiff.cpp2" + r.construct(x * func(x, y)); + return std::move(r.value()); } + +#line 81 "pure2-autodiff.cpp2" + [[nodiscard]] auto ad_test::func_outer_call(cpp2::impl::in x, cpp2::impl::in y) -> func_outer_call_ret{ + cpp2::impl::deferred_init r; +#line 82 "pure2-autodiff.cpp2" + r.construct(x * func_outer(x, y)); + return std::move(r.value()); } + +#line 85 "pure2-autodiff.cpp2" + [[nodiscard]] auto ad_test::sin_call(cpp2::impl::in x, cpp2::impl::in y) -> sin_call_ret{ + cpp2::impl::deferred_init r; +#line 86 "pure2-autodiff.cpp2" + r.construct(sin(x - y)); + return std::move(r.value()); } + +#line 89 "pure2-autodiff.cpp2" + [[nodiscard]] auto ad_test::if_branch(cpp2::impl::in x, cpp2::impl::in y) -> if_branch_ret{ + cpp2::impl::deferred_init r; +#line 90 "pure2-autodiff.cpp2" + r.construct(x); + + if (cpp2::impl::cmp_less(x,0.0)) { + r.value() = y; + }return std::move(r.value()); + } + +#line 97 "pure2-autodiff.cpp2" + [[nodiscard]] auto ad_test::if_else_branch(cpp2::impl::in x, cpp2::impl::in y) -> if_else_branch_ret{ + cpp2::impl::deferred_init r; +#line 98 "pure2-autodiff.cpp2" + if (cpp2::impl::cmp_less(x,0.0)) { + r.construct(y); + } + else { + r.construct(x); + }return std::move(r.value()); + } + +#line 106 "pure2-autodiff.cpp2" + [[nodiscard]] auto ad_test::direct_return(cpp2::impl::in x, cpp2::impl::in y) -> double{ + return x + y; + } + +#line 110 "pure2-autodiff.cpp2" + [[nodiscard]] auto ad_test::intermediate_var(cpp2::impl::in x, cpp2::impl::in y) -> intermediate_var_ret{ + cpp2::impl::deferred_init r; +#line 111 "pure2-autodiff.cpp2" + double t {x + y}; + + r.construct(cpp2::move(t)); + return std::move(r.value()); } + +#line 116 "pure2-autodiff.cpp2" + [[nodiscard]] auto ad_test::intermediate_passive_var(cpp2::impl::in x, cpp2::impl::in y) -> intermediate_passive_var_ret{ + cpp2::impl::deferred_init r; +#line 117 "pure2-autodiff.cpp2" + int i {}; + r.construct(x + y); + i = 2; + + static_cast(cpp2::move(i)); + return std::move(r.value()); } + +#line 124 "pure2-autodiff.cpp2" + [[nodiscard]] auto ad_test::intermediate_untyped(cpp2::impl::in x, cpp2::impl::in y) -> intermediate_untyped_ret{ + cpp2::impl::deferred_init r; +#line 125 "pure2-autodiff.cpp2" + auto t {0.0}; + t = x + y; + + r.construct(cpp2::move(t)); + return std::move(r.value()); } + +#line 131 "pure2-autodiff.cpp2" + [[nodiscard]] auto ad_test::intermediate_default_init(cpp2::impl::in x, cpp2::impl::in y) -> intermediate_default_init_ret{ + cpp2::impl::deferred_init r; +#line 132 "pure2-autodiff.cpp2" + double t {}; + t = x + y; + + r.construct(cpp2::move(t)); + return std::move(r.value()); } + +#line 138 "pure2-autodiff.cpp2" + [[nodiscard]] auto ad_test::intermediate_no_init(cpp2::impl::in x, cpp2::impl::in y) -> intermediate_no_init_ret{ + cpp2::impl::deferred_init r; +#line 139 "pure2-autodiff.cpp2" + cpp2::impl::deferred_init t; + t.construct(x + y); + + r.construct(cpp2::move(t.value())); + return std::move(r.value()); } + +#line 145 "pure2-autodiff.cpp2" + [[nodiscard]] auto ad_test::while_loop(cpp2::impl::in x, cpp2::impl::in y) -> while_loop_ret{ + cpp2::impl::deferred_init r; +#line 146 "pure2-autodiff.cpp2" + r.construct(x); +{ +int i{0}; +double t{0.0}; + +#line 149 "pure2-autodiff.cpp2" + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + t = y; + r.value() = r.value() + t; + } +} +#line 150 "pure2-autodiff.cpp2" + return std::move(r.value()); + +#line 153 "pure2-autodiff.cpp2" + } + +#line 155 "pure2-autodiff.cpp2" + [[nodiscard]] auto ad_test::do_while_loop(cpp2::impl::in x, cpp2::impl::in y) -> do_while_loop_ret{ + cpp2::impl::deferred_init r; +#line 156 "pure2-autodiff.cpp2" + r.construct(x); +{ +auto i{0}; + +#line 159 "pure2-autodiff.cpp2" + do { + r.value() = r.value() + y; + } while ( [&]{ + (i += 1) ; return true; }() && + cpp2::impl::cmp_less(i,2)); +} +#line 160 "pure2-autodiff.cpp2" + return std::move(r.value()); + +#line 164 "pure2-autodiff.cpp2" + } + +#line 166 "pure2-autodiff.cpp2" + [[nodiscard]] auto ad_test::for_loop(cpp2::impl::in x, cpp2::impl::in y) -> for_loop_ret{ + cpp2::impl::deferred_init r; +#line 167 "pure2-autodiff.cpp2" + std::vector v {}; + + CPP2_UFCS(push_back)(v, x); + CPP2_UFCS(push_back)(v, y); + + r.construct(0.0); + for ( + auto const& t : cpp2::move(v) ) + { + r.value() = r.value() + t; + }return std::move(r.value()); + } + +#line 180 "pure2-autodiff.cpp2" + [[nodiscard]] auto ad_test::type_outer_use(cpp2::impl::in x, cpp2::impl::in y) -> type_outer_use_ret{ + cpp2::impl::deferred_init r; +#line 181 "pure2-autodiff.cpp2" + type_outer t {}; + t.a = x; + + r.construct(cpp2::move(t).a + y); + return std::move(r.value()); } + +#line 187 "pure2-autodiff.cpp2" + [[nodiscard]] auto ad_test::type_outer_call(cpp2::impl::in x, cpp2::impl::in y) -> type_outer_call_ret{ + cpp2::impl::deferred_init r; +#line 188 "pure2-autodiff.cpp2" + type_outer t {}; + t.a = x; + + r.construct(CPP2_UFCS(add)(cpp2::move(t), y)); + return std::move(r.value()); } + + [[nodiscard]] auto ad_test::add_1_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> add_1_d_ret{ + double r {0.0}; + double r_d {0.0};r_d = x_d + y_d; + r = x + y; + return { std::move(r), std::move(r_d) }; + } + + [[nodiscard]] auto ad_test::add_2_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> add_2_d_ret{ + double r {0.0}; + double r_d {0.0};r_d = x_d + y_d + x_d; + r = x + y + x; + return { std::move(r), std::move(r_d) }; + } + + [[nodiscard]] auto ad_test::sub_1_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> sub_1_d_ret{ + double r {0.0}; + double r_d {0.0};r_d = x_d - y_d; + r = x - y; + return { std::move(r), std::move(r_d) }; + } + + [[nodiscard]] auto ad_test::sub_2_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> sub_2_d_ret{ + double r {0.0}; + double r_d {0.0};r_d = x_d - y_d - x_d; + r = x - y - x; + return { std::move(r), std::move(r_d) }; + } + + [[nodiscard]] auto ad_test::add_sub_2_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> add_sub_2_d_ret{ + double r {0.0}; + double r_d {0.0};r_d = x_d + y_d - x_d; + r = x + y - x; + return { std::move(r), std::move(r_d) }; + } + + [[nodiscard]] auto ad_test::mul_1_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> mul_1_d_ret{ + double r {0.0}; + double r_d {0.0};r_d = y * x_d + x * y_d; + r = x * y; + return { std::move(r), std::move(r_d) }; + } + + [[nodiscard]] auto ad_test::mul_2_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> mul_2_d_ret{ + double r {0.0}; + double r_d {0.0}; +auto temp_1_d {y * x_d + x * y_d}; + + auto temp_1 {x * y}; + r_d = x * cpp2::move(temp_1_d) + temp_1 * x_d; + r = cpp2::move(temp_1) * x; + return { std::move(r), std::move(r_d) }; + } + + [[nodiscard]] auto ad_test::div_1_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> div_1_d_ret{ + double r {0.0}; + double r_d {0.0};r_d = x_d / CPP2_ASSERT_NOT_ZERO(CPP2_TYPEOF(x_d),y) + -x * y_d / CPP2_ASSERT_NOT_ZERO(CPP2_TYPEOF(y_d),(y * y)); + r = x / CPP2_ASSERT_NOT_ZERO(CPP2_TYPEOF(x),y); + return { std::move(r), std::move(r_d) }; + } + + [[nodiscard]] auto ad_test::div_2_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> div_2_d_ret{ + double r {0.0}; + double r_d {0.0}; +auto temp_1_d {x_d / CPP2_ASSERT_NOT_ZERO(CPP2_TYPEOF(x_d),y) + -x * y_d / CPP2_ASSERT_NOT_ZERO(CPP2_TYPEOF(y_d),(y * y))}; + + auto temp_1 {x / CPP2_ASSERT_NOT_ZERO(CPP2_TYPEOF(x),y)}; + r_d = cpp2::move(temp_1_d) / CPP2_ASSERT_NOT_ZERO(CPP2_TYPEOF(cpp2::move(temp_1_d)),y) + -temp_1 * y_d / CPP2_ASSERT_NOT_ZERO(CPP2_TYPEOF(y_d),(y * y)); + r = cpp2::move(temp_1) / CPP2_ASSERT_NOT_ZERO(CPP2_TYPEOF(cpp2::move(temp_1)),y); + return { std::move(r), std::move(r_d) }; + } + + [[nodiscard]] auto ad_test::mul_div_2_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> mul_div_2_d_ret{ + double r {0.0}; + double r_d {0.0}; +auto temp_1_d {y * x_d + x * y_d}; + + auto temp_1 {x * y}; + r_d = cpp2::move(temp_1_d) / CPP2_ASSERT_NOT_ZERO(CPP2_TYPEOF(cpp2::move(temp_1_d)),x) + -temp_1 * x_d / CPP2_ASSERT_NOT_ZERO(CPP2_TYPEOF(x_d),(x * x)); + r = cpp2::move(temp_1) / CPP2_ASSERT_NOT_ZERO(CPP2_TYPEOF(cpp2::move(temp_1)),x); + return { std::move(r), std::move(r_d) }; + } + + [[nodiscard]] auto ad_test::mul_add_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> mul_add_d_ret{ + double r {0.0}; + double r_d {0.0}; +double temp_1_d {x_d + y_d}; + + double temp_1 {x + y}; + r_d = temp_1 * x_d + x * cpp2::move(temp_1_d); + r = x * cpp2::move(temp_1); + return { std::move(r), std::move(r_d) }; + } + + [[nodiscard]] auto ad_test::add_mul_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> add_mul_d_ret{ + double r {0.0}; + double r_d {0.0}; +double temp_1_d {y * x_d + x * y_d}; + + double temp_1 {x * y}; + r_d = x_d + cpp2::move(temp_1_d); + r = x + cpp2::move(temp_1); + return { std::move(r), std::move(r_d) }; + } + + [[nodiscard]] auto ad_test::prefix_add_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> prefix_add_d_ret{ + double r {0.0}; + double r_d {0.0}; +double temp_1_d {+x_d}; + + double temp_1 {+x}; + r_d = cpp2::move(temp_1_d) + y_d; + r = cpp2::move(temp_1) + y; + return { std::move(r), std::move(r_d) }; + } + + [[nodiscard]] auto ad_test::prefix_sub_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> prefix_sub_d_ret{ + double r {0.0}; + double r_d {0.0}; +double temp_1_d {-x_d}; + + double temp_1 {-x}; + r_d = cpp2::move(temp_1_d) + y_d; + r = cpp2::move(temp_1) + y; + return { std::move(r), std::move(r_d) }; + } + + [[nodiscard]] auto ad_test::func_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> func_d_ret{ + double ret {0.0}; + double ret_d {0.0};ret_d = x_d + y_d; + ret = x + y; + return { std::move(ret), std::move(ret_d) }; + } + + [[nodiscard]] auto ad_test::func_call_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> func_call_d_ret{ + double r {0.0}; + double r_d {0.0}; +auto temp_1 {func_d(x, x_d, y, y_d)}; + + double temp_2_d {cpp2::move(temp_1).ret_d}; + + double temp_2 {func(x, y)}; + r_d = temp_2 * x_d + x * cpp2::move(temp_2_d); + r = x * cpp2::move(temp_2); + return { std::move(r), std::move(r_d) }; + } + + [[nodiscard]] auto ad_test::func_outer_call_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> func_outer_call_d_ret{ + double r {0.0}; + double r_d {0.0}; +auto temp_1 {func_outer_d(x, x_d, y, y_d)}; + + double temp_2_d {cpp2::move(temp_1).ret_d}; + + double temp_2 {func_outer(x, y)}; + r_d = temp_2 * x_d + x * cpp2::move(temp_2_d); + r = x * cpp2::move(temp_2); + return { std::move(r), std::move(r_d) }; + } + + [[nodiscard]] auto ad_test::sin_call_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> sin_call_d_ret{ + double r {0.0}; + double r_d {0.0}; +double temp_1_d {x_d - y_d}; + + double temp_1 {x - y}; + r_d = cos(temp_1) * cpp2::move(temp_1_d); + r = sin(cpp2::move(temp_1)); + return { std::move(r), std::move(r_d) }; + } + + [[nodiscard]] auto ad_test::if_branch_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> if_branch_d_ret{ + double r {0.0}; + double r_d {0.0};r_d = x_d; + r = x; + if (cpp2::impl::cmp_less(x,0.0)) { + r_d = y_d; + r = y; + } + else { + } + return { std::move(r), std::move(r_d) }; + } + + [[nodiscard]] auto ad_test::if_else_branch_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> if_else_branch_d_ret{ + double r {0.0}; + double r_d {0.0};if (cpp2::impl::cmp_less(x,0.0)) { + r_d = y_d; + r = y; + } + else { + r_d = x_d; + r = x; + } + return { std::move(r), std::move(r_d) }; + } + + [[nodiscard]] auto ad_test::direct_return_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> direct_return_d_ret{ + double r {}; + double r_d {};r_d = x_d + y_d; + r = x + y; + return { std::move(r), std::move(r_d) }; } + + [[nodiscard]] auto ad_test::intermediate_var_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> intermediate_var_d_ret{ + double r {0.0}; + double r_d {0.0}; +double t_d {x_d + y_d}; + + double t {x + y}; + r_d = cpp2::move(t_d); + r = cpp2::move(t); + return { std::move(r), std::move(r_d) }; + } + + [[nodiscard]] auto ad_test::intermediate_passive_var_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> intermediate_passive_var_d_ret{ + double r {0.0}; + double r_d {0.0}; +int i {}; + r_d = x_d + y_d; + r = x + y; + i = 2; + static_cast(cpp2::move(i)); + return { std::move(r), std::move(r_d) }; + } + + [[nodiscard]] auto ad_test::intermediate_untyped_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> intermediate_untyped_d_ret{ + double r {0.0}; + double r_d {0.0}; +auto t_d {double()}; + + auto t {0.0}; + t_d = x_d + y_d; + t = x + y; + r_d = cpp2::move(t_d); + r = cpp2::move(t); + return { std::move(r), std::move(r_d) }; + } + + [[nodiscard]] auto ad_test::intermediate_default_init_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> intermediate_default_init_d_ret{ + double r {0.0}; + double r_d {0.0}; +double t_d {}; + + double t {}; + t_d = x_d + y_d; + t = x + y; + r_d = cpp2::move(t_d); + r = cpp2::move(t); + return { std::move(r), std::move(r_d) }; + } + + [[nodiscard]] auto ad_test::intermediate_no_init_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> intermediate_no_init_d_ret{ + double r {0.0}; + double r_d {0.0}; +cpp2::impl::deferred_init t_d; + + cpp2::impl::deferred_init t; + t_d.construct(x_d + y_d); + t.construct(x + y); + r_d = cpp2::move(t_d.value()); + r = cpp2::move(t.value()); + return { std::move(r), std::move(r_d) }; + } + + [[nodiscard]] auto ad_test::while_loop_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> while_loop_d_ret{ + double r {0.0}; + double r_d {0.0};r_d = x_d; + r = x; +{ +int i{0}; +double t{0.0}; +double t_d{}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + t_d = y_d; + t = y; + r_d = r_d + t_d; + r = r + t; + } +} + return { std::move(r), std::move(r_d) }; + } + + [[nodiscard]] auto ad_test::do_while_loop_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> do_while_loop_d_ret{ + double r {0.0}; + double r_d {0.0};r_d = x_d; + r = x; +{ +auto i{0}; + do { + r_d = r_d + y_d; + r = r + y; + } + while ( [&]{ + (i += 1) + ; return true; }() && + cpp2::impl::cmp_less(i,2) + ); +} + return { std::move(r), std::move(r_d) }; + } + + [[nodiscard]] auto ad_test::for_loop_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> for_loop_d_ret{ + double r {0.0}; + double r_d {0.0}; +std::vector v_d {}; + + std::vector v {}; + CPP2_UFCS(push_back)(v_d, x_d); + CPP2_UFCS(push_back)(v, x); + CPP2_UFCS(push_back)(v_d, y_d); + CPP2_UFCS(push_back)(v, y); + r_d = { }; + r = 0.0; +{ +auto t_d_iter{CPP2_UFCS(begin)(cpp2::move(v_d))}; + for ( auto const& t : cpp2::move(v) ) { do { +{ +auto const& t_d{*cpp2::impl::assert_not_null(t_d_iter)}; + { + r_d = r_d + t_d; + r = r + t; + } +} + } + while (false); (++t_d_iter); } +} + return { std::move(r), std::move(r_d) }; + } + + [[nodiscard]] auto ad_test::type_outer_use_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> type_outer_use_d_ret{ + double r {0.0}; + double r_d {0.0}; +type_outer_d t_d {}; + + type_outer t {}; + t_d.a_d = x_d; + t.a = x; + + double temp_1_d {cpp2::move(t_d).a_d}; + + double temp_1 {cpp2::move(t).a}; + r_d = cpp2::move(temp_1_d) + y_d; + r = cpp2::move(temp_1) + y; + return { std::move(r), std::move(r_d) }; + } + + [[nodiscard]] auto ad_test::type_outer_call_d(cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d) -> type_outer_call_d_ret{ + double r {0.0}; + double r_d {0.0}; +type_outer_d t_d {}; + + type_outer t {}; + t_d.a_d = x_d; + t.a = x; + + auto temp_1 {CPP2_UFCS(add_d)(t, cpp2::move(t_d), y, y_d)}; + r_d = cpp2::move(temp_1).r_d; + r = CPP2_UFCS(add)(cpp2::move(t), y); + return { std::move(r), std::move(r_d) }; + } + + [[nodiscard]] auto func_outer_b(cpp2::impl::in x, double& x_b, cpp2::impl::in y, double& y_b, double& ret_b) -> func_outer_b_ret{ + double ret {0.0};ret = x + y; + x_b += ret_b; + y_b += ret_b; + ret_b = 0.0; + return ret; } + +#line 197 "pure2-autodiff.cpp2" + [[nodiscard]] auto ad_test_reverse::add_1(cpp2::impl::in x, cpp2::impl::in y) -> add_1_ret{ + cpp2::impl::deferred_init r; +#line 198 "pure2-autodiff.cpp2" + r.construct(x + y); + return std::move(r.value()); } + +#line 201 "pure2-autodiff.cpp2" + [[nodiscard]] auto ad_test_reverse::add_2(cpp2::impl::in x, cpp2::impl::in y) -> add_2_ret{ + cpp2::impl::deferred_init r; +#line 202 "pure2-autodiff.cpp2" + r.construct(x + y + x); + return std::move(r.value()); } + +#line 205 "pure2-autodiff.cpp2" + [[nodiscard]] auto ad_test_reverse::sub_1(cpp2::impl::in x, cpp2::impl::in y) -> sub_1_ret{ + cpp2::impl::deferred_init r; +#line 206 "pure2-autodiff.cpp2" + r.construct(x - y); + return std::move(r.value()); } + +#line 209 "pure2-autodiff.cpp2" + [[nodiscard]] auto ad_test_reverse::sub_2(cpp2::impl::in x, cpp2::impl::in y) -> sub_2_ret{ + cpp2::impl::deferred_init r; +#line 210 "pure2-autodiff.cpp2" + r.construct(x - y - x); + return std::move(r.value()); } + +#line 213 "pure2-autodiff.cpp2" + [[nodiscard]] auto ad_test_reverse::add_sub_2(cpp2::impl::in x, cpp2::impl::in y) -> add_sub_2_ret{ + cpp2::impl::deferred_init r; +#line 214 "pure2-autodiff.cpp2" + r.construct(x + y - x); + return std::move(r.value()); } + +#line 217 "pure2-autodiff.cpp2" + [[nodiscard]] auto ad_test_reverse::mul_1(cpp2::impl::in x, cpp2::impl::in y) -> mul_1_ret{ + cpp2::impl::deferred_init r; +#line 218 "pure2-autodiff.cpp2" + r.construct(x * y); + return std::move(r.value()); } + +#line 221 "pure2-autodiff.cpp2" + [[nodiscard]] auto ad_test_reverse::mul_2(cpp2::impl::in x, cpp2::impl::in y) -> mul_2_ret{ + cpp2::impl::deferred_init r; +#line 222 "pure2-autodiff.cpp2" + r.construct(x * y * x); + return std::move(r.value()); } + +#line 225 "pure2-autodiff.cpp2" + [[nodiscard]] auto ad_test_reverse::div_1(cpp2::impl::in x, cpp2::impl::in y) -> div_1_ret{ + cpp2::impl::deferred_init r; +#line 226 "pure2-autodiff.cpp2" + r.construct(x / CPP2_ASSERT_NOT_ZERO(CPP2_TYPEOF(x),y)); + return std::move(r.value()); } + +#line 229 "pure2-autodiff.cpp2" + [[nodiscard]] auto ad_test_reverse::div_2(cpp2::impl::in x, cpp2::impl::in y) -> div_2_ret{ + cpp2::impl::deferred_init r; +#line 230 "pure2-autodiff.cpp2" + r.construct(x / CPP2_ASSERT_NOT_ZERO(CPP2_TYPEOF(x),y) / CPP2_ASSERT_NOT_ZERO(CPP2_TYPEOF(y),y)); + return std::move(r.value()); } + +#line 233 "pure2-autodiff.cpp2" + [[nodiscard]] auto ad_test_reverse::mul_div_2(cpp2::impl::in x, cpp2::impl::in y) -> mul_div_2_ret{ + cpp2::impl::deferred_init r; +#line 234 "pure2-autodiff.cpp2" + r.construct(x * y / CPP2_ASSERT_NOT_ZERO(CPP2_TYPEOF(y),x)); + return std::move(r.value()); } + +#line 237 "pure2-autodiff.cpp2" + [[nodiscard]] auto ad_test_reverse::mul_add(cpp2::impl::in x, cpp2::impl::in y) -> mul_add_ret{ + cpp2::impl::deferred_init r; +#line 238 "pure2-autodiff.cpp2" + r.construct(x * (x + y)); + return std::move(r.value()); } + +#line 241 "pure2-autodiff.cpp2" + [[nodiscard]] auto ad_test_reverse::add_mul(cpp2::impl::in x, cpp2::impl::in y) -> add_mul_ret{ + cpp2::impl::deferred_init r; +#line 242 "pure2-autodiff.cpp2" + r.construct(x + x * y); + return std::move(r.value()); } + +#line 245 "pure2-autodiff.cpp2" + [[nodiscard]] auto ad_test_reverse::sin_call(cpp2::impl::in x, cpp2::impl::in y) -> sin_call_ret{ + cpp2::impl::deferred_init r; +#line 246 "pure2-autodiff.cpp2" + r.construct(sin(x - y)); + return std::move(r.value()); } + +#line 249 "pure2-autodiff.cpp2" + [[nodiscard]] auto ad_test_reverse::func(cpp2::impl::in x, cpp2::impl::in y) -> func_ret{ + cpp2::impl::deferred_init ret; +#line 250 "pure2-autodiff.cpp2" + ret.construct(x + y); + return std::move(ret.value()); } + +#line 253 "pure2-autodiff.cpp2" + [[nodiscard]] auto ad_test_reverse::func_call(cpp2::impl::in x, cpp2::impl::in y) -> func_call_ret{ + cpp2::impl::deferred_init r; +#line 254 "pure2-autodiff.cpp2" + r.construct(x * func(x, y)); + return std::move(r.value()); } + +#line 257 "pure2-autodiff.cpp2" + [[nodiscard]] auto ad_test_reverse::func_outer_call(cpp2::impl::in x, cpp2::impl::in y) -> func_outer_call_ret{ + cpp2::impl::deferred_init r; +#line 258 "pure2-autodiff.cpp2" + r.construct(x * func_outer(x, y)); + return std::move(r.value()); } + + [[nodiscard]] auto ad_test_reverse::add_1_b(cpp2::impl::in x, double& x_b, cpp2::impl::in y, double& y_b, double& r_b) -> add_1_b_ret{ + double r {0.0};r = x + y; + x_b += r_b; + y_b += r_b; + r_b = 0.0; + return r; } + + [[nodiscard]] auto ad_test_reverse::add_2_b(cpp2::impl::in x, double& x_b, cpp2::impl::in y, double& y_b, double& r_b) -> add_2_b_ret{ + double r {0.0};r = x + y + x; + x_b += r_b; + y_b += r_b; + x_b += r_b; + r_b = 0.0; + return r; } + + [[nodiscard]] auto ad_test_reverse::sub_1_b(cpp2::impl::in x, double& x_b, cpp2::impl::in y, double& y_b, double& r_b) -> sub_1_b_ret{ + double r {0.0};r = x - y; + x_b += r_b; + y_b -= r_b; + r_b = 0.0; + return r; } + + [[nodiscard]] auto ad_test_reverse::sub_2_b(cpp2::impl::in x, double& x_b, cpp2::impl::in y, double& y_b, double& r_b) -> sub_2_b_ret{ + double r {0.0};r = x - y - x; + x_b += r_b; + y_b -= r_b; + x_b -= r_b; + r_b = 0.0; + return r; } + + [[nodiscard]] auto ad_test_reverse::add_sub_2_b(cpp2::impl::in x, double& x_b, cpp2::impl::in y, double& y_b, double& r_b) -> add_sub_2_b_ret{ + double r {0.0};r = x + y - x; + x_b += r_b; + y_b += r_b; + x_b -= r_b; + r_b = 0.0; + return r; } + + [[nodiscard]] auto ad_test_reverse::mul_1_b(cpp2::impl::in x, double& x_b, cpp2::impl::in y, double& y_b, double& r_b) -> mul_1_b_ret{ + double r {0.0};r = x * y; + x_b += y * r_b; + y_b += x * r_b; + r_b = 0.0; + return r; } + + [[nodiscard]] auto ad_test_reverse::mul_2_b(cpp2::impl::in x, double& x_b, cpp2::impl::in y, double& y_b, double& r_b) -> mul_2_b_ret{ + double r {0.0}; +auto temp_1_b {0.0}; + + auto temp_1 {x * y}; + r = temp_1 * x; + temp_1_b += x * r_b; + x_b += cpp2::move(temp_1) * r_b; + r_b = 0.0; + x_b += y * temp_1_b; + y_b += x * temp_1_b; + temp_1_b = 0.0; + return r; } + + [[nodiscard]] auto ad_test_reverse::div_1_b(cpp2::impl::in x, double& x_b, cpp2::impl::in y, double& y_b, double& r_b) -> div_1_b_ret{ + double r {0.0};r = x / CPP2_ASSERT_NOT_ZERO(CPP2_TYPEOF(x),y); + x_b += r_b / CPP2_ASSERT_NOT_ZERO(CPP2_TYPEOF(r_b),y); + y_b -= x * r_b / CPP2_ASSERT_NOT_ZERO(CPP2_TYPEOF(r_b),(y * y)); + r_b = 0.0; + return r; } + + [[nodiscard]] auto ad_test_reverse::div_2_b(cpp2::impl::in x, double& x_b, cpp2::impl::in y, double& y_b, double& r_b) -> div_2_b_ret{ + double r {0.0}; +auto temp_1_b {0.0}; + + auto temp_1 {x / CPP2_ASSERT_NOT_ZERO(CPP2_TYPEOF(x),y)}; + r = temp_1 / CPP2_ASSERT_NOT_ZERO(CPP2_TYPEOF(temp_1),y); + temp_1_b += r_b / CPP2_ASSERT_NOT_ZERO(CPP2_TYPEOF(r_b),y); + y_b -= cpp2::move(temp_1) * r_b / CPP2_ASSERT_NOT_ZERO(CPP2_TYPEOF(r_b),(y * y)); + r_b = 0.0; + x_b += temp_1_b / CPP2_ASSERT_NOT_ZERO(CPP2_TYPEOF(temp_1_b),y); + y_b -= x * temp_1_b / CPP2_ASSERT_NOT_ZERO(CPP2_TYPEOF(temp_1_b),(y * y)); + temp_1_b = 0.0; + return r; } + + [[nodiscard]] auto ad_test_reverse::mul_div_2_b(cpp2::impl::in x, double& x_b, cpp2::impl::in y, double& y_b, double& r_b) -> mul_div_2_b_ret{ + double r {0.0}; +auto temp_1_b {0.0}; + + auto temp_1 {x * y}; + r = temp_1 / CPP2_ASSERT_NOT_ZERO(CPP2_TYPEOF(temp_1),x); + temp_1_b += r_b / CPP2_ASSERT_NOT_ZERO(CPP2_TYPEOF(r_b),x); + x_b -= cpp2::move(temp_1) * r_b / CPP2_ASSERT_NOT_ZERO(CPP2_TYPEOF(r_b),(x * x)); + r_b = 0.0; + x_b += y * temp_1_b; + y_b += x * temp_1_b; + temp_1_b = 0.0; + return r; } + + [[nodiscard]] auto ad_test_reverse::mul_add_b(cpp2::impl::in x, double& x_b, cpp2::impl::in y, double& y_b, double& r_b) -> mul_add_b_ret{ + double r {0.0}; +double temp_1_b {0.0}; + + double temp_1 {x + y}; + r = x * temp_1; + x_b += cpp2::move(temp_1) * r_b; + temp_1_b += x * r_b; + r_b = 0.0; + x_b += temp_1_b; + y_b += temp_1_b; + temp_1_b = 0.0; + return r; } + + [[nodiscard]] auto ad_test_reverse::add_mul_b(cpp2::impl::in x, double& x_b, cpp2::impl::in y, double& y_b, double& r_b) -> add_mul_b_ret{ + double r {0.0}; +double temp_1_b {0.0}; + + double temp_1 {x * y}; + r = x + cpp2::move(temp_1); + x_b += r_b; + temp_1_b += r_b; + r_b = 0.0; + x_b += y * temp_1_b; + y_b += x * temp_1_b; + temp_1_b = 0.0; + return r; } + + [[nodiscard]] auto ad_test_reverse::sin_call_b(cpp2::impl::in x, double& x_b, cpp2::impl::in y, double& y_b, double& r_b) -> sin_call_b_ret{ + double r {0.0}; +double temp_1_b {0.0}; + + double temp_1 {x - y}; + r = sin(temp_1); + temp_1_b += cos(cpp2::move(temp_1)) * r_b; + r_b = 0.0; + x_b += temp_1_b; + y_b -= temp_1_b; + temp_1_b = 0.0; + return r; } + + [[nodiscard]] auto ad_test_reverse::func_b(cpp2::impl::in x, double& x_b, cpp2::impl::in y, double& y_b, double& ret_b) -> func_b_ret{ + double ret {0.0};ret = x + y; + x_b += ret_b; + y_b += ret_b; + ret_b = 0.0; + return ret; } + + [[nodiscard]] auto ad_test_reverse::func_call_b(cpp2::impl::in x, double& x_b, cpp2::impl::in y, double& y_b, double& r_b) -> func_call_b_ret{ + double r {0.0}; +double temp_2_b {0.0}; + + double temp_2 {func(x, y)}; + r = x * temp_2; + x_b += cpp2::move(temp_2) * r_b; + temp_2_b += x * r_b; + r_b = 0.0; + static_cast(func_b(x, x_b, y, y_b, temp_2_b)); + temp_2_b = 0.0; + return r; } + + [[nodiscard]] auto ad_test_reverse::func_outer_call_b(cpp2::impl::in x, double& x_b, cpp2::impl::in y, double& y_b, double& r_b) -> func_outer_call_b_ret{ + double r {0.0}; +double temp_2_b {0.0}; + + double temp_2 {func_outer(x, y)}; + r = x * temp_2; + x_b += cpp2::move(temp_2) * r_b; + temp_2_b += x * r_b; + r_b = 0.0; + static_cast(func_outer_b(x, x_b, y, y_b, temp_2_b)); + temp_2_b = 0.0; + return r; } + +#line 261 "pure2-autodiff.cpp2" +} + +#line 264 "pure2-autodiff.cpp2" + [[nodiscard]] auto ad_test_twice::mul_1(cpp2::impl::in x) -> mul_1_ret{ + cpp2::impl::deferred_init r; +#line 265 "pure2-autodiff.cpp2" + r.construct(x * x); + return std::move(r.value()); } + + [[nodiscard]] auto ad_test_twice::mul_1_d(cpp2::impl::in x, cpp2::impl::in x_d) -> mul_1_d_ret{ + double r {0.0}; + double r_d {0.0};r_d = x * x_d + x * x_d; + r = x * x; + return { std::move(r), std::move(r_d) }; + } + + [[nodiscard]] auto ad_test_twice::mul_1_d2(cpp2::impl::in x, cpp2::impl::in x_d2) -> mul_1_d2_ret{ + double r {0.0}; + double r_d2 {0.0};r_d2 = x * x_d2 + x * x_d2; + r = x * x; + return { std::move(r), std::move(r_d2) }; + } + + [[nodiscard]] auto ad_test_twice::mul_1_d_d2(cpp2::impl::in x, cpp2::impl::in x_d2, cpp2::impl::in x_d, cpp2::impl::in x_d_d2) -> mul_1_d_d2_ret{ + double r {0.0}; + double r_d2 {0.0}; + double r_d {0.0}; + double r_d_d2 {0.0}; +double temp_1_d2 {x_d * x_d2 + x * x_d_d2}; + + double temp_1 {x * x_d}; + + double temp_2_d2 {x_d * x_d2 + x * x_d_d2}; + + double temp_2 {x * x_d}; + r_d_d2 = cpp2::move(temp_1_d2) + cpp2::move(temp_2_d2); + r_d = cpp2::move(temp_1) + cpp2::move(temp_2); + r_d2 = x * x_d2 + x * x_d2; + r = x * x; + return { std::move(r), std::move(r_d2), std::move(r_d), std::move(r_d_d2) }; + } + +#line 269 "pure2-autodiff.cpp2" +auto write_output(cpp2::impl::in func, cpp2::impl::in x, cpp2::impl::in x_d, cpp2::impl::in y, cpp2::impl::in y_d, auto const& ret) -> void{ + std::cout << "diff(" + cpp2::to_string(func) + ") at (x = " + cpp2::to_string(x) + ", x_d = " + cpp2::to_string(x_d) + ", y = " + cpp2::to_string(y) + ", y_d = " + cpp2::to_string(y_d) + ") = (r = " + cpp2::to_string(ret.r) + ", r_d = " + cpp2::to_string(ret.r_d) + ")" << std::endl; +} + +#line 273 "pure2-autodiff.cpp2" +auto write_output_reverse(cpp2::impl::in func, cpp2::impl::in x, double& x_b, cpp2::impl::in y, double& y_b, double& r_b, auto const& ret) -> void{ + r_b = 1.0; + std::cout << "diff(" + cpp2::to_string(func) + ") at (x = " + cpp2::to_string(x) + ", y = " + cpp2::to_string(y) + ", r_b = " + cpp2::to_string(r_b) + ") = (r = " + cpp2::to_string(ret) + ", x_b = " + cpp2::to_string(x_b) + ", y_b = " + cpp2::to_string(y_b) + ")" << std::endl; + x_b = 0.0; + y_b = 0.0; +} + +#line 281 "pure2-autodiff.cpp2" + [[nodiscard]] auto ad_test_2::f(cpp2::impl::in x) -> f_ret{ + cpp2::impl::deferred_init y; +#line 282 "pure2-autodiff.cpp2" + if (cpp2::impl::cmp_less(x,-3)) + { + y.construct(x * x); + } + else {if (cpp2::impl::cmp_less(x,3)) + { + y.construct(x + sin(x) + 10); + } + else + { + y.construct(sin(x) * x * x); + }}return std::move(y.value()); + } + + [[nodiscard]] auto ad_test_2::f_d(cpp2::impl::in x, cpp2::impl::in> x_d) -> f_d_ret{ + double y {0.0}; + cpp2::taylor y_d {0.0};if (cpp2::impl::cmp_less(x,-3)) { + y_d = x_d.mul(x_d, x, x); + y = x * x; + } + else { + if (cpp2::impl::cmp_less(x,3)) { + + cpp2::taylor temp_1_d {CPP2_UFCS(sin)(x_d, x)}; + + double temp_1 {sin(x)}; + y_d = x_d + cpp2::move(temp_1_d); + y = x + cpp2::move(temp_1) + 10; + } + else { + + cpp2::taylor temp_3_d {CPP2_UFCS(sin)(x_d, x)}; + + double temp_3 {sin(x)}; + + auto temp_4_d {cpp2::move(temp_3_d).mul(x_d, temp_3, x)}; + + auto temp_4 {cpp2::move(temp_3) * x}; + y_d = cpp2::move(temp_4_d).mul(x_d, temp_4, x); + y = cpp2::move(temp_4) * x; + } + } + return { std::move(y), std::move(y_d) }; + } + +#line 297 "pure2-autodiff.cpp2" +auto main() -> int{ + + double x {2.0}; + double x_d {1.0}; + double y {3.0}; + double y_d {2.0}; + + write_output("x + y", x, x_d, y, y_d, ad_name::ad_test::add_1_d(x, x_d, y, y_d)); + write_output("x + y + x", x, x_d, y, y_d, ad_name::ad_test::add_2_d(x, x_d, y, y_d)); + write_output("x - y", x, x_d, y, y_d, ad_name::ad_test::sub_1_d(x, x_d, y, y_d)); + write_output("x - y - x", x, x_d, y, y_d, ad_name::ad_test::sub_2_d(x, x_d, y, y_d)); + write_output("x + y - x", x, x_d, y, y_d, ad_name::ad_test::add_sub_2_d(x, x_d, y, y_d)); + write_output("x * y", x, x_d, y, y_d, ad_name::ad_test::mul_1_d(x, x_d, y, y_d)); + write_output("x * y * x", x, x_d, y, y_d, ad_name::ad_test::mul_2_d(x, x_d, y, y_d)); + write_output("x / y", x, x_d, y, y_d, ad_name::ad_test::div_1_d(x, x_d, y, y_d)); + write_output("x / y / y", x, x_d, y, y_d, ad_name::ad_test::div_2_d(x, x_d, y, y_d)); + write_output("x * y / x", x, x_d, y, y_d, ad_name::ad_test::mul_div_2_d(x, x_d, y, y_d)); + write_output("x * (x + y)", x, x_d, y, y_d, ad_name::ad_test::mul_add_d(x, x_d, y, y_d)); + write_output("x + x * y", x, x_d, y, y_d, ad_name::ad_test::add_mul_d(x, x_d, y, y_d)); + write_output("+x + y)", x, x_d, y, y_d, ad_name::ad_test::prefix_add_d(x, x_d, y, y_d)); + write_output("-x + y)", x, x_d, y, y_d, ad_name::ad_test::prefix_sub_d(x, x_d, y, y_d)); + write_output("x * func(x, y)", x, x_d, y, y_d, ad_name::ad_test::func_call_d(x, x_d, y, y_d)); + write_output("x * func_outer(x, y)", x, x_d, y, y_d, ad_name::ad_test::func_outer_call_d(x, x_d, y, y_d)); + write_output("sin(x - y)", x, x_d, y, y_d, ad_name::ad_test::sin_call_d(x, x_d, y, y_d)); + write_output("if branch", x, x_d, y, y_d, ad_name::ad_test::if_branch_d(x, x_d, y, y_d)); + write_output("if else branch", x, x_d, y, y_d, ad_name::ad_test::if_else_branch_d(x, x_d, y, y_d)); + write_output("direct return", x, x_d, y, y_d, ad_name::ad_test::direct_return_d(x, x_d, y, y_d)); + write_output("intermediate var", x, x_d, y, y_d, ad_name::ad_test::intermediate_var_d(x, x_d, y, y_d)); + write_output("intermediate passive var", x, x_d, y, y_d, ad_name::ad_test::intermediate_passive_var_d(x, x_d, y, y_d)); + write_output("intermediate untyped", x, x_d, y, y_d, ad_name::ad_test::intermediate_untyped_d(x, x_d, y, y_d)); + write_output("intermediate default init", x, x_d, y, y_d, ad_name::ad_test::intermediate_default_init_d(x, x_d, y, y_d)); + write_output("intermediate no init", x, x_d, y, y_d, ad_name::ad_test::intermediate_no_init_d(x, x_d, y, y_d)); + write_output("while loop", x, x_d, y, y_d, ad_name::ad_test::while_loop_d(x, x_d, y, y_d)); + write_output("do while loop", x, x_d, y, y_d, ad_name::ad_test::do_while_loop_d(x, x_d, y, y_d)); + write_output("for loop", x, x_d, y, y_d, ad_name::ad_test::for_loop_d(x, x_d, y, y_d)); + write_output("tye_outer.a + y", x, x_d, y, y_d, ad_name::ad_test::type_outer_use_d(x, x_d, y, y_d)); + write_output("type_outer.add(y)", x, x_d, y, y_d, ad_name::ad_test::type_outer_call_d(x, x_d, y, cpp2::move(y_d))); + + double x_b {0.0}; + double y_b {0.0}; + double w_b {1.0}; + + write_output_reverse("x + y", x, x_b, y, y_b, w_b, ad_name::ad_test_reverse::add_1_b(x, x_b, y, y_b, w_b)); + write_output_reverse("x + y + x", x, x_b, y, y_b, w_b, ad_name::ad_test_reverse::add_2_b(x, x_b, y, y_b, w_b)); + write_output_reverse("x - y", x, x_b, y, y_b, w_b, ad_name::ad_test_reverse::sub_1_b(x, x_b, y, y_b, w_b)); + write_output_reverse("x - y - x", x, x_b, y, y_b, w_b, ad_name::ad_test_reverse::sub_2_b(x, x_b, y, y_b, w_b)); + write_output_reverse("x + y - x", x, x_b, y, y_b, w_b, ad_name::ad_test_reverse::add_sub_2_b(x, x_b, y, y_b, w_b)); + write_output_reverse("x * y", x, x_b, y, y_b, w_b, ad_name::ad_test_reverse::mul_1_b(x, x_b, y, y_b, w_b)); + write_output_reverse("x * y * x", x, x_b, y, y_b, w_b, ad_name::ad_test_reverse::mul_2_b(x, x_b, y, y_b, w_b)); + write_output_reverse("x / y", x, x_b, y, y_b, w_b, ad_name::ad_test_reverse::div_1_b(x, x_b, y, y_b, w_b)); + write_output_reverse("x / y / y", x, x_b, y, y_b, w_b, ad_name::ad_test_reverse::div_2_b(x, x_b, y, y_b, w_b)); + write_output_reverse("x * y / x", x, x_b, y, y_b, w_b, ad_name::ad_test_reverse::mul_div_2_b(x, x_b, y, y_b, w_b)); + write_output_reverse("x * (x + y)", x, x_b, y, y_b, w_b, ad_name::ad_test_reverse::mul_add_b(x, x_b, y, y_b, w_b)); + write_output_reverse("x + x * y", x, x_b, y, y_b, w_b, ad_name::ad_test_reverse::add_mul_b(x, x_b, y, y_b, w_b)); + write_output_reverse("sin(x-y)", x, x_b, y, y_b, w_b, ad_name::ad_test_reverse::sin_call_b(x, x_b, y, y_b, w_b)); + write_output_reverse("x * func(x-y)", x, x_b, y, y_b, w_b, ad_name::ad_test_reverse::func_call_b(x, x_b, y, y_b, w_b)); + write_output_reverse("x * func_outer(x-y)", x, x_b, y, y_b, w_b, ad_name::ad_test_reverse::func_outer_call_b(x, x_b, cpp2::move(y), y_b, w_b)); + + static_cast(cpp2::move(x_b)); + static_cast(cpp2::move(y_b)); + static_cast(cpp2::move(w_b)); + + auto r_twice {ad_test_twice::mul_1_d_d2(x, x_d, cpp2::move(x_d), 0.0)}; + std::cout << "2nd order diff of x*x at " + cpp2::to_string(cpp2::move(x)) + " = " + cpp2::to_string(cpp2::move(r_twice).r_d_d2) + "" << std::endl; +} + diff --git a/regression-tests/test-results/pure2-autodiff.cpp2.output b/regression-tests/test-results/pure2-autodiff.cpp2.output new file mode 100644 index 000000000..5c8a5e762 --- /dev/null +++ b/regression-tests/test-results/pure2-autodiff.cpp2.output @@ -0,0 +1,1444 @@ +pure2-autodiff.cpp2... + +ad_test:/* @autodiff @print */ type = +{ + add_1:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + r = x + y; + return; + } + + add_2:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + r = x + y + x; + return; + } + + sub_1:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + r = x - y; + return; + } + + sub_2:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + r = x - y - x; + return; + } + + add_sub_2:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + r = x + y - x; + return; + } + + mul_1:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + r = x * y; + return; + } + + mul_2:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + r = x * y * x; + return; + } + + div_1:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + r = x / y; + return; + } + + div_2:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + r = x / y / y; + return; + } + + mul_div_2:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + r = x * y / x; + return; + } + + mul_add:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + r = x * (x + y); + return; + } + + add_mul:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + r = x + x * y; + return; + } + + prefix_add:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + r = +x + y; + return; + } + + prefix_sub:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + r = -x + y; + return; + } + + func:( + in x: double, + in y: double, + ) -> (out ret: double, ) = + { + ret = x + y; + return; + } + + func_call:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + r = x * func(x, y); + return; + } + + func_outer_call:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + r = x * func_outer(x, y); + return; + } + + sin_call:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + r = sin(x - y); + return; + } + + if_branch:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + r = x; + if x < 0.0 + { + r = y; + } + return; + } + + if_else_branch:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + if x < 0.0 + { + r = y; + } + else + { + r = x; + } + return; + } + + direct_return:( + in x: double, + in y: double, + ) -> move double = + { + return x + y; + } + + intermediate_var:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + t: double = x + y; + r = t; + return; + } + + intermediate_passive_var:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + i: int = (); + r = x + y; + i = 2; + _ = i; + return; + } + + intermediate_untyped:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + t: _ = 0.0; + t = x + y; + r = t; + return; + } + + intermediate_default_init:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + t: double = (); + t = x + y; + r = t; + return; + } + + intermediate_no_init:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + t: double; + t = x + y; + r = t; + return; + } + + while_loop:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + r = x; + ( + copy i: int = 0, + copy t: double = 0.0, + ) + while i < 2 + next (i += 1) + { + t = y; + r = r + t; + } + return; + } + + do_while_loop:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + r = x; + (copy i: _ = 0, ) + do + { + r = r + y; + } + next (i += 1) + while i < 2; + return; + } + + for_loop:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + v: std::vector = (); + v.push_back(x); + v.push_back(y); + r = 0.0; + for v + do (in t: _) + { + r = r + t; + } + return; + } + + type_outer_use:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + t: type_outer = (); + t.a = x; + r = t.a + y; + return; + } + + type_outer_call:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + t: type_outer = (); + t.a = x; + r = t.add(y); + return; + } + + add_1_d:( + in x: double, + in x_d: double, + in y: double, + in y_d: double, + ) -> ( + out r: double = 0.0, + out r_d: double = 0.0, + ) = + { + r_d = x_d + y_d; + r = x + y; + return; + } + + add_2_d:( + in x: double, + in x_d: double, + in y: double, + in y_d: double, + ) -> ( + out r: double = 0.0, + out r_d: double = 0.0, + ) = + { + r_d = x_d + y_d + x_d; + r = x + y + x; + return; + } + + sub_1_d:( + in x: double, + in x_d: double, + in y: double, + in y_d: double, + ) -> ( + out r: double = 0.0, + out r_d: double = 0.0, + ) = + { + r_d = x_d - y_d; + r = x - y; + return; + } + + sub_2_d:( + in x: double, + in x_d: double, + in y: double, + in y_d: double, + ) -> ( + out r: double = 0.0, + out r_d: double = 0.0, + ) = + { + r_d = x_d - y_d - x_d; + r = x - y - x; + return; + } + + add_sub_2_d:( + in x: double, + in x_d: double, + in y: double, + in y_d: double, + ) -> ( + out r: double = 0.0, + out r_d: double = 0.0, + ) = + { + r_d = x_d + y_d - x_d; + r = x + y - x; + return; + } + + mul_1_d:( + in x: double, + in x_d: double, + in y: double, + in y_d: double, + ) -> ( + out r: double = 0.0, + out r_d: double = 0.0, + ) = + { + r_d = y * x_d + x * y_d; + r = x * y; + return; + } + + mul_2_d:( + in x: double, + in x_d: double, + in y: double, + in y_d: double, + ) -> ( + out r: double = 0.0, + out r_d: double = 0.0, + ) = + { + temp_1_d: _ = y * x_d + x * y_d; + temp_1: _ = x * y; + r_d = x * temp_1_d + temp_1 * x_d; + r = temp_1 * x; + return; + } + + div_1_d:( + in x: double, + in x_d: double, + in y: double, + in y_d: double, + ) -> ( + out r: double = 0.0, + out r_d: double = 0.0, + ) = + { + r_d = x_d / y + -x * y_d / (y * y); + r = x / y; + return; + } + + div_2_d:( + in x: double, + in x_d: double, + in y: double, + in y_d: double, + ) -> ( + out r: double = 0.0, + out r_d: double = 0.0, + ) = + { + temp_1_d: _ = x_d / y + -x * y_d / (y * y); + temp_1: _ = x / y; + r_d = temp_1_d / y + -temp_1 * y_d / (y * y); + r = temp_1 / y; + return; + } + + mul_div_2_d:( + in x: double, + in x_d: double, + in y: double, + in y_d: double, + ) -> ( + out r: double = 0.0, + out r_d: double = 0.0, + ) = + { + temp_1_d: _ = y * x_d + x * y_d; + temp_1: _ = x * y; + r_d = temp_1_d / x + -temp_1 * x_d / (x * x); + r = temp_1 / x; + return; + } + + mul_add_d:( + in x: double, + in x_d: double, + in y: double, + in y_d: double, + ) -> ( + out r: double = 0.0, + out r_d: double = 0.0, + ) = + { + temp_1_d: double = x_d + y_d; + temp_1: double = x + y; + r_d = temp_1 * x_d + x * temp_1_d; + r = x * temp_1; + return; + } + + add_mul_d:( + in x: double, + in x_d: double, + in y: double, + in y_d: double, + ) -> ( + out r: double = 0.0, + out r_d: double = 0.0, + ) = + { + temp_1_d: double = y * x_d + x * y_d; + temp_1: double = x * y; + r_d = x_d + temp_1_d; + r = x + temp_1; + return; + } + + prefix_add_d:( + in x: double, + in x_d: double, + in y: double, + in y_d: double, + ) -> ( + out r: double = 0.0, + out r_d: double = 0.0, + ) = + { + temp_1_d: double = +x_d; + temp_1: double = +x; + r_d = temp_1_d + y_d; + r = temp_1 + y; + return; + } + + prefix_sub_d:( + in x: double, + in x_d: double, + in y: double, + in y_d: double, + ) -> ( + out r: double = 0.0, + out r_d: double = 0.0, + ) = + { + temp_1_d: double = -x_d; + temp_1: double = -x; + r_d = temp_1_d + y_d; + r = temp_1 + y; + return; + } + + func_d:( + in x: double, + in x_d: double, + in y: double, + in y_d: double, + ) -> ( + out ret: double = 0.0, + out ret_d: double = 0.0, + ) = + { + ret_d = x_d + y_d; + ret = x + y; + return; + } + + func_call_d:( + in x: double, + in x_d: double, + in y: double, + in y_d: double, + ) -> ( + out r: double = 0.0, + out r_d: double = 0.0, + ) = + { + temp_1: _ = func_d(x, x_d, y, y_d); + temp_2_d: double = temp_1.ret_d; + temp_2: double = func(x, y); + r_d = temp_2 * x_d + x * temp_2_d; + r = x * temp_2; + return; + } + + func_outer_call_d:( + in x: double, + in x_d: double, + in y: double, + in y_d: double, + ) -> ( + out r: double = 0.0, + out r_d: double = 0.0, + ) = + { + temp_1: _ = func_outer_d(x, x_d, y, y_d); + temp_2_d: double = temp_1.ret_d; + temp_2: double = func_outer(x, y); + r_d = temp_2 * x_d + x * temp_2_d; + r = x * temp_2; + return; + } + + sin_call_d:( + in x: double, + in x_d: double, + in y: double, + in y_d: double, + ) -> ( + out r: double = 0.0, + out r_d: double = 0.0, + ) = + { + temp_1_d: double = x_d - y_d; + temp_1: double = x - y; + r_d = cos(temp_1) * temp_1_d; + r = sin(temp_1); + return; + } + + if_branch_d:( + in x: double, + in x_d: double, + in y: double, + in y_d: double, + ) -> ( + out r: double = 0.0, + out r_d: double = 0.0, + ) = + { + r_d = x_d; + r = x; + if x < 0.0 + { + r_d = y_d; + r = y; + } + else + { + } + return; + } + + if_else_branch_d:( + in x: double, + in x_d: double, + in y: double, + in y_d: double, + ) -> ( + out r: double = 0.0, + out r_d: double = 0.0, + ) = + { + if x < 0.0 + { + r_d = y_d; + r = y; + } + else + { + r_d = x_d; + r = x; + } + return; + } + + direct_return_d:( + in x: double, + in x_d: double, + in y: double, + in y_d: double, + ) -> ( + out r: double = (), + out r_d: double = (), + ) = + { + r_d = x_d + y_d; + r = x + y; + return; + } + + intermediate_var_d:( + in x: double, + in x_d: double, + in y: double, + in y_d: double, + ) -> ( + out r: double = 0.0, + out r_d: double = 0.0, + ) = + { + t_d: double = x_d + y_d; + t: double = x + y; + r_d = t_d; + r = t; + return; + } + + intermediate_passive_var_d:( + in x: double, + in x_d: double, + in y: double, + in y_d: double, + ) -> ( + out r: double = 0.0, + out r_d: double = 0.0, + ) = + { + i: int = (); + r_d = x_d + y_d; + r = x + y; + i = 2; + _ = i; + return; + } + + intermediate_untyped_d:( + in x: double, + in x_d: double, + in y: double, + in y_d: double, + ) -> ( + out r: double = 0.0, + out r_d: double = 0.0, + ) = + { + t_d: _ = double(); + t: _ = 0.0; + t_d = x_d + y_d; + t = x + y; + r_d = t_d; + r = t; + return; + } + + intermediate_default_init_d:( + in x: double, + in x_d: double, + in y: double, + in y_d: double, + ) -> ( + out r: double = 0.0, + out r_d: double = 0.0, + ) = + { + t_d: double = (); + t: double = (); + t_d = x_d + y_d; + t = x + y; + r_d = t_d; + r = t; + return; + } + + intermediate_no_init_d:( + in x: double, + in x_d: double, + in y: double, + in y_d: double, + ) -> ( + out r: double = 0.0, + out r_d: double = 0.0, + ) = + { + t_d: double; + t: double; + t_d = x_d + y_d; + t = x + y; + r_d = t_d; + r = t; + return; + } + + while_loop_d:( + in x: double, + in x_d: double, + in y: double, + in y_d: double, + ) -> ( + out r: double = 0.0, + out r_d: double = 0.0, + ) = + { + r_d = x_d; + r = x; + ( + copy i: int = 0, + copy t: double = 0.0, + copy t_d: double = (), + ) + while i < 2 + next (i += 1) + { + t_d = y_d; + t = y; + r_d = r_d + t_d; + r = r + t; + } + return; + } + + do_while_loop_d:( + in x: double, + in x_d: double, + in y: double, + in y_d: double, + ) -> ( + out r: double = 0.0, + out r_d: double = 0.0, + ) = + { + r_d = x_d; + r = x; + (copy i: _ = 0, ) + do + { + r_d = r_d + y_d; + r = r + y; + } + next (i += 1) + while i < 2; + return; + } + + for_loop_d:( + in x: double, + in x_d: double, + in y: double, + in y_d: double, + ) -> ( + out r: double = 0.0, + out r_d: double = 0.0, + ) = + { + v_d: std::vector = (); + v: std::vector = (); + v_d.push_back(x_d); + v.push_back(x); + v_d.push_back(y_d); + v.push_back(y); + r_d = (); + r = 0.0; + (copy t_d_iter: _ = v_d.begin(), ) + for v + next (t_d_iter++) + do (in t: _) + { + (in t_d: _ = t_d_iter*, ) + { + r_d = r_d + t_d; + r = r + t; + } + } + return; + } + + type_outer_use_d:( + in x: double, + in x_d: double, + in y: double, + in y_d: double, + ) -> ( + out r: double = 0.0, + out r_d: double = 0.0, + ) = + { + t_d: type_outer_d = (); + t: type_outer = (); + t_d.a_d = x_d; + t.a = x; + temp_1_d: double = t_d.a_d; + temp_1: double = t.a; + r_d = temp_1_d + y_d; + r = temp_1 + y; + return; + } + + type_outer_call_d:( + in x: double, + in x_d: double, + in y: double, + in y_d: double, + ) -> ( + out r: double = 0.0, + out r_d: double = 0.0, + ) = + { + t_d: type_outer_d = (); + t: type_outer = (); + t_d.a_d = x_d; + t.a = x; + temp_1: _ = t.add_d(t_d, y, y_d); + r_d = temp_1.r_d; + r = t.add(y); + return; + } +} +AD: Warning - reverse mode differentiation is very experimental + + +ad_test_reverse:/* @autodiff<"reverse"> @print */ type = +{ + add_1:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + r = x + y; + return; + } + + add_2:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + r = x + y + x; + return; + } + + sub_1:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + r = x - y; + return; + } + + sub_2:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + r = x - y - x; + return; + } + + add_sub_2:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + r = x + y - x; + return; + } + + mul_1:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + r = x * y; + return; + } + + mul_2:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + r = x * y * x; + return; + } + + div_1:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + r = x / y; + return; + } + + div_2:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + r = x / y / y; + return; + } + + mul_div_2:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + r = x * y / x; + return; + } + + mul_add:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + r = x * (x + y); + return; + } + + add_mul:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + r = x + x * y; + return; + } + + sin_call:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + r = sin(x - y); + return; + } + + func:( + in x: double, + in y: double, + ) -> (out ret: double, ) = + { + ret = x + y; + return; + } + + func_call:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + r = x * func(x, y); + return; + } + + func_outer_call:( + in x: double, + in y: double, + ) -> (out r: double, ) = + { + r = x * func_outer(x, y); + return; + } + + add_1_b:( + in x: double, + inout x_b: double, + in y: double, + inout y_b: double, + inout r_b: double, + ) -> (out r: double = 0.0, ) = + { + r = x + y; + x_b += r_b; + y_b += r_b; + r_b = 0.0; + return; + } + + add_2_b:( + in x: double, + inout x_b: double, + in y: double, + inout y_b: double, + inout r_b: double, + ) -> (out r: double = 0.0, ) = + { + r = x + y + x; + x_b += r_b; + y_b += r_b; + x_b += r_b; + r_b = 0.0; + return; + } + + sub_1_b:( + in x: double, + inout x_b: double, + in y: double, + inout y_b: double, + inout r_b: double, + ) -> (out r: double = 0.0, ) = + { + r = x - y; + x_b += r_b; + y_b -= r_b; + r_b = 0.0; + return; + } + + sub_2_b:( + in x: double, + inout x_b: double, + in y: double, + inout y_b: double, + inout r_b: double, + ) -> (out r: double = 0.0, ) = + { + r = x - y - x; + x_b += r_b; + y_b -= r_b; + x_b -= r_b; + r_b = 0.0; + return; + } + + add_sub_2_b:( + in x: double, + inout x_b: double, + in y: double, + inout y_b: double, + inout r_b: double, + ) -> (out r: double = 0.0, ) = + { + r = x + y - x; + x_b += r_b; + y_b += r_b; + x_b -= r_b; + r_b = 0.0; + return; + } + + mul_1_b:( + in x: double, + inout x_b: double, + in y: double, + inout y_b: double, + inout r_b: double, + ) -> (out r: double = 0.0, ) = + { + r = x * y; + x_b += y * r_b; + y_b += x * r_b; + r_b = 0.0; + return; + } + + mul_2_b:( + in x: double, + inout x_b: double, + in y: double, + inout y_b: double, + inout r_b: double, + ) -> (out r: double = 0.0, ) = + { + temp_1_b: _ = 0.0; + temp_1: _ = x * y; + r = temp_1 * x; + temp_1_b += x * r_b; + x_b += temp_1 * r_b; + r_b = 0.0; + x_b += y * temp_1_b; + y_b += x * temp_1_b; + temp_1_b = 0.0; + return; + } + + div_1_b:( + in x: double, + inout x_b: double, + in y: double, + inout y_b: double, + inout r_b: double, + ) -> (out r: double = 0.0, ) = + { + r = x / y; + x_b += r_b / y; + y_b -= x * r_b / (y * y); + r_b = 0.0; + return; + } + + div_2_b:( + in x: double, + inout x_b: double, + in y: double, + inout y_b: double, + inout r_b: double, + ) -> (out r: double = 0.0, ) = + { + temp_1_b: _ = 0.0; + temp_1: _ = x / y; + r = temp_1 / y; + temp_1_b += r_b / y; + y_b -= temp_1 * r_b / (y * y); + r_b = 0.0; + x_b += temp_1_b / y; + y_b -= x * temp_1_b / (y * y); + temp_1_b = 0.0; + return; + } + + mul_div_2_b:( + in x: double, + inout x_b: double, + in y: double, + inout y_b: double, + inout r_b: double, + ) -> (out r: double = 0.0, ) = + { + temp_1_b: _ = 0.0; + temp_1: _ = x * y; + r = temp_1 / x; + temp_1_b += r_b / x; + x_b -= temp_1 * r_b / (x * x); + r_b = 0.0; + x_b += y * temp_1_b; + y_b += x * temp_1_b; + temp_1_b = 0.0; + return; + } + + mul_add_b:( + in x: double, + inout x_b: double, + in y: double, + inout y_b: double, + inout r_b: double, + ) -> (out r: double = 0.0, ) = + { + temp_1_b: double = 0.0; + temp_1: double = x + y; + r = x * temp_1; + x_b += temp_1 * r_b; + temp_1_b += x * r_b; + r_b = 0.0; + x_b += temp_1_b; + y_b += temp_1_b; + temp_1_b = 0.0; + return; + } + + add_mul_b:( + in x: double, + inout x_b: double, + in y: double, + inout y_b: double, + inout r_b: double, + ) -> (out r: double = 0.0, ) = + { + temp_1_b: double = 0.0; + temp_1: double = x * y; + r = x + temp_1; + x_b += r_b; + temp_1_b += r_b; + r_b = 0.0; + x_b += y * temp_1_b; + y_b += x * temp_1_b; + temp_1_b = 0.0; + return; + } + + sin_call_b:( + in x: double, + inout x_b: double, + in y: double, + inout y_b: double, + inout r_b: double, + ) -> (out r: double = 0.0, ) = + { + temp_1_b: double = 0.0; + temp_1: double = x - y; + r = sin(temp_1); + temp_1_b += cos(temp_1) * r_b; + r_b = 0.0; + x_b += temp_1_b; + y_b -= temp_1_b; + temp_1_b = 0.0; + return; + } + + func_b:( + in x: double, + inout x_b: double, + in y: double, + inout y_b: double, + inout ret_b: double, + ) -> (out ret: double = 0.0, ) = + { + ret = x + y; + x_b += ret_b; + y_b += ret_b; + ret_b = 0.0; + return; + } + + func_call_b:( + in x: double, + inout x_b: double, + in y: double, + inout y_b: double, + inout r_b: double, + ) -> (out r: double = 0.0, ) = + { + temp_2_b: double = 0.0; + temp_2: double = func(x, y); + r = x * temp_2; + x_b += temp_2 * r_b; + temp_2_b += x * r_b; + r_b = 0.0; + _ = func_b(x, x_b, y, y_b, temp_2_b); + temp_2_b = 0.0; + return; + } + + func_outer_call_b:( + in x: double, + inout x_b: double, + in y: double, + inout y_b: double, + inout r_b: double, + ) -> (out r: double = 0.0, ) = + { + temp_2_b: double = 0.0; + temp_2: double = func_outer(x, y); + r = x * temp_2; + x_b += temp_2 * r_b; + temp_2_b += x * r_b; + r_b = 0.0; + _ = func_outer_b(x, x_b, y, y_b, temp_2_b); + temp_2_b = 0.0; + return; + } +} + + +ad_test_twice:/* @autodiff @autodiff<"suffix=_d2"> @print */ type = +{ + mul_1:(in x: double, ) -> (out r: double, ) = + { + r = x * x; + return; + } + + mul_1_d:( + in x: double, + in x_d: double, + ) -> ( + out r: double = 0.0, + out r_d: double = 0.0, + ) = + { + r_d = x * x_d + x * x_d; + r = x * x; + return; + } + + mul_1_d2:( + in x: double, + in x_d2: double, + ) -> ( + out r: double = 0.0, + out r_d2: double = 0.0, + ) = + { + r_d2 = x * x_d2 + x * x_d2; + r = x * x; + return; + } + + mul_1_d_d2:( + in x: double, + in x_d2: double, + in x_d: double, + in x_d_d2: double, + ) -> ( + out r: double = 0.0, + out r_d2: double = 0.0, + out r_d: double = 0.0, + out r_d_d2: double = 0.0, + ) = + { + temp_1_d2: double = x_d * x_d2 + x * x_d_d2; + temp_1: double = x * x_d; + temp_2_d2: double = x_d * x_d2 + x * x_d_d2; + temp_2: double = x * x_d; + r_d_d2 = temp_1_d2 + temp_2_d2; + r_d = temp_1 + temp_2; + r_d2 = x * x_d2 + x * x_d2; + r = x * x; + return; + } +} + + +ad_test_2:/* @autodiff<"order=2"> @print */ type = +{ + f:(in x: double, ) -> (out y: double, ) = + { + if x < -3 + { + y = x * x; + } + else if x < 3 + { + y = x + sin(x) + 10; + } + else + { + y = sin(x) * x * x; + } + return; + } + + f_d:( + in x: double, + in x_d: cpp2::taylor, + ) -> ( + out y: double = 0.0, + out y_d: cpp2::taylor = 0.0, + ) = + { + if x < -3 + { + y_d = x_d..mul(x_d, x, x); + y = x * x; + } + else if x < 3 + { + temp_1_d: cpp2::taylor = x_d.sin(x); + temp_1: double = sin(x); + y_d = x_d + temp_1_d; + y = x + temp_1 + 10; + } + else + { + temp_3_d: cpp2::taylor = x_d.sin(x); + temp_3: double = sin(x); + temp_4_d: _ = temp_3_d..mul(x_d, temp_3, x); + temp_4: _ = temp_3 * x; + y_d = temp_4_d..mul(x_d, temp_4, x); + y = temp_4 * x; + } + return; + } +} + ok (all Cpp2, passes safety checks) + diff --git a/regression-tests/test-results/pure2-bounds-safety-span.cpp b/regression-tests/test-results/pure2-bounds-safety-span.cpp index 374f11039..ce2ce82c0 100644 --- a/regression-tests/test-results/pure2-bounds-safety-span.cpp +++ b/regression-tests/test-results/pure2-bounds-safety-span.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-break-continue.cpp b/regression-tests/test-results/pure2-break-continue.cpp index ca21a0fc7..34307f93f 100644 --- a/regression-tests/test-results/pure2-break-continue.cpp +++ b/regression-tests/test-results/pure2-break-continue.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-bugfix-for-assert-capture-error.cpp2.output b/regression-tests/test-results/pure2-bugfix-for-assert-capture-error.cpp2.output new file mode 100644 index 000000000..cf29d86b6 --- /dev/null +++ b/regression-tests/test-results/pure2-bugfix-for-assert-capture-error.cpp2.output @@ -0,0 +1,4 @@ +pure2-bugfix-for-assert-capture-error.cpp2... +pure2-bugfix-for-assert-capture-error.cpp2(2,29): error: $ (capture) cannot appear here - it must appear in an anonymous expression function, a postcondition, or an interpolated string literal (at '$') +pure2-bugfix-for-assert-capture-error.cpp2(2,23): error: expected ')' at the end of the contract (at '==') + diff --git a/regression-tests/test-results/pure2-bugfix-for-assign-expression-list.cpp b/regression-tests/test-results/pure2-bugfix-for-assign-expression-list.cpp index 719ee11c5..60e0b0a04 100644 --- a/regression-tests/test-results/pure2-bugfix-for-assign-expression-list.cpp +++ b/regression-tests/test-results/pure2-bugfix-for-assign-expression-list.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-bugfix-for-bad-capture-error.cpp2.output b/regression-tests/test-results/pure2-bugfix-for-bad-capture-error.cpp2.output new file mode 100644 index 000000000..5ba08c536 --- /dev/null +++ b/regression-tests/test-results/pure2-bugfix-for-bad-capture-error.cpp2.output @@ -0,0 +1,4 @@ +pure2-bugfix-for-bad-capture-error.cpp2... +pure2-bugfix-for-bad-capture-error.cpp2(2,29): error: $ (capture) cannot appear here - it must appear in an anonymous expression function, a postcondition, or an interpolated string literal (at '$') +pure2-bugfix-for-bad-capture-error.cpp2(2,23): error: expected ')' at the end of the contract (at '==') + diff --git a/regression-tests/test-results/pure2-bugfix-for-bad-decltype-error.cpp2.output b/regression-tests/test-results/pure2-bugfix-for-bad-decltype-error.cpp2.output new file mode 100644 index 000000000..57a22f00b --- /dev/null +++ b/regression-tests/test-results/pure2-bugfix-for-bad-decltype-error.cpp2.output @@ -0,0 +1,6 @@ +pure2-bugfix-for-bad-decltype-error.cpp2... +pure2-bugfix-for-bad-decltype-error.cpp2(3,14): error: 'decltype' must be followed by a single parenthesized expression +pure2-bugfix-for-bad-decltype-error.cpp2(3,24): error: 'is' must be followed by a type-id or an expression +pure2-bugfix-for-bad-decltype-error.cpp2(3,14): error: 'decltype' must be followed by a single parenthesized expression +pure2-bugfix-for-bad-decltype-error.cpp2(3,24): error: 'is' must be followed by a type-id or an expression + diff --git a/regression-tests/test-results/pure2-bugfix-for-bad-parameter-error.cpp2.output b/regression-tests/test-results/pure2-bugfix-for-bad-parameter-error.cpp2.output new file mode 100644 index 000000000..d52f98037 --- /dev/null +++ b/regression-tests/test-results/pure2-bugfix-for-bad-parameter-error.cpp2.output @@ -0,0 +1,3 @@ +pure2-bugfix-for-bad-parameter-error.cpp2... +pure2-bugfix-for-bad-parameter-error.cpp2(1,50): error: parameter must be initialized with an expression (at ')') + diff --git a/regression-tests/test-results/pure2-bugfix-for-bad-using-error.cpp2.output b/regression-tests/test-results/pure2-bugfix-for-bad-using-error.cpp2.output new file mode 100644 index 000000000..539bfa62b --- /dev/null +++ b/regression-tests/test-results/pure2-bugfix-for-bad-using-error.cpp2.output @@ -0,0 +1,3 @@ +pure2-bugfix-for-bad-using-error.cpp2... +pure2-bugfix-for-bad-using-error.cpp2(3,1): error: expected valid id-expression after 'using' (at '}') + diff --git a/regression-tests/test-results/pure2-bugfix-for-discard-precedence.cpp b/regression-tests/test-results/pure2-bugfix-for-discard-precedence.cpp index eccd84132..be8f9eeb1 100644 --- a/regression-tests/test-results/pure2-bugfix-for-discard-precedence.cpp +++ b/regression-tests/test-results/pure2-bugfix-for-discard-precedence.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== @@ -17,7 +17,7 @@ class quantity; class quantity { #line 2 "pure2-bugfix-for-discard-precedence.cpp2" private: cpp2::i32 number; - public: explicit quantity(cpp2::impl::in x); + public: quantity(cpp2::impl::in x); #line 3 "pure2-bugfix-for-discard-precedence.cpp2" public: auto operator=(cpp2::impl::in x) -> quantity& ; public: [[nodiscard]] auto operator+(quantity const& that) & -> quantity; diff --git a/regression-tests/test-results/pure2-bugfix-for-functions-before-superclasses-error.cpp2.output b/regression-tests/test-results/pure2-bugfix-for-functions-before-superclasses-error.cpp2.output new file mode 100644 index 000000000..d423e88ce --- /dev/null +++ b/regression-tests/test-results/pure2-bugfix-for-functions-before-superclasses-error.cpp2.output @@ -0,0 +1,3 @@ +pure2-bugfix-for-functions-before-superclasses-error.cpp2... +pure2-bugfix-for-functions-before-superclasses-error.cpp2(7,3): error: a type cannot declare a parent after defining a function + diff --git a/regression-tests/test-results/pure2-bugfix-for-indexed-call.cpp b/regression-tests/test-results/pure2-bugfix-for-indexed-call.cpp index 1e837c7d3..9bd00102b 100644 --- a/regression-tests/test-results/pure2-bugfix-for-indexed-call.cpp +++ b/regression-tests/test-results/pure2-bugfix-for-indexed-call.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-bugfix-for-invalid-alias-error.cpp2.output b/regression-tests/test-results/pure2-bugfix-for-invalid-alias-error.cpp2.output new file mode 100644 index 000000000..b3dc73e2e --- /dev/null +++ b/regression-tests/test-results/pure2-bugfix-for-invalid-alias-error.cpp2.output @@ -0,0 +1,3 @@ +pure2-bugfix-for-invalid-alias-error.cpp2... +pure2-bugfix-for-invalid-alias-error.cpp2(2,25): error: invalid alias declaration - expected 'type', 'namespace', or a type-id after ':' + diff --git a/regression-tests/test-results/pure2-bugfix-for-late-comments.cpp b/regression-tests/test-results/pure2-bugfix-for-late-comments.cpp new file mode 100644 index 000000000..0c9eb14ca --- /dev/null +++ b/regression-tests/test-results/pure2-bugfix-for-late-comments.cpp @@ -0,0 +1,47 @@ + +#define CPP2_INCLUDE_STD Yes + +//=== Cpp2 type declarations ==================================================== + + +#include "cpp2util.h" + +#line 1 "pure2-bugfix-for-late-comments.cpp2" + +#line 7 "pure2-bugfix-for-late-comments.cpp2" +class crash_m0; + + +//=== Cpp2 type definitions and function declarations =========================== + +#line 1 "pure2-bugfix-for-late-comments.cpp2" + +#line 2 "pure2-bugfix-for-late-comments.cpp2" +[[nodiscard]] auto main() -> int; + +#line 7 "pure2-bugfix-for-late-comments.cpp2" +class crash_m0 { + public: [[nodiscard]] auto operator-([[maybe_unused]] auto const& unnamed_param_2) const& -> int; + public: crash_m0() = default; + public: crash_m0(crash_m0 const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(crash_m0 const&) -> void = delete; + + +#line 11 "pure2-bugfix-for-late-comments.cpp2" +}; + + +//=== Cpp2 function definitions ================================================= + +#line 1 "pure2-bugfix-for-late-comments.cpp2" + +#line 2 "pure2-bugfix-for-late-comments.cpp2" +[[nodiscard]] auto main() -> int{ + auto x {crash_m0()}; + static_cast(cpp2::move(x)); +} + +#line 8 "pure2-bugfix-for-late-comments.cpp2" + [[nodiscard]] auto crash_m0::operator-([[maybe_unused]] auto const& unnamed_param_2) const& -> int { return 0; }/* Comment starts here +And continues here +*/ diff --git a/regression-tests/test-results/pure2-bugfix-for-late-comments.cpp2.output b/regression-tests/test-results/pure2-bugfix-for-late-comments.cpp2.output new file mode 100644 index 000000000..a44b6fa85 --- /dev/null +++ b/regression-tests/test-results/pure2-bugfix-for-late-comments.cpp2.output @@ -0,0 +1,2 @@ +pure2-bugfix-for-late-comments.cpp2... ok (all Cpp2, passes safety checks) + diff --git a/regression-tests/test-results/pure2-bugfix-for-max-munch.cpp b/regression-tests/test-results/pure2-bugfix-for-max-munch.cpp index 5aa5f239f..9f7ad7650 100644 --- a/regression-tests/test-results/pure2-bugfix-for-max-munch.cpp +++ b/regression-tests/test-results/pure2-bugfix-for-max-munch.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-bugfix-for-memberwise-base-assignment.cpp b/regression-tests/test-results/pure2-bugfix-for-memberwise-base-assignment.cpp index 962c5a426..0a45032fe 100644 --- a/regression-tests/test-results/pure2-bugfix-for-memberwise-base-assignment.cpp +++ b/regression-tests/test-results/pure2-bugfix-for-memberwise-base-assignment.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== @@ -37,6 +37,8 @@ class Derived: public Base { public: explicit Derived(); public: Derived(Derived const& that); +#line 10 "pure2-bugfix-for-memberwise-base-assignment.cpp2" + public: Derived(Derived&& that) noexcept; public: auto operator=(Derived&& that) noexcept -> Derived& ; }; @@ -70,6 +72,9 @@ auto main() -> int; #line 10 "pure2-bugfix-for-memberwise-base-assignment.cpp2" Derived::Derived(Derived const& that) : Base{ static_cast(that) }{} +#line 10 "pure2-bugfix-for-memberwise-base-assignment.cpp2" + Derived::Derived(Derived&& that) noexcept + : Base{ static_cast(that) }{} #line 11 "pure2-bugfix-for-memberwise-base-assignment.cpp2" auto Derived::operator=(Derived&& that) noexcept -> Derived& { Base::operator= ( static_cast(that) ); diff --git a/regression-tests/test-results/pure2-bugfix-for-naked-unsigned-char-error.cpp2.output b/regression-tests/test-results/pure2-bugfix-for-naked-unsigned-char-error.cpp2.output new file mode 100644 index 000000000..c1b5aceac --- /dev/null +++ b/regression-tests/test-results/pure2-bugfix-for-naked-unsigned-char-error.cpp2.output @@ -0,0 +1,8 @@ +pure2-bugfix-for-naked-unsigned-char-error.cpp2... +pure2-bugfix-for-naked-unsigned-char-error.cpp2(2,8): error: 'unsigned char' - did you mean 'u8' (usually best) or 'cpp2::_uchar'? +pure2-bugfix-for-naked-unsigned-char-error.cpp2(2,8): error: 'unsigned char' is an old-style C/C++ multi-word keyword type + - most such types should be used only for interoperability with older code + - using those when you need them is fine, but name them with these short names instead: + short, ushort, int, uint, long, ulong, longlong, ulonglong, longdouble, _schar, _uchar + - see also cpp2util.h > "Convenience names for integer types" + diff --git a/regression-tests/test-results/pure2-bugfix-for-name-lookup-and-value-decoration.cpp b/regression-tests/test-results/pure2-bugfix-for-name-lookup-and-value-decoration.cpp index 983f2e839..58b5d88cb 100644 --- a/regression-tests/test-results/pure2-bugfix-for-name-lookup-and-value-decoration.cpp +++ b/regression-tests/test-results/pure2-bugfix-for-name-lookup-and-value-decoration.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-bugfix-for-namespace-error.cpp2.output b/regression-tests/test-results/pure2-bugfix-for-namespace-error.cpp2.output new file mode 100644 index 000000000..0c5ed2526 --- /dev/null +++ b/regression-tests/test-results/pure2-bugfix-for-namespace-error.cpp2.output @@ -0,0 +1,3 @@ +pure2-bugfix-for-namespace-error.cpp2... +pure2-bugfix-for-namespace-error.cpp2(2,22): error: types cannot contain namespaces (at 'namespace') + diff --git a/regression-tests/test-results/pure2-bugfix-for-non-local-function-expression.cpp b/regression-tests/test-results/pure2-bugfix-for-non-local-function-expression.cpp index f7bf2d3d3..d4296214b 100644 --- a/regression-tests/test-results/pure2-bugfix-for-non-local-function-expression.cpp +++ b/regression-tests/test-results/pure2-bugfix-for-non-local-function-expression.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-bugfix-for-non-local-initialization.cpp b/regression-tests/test-results/pure2-bugfix-for-non-local-initialization.cpp index 2b27f9481..2cceaf6f0 100644 --- a/regression-tests/test-results/pure2-bugfix-for-non-local-initialization.cpp +++ b/regression-tests/test-results/pure2-bugfix-for-non-local-initialization.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-bugfix-for-optional-template-argument-list.cpp b/regression-tests/test-results/pure2-bugfix-for-optional-template-argument-list.cpp index 93aa8dafe..0b9b9f519 100644 --- a/regression-tests/test-results/pure2-bugfix-for-optional-template-argument-list.cpp +++ b/regression-tests/test-results/pure2-bugfix-for-optional-template-argument-list.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-bugfix-for-out-this-nonconstructor-error.cpp2.output b/regression-tests/test-results/pure2-bugfix-for-out-this-nonconstructor-error.cpp2.output new file mode 100644 index 000000000..0d5527d6d --- /dev/null +++ b/regression-tests/test-results/pure2-bugfix-for-out-this-nonconstructor-error.cpp2.output @@ -0,0 +1,3 @@ +pure2-bugfix-for-out-this-nonconstructor-error.cpp2... +pure2-bugfix-for-out-this-nonconstructor-error.cpp2(3,16): error: a function with an 'out this' parameter must be a constructor + diff --git a/regression-tests/test-results/pure2-bugfix-for-requires-clause-in-forward-declaration.cpp b/regression-tests/test-results/pure2-bugfix-for-requires-clause-in-forward-declaration.cpp index b0a265afa..f0f1445bd 100644 --- a/regression-tests/test-results/pure2-bugfix-for-requires-clause-in-forward-declaration.cpp +++ b/regression-tests/test-results/pure2-bugfix-for-requires-clause-in-forward-declaration.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== @@ -17,7 +17,7 @@ class element; class element { #line 2 "pure2-bugfix-for-requires-clause-in-forward-declaration.cpp2" private: std::string name; - public: explicit element(auto&& n) + public: element(auto&& n) CPP2_REQUIRES_ (std::is_convertible_v&>) ; #line 3 "pure2-bugfix-for-requires-clause-in-forward-declaration.cpp2" public: auto operator=(auto&& n) -> element& diff --git a/regression-tests/test-results/pure2-bugfix-for-requires-clause-unbraced-function-initializer.cpp b/regression-tests/test-results/pure2-bugfix-for-requires-clause-unbraced-function-initializer.cpp index 4826776a3..2e7e256e8 100644 --- a/regression-tests/test-results/pure2-bugfix-for-requires-clause-unbraced-function-initializer.cpp +++ b/regression-tests/test-results/pure2-bugfix-for-requires-clause-unbraced-function-initializer.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-bugfix-for-template-argument.cpp b/regression-tests/test-results/pure2-bugfix-for-template-argument.cpp index 1b0f4c2a7..8c47d4aa5 100644 --- a/regression-tests/test-results/pure2-bugfix-for-template-argument.cpp +++ b/regression-tests/test-results/pure2-bugfix-for-template-argument.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-bugfix-for-ufcs-arguments.cpp b/regression-tests/test-results/pure2-bugfix-for-ufcs-arguments.cpp index 9777e04bb..8145fae4c 100644 --- a/regression-tests/test-results/pure2-bugfix-for-ufcs-arguments.cpp +++ b/regression-tests/test-results/pure2-bugfix-for-ufcs-arguments.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-bugfix-for-ufcs-name-lookup.cpp b/regression-tests/test-results/pure2-bugfix-for-ufcs-name-lookup.cpp index ae5a4442e..bcaa8c241 100644 --- a/regression-tests/test-results/pure2-bugfix-for-ufcs-name-lookup.cpp +++ b/regression-tests/test-results/pure2-bugfix-for-ufcs-name-lookup.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-bugfix-for-ufcs-noexcept.cpp b/regression-tests/test-results/pure2-bugfix-for-ufcs-noexcept.cpp index 4d31faf29..a3425a914 100644 --- a/regression-tests/test-results/pure2-bugfix-for-ufcs-noexcept.cpp +++ b/regression-tests/test-results/pure2-bugfix-for-ufcs-noexcept.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-bugfix-for-ufcs-sfinae.cpp b/regression-tests/test-results/pure2-bugfix-for-ufcs-sfinae.cpp index a6ea35ca8..158ff789f 100644 --- a/regression-tests/test-results/pure2-bugfix-for-ufcs-sfinae.cpp +++ b/regression-tests/test-results/pure2-bugfix-for-ufcs-sfinae.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-bugfix-for-unbraced-function-expression.cpp b/regression-tests/test-results/pure2-bugfix-for-unbraced-function-expression.cpp index 33e705a4e..1b8019dc0 100644 --- a/regression-tests/test-results/pure2-bugfix-for-unbraced-function-expression.cpp +++ b/regression-tests/test-results/pure2-bugfix-for-unbraced-function-expression.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-bugfix-for-variable-template.cpp b/regression-tests/test-results/pure2-bugfix-for-variable-template.cpp index 7b8d7f07b..71f3ced75 100644 --- a/regression-tests/test-results/pure2-bugfix-for-variable-template.cpp +++ b/regression-tests/test-results/pure2-bugfix-for-variable-template.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-chained-comparisons.cpp b/regression-tests/test-results/pure2-chained-comparisons.cpp index 5b1367026..837d175f8 100644 --- a/regression-tests/test-results/pure2-chained-comparisons.cpp +++ b/regression-tests/test-results/pure2-chained-comparisons.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-concept-definition.cpp b/regression-tests/test-results/pure2-concept-definition.cpp index b4222a5da..3e47e41f4 100644 --- a/regression-tests/test-results/pure2-concept-definition.cpp +++ b/regression-tests/test-results/pure2-concept-definition.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-contracts.cpp b/regression-tests/test-results/pure2-contracts.cpp index 43a9f7bfe..02240ec56 100644 --- a/regression-tests/test-results/pure2-contracts.cpp +++ b/regression-tests/test-results/pure2-contracts.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-default-arguments.cpp b/regression-tests/test-results/pure2-default-arguments.cpp index e7a5471f8..b95c5e60f 100644 --- a/regression-tests/test-results/pure2-default-arguments.cpp +++ b/regression-tests/test-results/pure2-default-arguments.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== @@ -21,7 +21,7 @@ template class myclass; // Older compilers will emit failures for this test case. #line 5 "pure2-default-arguments.cpp2" auto my_function_name( - char const* fn = CPP2_UFCS_NONLOCAL(function_name)(std::source_location::current()) + cpp2::impl::in fn = CPP2_UFCS_NONLOCAL(function_name)(std::source_location::current()) ) -> void; #line 12 "pure2-default-arguments.cpp2" @@ -58,7 +58,7 @@ auto main(int const argc_, char** argv_) -> int; #line 5 "pure2-default-arguments.cpp2" auto my_function_name( - char const* fn + cpp2::impl::in fn ) -> void { std::cout << "calling: " + cpp2::to_string(fn) + "\n"; diff --git a/regression-tests/test-results/pure2-defaulted-comparisons-and-final-types.cpp b/regression-tests/test-results/pure2-defaulted-comparisons-and-final-types.cpp index bd5c9275a..f5c443d21 100644 --- a/regression-tests/test-results/pure2-defaulted-comparisons-and-final-types.cpp +++ b/regression-tests/test-results/pure2-defaulted-comparisons-and-final-types.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== @@ -21,7 +21,7 @@ class widget final { private: int v; - public: explicit widget(cpp2::impl::in value); + public: widget(cpp2::impl::in value); #line 6 "pure2-defaulted-comparisons-and-final-types.cpp2" public: auto operator=(cpp2::impl::in value) -> widget& ; diff --git a/regression-tests/test-results/pure2-enum.cpp b/regression-tests/test-results/pure2-enum.cpp index ca0a940ad..f1dd40d46 100644 --- a/regression-tests/test-results/pure2-enum.cpp +++ b/regression-tests/test-results/pure2-enum.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== @@ -161,12 +161,12 @@ constexpr auto skat_game::operator=(skat_game&& that) noexcept -> skat_game& { [[nodiscard]] auto skat_game::to_string_impl(cpp2::impl::in prefix) const& -> std::string{ auto pref {cpp2::to_string(prefix)}; -if ((*this) == diamonds) {return pref + "diamonds"; } -if ((*this) == hearts) {return pref + "hearts"; } -if ((*this) == spades) {return pref + "spades"; } -if ((*this) == clubs) {return pref + "clubs"; } -if ((*this) == grand) {return pref + "grand"; } -if ((*this) == null) {return cpp2::move(pref) + "null"; } +if ((*this) == skat_game::diamonds) {return pref + "diamonds"; } +if ((*this) == skat_game::hearts) {return pref + "hearts"; } +if ((*this) == skat_game::spades) {return pref + "spades"; } +if ((*this) == skat_game::clubs) {return pref + "clubs"; } +if ((*this) == skat_game::grand) {return pref + "grand"; } +if ((*this) == skat_game::null) {return cpp2::move(pref) + "null"; } return "invalid skat_game value"; } @@ -175,16 +175,16 @@ return "invalid skat_game value"; [[nodiscard]] auto skat_game::from_string(cpp2::impl::in s) -> skat_game{ auto x {s}; -if ("diamonds" == x) {return diamonds; } -else {if ("hearts" == x) {return hearts; } -else {if ("spades" == x) {return spades; } -else {if ("clubs" == x) {return clubs; } -else {if ("grand" == x) {return grand; } -else {if ("null" == cpp2::move(x)) {return null; } +if ("diamonds" == x) {return skat_game::diamonds; } +else {if ("hearts" == x) {return skat_game::hearts; } +else {if ("spades" == x) {return skat_game::spades; } +else {if ("clubs" == x) {return skat_game::clubs; } +else {if ("grand" == x) {return skat_game::grand; } +else {if ("null" == cpp2::move(x)) {return skat_game::null; } #line 1 "pure2-enum.cpp2" }}}}} CPP2_UFCS(report_violation)(cpp2::type_safety, CPP2_UFCS(c_str)(("can't convert string '" + cpp2::to_string(s) + "' to enum of type skat_game"))); -return diamonds; +return skat_game::diamonds; } [[nodiscard]] auto skat_game::from_code(cpp2::impl::in s) -> skat_game{ @@ -223,8 +223,8 @@ constexpr auto janus::operator=(janus&& that) noexcept -> janus& { [[nodiscard]] auto janus::to_string_impl(cpp2::impl::in prefix) const& -> std::string{ auto pref {cpp2::to_string(prefix)}; - if ((*this) == past) {return pref + "past"; } - if ((*this) == future) {return cpp2::move(pref) + "future"; } + if ((*this) == janus::past) {return pref + "past"; } + if ((*this) == janus::future) {return cpp2::move(pref) + "future"; } return "invalid janus value"; } @@ -233,12 +233,12 @@ constexpr auto janus::operator=(janus&& that) noexcept -> janus& { [[nodiscard]] auto janus::from_string(cpp2::impl::in s) -> janus{ auto x {s}; - if ("past" == x) {return past; } - else {if ("future" == cpp2::move(x)) {return future; } + if ("past" == x) {return janus::past; } + else {if ("future" == cpp2::move(x)) {return janus::future; } #line 1 "pure2-enum.cpp2" } CPP2_UFCS(report_violation)(cpp2::type_safety, CPP2_UFCS(c_str)(("can't convert string '" + cpp2::to_string(s) + "' to enum of type janus"))); -return past; +return janus::past; } [[nodiscard]] auto janus::from_code(cpp2::impl::in s) -> janus{ @@ -290,10 +290,10 @@ std::string sep {}; if ((*this) == none) {return "(none)"; } auto pref {cpp2::to_string(prefix)}; -if (((*this) & cached) == cached) {ret += sep + pref + "cached";sep = separator;} -if (((*this) & current) == current) {ret += sep + pref + "current";sep = separator;} -if (((*this) & obsolete) == obsolete) {ret += sep + pref + "obsolete";sep = separator;} -if (((*this) & cached_and_current) == cached_and_current) {ret += sep + cpp2::move(pref) + "cached_and_current";sep = separator;} +if (((*this) & file_attributes::cached) == file_attributes::cached) {ret += sep + pref + "cached";sep = separator;} +if (((*this) & file_attributes::current) == file_attributes::current) {ret += sep + pref + "current";sep = separator;} +if (((*this) & file_attributes::obsolete) == file_attributes::obsolete) {ret += sep + pref + "obsolete";sep = separator;} +if (((*this) & file_attributes::cached_and_current) == file_attributes::cached_and_current) {ret += sep + cpp2::move(pref) + "cached_and_current";sep = separator;} return cpp2::move(ret) + ")"; } @@ -304,11 +304,11 @@ return cpp2::move(ret) + ")"; auto ret {none}; do {{ for ( auto const& x : cpp2::string_util::split_string_list(s) ) { -if ("cached" == x) {ret |= cached;} -else {if ("current" == x) {ret |= current;} -else {if ("obsolete" == x) {ret |= obsolete;} -else {if ("cached_and_current" == x) {ret |= cached_and_current;} -else {if ("none" == x) {ret |= none;} +if ("cached" == x) {ret |= file_attributes::cached;} +else {if ("current" == x) {ret |= file_attributes::current;} +else {if ("obsolete" == x) {ret |= file_attributes::obsolete;} +else {if ("cached_and_current" == x) {ret |= file_attributes::cached_and_current;} +else {if ("none" == x) {ret |= file_attributes::none;} else {goto BREAK_outer;} #line 1 "pure2-enum.cpp2" }}}} @@ -320,7 +320,7 @@ return ret; false ); CPP2_UFCS(report_violation)(cpp2::type_safety, CPP2_UFCS(c_str)(("can't convert string '" + cpp2::to_string(s) + "' to flag_enum of type file_attributes"))); -return none; +return file_attributes::none; } [[nodiscard]] auto file_attributes::from_code(cpp2::impl::in s) -> file_attributes{ diff --git a/regression-tests/test-results/pure2-expected-is-as.cpp b/regression-tests/test-results/pure2-expected-is-as.cpp new file mode 100644 index 000000000..be0cb2dd0 --- /dev/null +++ b/regression-tests/test-results/pure2-expected-is-as.cpp @@ -0,0 +1,117 @@ + +#define CPP2_INCLUDE_STD Yes + +//=== Cpp2 type declarations ==================================================== + + +#include "cpp2util.h" + +#line 1 "pure2-expected-is-as.cpp2" + + +//=== Cpp2 type definitions and function declarations =========================== + +#line 1 "pure2-expected-is-as.cpp2" +// `std::expected` requires C++23 so a dedicated test file is needed +// since only MSVC supports it at time of writing, and there's no #ifdef +// or `static if` support in Cpp2 (yet?). + +#line 5 "pure2-expected-is-as.cpp2" +[[nodiscard]] auto main() -> int; + +#line 75 "pure2-expected-is-as.cpp2" +auto test_inspect(auto const& x, auto const& msg) -> void; + +//=== Cpp2 function definitions ================================================= + +#line 1 "pure2-expected-is-as.cpp2" + +#line 5 "pure2-expected-is-as.cpp2" +[[nodiscard]] auto main() -> int{ + + std::expected ex1 {123}; + std::expected ex2 {std::unexpected(-1)}; + std::expected ex3 {"Expect the unexpected"}; + + if (cpp2::impl::is(ex1)) { + std::cout << "ex1 is int\n"; + } + + if (cpp2::impl::is(ex1)) { + std::cout << "BUG - ex1 is not a bool\n"; + return -1; + } + + if (cpp2::impl::is(ex1)) { + std::cout << "BUG - ex1 is not 'empty'\n"; + return -1; + } + + if (cpp2::impl::is>(ex1)) { + std::cout << "BUG - ex1 is not unexpected\n"; + return -1; + } + + if (cpp2::impl::is(ex1, 123)) { + std::cout << "ex1 is 123\n"; + } + + if (cpp2::impl::is(ex1, 100)) { + std::cout << "BUG - ex1's value is not 100\n"; + return -1; + } + + auto val1 {cpp2::impl::as_(ex1)}; + std::cout << "ex1 as int = " << cpp2::move(val1) << "\n"; + + if (cpp2::impl::is(ex2)) { + std::cout << "BUG - ex2 is not an int\n"; + return -1; + } + + if (cpp2::impl::is(ex2)) { + std::cout << "BUG - ex2 is not a bool\n"; + return -1; + } + + if (cpp2::impl::is(ex2, 123)) { + std::cout << "BUG - ex2 does not have a value\n"; + return -1; + } + + if (cpp2::impl::is>(ex2)) { + std::cout << "ex2 is unexpected and error is: " << CPP2_UFCS(error)(ex2) << "\n"; + } + + if (cpp2::impl::is(ex2)) { + std::cout << "ex2 is 'empty' aka unexpected and error is: " << CPP2_UFCS(error)(ex2) << "\n"; + } + + auto ex2_err {cpp2::impl::as_>(ex2)}; + std::cout << "ex2 as std::unexpected and error = " << CPP2_UFCS(error)(cpp2::move(ex2_err)) << "\n"; + + test_inspect(cpp2::move(ex1), "expected with value"); + test_inspect(cpp2::move(ex2), "expected with unexpected"); + test_inspect(cpp2::move(ex3), "expected with value"); + + return 0; +} + +#line 75 "pure2-expected-is-as.cpp2" +auto test_inspect(auto const& x, auto const& msg) -> void{ + + auto unwrap {[](cpp2::impl::in> unexp) -> auto{ + return CPP2_UFCS(error)(unexp); + }}; + + std::cout + << "\n" << msg << "\n ..." + << [&] () -> std::string { auto&& _expr = x; + if (cpp2::impl::is(_expr)) { if constexpr( requires{"integer " + std::to_string(cpp2::impl::as(x));} ) if constexpr( std::is_convertible_v(x)))),std::string> ) return "integer " + std::to_string(cpp2::impl::as(x)); else return std::string{}; else return std::string{}; } + else if (cpp2::impl::is>(_expr)) { if constexpr( requires{"unexpected " + std::to_string(cpp2::move(unwrap)(cpp2::impl::as>(x)));} ) if constexpr( std::is_convertible_v " + std::to_string(cpp2::move(unwrap)(cpp2::impl::as>(x))))),std::string> ) return "unexpected " + std::to_string(cpp2::move(unwrap)(cpp2::impl::as>(x))); else return std::string{}; else return std::string{}; } + else if (cpp2::impl::is(_expr)) { if constexpr( requires{"string " + cpp2::impl::as(x);} ) if constexpr( std::is_convertible_v(x))),std::string> ) return "string " + cpp2::impl::as(x); else return std::string{}; else return std::string{}; } + else return " no match"; } + () + << "\n"; +} + diff --git a/regression-tests/test-results/pure2-expected-is-as.cpp2.output b/regression-tests/test-results/pure2-expected-is-as.cpp2.output new file mode 100644 index 000000000..a63d2c2a1 --- /dev/null +++ b/regression-tests/test-results/pure2-expected-is-as.cpp2.output @@ -0,0 +1,2 @@ +pure2-expected-is-as.cpp2... ok (all Cpp2, passes safety checks) + diff --git a/regression-tests/test-results/pure2-for-loop-range-with-lambda.cpp b/regression-tests/test-results/pure2-for-loop-range-with-lambda.cpp index 1a1256651..c3dcb10a3 100644 --- a/regression-tests/test-results/pure2-for-loop-range-with-lambda.cpp +++ b/regression-tests/test-results/pure2-for-loop-range-with-lambda.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-forward-return.cpp b/regression-tests/test-results/pure2-forward-return.cpp index fdab13b7e..5923895b6 100644 --- a/regression-tests/test-results/pure2-forward-return.cpp +++ b/regression-tests/test-results/pure2-forward-return.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-function-body-reflection.cpp b/regression-tests/test-results/pure2-function-body-reflection.cpp new file mode 100644 index 000000000..0fc93b2e5 --- /dev/null +++ b/regression-tests/test-results/pure2-function-body-reflection.cpp @@ -0,0 +1,196 @@ + +#define CPP2_INCLUDE_STD Yes + +//=== Cpp2 type declarations ==================================================== + + +#include "cpp2util.h" + +#line 1 "pure2-function-body-reflection.cpp2" + +#line 2 "pure2-function-body-reflection.cpp2" +namespace ns { + +#line 7 "pure2-function-body-reflection.cpp2" +class test; + +#line 88 "pure2-function-body-reflection.cpp2" +} + + +//=== Cpp2 type definitions and function declarations =========================== + +#line 1 "pure2-function-body-reflection.cpp2" + +#line 2 "pure2-function-body-reflection.cpp2" +namespace ns { + +// This function will be visible as a namespace member while reflecting on ns::test +auto sample_function_before_type() -> void; +[[nodiscard]] auto add_1(auto const& x) -> decltype(auto); + + +#line 7 "pure2-function-body-reflection.cpp2" +class test + { + public: [[nodiscard]] static auto one_liner(cpp2::impl::in a, cpp2::impl::in b, cpp2::impl::in c) -> decltype(auto); +struct return_list_ret { double r; float s; std::string t; }; + + + +#line 11 "pure2-function-body-reflection.cpp2" + public: [[nodiscard]] static auto return_list() -> return_list_ret; +using branches_ret = double; + + +#line 19 "pure2-function-body-reflection.cpp2" + public: [[nodiscard]] static auto branches(cpp2::impl::in a, cpp2::impl::in b, cpp2::impl::in c) -> branches_ret; + +#line 34 "pure2-function-body-reflection.cpp2" + public: static auto binary_ops(double& a, cpp2::impl::in b, cpp2::impl::in c) -> void; + +#line 43 "pure2-function-body-reflection.cpp2" + public: [[nodiscard]] static auto prefix() -> int; + +#line 55 "pure2-function-body-reflection.cpp2" + public: static auto postfix(double& a) -> void; + +#line 61 "pure2-function-body-reflection.cpp2" + public: [[nodiscard]] static auto qualified_ids() -> auto; + +#line 67 "pure2-function-body-reflection.cpp2" + public: static auto loops() -> void; + public: test() = default; + public: test(test const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(test const&) -> void = delete; + + +#line 83 "pure2-function-body-reflection.cpp2" +}; + +// This function will not be visible as a namespace member while reflecting on ns::test +auto sample_function_after_type() -> void; + +} + +auto main() -> int; + +//=== Cpp2 function definitions ================================================= + +#line 1 "pure2-function-body-reflection.cpp2" + +#line 2 "pure2-function-body-reflection.cpp2" +namespace ns { + +#line 5 "pure2-function-body-reflection.cpp2" +auto sample_function_before_type() -> void{} + +[[nodiscard]] auto add_1(auto const& x) -> decltype(auto) { return x + 1; } + +#line 9 "pure2-function-body-reflection.cpp2" + [[nodiscard]] auto test::one_liner(cpp2::impl::in a, cpp2::impl::in b, cpp2::impl::in c) -> decltype(auto) { return (a + c) * b; } + +#line 11 "pure2-function-body-reflection.cpp2" + [[nodiscard]] auto test::return_list() -> return_list_ret + + { + cpp2::impl::deferred_init r; + cpp2::impl::deferred_init s; + cpp2::impl::deferred_init t; +#line 14 "pure2-function-body-reflection.cpp2" + r.construct(42.0); + s.construct(2.71828f); + t.construct("e times pi"); + return { std::move(r.value()), std::move(s.value()), std::move(t.value()) }; } + +#line 19 "pure2-function-body-reflection.cpp2" + [[nodiscard]] auto test::branches(cpp2::impl::in a, cpp2::impl::in b, cpp2::impl::in c) -> branches_ret + + { + double r {3.14159}; +#line 22 "pure2-function-body-reflection.cpp2" + if (true) { + r = r + a; + } + + if (cpp2::impl::cmp_greater(a * b,c)) { + r += sin(b); + } + else { + r = c; + }return r; + } + +#line 34 "pure2-function-body-reflection.cpp2" + auto test::binary_ops(double& a, cpp2::impl::in b, cpp2::impl::in c) -> void + { + a -= b * c + (1 << 2); + bool test {[_0 = a, _1 = b, _2 = c]{ return cpp2::impl::cmp_less_eq(_0,_1) && cpp2::impl::cmp_less(_1,_2); }() && true || false}; + auto x {1 & 2}; + auto y {3 ^ 4}; + auto z {5 | 6}; + } + +#line 43 "pure2-function-body-reflection.cpp2" + [[nodiscard]] auto test::prefix() -> int + { + auto a {-1}; + auto b {+2}; +{ +auto const& local{a - b}; + +#line 49 "pure2-function-body-reflection.cpp2" + if (!(true)) { + return local; + } +} +#line 52 "pure2-function-body-reflection.cpp2" + return cpp2::move(a) + cpp2::move(b); + } + +#line 55 "pure2-function-body-reflection.cpp2" + auto test::postfix(double& a) -> void + { + auto ptr {&a}; + --++*cpp2::impl::assert_not_null(cpp2::move(ptr)); + } + +#line 61 "pure2-function-body-reflection.cpp2" + [[nodiscard]] auto test::qualified_ids() -> auto + { + std::vector v {1, 2, 3}; + return CPP2_UFCS(ssize)(cpp2::move(v)); + } + +#line 67 "pure2-function-body-reflection.cpp2" + auto test::loops() -> void + { + std::vector v {1, 2, 3}; +{ +auto index{1}; + +#line 72 "pure2-function-body-reflection.cpp2" + for ( + auto const& value : cpp2::move(v) ) + { + std::cout << "" + cpp2::to_string(index) + " " + cpp2::to_string(value) + "\n"; + } +} + +#line 78 "pure2-function-body-reflection.cpp2" + auto i {0}; + for( ; cpp2::impl::cmp_less(i,3); i += 1 ) {std::cout << i << "\n"; } + + do {std::cout << "plugh\n"; } while ( false); + } + +#line 86 "pure2-function-body-reflection.cpp2" +auto sample_function_after_type() -> void{} + +} + +#line 90 "pure2-function-body-reflection.cpp2" +auto main() -> int{ + std::cout << "calling generated function ns::add_1... ns::add_1(42) returned " + cpp2::to_string(ns::add_1(42)) + "\n"; +} + diff --git a/regression-tests/test-results/pure2-function-body-reflection.cpp2.output b/regression-tests/test-results/pure2-function-body-reflection.cpp2.output new file mode 100644 index 000000000..70ed9e03c --- /dev/null +++ b/regression-tests/test-results/pure2-function-body-reflection.cpp2.output @@ -0,0 +1,433 @@ +pure2-function-body-reflection.cpp2...Type: test + is a member of namespace ns which contains the following names: + sample_function_before_type + Declaration: one_liner + Function: one_liner + Parameters: + parameter: + passing style: in + declaration: + Object: name a, type double + parameter: + passing style: in + declaration: + Object: name b, type double + parameter: + passing style: in + declaration: + Object: name c, type double + Body: + multiplicative + term: + ( + additive + term: + a + op: + + term: + c + ) + op: * + term: + b + Declaration: return_list + Function: return_list + Returns: + parameter: + passing style: out + declaration: + Object: name r, type double + parameter: + passing style: out + declaration: + Object: name s, type float + parameter: + passing style: out + declaration: + Object: name t, type std::string + Body: + compound statement + assignment + term: + r + op: = + term: + 42.0 + assignment + term: + s + op: = + term: + 2.71828f + assignment + term: + t + op: = + term: + "e times pi" + return statement + Declaration: branches + Function: branches + Parameters: + parameter: + passing style: in + declaration: + Object: name a, type double + parameter: + passing style: in + declaration: + Object: name b, type double + parameter: + passing style: in + declaration: + Object: name c, type double + Returns: + parameter: + passing style: out + declaration: + Object: name r, type double + Initializer: + 3.14159 + Body: + compound statement + if statement + condition: + true + true branch: + compound statement + assignment + term: + r + op: = + term: + additive + term: + r + op: + + term: + a + false branch: + compound statement (empty) + if statement + condition: + relational + term: + multiplicative + term: + a + op: * + term: + b + op: > + term: + c + true branch: + compound statement + assignment + term: + r + op: += + term: + postfix expression + expression + sin + op: ( + ( + b + ) + false branch: + compound statement + assignment + term: + r + op: = + term: + c + return statement + Declaration: binary_ops + Function: binary_ops + Parameters: + parameter: + passing style: inout + declaration: + Object: name a, type double + parameter: + passing style: in + declaration: + Object: name b, type double + parameter: + passing style: in + declaration: + Object: name c, type double + Body: + compound statement + assignment + term: + a + op: -= + term: + additive + term: + multiplicative + term: + b + op: * + term: + c + op: + + term: + ( + shift + term: + 1 + op: << + term: + 2 + ) + Declaration: test + Object: name test, type bool + Initializer: + logical-or + term: + logical-and + term: + relational + term: + a + op: <= + term: + b + op: < + term: + c + op: && + term: + true + op: || + term: + false + Declaration: x + Object: name x, type _ + Initializer: + bit-and + term: + 1 + op: & + term: + 2 + Declaration: y + Object: name y, type _ + Initializer: + bit-xor + term: + 3 + op: ^ + term: + 4 + Declaration: z + Object: name z, type _ + Initializer: + bit-or + term: + 5 + op: | + term: + 6 + Declaration: prefix + Function: prefix + Body: + compound statement + Declaration: a + Object: name a, type _ + Initializer: + prefix expression + op: - + expression + 1 + Declaration: b + Object: name b, type _ + Initializer: + prefix expression + op: + + expression + 2 + statement parameters: + parameter: + passing style: in + declaration: + Object: name local, type _ + Initializer: + additive + term: + a + op: - + term: + b + if statement + condition: + prefix expression + op: ! + expression + true + true branch: + compound statement + return statement + expression + local + false branch: + compound statement (empty) + return statement + expression + additive + term: + a + op: + + term: + b + Declaration: postfix + Function: postfix + Parameters: + parameter: + passing style: inout + declaration: + Object: name a, type double + Body: + compound statement + Declaration: ptr + Object: name ptr, type _ + Initializer: + postfix expression + expression + a + op: & + postfix expression + expression + ptr + op: * + op: ++ + op: -- + Declaration: qualified_ids + Function: qualified_ids + Body: + compound statement + Declaration: v + Object: name v, type std::vector + Initializer: + ( + 1 + 2 + 3 + ) + return statement + expression + postfix expression + expression + v + op: . + ssize + op: ( + () + Declaration: loops + Function: loops + Body: + compound statement + Declaration: v + Object: name v, type std::vector + Initializer: + ( + 1 + 2 + 3 + ) + statement parameters: + parameter: + passing style: copy + declaration: + Object: name index, type _ + Initializer: + 1 + for loop: + range: + v + parameter: + parameter: + passing style: in + declaration: + Object: name value, type _ + body: + compound statement + shift + term: + std::cout + op: << + term: + additive + term: + "" + op: + + term: + postfix expression + expression + cpp2::to_string + op: ( + ( + index + ) + op: + + term: + " " + op: + + term: + postfix expression + expression + cpp2::to_string + op: ( + ( + value + ) + op: + + term: + "\n" + Declaration: i + Object: name i, type _ + Initializer: + 0 + while loop: + condition: + relational + term: + i + op: < + term: + 3 + body: + compound statement + shift + term: + std::cout + op: << + term: + i + op: << + term: + "\n" + next expression: + assignment + term: + i + op: += + term: + 1 + do loop: + condition: + false + body: + compound statement + shift + term: + std::cout + op: << + term: + "plugh\n" + ok (all Cpp2, passes safety checks) + diff --git a/regression-tests/test-results/pure2-function-multiple-forward-arguments.cpp b/regression-tests/test-results/pure2-function-multiple-forward-arguments.cpp index 6f87a1468..16843d01a 100644 --- a/regression-tests/test-results/pure2-function-multiple-forward-arguments.cpp +++ b/regression-tests/test-results/pure2-function-multiple-forward-arguments.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-function-single-expression-body-default-return.cpp b/regression-tests/test-results/pure2-function-single-expression-body-default-return.cpp index edf5d7e32..b02ad7218 100644 --- a/regression-tests/test-results/pure2-function-single-expression-body-default-return.cpp +++ b/regression-tests/test-results/pure2-function-single-expression-body-default-return.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-function-typeids.cpp b/regression-tests/test-results/pure2-function-typeids.cpp index 4ebe848aa..fb07eb976 100644 --- a/regression-tests/test-results/pure2-function-typeids.cpp +++ b/regression-tests/test-results/pure2-function-typeids.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-hashable.cpp b/regression-tests/test-results/pure2-hashable.cpp index 008d74f8a..d5f974789 100644 --- a/regression-tests/test-results/pure2-hashable.cpp +++ b/regression-tests/test-results/pure2-hashable.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-hello.cpp b/regression-tests/test-results/pure2-hello.cpp index 0053377b5..ef15af4ee 100644 --- a/regression-tests/test-results/pure2-hello.cpp +++ b/regression-tests/test-results/pure2-hello.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-initialization-safety-with-else-if.cpp b/regression-tests/test-results/pure2-initialization-safety-with-else-if.cpp index 1e22c8840..b612de40e 100644 --- a/regression-tests/test-results/pure2-initialization-safety-with-else-if.cpp +++ b/regression-tests/test-results/pure2-initialization-safety-with-else-if.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== @@ -8,13 +8,29 @@ #line 1 "pure2-initialization-safety-with-else-if.cpp2" +#line 27 "pure2-initialization-safety-with-else-if.cpp2" +class ad_test; + //=== Cpp2 type definitions and function declarations =========================== #line 1 "pure2-initialization-safety-with-else-if.cpp2" auto main(int const argc_, char** argv_) -> int; +#line 27 "pure2-initialization-safety-with-else-if.cpp2" +class ad_test { +using intermediate_default_no_init_ret = double; + #line 28 "pure2-initialization-safety-with-else-if.cpp2" + public: [[nodiscard]] static auto intermediate_default_no_init(cpp2::impl::in x, cpp2::impl::in y) -> intermediate_default_no_init_ret; + public: ad_test() = default; + public: ad_test(ad_test const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(ad_test const&) -> void = delete; + + +#line 34 "pure2-initialization-safety-with-else-if.cpp2" +}; + auto ok() -> void; //=== Cpp2 function definitions ================================================= @@ -49,6 +65,16 @@ auto main(int const argc_, char** argv_) -> int{ } #line 28 "pure2-initialization-safety-with-else-if.cpp2" + [[nodiscard]] auto ad_test::intermediate_default_no_init(cpp2::impl::in x, cpp2::impl::in y) -> intermediate_default_no_init_ret{ + cpp2::impl::deferred_init r; +#line 29 "pure2-initialization-safety-with-else-if.cpp2" + cpp2::impl::deferred_init t; + t.construct(x + y); + + r.construct(cpp2::move(t.value()));// OK, after t but it's a return value + return std::move(r.value()); } + +#line 36 "pure2-initialization-safety-with-else-if.cpp2" auto ok() -> void{ cpp2::impl::deferred_init i; if (true) { diff --git a/regression-tests/test-results/pure2-inspect-expression-in-generic-function-multiple-types.cpp b/regression-tests/test-results/pure2-inspect-expression-in-generic-function-multiple-types.cpp index 5f4ae295a..0c564c2c5 100644 --- a/regression-tests/test-results/pure2-inspect-expression-in-generic-function-multiple-types.cpp +++ b/regression-tests/test-results/pure2-inspect-expression-in-generic-function-multiple-types.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-inspect-expression-with-as-in-generic-function.cpp b/regression-tests/test-results/pure2-inspect-expression-with-as-in-generic-function.cpp index 271d6136c..350876930 100644 --- a/regression-tests/test-results/pure2-inspect-expression-with-as-in-generic-function.cpp +++ b/regression-tests/test-results/pure2-inspect-expression-with-as-in-generic-function.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-inspect-fallback-with-variant-any-optional.cpp b/regression-tests/test-results/pure2-inspect-fallback-with-variant-any-optional.cpp index ec770fa2f..9bc4a384c 100644 --- a/regression-tests/test-results/pure2-inspect-fallback-with-variant-any-optional.cpp +++ b/regression-tests/test-results/pure2-inspect-fallback-with-variant-any-optional.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-inspect-generic-void-empty-with-variant-any-optional.cpp b/regression-tests/test-results/pure2-inspect-generic-void-empty-with-variant-any-optional.cpp index b20fb2758..b57e6acde 100644 --- a/regression-tests/test-results/pure2-inspect-generic-void-empty-with-variant-any-optional.cpp +++ b/regression-tests/test-results/pure2-inspect-generic-void-empty-with-variant-any-optional.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-interpolation.cpp b/regression-tests/test-results/pure2-interpolation.cpp index 43d8237db..26f755477 100644 --- a/regression-tests/test-results/pure2-interpolation.cpp +++ b/regression-tests/test-results/pure2-interpolation.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-intro-example-hello-2022.cpp b/regression-tests/test-results/pure2-intro-example-hello-2022.cpp index ff3c60857..54e0e7595 100644 --- a/regression-tests/test-results/pure2-intro-example-hello-2022.cpp +++ b/regression-tests/test-results/pure2-intro-example-hello-2022.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-intro-example-three-loops.cpp b/regression-tests/test-results/pure2-intro-example-three-loops.cpp index 73c390f05..80fd135bc 100644 --- a/regression-tests/test-results/pure2-intro-example-three-loops.cpp +++ b/regression-tests/test-results/pure2-intro-example-three-loops.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-is-with-free-functions-predicate.cpp b/regression-tests/test-results/pure2-is-with-free-functions-predicate.cpp index f5c421830..d51922876 100644 --- a/regression-tests/test-results/pure2-is-with-free-functions-predicate.cpp +++ b/regression-tests/test-results/pure2-is-with-free-functions-predicate.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-is-with-polymorphic-types.cpp b/regression-tests/test-results/pure2-is-with-polymorphic-types.cpp index 25769c3bb..81b1b3c91 100644 --- a/regression-tests/test-results/pure2-is-with-polymorphic-types.cpp +++ b/regression-tests/test-results/pure2-is-with-polymorphic-types.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-is-with-unnamed-predicates.cpp b/regression-tests/test-results/pure2-is-with-unnamed-predicates.cpp index 4d8da75e4..63a5429b6 100644 --- a/regression-tests/test-results/pure2-is-with-unnamed-predicates.cpp +++ b/regression-tests/test-results/pure2-is-with-unnamed-predicates.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-is-with-variable-and-value.cpp b/regression-tests/test-results/pure2-is-with-variable-and-value.cpp index d19439ca0..a3cad94f4 100644 --- a/regression-tests/test-results/pure2-is-with-variable-and-value.cpp +++ b/regression-tests/test-results/pure2-is-with-variable-and-value.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-last-use.cpp b/regression-tests/test-results/pure2-last-use.cpp index 992c82e9c..f08a06d70 100644 --- a/regression-tests/test-results/pure2-last-use.cpp +++ b/regression-tests/test-results/pure2-last-use.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== @@ -156,8 +156,6 @@ class issue_857 { private: std::unique_ptr a; private: std::unique_ptr b; public: issue_857(issue_857&& that) noexcept; -#line 172 "pure2-last-use.cpp2" - public: auto operator=(issue_857&& that) noexcept -> issue_857& ; // operator=: (move this) = { // f_inout(a); // error, can't pass rvalue to inout param // f_inout(this.b); // error, can't pass rvalue to inout param @@ -287,7 +285,7 @@ class issue_857_4 { public: std::move_only_function mf; public: std::move_only_function unnamed_param_1)> mg; public: issue_857_4(auto&& f_, auto&& g_, auto&& mf_, auto&& mg_) -CPP2_REQUIRES_ (std::is_convertible_v>&> && std::is_convertible_v in_)>>&> && std::is_convertible_v>&> && std::is_convertible_v in_)>>&>) ; +CPP2_REQUIRES_ (std::is_convertible_v>&> && std::is_convertible_v unnamed_param_1)>>&> && std::is_convertible_v>&> && std::is_convertible_v unnamed_param_1)>>&>) ; // h0: (move this) = _ = mf(); // h1: (move this) = _ = this.mf(); @@ -397,7 +395,7 @@ class issue_857_9: public issue_857_8 { }; class issue_869_0 { - public: explicit issue_869_0([[maybe_unused]] std::unique_ptr&& unnamed_param_2); + public: issue_869_0([[maybe_unused]] std::unique_ptr&& unnamed_param_2); #line 366 "pure2-last-use.cpp2" public: auto operator=([[maybe_unused]] std::unique_ptr&& unnamed_param_2) -> issue_869_0& ; public: [[nodiscard]] auto operator<=>([[maybe_unused]] issue_869_0 const& that) const& -> std::strong_ordering = default; @@ -724,11 +722,6 @@ auto issue_850() -> void{ issue_857::issue_857(issue_857&& that) noexcept : a{ std::move(that).a } , b{ std::move(that).b }{} -#line 172 "pure2-last-use.cpp2" - auto issue_857::operator=(issue_857&& that) noexcept -> issue_857& { - a = std::move(that).a; - b = std::move(that).b; - return *this; } #line 181 "pure2-last-use.cpp2" [[nodiscard]] auto issue_857::h() & -> decltype(auto) { return f_inout(a); } @@ -772,11 +765,11 @@ requires (std::is_convertible_v>&> && std::is_convertible_v in_)>>&> && std::is_convertible_v>&> && std::is_convertible_v in_)>>&>) - : f{ CPP2_FORWARD(f_) } - , g{ CPP2_FORWARD(g_) } - , mf{ CPP2_FORWARD(mf_) } - , mg{ CPP2_FORWARD(mg_) }{} +requires (std::is_convertible_v>&> && std::is_convertible_v unnamed_param_1)>>&> && std::is_convertible_v>&> && std::is_convertible_v unnamed_param_1)>>&>) + : f{ CPP2_FORWARD(f_) } + , g{ CPP2_FORWARD(g_) } + , mf{ CPP2_FORWARD(mf_) } + , mg{ CPP2_FORWARD(mg_) }{} #line 267 "pure2-last-use.cpp2" // OK: The implicit `this` is moved, not `i`. diff --git a/regression-tests/test-results/pure2-look-up-parameter-across-unnamed-function.cpp b/regression-tests/test-results/pure2-look-up-parameter-across-unnamed-function.cpp index e25c25173..a2d442297 100644 --- a/regression-tests/test-results/pure2-look-up-parameter-across-unnamed-function.cpp +++ b/regression-tests/test-results/pure2-look-up-parameter-across-unnamed-function.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-main-args.cpp b/regression-tests/test-results/pure2-main-args.cpp index c4bee2076..06fb1e170 100644 --- a/regression-tests/test-results/pure2-main-args.cpp +++ b/regression-tests/test-results/pure2-main-args.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-more-wildcards.cpp b/regression-tests/test-results/pure2-more-wildcards.cpp index 4d01aba11..4d823038c 100644 --- a/regression-tests/test-results/pure2-more-wildcards.cpp +++ b/regression-tests/test-results/pure2-more-wildcards.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-print.cpp b/regression-tests/test-results/pure2-print.cpp index 47725b573..dd93d0504 100644 --- a/regression-tests/test-results/pure2-print.cpp +++ b/regression-tests/test-results/pure2-print.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== @@ -45,6 +45,12 @@ struct values_ret { int offset; std::string name; }; public: explicit mytype(); public: mytype([[maybe_unused]] mytype const& that); +#line 63 "pure2-print.cpp2" + public: auto operator=([[maybe_unused]] mytype const& that) -> mytype& ; +#line 63 "pure2-print.cpp2" + public: mytype([[maybe_unused]] mytype&& that) noexcept; +#line 63 "pure2-print.cpp2" + public: auto operator=([[maybe_unused]] mytype&& that) noexcept -> mytype& ; public: mytype([[maybe_unused]] cpp2::impl::in unnamed_param_2); @@ -73,12 +79,16 @@ CPP2_REQUIRES_ (cpp2::impl::cmp_greater_eq(sizeof...(Args),0u)) ; #line 103 "pure2-print.cpp2" public: static auto y([[maybe_unused]] cpp2::impl::in unnamed_param_1) -> void; + + public: static auto ff([[maybe_unused]] cpp2::impl::in unnamed_param_1) -> void; + + public: static auto try_catch() -> void; public: outer() = default; public: outer(outer const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(outer const&) -> void = delete; -#line 105 "pure2-print.cpp2" +#line 122 "pure2-print.cpp2" }; auto main() -> int; @@ -108,7 +118,7 @@ requires (true) inline CPP2_CONSTEXPR T outer::object_alias{ 42 }; if (cpp2::impl::cmp_less(*cpp2::impl::assert_not_null(p),0)) { ret = -*cpp2::impl::assert_not_null(cpp2::move(p)); } - ret += strlen(s) - 10 + CPP2_UFCS(strlen)(s) * (16 / CPP2_ASSERT_NOT_ZERO(CPP2_TYPEOF(16),(3 & 2))) % 3; + ret += strlen(s) - 10 + CPP2_UFCS(strlen)(s) * (16 / CPP2_ASSERT_NOT_ZERO(CPP2_TYPEOF(16),(3 & 2))) % CPP2_ASSERT_NOT_ZERO_LITERAL(CPP2_TYPEOF((16 / CPP2_ASSERT_NOT_ZERO(CPP2_TYPEOF(16),(3 & 2)))),3); map m {}; CPP2_ASSERT_IN_BOUNDS_LITERAL(m, 0) = cpp2::impl::as_("har"); @@ -160,6 +170,14 @@ requires (true) inline CPP2_CONSTEXPR T outer::object_alias{ 42 }; #line 63 "pure2-print.cpp2" outer::mytype::mytype([[maybe_unused]] mytype const& that){} +#line 63 "pure2-print.cpp2" + auto outer::mytype::operator=([[maybe_unused]] mytype const& that) -> mytype& { + return *this; } +#line 63 "pure2-print.cpp2" + outer::mytype::mytype([[maybe_unused]] mytype&& that) noexcept{} +#line 63 "pure2-print.cpp2" + auto outer::mytype::operator=([[maybe_unused]] mytype&& that) noexcept -> mytype& { + return *this; } #line 65 "pure2-print.cpp2" outer::mytype::mytype([[maybe_unused]] cpp2::impl::in unnamed_param_2){} @@ -205,7 +223,26 @@ requires (cpp2::impl::cmp_greater_eq(sizeof...(Args),0u)) { #line 103 "pure2-print.cpp2" auto outer::y([[maybe_unused]] cpp2::impl::in unnamed_param_1) -> void{} +#line 105 "pure2-print.cpp2" + auto outer::ff([[maybe_unused]] cpp2::impl::in unnamed_param_1) -> void{} + #line 107 "pure2-print.cpp2" + auto outer::try_catch() -> void + { + auto fptr {&ff}; + try { + cpp2::move(fptr)(-666); + } catch (cpp2::impl::in i) { + std::cout << "oh look, a thrown int: " << i << std::endl; + } + try { + ff(-42); + } catch (...) { + std::cout << "oh look, another exception" << std::endl; + } + } + +#line 124 "pure2-print.cpp2" auto main() -> int{ outer::test(); } diff --git a/regression-tests/test-results/pure2-print.cpp2.output b/regression-tests/test-results/pure2-print.cpp2.output index 2d4920924..0a6042f4f 100644 --- a/regression-tests/test-results/pure2-print.cpp2.output +++ b/regression-tests/test-results/pure2-print.cpp2.output @@ -64,16 +64,13 @@ outer:/* @print */ type = { a(); } + else if !m.empty() + { + b(); + } else { - if !m.empty() - { - b(); - } - else - { - c(); - } + c(); } assert( true ); return :() -> move std::string = (s + m[0])$;(); @@ -150,6 +147,29 @@ outer:/* @print */ type = y:(in _: type_of(0), ) = { } + + ff:(in _: int, ) = + { + } + + try_catch:() = + { + fptr: _ = ff&; + try { + fptr(-666); + } + catch (in i: int ) + { + std::cout << "oh look, a thrown int: " << i << std::endl; + } + try { + ff(-42); + } + catch (in _: _ ) + { + std::cout << "oh look, another exception" << std::endl; + } + } } ok (all Cpp2, passes safety checks) diff --git a/regression-tests/test-results/pure2-range-operators.cpp b/regression-tests/test-results/pure2-range-operators.cpp index 53ef35a57..2df27e425 100644 --- a/regression-tests/test-results/pure2-range-operators.cpp +++ b/regression-tests/test-results/pure2-range-operators.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-raw-string-literal-and-interpolation.cpp b/regression-tests/test-results/pure2-raw-string-literal-and-interpolation.cpp index 63ce8c8d4..097052cdc 100644 --- a/regression-tests/test-results/pure2-raw-string-literal-and-interpolation.cpp +++ b/regression-tests/test-results/pure2-raw-string-literal-and-interpolation.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-regex-general.cpp b/regression-tests/test-results/pure2-regex-general.cpp new file mode 100644 index 000000000..81dac4196 --- /dev/null +++ b/regression-tests/test-results/pure2-regex-general.cpp @@ -0,0 +1,236 @@ + +#define CPP2_INCLUDE_STD Yes +#include "cpp2regex.h" + +//=== Cpp2 type declarations ==================================================== + + +#include "cpp2util.h" + +#line 1 "pure2-regex-general.cpp2" +class general_regex_test; +#line 2 "pure2-regex-general.cpp2" + + +//=== Cpp2 type definitions and function declarations =========================== + +#line 1 "pure2-regex-general.cpp2" +class general_regex_test { + +#line 4 "pure2-regex-general.cpp2" + public: auto run() const& -> void; + public: template class regex_01_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_01_matcher() = default; + public: regex_01_matcher(regex_01_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_01_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_01 {}; public: template class regex_02_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_02_matcher() = default; + public: regex_02_matcher(regex_02_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_02_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_02 {}; + public: general_regex_test() = default; + public: general_regex_test(general_regex_test const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(general_regex_test const&) -> void = delete; + + +#line 28 "pure2-regex-general.cpp2" +}; + +auto main() -> int; + +//=== Cpp2 function definitions ================================================= + +#line 1 "pure2-regex-general.cpp2" + +#line 4 "pure2-regex-general.cpp2" + auto general_regex_test::run() const& -> void{ + std::cout << "Running tests_01_char_matcher:" << std::endl; + + std::cout << "Not full match fails: " << CPP2_UFCS(match)(regex_01, "AAaa").matched << std::endl; + std::cout << "Full match is ok: " << CPP2_UFCS(match)(regex_01, "AA").matched << std::endl; + std::cout << "Search finds at position 1: " << CPP2_UFCS(group_start)(CPP2_UFCS(search)(regex_01, "aAAaa"), 0) << std::endl; + std::cout << "Search finds at position 3: " << CPP2_UFCS(group_start)(CPP2_UFCS(search)(regex_01, "aaaAAaa"), 0) << std::endl; + + auto count {0}; + auto func {[&, _1 = (&count)](auto const& r) -> bool{ + *cpp2::impl::assert_not_null(_1) += 1; + std::cout << "Find all finds at position: " << CPP2_UFCS(group_start)(r, 0) << std::endl; + return true; + }}; + + std::string str {"aAAaAAaAAa"}; + regex_01.find_all(func, str); + std::cout << "Find all found 3 matched: " << count << std::endl; + + count = 0; + str = "bbaabb"; + regex_02.find_all(cpp2::move(func), cpp2::move(str)); + std::cout << "Find all found 1 match: " << cpp2::move(count) << std::endl; + } + + + + + template template [[nodiscard]] auto general_regex_test::regex_01_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"AA"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto general_regex_test::regex_01_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto general_regex_test::regex_01_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto general_regex_test::regex_01_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto general_regex_test::regex_01_matcher::to_string() -> std::string{return R"(AA)"; } + + + + + + template template [[nodiscard]] auto general_regex_test::regex_02_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto general_regex_test::regex_02_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto general_regex_test::regex_02_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto general_regex_test::regex_02_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto general_regex_test::regex_02_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto general_regex_test::regex_02_matcher::to_string() -> std::string{return R"((?=aa))"; } + + +#line 30 "pure2-regex-general.cpp2" +auto main() -> int{ + CPP2_UFCS(run)(general_regex_test()); +} + diff --git a/regression-tests/test-results/pure2-regex-general.cpp2.output b/regression-tests/test-results/pure2-regex-general.cpp2.output new file mode 100644 index 000000000..73b5e2c6f --- /dev/null +++ b/regression-tests/test-results/pure2-regex-general.cpp2.output @@ -0,0 +1,2 @@ +pure2-regex-general.cpp2... ok (all Cpp2, passes safety checks) + diff --git a/regression-tests/test-results/pure2-regex_01_char_matcher.cpp b/regression-tests/test-results/pure2-regex_01_char_matcher.cpp index 28c6a1c57..6d8e23e67 100644 --- a/regression-tests/test-results/pure2-regex_01_char_matcher.cpp +++ b/regression-tests/test-results/pure2-regex_01_char_matcher.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes #include "cpp2regex.h" //=== Cpp2 type declarations ==================================================== @@ -9,7 +9,7 @@ #line 1 "pure2-regex_01_char_matcher.cpp2" -#line 165 "pure2-regex_01_char_matcher.cpp2" +#line 166 "pure2-regex_01_char_matcher.cpp2" class test_tests_01_char_matcher; @@ -18,37 +18,31 @@ class test_tests_01_char_matcher; #line 1 "pure2-regex_01_char_matcher.cpp2" [[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string; -#line 112 "pure2-regex_01_char_matcher.cpp2" +#line 113 "pure2-regex_01_char_matcher.cpp2" [[nodiscard]] auto sanitize(std::string str) -> std::string; -#line 124 "pure2-regex_01_char_matcher.cpp2" +#line 125 "pure2-regex_01_char_matcher.cpp2" template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, cpp2::impl::in resultExpected) -> void; -#line 165 "pure2-regex_01_char_matcher.cpp2" +#line 166 "pure2-regex_01_char_matcher.cpp2" class test_tests_01_char_matcher { -#line 178 "pure2-regex_01_char_matcher.cpp2" +#line 179 "pure2-regex_01_char_matcher.cpp2" public: auto run() const& -> void; - public: class regex_01_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: template class regex_01_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_01_matcher() = default; public: regex_01_matcher(regex_01_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -56,25 +50,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_01 {}; public: class regex_02_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_01 {}; public: template class regex_02_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_02_matcher() = default; public: regex_02_matcher(regex_02_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -82,25 +70,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_02 {}; public: class regex_03_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_02 {}; public: template class regex_03_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_03_matcher() = default; public: regex_03_matcher(regex_03_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -108,25 +90,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_03 {}; public: class regex_04_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_03 {}; public: template class regex_04_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_04_matcher() = default; public: regex_04_matcher(regex_04_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -134,25 +110,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_04 {}; public: class regex_05_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_04 {}; public: template class regex_05_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_05_matcher() = default; public: regex_05_matcher(regex_05_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -160,25 +130,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_05 {}; public: class regex_06_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_05 {}; public: template class regex_06_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_06_matcher() = default; public: regex_06_matcher(regex_06_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -186,25 +150,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_06 {}; public: class regex_07_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_06 {}; public: template class regex_07_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_07_matcher() = default; public: regex_07_matcher(regex_07_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -212,25 +170,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_07 {}; public: class regex_08_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_07 {}; public: template class regex_08_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_08_matcher() = default; public: regex_08_matcher(regex_08_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -238,25 +190,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_08 {}; public: class regex_09_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_08 {}; public: template class regex_09_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_09_matcher() = default; public: regex_09_matcher(regex_09_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -264,25 +210,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_09 {}; public: class regex_10_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_09 {}; public: template class regex_10_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_10_matcher() = default; public: regex_10_matcher(regex_10_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -290,25 +230,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_10 {}; public: class regex_11_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_10 {}; public: template class regex_11_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_11_matcher() = default; public: regex_11_matcher(regex_11_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -316,25 +250,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_11 {}; public: class regex_12_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_11 {}; public: template class regex_12_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_12_matcher() = default; public: regex_12_matcher(regex_12_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -342,13 +270,13 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_12 {}; + public: cpp2::regex::regular_expression> regex_12 {}; public: test_tests_01_char_matcher() = default; public: test_tests_01_char_matcher(test_tests_01_char_matcher const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(test_tests_01_char_matcher const&) -> void = delete; -#line 194 "pure2-regex_01_char_matcher.cpp2" +#line 195 "pure2-regex_01_char_matcher.cpp2" }; auto main() -> int; @@ -452,6 +380,7 @@ auto main() -> int; } result += std::to_string(cpp2::move(pos)); } + ++next; } else { std::cerr << "Not implemented"; @@ -467,7 +396,7 @@ auto main() -> int; return result; } -#line 112 "pure2-regex_01_char_matcher.cpp2" +#line 113 "pure2-regex_01_char_matcher.cpp2" [[nodiscard]] auto sanitize(std::string str) -> std::string { str = cpp2::string_util::replace_all(str, "\a", "\\a"); @@ -480,7 +409,7 @@ auto main() -> int; return cpp2::move(str); } -#line 124 "pure2-regex_01_char_matcher.cpp2" +#line 125 "pure2-regex_01_char_matcher.cpp2" template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, cpp2::impl::in resultExpected) -> void{ @@ -521,7 +450,7 @@ template auto test(M const& regex, cpp2::impl::in id, c std::cout << "" + cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(sanitize(str)) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(sanitize(resultExpected)) + "" << std::endl; } -#line 178 "pure2-regex_01_char_matcher.cpp2" +#line 179 "pure2-regex_01_char_matcher.cpp2" auto test_tests_01_char_matcher::run() const& -> void{ std::cout << "Running tests_01_char_matcher:" << std::endl; test(regex_01, "01", R"(abc)", "abc", "y", R"($&)", "abc"); @@ -542,8 +471,7 @@ template auto test(M const& regex, cpp2::impl::in id, c - - template [[nodiscard]] auto test_tests_01_char_matcher::regex_01_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_01_char_matcher::regex_01_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -571,10 +499,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_01_char_matcher::regex_01_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_01_char_matcher::regex_01_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -582,19 +511,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_01_char_matcher::regex_01_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_01_char_matcher::regex_01_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_01_char_matcher::regex_01_matcher::to_string() -> std::string{return R"(abc)"; } + template [[nodiscard]] constexpr auto test_tests_01_char_matcher::regex_01_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_01_char_matcher::regex_01_matcher::to_string() -> std::string{return R"(abc)"; } - - template [[nodiscard]] auto test_tests_01_char_matcher::regex_02_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_01_char_matcher::regex_02_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -622,10 +551,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_01_char_matcher::regex_02_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_01_char_matcher::regex_02_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -633,19 +563,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_01_char_matcher::regex_02_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_01_char_matcher::regex_02_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_01_char_matcher::regex_02_matcher::to_string() -> std::string{return R"(abc)"; } - + template [[nodiscard]] constexpr auto test_tests_01_char_matcher::regex_02_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_01_char_matcher::regex_02_matcher::to_string() -> std::string{return R"(abc)"; } - template [[nodiscard]] auto test_tests_01_char_matcher::regex_03_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_01_char_matcher::regex_03_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -673,10 +603,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_01_char_matcher::regex_03_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_01_char_matcher::regex_03_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -684,19 +615,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_01_char_matcher::regex_03_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_01_char_matcher::regex_03_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_01_char_matcher::regex_03_matcher::to_string() -> std::string{return R"(abc)"; } - + template [[nodiscard]] constexpr auto test_tests_01_char_matcher::regex_03_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_01_char_matcher::regex_03_matcher::to_string() -> std::string{return R"(abc)"; } - template [[nodiscard]] auto test_tests_01_char_matcher::regex_04_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_01_char_matcher::regex_04_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -724,10 +655,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_01_char_matcher::regex_04_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_01_char_matcher::regex_04_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -735,19 +667,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_01_char_matcher::regex_04_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_01_char_matcher::regex_04_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_01_char_matcher::regex_04_matcher::to_string() -> std::string{return R"(abc)"; } + template [[nodiscard]] constexpr auto test_tests_01_char_matcher::regex_04_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_01_char_matcher::regex_04_matcher::to_string() -> std::string{return R"(abc)"; } - - template [[nodiscard]] auto test_tests_01_char_matcher::regex_05_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_01_char_matcher::regex_05_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -775,10 +707,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_01_char_matcher::regex_05_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_01_char_matcher::regex_05_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -786,19 +719,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_01_char_matcher::regex_05_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_01_char_matcher::regex_05_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_01_char_matcher::regex_05_matcher::to_string() -> std::string{return R"(abc)"; } - + template [[nodiscard]] constexpr auto test_tests_01_char_matcher::regex_05_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_01_char_matcher::regex_05_matcher::to_string() -> std::string{return R"(abc)"; } - template [[nodiscard]] auto test_tests_01_char_matcher::regex_06_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_01_char_matcher::regex_06_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -826,10 +759,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_01_char_matcher::regex_06_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_01_char_matcher::regex_06_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -837,19 +771,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_01_char_matcher::regex_06_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_01_char_matcher::regex_06_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_01_char_matcher::regex_06_matcher::to_string() -> std::string{return R"(abc)"; } - + template [[nodiscard]] constexpr auto test_tests_01_char_matcher::regex_06_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_01_char_matcher::regex_06_matcher::to_string() -> std::string{return R"(abc)"; } - template [[nodiscard]] auto test_tests_01_char_matcher::regex_07_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_01_char_matcher::regex_07_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -877,10 +811,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_01_char_matcher::regex_07_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_01_char_matcher::regex_07_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -888,19 +823,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_01_char_matcher::regex_07_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_01_char_matcher::regex_07_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_01_char_matcher::regex_07_matcher::to_string() -> std::string{return R"(abc)"; } + template [[nodiscard]] constexpr auto test_tests_01_char_matcher::regex_07_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_01_char_matcher::regex_07_matcher::to_string() -> std::string{return R"(abc)"; } - - template [[nodiscard]] auto test_tests_01_char_matcher::regex_08_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_01_char_matcher::regex_08_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -928,10 +863,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_01_char_matcher::regex_08_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_01_char_matcher::regex_08_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -939,19 +875,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_01_char_matcher::regex_08_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_01_char_matcher::regex_08_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_01_char_matcher::regex_08_matcher::to_string() -> std::string{return R"(abc)"; } - + template [[nodiscard]] constexpr auto test_tests_01_char_matcher::regex_08_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_01_char_matcher::regex_08_matcher::to_string() -> std::string{return R"(abc)"; } - template [[nodiscard]] auto test_tests_01_char_matcher::regex_09_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_01_char_matcher::regex_09_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -979,10 +915,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_01_char_matcher::regex_09_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_01_char_matcher::regex_09_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -990,19 +927,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_01_char_matcher::regex_09_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_01_char_matcher::regex_09_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_01_char_matcher::regex_09_matcher::to_string() -> std::string{return R"(abc)"; } - + template [[nodiscard]] constexpr auto test_tests_01_char_matcher::regex_09_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_01_char_matcher::regex_09_matcher::to_string() -> std::string{return R"(abc)"; } - template [[nodiscard]] auto test_tests_01_char_matcher::regex_10_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_01_char_matcher::regex_10_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1030,10 +967,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_01_char_matcher::regex_10_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_01_char_matcher::regex_10_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1041,19 +979,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_01_char_matcher::regex_10_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_01_char_matcher::regex_10_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_01_char_matcher::regex_10_matcher::to_string() -> std::string{return R"(abc)"; } + template [[nodiscard]] constexpr auto test_tests_01_char_matcher::regex_10_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_01_char_matcher::regex_10_matcher::to_string() -> std::string{return R"(abc)"; } - - template [[nodiscard]] auto test_tests_01_char_matcher::regex_11_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_01_char_matcher::regex_11_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1081,10 +1019,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_01_char_matcher::regex_11_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_01_char_matcher::regex_11_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1092,19 +1031,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_01_char_matcher::regex_11_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_01_char_matcher::regex_11_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_01_char_matcher::regex_11_matcher::to_string() -> std::string{return R"(abc)"; } - + template [[nodiscard]] constexpr auto test_tests_01_char_matcher::regex_11_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_01_char_matcher::regex_11_matcher::to_string() -> std::string{return R"(abc)"; } - template [[nodiscard]] auto test_tests_01_char_matcher::regex_12_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_01_char_matcher::regex_12_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1132,10 +1071,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_01_char_matcher::regex_12_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_01_char_matcher::regex_12_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1143,15 +1083,16 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_01_char_matcher::regex_12_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_01_char_matcher::regex_12_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_01_char_matcher::regex_12_matcher::to_string() -> std::string{return R"(abc)"; } + template [[nodiscard]] constexpr auto test_tests_01_char_matcher::regex_12_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_01_char_matcher::regex_12_matcher::to_string() -> std::string{return R"(abc)"; } -#line 195 "pure2-regex_01_char_matcher.cpp2" +#line 196 "pure2-regex_01_char_matcher.cpp2" auto main() -> int{ CPP2_UFCS(run)(test_tests_01_char_matcher()); } diff --git a/regression-tests/test-results/pure2-regex_02_ranges.cpp b/regression-tests/test-results/pure2-regex_02_ranges.cpp index ba9e6eef5..b2ef39e0d 100644 --- a/regression-tests/test-results/pure2-regex_02_ranges.cpp +++ b/regression-tests/test-results/pure2-regex_02_ranges.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes #include "cpp2regex.h" //=== Cpp2 type declarations ==================================================== @@ -9,7 +9,7 @@ #line 1 "pure2-regex_02_ranges.cpp2" -#line 165 "pure2-regex_02_ranges.cpp2" +#line 166 "pure2-regex_02_ranges.cpp2" class test_tests_02_ranges; @@ -18,47 +18,41 @@ class test_tests_02_ranges; #line 1 "pure2-regex_02_ranges.cpp2" [[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string; -#line 112 "pure2-regex_02_ranges.cpp2" +#line 113 "pure2-regex_02_ranges.cpp2" [[nodiscard]] auto sanitize(std::string str) -> std::string; -#line 124 "pure2-regex_02_ranges.cpp2" +#line 125 "pure2-regex_02_ranges.cpp2" template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, cpp2::impl::in resultExpected) -> void; -#line 165 "pure2-regex_02_ranges.cpp2" +#line 166 "pure2-regex_02_ranges.cpp2" class test_tests_02_ranges { -#line 206 "pure2-regex_02_ranges.cpp2" +#line 207 "pure2-regex_02_ranges.cpp2" public: auto run() const& -> void; - public: class regex_01_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: template class regex_01_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_01_matcher() = default; public: regex_01_matcher(regex_01_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -66,35 +60,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_01 {}; public: class regex_02_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_01 {}; public: template class regex_02_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_02_matcher() = default; public: regex_02_matcher(regex_02_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -102,35 +90,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_02 {}; public: class regex_03_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_02 {}; public: template class regex_03_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_03_matcher() = default; public: regex_03_matcher(regex_03_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -138,35 +120,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_03 {}; public: class regex_04_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_03 {}; public: template class regex_04_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_04_matcher() = default; public: regex_04_matcher(regex_04_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -174,35 +150,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_04 {}; public: class regex_05_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_04 {}; public: template class regex_05_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_05_matcher() = default; public: regex_05_matcher(regex_05_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -210,35 +180,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_05 {}; public: class regex_06_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_05 {}; public: template class regex_06_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_06_matcher() = default; public: regex_06_matcher(regex_06_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -246,35 +210,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_06 {}; public: class regex_07_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_06 {}; public: template class regex_07_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_07_matcher() = default; public: regex_07_matcher(regex_07_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -282,35 +240,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_07 {}; public: class regex_08_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_07 {}; public: template class regex_08_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_08_matcher() = default; public: regex_08_matcher(regex_08_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -318,35 +270,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_08 {}; public: class regex_09_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_08 {}; public: template class regex_09_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_09_matcher() = default; public: regex_09_matcher(regex_09_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -354,35 +300,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_09 {}; public: class regex_10_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_09 {}; public: template class regex_10_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_10_matcher() = default; public: regex_10_matcher(regex_10_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -390,35 +330,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_10 {}; public: class regex_11_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_10 {}; public: template class regex_11_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_11_matcher() = default; public: regex_11_matcher(regex_11_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -426,35 +360,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_11 {}; public: class regex_12_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_11 {}; public: template class regex_12_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_12_matcher() = default; public: regex_12_matcher(regex_12_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -462,35 +390,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_12 {}; public: class regex_13_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_12 {}; public: template class regex_13_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_13_matcher() = default; public: regex_13_matcher(regex_13_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -498,35 +420,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_13 {}; public: class regex_14_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_13 {}; public: template class regex_14_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_14_matcher() = default; public: regex_14_matcher(regex_14_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -534,35 +450,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_14 {}; public: class regex_15_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_14 {}; public: template class regex_15_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_15_matcher() = default; public: regex_15_matcher(regex_15_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -570,35 +480,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_15 {}; public: class regex_16_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_15 {}; public: template class regex_16_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_16_matcher() = default; public: regex_16_matcher(regex_16_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -606,35 +510,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_16 {}; public: class regex_17_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_16 {}; public: template class regex_17_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_17_matcher() = default; public: regex_17_matcher(regex_17_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -642,35 +540,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_17 {}; public: class regex_18_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_17 {}; public: template class regex_18_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_18_matcher() = default; public: regex_18_matcher(regex_18_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -678,35 +570,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_18 {}; public: class regex_19_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_18 {}; public: template class regex_19_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_19_matcher() = default; public: regex_19_matcher(regex_19_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -714,35 +600,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_19 {}; public: class regex_20_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_19 {}; public: template class regex_20_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_20_matcher() = default; public: regex_20_matcher(regex_20_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -750,35 +630,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_20 {}; public: class regex_21_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_20 {}; public: template class regex_21_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_21_matcher() = default; public: regex_21_matcher(regex_21_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -786,35 +660,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_21 {}; public: class regex_22_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_21 {}; public: template class regex_22_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_22_matcher() = default; public: regex_22_matcher(regex_22_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -822,35 +690,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_22 {}; public: class regex_23_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_22 {}; public: template class regex_23_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_23_matcher() = default; public: regex_23_matcher(regex_23_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -858,35 +720,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_23 {}; public: class regex_24_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_23 {}; public: template class regex_24_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_24_matcher() = default; public: regex_24_matcher(regex_24_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -894,35 +750,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_24 {}; public: class regex_25_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_24 {}; public: template class regex_25_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_25_matcher() = default; public: regex_25_matcher(regex_25_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -930,35 +780,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_25 {}; public: class regex_26_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_25 {}; public: template class regex_26_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_26_matcher() = default; public: regex_26_matcher(regex_26_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -966,35 +810,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_26 {}; public: class regex_27_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_26 {}; public: template class regex_27_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_27_matcher() = default; public: regex_27_matcher(regex_27_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1002,35 +840,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_27 {}; public: class regex_28_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_27 {}; public: template class regex_28_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_28_matcher() = default; public: regex_28_matcher(regex_28_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1038,35 +870,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_28 {}; public: class regex_29_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_28 {}; public: template class regex_29_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_29_matcher() = default; public: regex_29_matcher(regex_29_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1074,35 +900,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_29 {}; public: class regex_30_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_29 {}; public: template class regex_30_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_30_matcher() = default; public: regex_30_matcher(regex_30_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1110,35 +930,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_30 {}; public: class regex_31_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_30 {}; public: template class regex_31_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_31_matcher() = default; public: regex_31_matcher(regex_31_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1146,35 +960,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_31 {}; public: class regex_32_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_31 {}; public: template class regex_32_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_32_matcher() = default; public: regex_32_matcher(regex_32_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1182,35 +990,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_32 {}; public: class regex_33_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_32 {}; public: template class regex_33_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_33_matcher() = default; public: regex_33_matcher(regex_33_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1218,35 +1020,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_33 {}; public: class regex_34_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_33 {}; public: template class regex_34_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_34_matcher() = default; public: regex_34_matcher(regex_34_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1254,35 +1050,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_34 {}; public: class regex_35_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_34 {}; public: template class regex_35_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_35_matcher() = default; public: regex_35_matcher(regex_35_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1290,35 +1080,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_35 {}; public: class regex_36_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_35 {}; public: template class regex_36_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_36_matcher() = default; public: regex_36_matcher(regex_36_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1326,35 +1110,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_36 {}; public: class regex_37_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_36 {}; public: template class regex_37_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_37_matcher() = default; public: regex_37_matcher(regex_37_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1362,35 +1140,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_37 {}; public: class regex_38_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_37 {}; public: template class regex_38_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_38_matcher() = default; public: regex_38_matcher(regex_38_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1398,35 +1170,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_38 {}; public: class regex_39_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_38 {}; public: template class regex_39_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_39_matcher() = default; public: regex_39_matcher(regex_39_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1434,35 +1200,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_39 {}; public: class regex_40_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_39 {}; public: template class regex_40_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_40_matcher() = default; public: regex_40_matcher(regex_40_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1470,13 +1230,13 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_40 {}; + public: cpp2::regex::regular_expression> regex_40 {}; public: test_tests_02_ranges() = default; public: test_tests_02_ranges(test_tests_02_ranges const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(test_tests_02_ranges const&) -> void = delete; -#line 250 "pure2-regex_02_ranges.cpp2" +#line 251 "pure2-regex_02_ranges.cpp2" }; auto main() -> int; @@ -1580,6 +1340,7 @@ auto main() -> int; } result += std::to_string(cpp2::move(pos)); } + ++next; } else { std::cerr << "Not implemented"; @@ -1595,7 +1356,7 @@ auto main() -> int; return result; } -#line 112 "pure2-regex_02_ranges.cpp2" +#line 113 "pure2-regex_02_ranges.cpp2" [[nodiscard]] auto sanitize(std::string str) -> std::string { str = cpp2::string_util::replace_all(str, "\a", "\\a"); @@ -1608,7 +1369,7 @@ auto main() -> int; return cpp2::move(str); } -#line 124 "pure2-regex_02_ranges.cpp2" +#line 125 "pure2-regex_02_ranges.cpp2" template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, cpp2::impl::in resultExpected) -> void{ @@ -1649,7 +1410,7 @@ template auto test(M const& regex, cpp2::impl::in id, c std::cout << "" + cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(sanitize(str)) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(sanitize(resultExpected)) + "" << std::endl; } -#line 206 "pure2-regex_02_ranges.cpp2" +#line 207 "pure2-regex_02_ranges.cpp2" auto test_tests_02_ranges::run() const& -> void{ std::cout << "Running tests_02_ranges:" << std::endl; test(regex_01, "01", R"(ab*c)", "abc", "y", R"($&)", "abc"); @@ -1698,8 +1459,7 @@ template auto test(M const& regex, cpp2::impl::in id, c - - template [[nodiscard]] auto test_tests_02_ranges::regex_01_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_01_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1727,11 +1487,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_01_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_01_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1759,11 +1520,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_01_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_01_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1791,10 +1553,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_01_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_01_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1802,19 +1565,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_01_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_02_ranges::regex_01_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_02_ranges::regex_01_matcher::to_string() -> std::string{return R"(ab*c)"; } + template [[nodiscard]] constexpr auto test_tests_02_ranges::regex_01_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_02_ranges::regex_01_matcher::to_string() -> std::string{return R"(ab*c)"; } - - template [[nodiscard]] auto test_tests_02_ranges::regex_02_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_02_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1842,11 +1605,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_02_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_02_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1874,11 +1638,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_02_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_02_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1906,10 +1671,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_02_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_02_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1917,19 +1683,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_02_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_02_ranges::regex_02_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_02_ranges::regex_02_matcher::to_string() -> std::string{return R"(ab*c)"; } - + template [[nodiscard]] constexpr auto test_tests_02_ranges::regex_02_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_02_ranges::regex_02_matcher::to_string() -> std::string{return R"(ab*c)"; } - template [[nodiscard]] auto test_tests_02_ranges::regex_03_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_03_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1957,11 +1723,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_03_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_03_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1989,11 +1756,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_03_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_03_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2021,10 +1789,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_03_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_03_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2032,19 +1801,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_03_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_02_ranges::regex_03_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_02_ranges::regex_03_matcher::to_string() -> std::string{return R"(ab*c)"; } - + template [[nodiscard]] constexpr auto test_tests_02_ranges::regex_03_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_02_ranges::regex_03_matcher::to_string() -> std::string{return R"(ab*c)"; } - template [[nodiscard]] auto test_tests_02_ranges::regex_04_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_04_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2072,11 +1841,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_04_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_04_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2104,11 +1874,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_04_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_04_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2136,10 +1907,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_04_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_04_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2147,19 +1919,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_04_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_02_ranges::regex_04_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_02_ranges::regex_04_matcher::to_string() -> std::string{return R"(ab*bc)"; } + template [[nodiscard]] constexpr auto test_tests_02_ranges::regex_04_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_02_ranges::regex_04_matcher::to_string() -> std::string{return R"(ab*bc)"; } - - template [[nodiscard]] auto test_tests_02_ranges::regex_05_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_05_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2187,11 +1959,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_05_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_05_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2219,11 +1992,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_05_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_05_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2251,10 +2025,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_05_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_05_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2262,19 +2037,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_05_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_02_ranges::regex_05_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_02_ranges::regex_05_matcher::to_string() -> std::string{return R"(ab*bc)"; } - + template [[nodiscard]] constexpr auto test_tests_02_ranges::regex_05_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_02_ranges::regex_05_matcher::to_string() -> std::string{return R"(ab*bc)"; } - template [[nodiscard]] auto test_tests_02_ranges::regex_06_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_06_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2302,11 +2077,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_06_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_06_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2334,11 +2110,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_06_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_06_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2366,10 +2143,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_06_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_06_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2377,19 +2155,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_06_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_02_ranges::regex_06_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_02_ranges::regex_06_matcher::to_string() -> std::string{return R"(ab*bc)"; } + template [[nodiscard]] constexpr auto test_tests_02_ranges::regex_06_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_02_ranges::regex_06_matcher::to_string() -> std::string{return R"(ab*bc)"; } - - template [[nodiscard]] auto test_tests_02_ranges::regex_07_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_07_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2417,11 +2195,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_07_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_07_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2449,11 +2228,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_07_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_07_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2481,10 +2261,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_07_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_07_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2492,19 +2273,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_07_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_02_ranges::regex_07_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_02_ranges::regex_07_matcher::to_string() -> std::string{return R"(ab*bc)"; } - + template [[nodiscard]] constexpr auto test_tests_02_ranges::regex_07_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_02_ranges::regex_07_matcher::to_string() -> std::string{return R"(ab*bc)"; } - template [[nodiscard]] auto test_tests_02_ranges::regex_08_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_08_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2532,11 +2313,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_08_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_08_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2564,11 +2346,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_08_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_08_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2596,10 +2379,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_08_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_08_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2607,19 +2391,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_08_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_02_ranges::regex_08_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_02_ranges::regex_08_matcher::to_string() -> std::string{return R"(ab*bc)"; } - + template [[nodiscard]] constexpr auto test_tests_02_ranges::regex_08_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_02_ranges::regex_08_matcher::to_string() -> std::string{return R"(ab*bc)"; } - template [[nodiscard]] auto test_tests_02_ranges::regex_09_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_09_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2647,11 +2431,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_09_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_09_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2679,11 +2464,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_09_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_09_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2711,10 +2497,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_09_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_09_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2722,19 +2509,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_09_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_02_ranges::regex_09_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_02_ranges::regex_09_matcher::to_string() -> std::string{return R"(ab*bc)"; } + template [[nodiscard]] constexpr auto test_tests_02_ranges::regex_09_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_02_ranges::regex_09_matcher::to_string() -> std::string{return R"(ab*bc)"; } - - template [[nodiscard]] auto test_tests_02_ranges::regex_10_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_10_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2762,11 +2549,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_10_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_10_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2794,11 +2582,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_10_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_10_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2826,10 +2615,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_10_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_10_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2837,19 +2627,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_10_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_02_ranges::regex_10_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_02_ranges::regex_10_matcher::to_string() -> std::string{return R"(ab*bc)"; } - + template [[nodiscard]] constexpr auto test_tests_02_ranges::regex_10_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_02_ranges::regex_10_matcher::to_string() -> std::string{return R"(ab*bc)"; } - template [[nodiscard]] auto test_tests_02_ranges::regex_11_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_11_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2877,11 +2667,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_11_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_11_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2909,11 +2700,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_11_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_11_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2941,10 +2733,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_11_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_11_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2952,19 +2745,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_11_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_02_ranges::regex_11_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_02_ranges::regex_11_matcher::to_string() -> std::string{return R"(ab*bc)"; } + template [[nodiscard]] constexpr auto test_tests_02_ranges::regex_11_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_02_ranges::regex_11_matcher::to_string() -> std::string{return R"(ab*bc)"; } - - template [[nodiscard]] auto test_tests_02_ranges::regex_12_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_12_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2992,11 +2785,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_12_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_12_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3024,11 +2818,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_12_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_12_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3056,10 +2851,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_12_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_12_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -3067,19 +2863,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_12_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_02_ranges::regex_12_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_02_ranges::regex_12_matcher::to_string() -> std::string{return R"(ab*bc)"; } - + template [[nodiscard]] constexpr auto test_tests_02_ranges::regex_12_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_02_ranges::regex_12_matcher::to_string() -> std::string{return R"(ab*bc)"; } - template [[nodiscard]] auto test_tests_02_ranges::regex_13_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_13_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3107,11 +2903,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_13_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_13_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3139,11 +2936,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_13_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_13_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3171,10 +2969,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_13_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_13_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -3182,19 +2981,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_13_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_02_ranges::regex_13_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_02_ranges::regex_13_matcher::to_string() -> std::string{return R"(ab{0,}bc)"; } - + template [[nodiscard]] constexpr auto test_tests_02_ranges::regex_13_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_02_ranges::regex_13_matcher::to_string() -> std::string{return R"(ab{0,}bc)"; } - template [[nodiscard]] auto test_tests_02_ranges::regex_14_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_14_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3222,11 +3021,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_14_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_14_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3254,11 +3054,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_14_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_14_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3286,10 +3087,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_14_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_14_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -3297,19 +3099,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_14_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_02_ranges::regex_14_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_02_ranges::regex_14_matcher::to_string() -> std::string{return R"(ab{0,}bc)"; } + template [[nodiscard]] constexpr auto test_tests_02_ranges::regex_14_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_02_ranges::regex_14_matcher::to_string() -> std::string{return R"(ab{0,}bc)"; } - - template [[nodiscard]] auto test_tests_02_ranges::regex_15_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_15_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3337,11 +3139,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_15_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_15_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3369,11 +3172,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_15_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_15_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3401,10 +3205,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_15_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_15_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -3412,19 +3217,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_15_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_02_ranges::regex_15_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_02_ranges::regex_15_matcher::to_string() -> std::string{return R"(ab{0,}bc)"; } - + template [[nodiscard]] constexpr auto test_tests_02_ranges::regex_15_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_02_ranges::regex_15_matcher::to_string() -> std::string{return R"(ab{0,}bc)"; } - template [[nodiscard]] auto test_tests_02_ranges::regex_16_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_16_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3452,11 +3257,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_16_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_16_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3484,11 +3290,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_16_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_16_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3516,10 +3323,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_16_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_16_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -3527,19 +3335,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_16_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_02_ranges::regex_16_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_02_ranges::regex_16_matcher::to_string() -> std::string{return R"(ab+bc)"; } + template [[nodiscard]] constexpr auto test_tests_02_ranges::regex_16_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_02_ranges::regex_16_matcher::to_string() -> std::string{return R"(ab+bc)"; } - - template [[nodiscard]] auto test_tests_02_ranges::regex_17_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_17_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3567,11 +3375,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_17_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_17_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3599,11 +3408,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_17_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_17_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3631,10 +3441,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_17_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_17_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -3642,19 +3453,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_17_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_02_ranges::regex_17_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_02_ranges::regex_17_matcher::to_string() -> std::string{return R"(ab+bc)"; } - + template [[nodiscard]] constexpr auto test_tests_02_ranges::regex_17_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_02_ranges::regex_17_matcher::to_string() -> std::string{return R"(ab+bc)"; } - template [[nodiscard]] auto test_tests_02_ranges::regex_18_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_18_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3682,11 +3493,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_18_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_18_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3714,11 +3526,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_18_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_18_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3746,10 +3559,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_18_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_18_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -3757,19 +3571,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_18_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_02_ranges::regex_18_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_02_ranges::regex_18_matcher::to_string() -> std::string{return R"(ab+bc)"; } - + template [[nodiscard]] constexpr auto test_tests_02_ranges::regex_18_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_02_ranges::regex_18_matcher::to_string() -> std::string{return R"(ab+bc)"; } - template [[nodiscard]] auto test_tests_02_ranges::regex_19_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_19_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3797,11 +3611,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_19_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_19_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3829,11 +3644,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_19_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_19_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3861,10 +3677,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_19_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_19_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -3872,19 +3689,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_19_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_02_ranges::regex_19_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_02_ranges::regex_19_matcher::to_string() -> std::string{return R"(ab+bc)"; } + template [[nodiscard]] constexpr auto test_tests_02_ranges::regex_19_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_02_ranges::regex_19_matcher::to_string() -> std::string{return R"(ab+bc)"; } - - template [[nodiscard]] auto test_tests_02_ranges::regex_20_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_20_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3912,11 +3729,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_20_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_20_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3944,11 +3762,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_20_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_20_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3976,10 +3795,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_20_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_20_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -3987,19 +3807,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_20_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_02_ranges::regex_20_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_02_ranges::regex_20_matcher::to_string() -> std::string{return R"(ab+bc)"; } - + template [[nodiscard]] constexpr auto test_tests_02_ranges::regex_20_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_02_ranges::regex_20_matcher::to_string() -> std::string{return R"(ab+bc)"; } - template [[nodiscard]] auto test_tests_02_ranges::regex_21_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_21_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4027,11 +3847,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_21_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_21_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4059,11 +3880,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_21_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_21_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4091,10 +3913,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_21_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_21_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -4102,19 +3925,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_21_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_02_ranges::regex_21_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_02_ranges::regex_21_matcher::to_string() -> std::string{return R"(ab{1,}bc)"; } + template [[nodiscard]] constexpr auto test_tests_02_ranges::regex_21_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_02_ranges::regex_21_matcher::to_string() -> std::string{return R"(ab{1,}bc)"; } - - template [[nodiscard]] auto test_tests_02_ranges::regex_22_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_22_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4142,11 +3965,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_22_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_22_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4174,11 +3998,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_22_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_22_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4206,10 +4031,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_22_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_22_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -4217,19 +4043,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_22_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_02_ranges::regex_22_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_02_ranges::regex_22_matcher::to_string() -> std::string{return R"(ab+bc)"; } - + template [[nodiscard]] constexpr auto test_tests_02_ranges::regex_22_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_02_ranges::regex_22_matcher::to_string() -> std::string{return R"(ab+bc)"; } - template [[nodiscard]] auto test_tests_02_ranges::regex_23_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_23_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4257,11 +4083,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_23_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_23_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4289,11 +4116,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_23_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_23_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4321,10 +4149,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_23_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_23_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -4332,19 +4161,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_23_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_02_ranges::regex_23_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_02_ranges::regex_23_matcher::to_string() -> std::string{return R"(ab+bc)"; } - + template [[nodiscard]] constexpr auto test_tests_02_ranges::regex_23_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_02_ranges::regex_23_matcher::to_string() -> std::string{return R"(ab+bc)"; } - template [[nodiscard]] auto test_tests_02_ranges::regex_24_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_24_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4372,11 +4201,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_24_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_24_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4404,11 +4234,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_24_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_24_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4436,10 +4267,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_24_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_24_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -4447,19 +4279,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_24_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_02_ranges::regex_24_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_02_ranges::regex_24_matcher::to_string() -> std::string{return R"(ab+bc)"; } + template [[nodiscard]] constexpr auto test_tests_02_ranges::regex_24_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_02_ranges::regex_24_matcher::to_string() -> std::string{return R"(ab+bc)"; } - - template [[nodiscard]] auto test_tests_02_ranges::regex_25_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_25_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4487,11 +4319,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_25_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_25_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4519,11 +4352,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_25_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_25_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4551,10 +4385,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_25_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_25_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -4562,19 +4397,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_25_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_02_ranges::regex_25_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_02_ranges::regex_25_matcher::to_string() -> std::string{return R"(ab{1,}bc)"; } - + template [[nodiscard]] constexpr auto test_tests_02_ranges::regex_25_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_02_ranges::regex_25_matcher::to_string() -> std::string{return R"(ab{1,}bc)"; } - template [[nodiscard]] auto test_tests_02_ranges::regex_26_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_26_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4602,11 +4437,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_26_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_26_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4634,11 +4470,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_26_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_26_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4666,10 +4503,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_26_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_26_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -4677,19 +4515,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_26_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_02_ranges::regex_26_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_02_ranges::regex_26_matcher::to_string() -> std::string{return R"(ab{1,}bc)"; } + template [[nodiscard]] constexpr auto test_tests_02_ranges::regex_26_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_02_ranges::regex_26_matcher::to_string() -> std::string{return R"(ab{1,}bc)"; } - - template [[nodiscard]] auto test_tests_02_ranges::regex_27_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_27_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4717,11 +4555,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_27_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_27_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4749,11 +4588,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_27_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_27_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4781,10 +4621,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_27_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_27_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -4792,19 +4633,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_27_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_02_ranges::regex_27_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_02_ranges::regex_27_matcher::to_string() -> std::string{return R"(ab{1,}bc)"; } - + template [[nodiscard]] constexpr auto test_tests_02_ranges::regex_27_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_02_ranges::regex_27_matcher::to_string() -> std::string{return R"(ab{1,}bc)"; } - template [[nodiscard]] auto test_tests_02_ranges::regex_28_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_28_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4832,11 +4673,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_28_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_28_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4864,11 +4706,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_28_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_28_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4896,10 +4739,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_28_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_28_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -4907,19 +4751,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_28_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_02_ranges::regex_28_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_02_ranges::regex_28_matcher::to_string() -> std::string{return R"(ab{1,3}bc)"; } - + template [[nodiscard]] constexpr auto test_tests_02_ranges::regex_28_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_02_ranges::regex_28_matcher::to_string() -> std::string{return R"(ab{1,3}bc)"; } - template [[nodiscard]] auto test_tests_02_ranges::regex_29_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_29_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4947,11 +4791,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_29_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_29_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4979,11 +4824,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_29_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_29_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5011,10 +4857,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_29_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_29_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -5022,19 +4869,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_29_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_02_ranges::regex_29_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_02_ranges::regex_29_matcher::to_string() -> std::string{return R"(ab{1,3}bc)"; } + template [[nodiscard]] constexpr auto test_tests_02_ranges::regex_29_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_02_ranges::regex_29_matcher::to_string() -> std::string{return R"(ab{1,3}bc)"; } - - template [[nodiscard]] auto test_tests_02_ranges::regex_30_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_30_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5062,11 +4909,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_30_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_30_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5094,11 +4942,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_30_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_30_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5126,10 +4975,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_30_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_30_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -5137,19 +4987,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_30_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_02_ranges::regex_30_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_02_ranges::regex_30_matcher::to_string() -> std::string{return R"(ab{1,3}bc)"; } - + template [[nodiscard]] constexpr auto test_tests_02_ranges::regex_30_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_02_ranges::regex_30_matcher::to_string() -> std::string{return R"(ab{1,3}bc)"; } - template [[nodiscard]] auto test_tests_02_ranges::regex_31_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_31_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5177,11 +5027,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_31_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_31_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5209,11 +5060,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_31_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_31_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5241,10 +5093,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_31_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_31_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -5252,19 +5105,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_31_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_02_ranges::regex_31_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_02_ranges::regex_31_matcher::to_string() -> std::string{return R"(ab{3,4}bc)"; } + template [[nodiscard]] constexpr auto test_tests_02_ranges::regex_31_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_02_ranges::regex_31_matcher::to_string() -> std::string{return R"(ab{3,4}bc)"; } - - template [[nodiscard]] auto test_tests_02_ranges::regex_32_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_32_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5292,11 +5145,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_32_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_32_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5324,11 +5178,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_32_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_32_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5356,10 +5211,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_32_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_32_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -5367,19 +5223,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_32_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_02_ranges::regex_32_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_02_ranges::regex_32_matcher::to_string() -> std::string{return R"(ab{3,4}bc)"; } - + template [[nodiscard]] constexpr auto test_tests_02_ranges::regex_32_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_02_ranges::regex_32_matcher::to_string() -> std::string{return R"(ab{3,4}bc)"; } - template [[nodiscard]] auto test_tests_02_ranges::regex_33_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_33_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5407,11 +5263,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_33_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_33_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5439,11 +5296,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_33_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_33_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5471,10 +5329,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_33_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_33_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -5482,19 +5341,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_33_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_02_ranges::regex_33_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_02_ranges::regex_33_matcher::to_string() -> std::string{return R"(ab{3,4}bc)"; } - + template [[nodiscard]] constexpr auto test_tests_02_ranges::regex_33_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_02_ranges::regex_33_matcher::to_string() -> std::string{return R"(ab{3,4}bc)"; } - template [[nodiscard]] auto test_tests_02_ranges::regex_34_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_34_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5522,11 +5381,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_34_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_34_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5554,11 +5414,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_34_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_34_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5586,10 +5447,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_34_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_34_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -5597,19 +5459,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_34_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_02_ranges::regex_34_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_02_ranges::regex_34_matcher::to_string() -> std::string{return R"(ab{4,5}bc)"; } + template [[nodiscard]] constexpr auto test_tests_02_ranges::regex_34_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_02_ranges::regex_34_matcher::to_string() -> std::string{return R"(ab{4,5}bc)"; } - - template [[nodiscard]] auto test_tests_02_ranges::regex_35_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_35_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5637,11 +5499,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_35_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_35_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5669,11 +5532,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_35_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_35_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5701,10 +5565,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_35_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_35_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -5712,19 +5577,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_35_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_02_ranges::regex_35_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_02_ranges::regex_35_matcher::to_string() -> std::string{return R"(ab?bc)"; } - + template [[nodiscard]] constexpr auto test_tests_02_ranges::regex_35_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_02_ranges::regex_35_matcher::to_string() -> std::string{return R"(ab?bc)"; } - template [[nodiscard]] auto test_tests_02_ranges::regex_36_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_36_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5752,11 +5617,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_36_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_36_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5784,11 +5650,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_36_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_36_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5816,10 +5683,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_36_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_36_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -5827,19 +5695,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_36_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_02_ranges::regex_36_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_02_ranges::regex_36_matcher::to_string() -> std::string{return R"(ab?bc)"; } + template [[nodiscard]] constexpr auto test_tests_02_ranges::regex_36_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_02_ranges::regex_36_matcher::to_string() -> std::string{return R"(ab?bc)"; } - - template [[nodiscard]] auto test_tests_02_ranges::regex_37_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_37_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5867,11 +5735,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_37_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_37_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5899,11 +5768,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_37_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_37_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5931,10 +5801,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_37_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_37_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -5942,19 +5813,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_37_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_02_ranges::regex_37_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_02_ranges::regex_37_matcher::to_string() -> std::string{return R"(ab{0,1}bc)"; } - + template [[nodiscard]] constexpr auto test_tests_02_ranges::regex_37_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_02_ranges::regex_37_matcher::to_string() -> std::string{return R"(ab{0,1}bc)"; } - template [[nodiscard]] auto test_tests_02_ranges::regex_38_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_38_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5982,11 +5853,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_38_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_38_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6014,11 +5886,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_38_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_38_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6046,10 +5919,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_38_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_38_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -6057,19 +5931,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_38_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_02_ranges::regex_38_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_02_ranges::regex_38_matcher::to_string() -> std::string{return R"(ab?bc)"; } - + template [[nodiscard]] constexpr auto test_tests_02_ranges::regex_38_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_02_ranges::regex_38_matcher::to_string() -> std::string{return R"(ab?bc)"; } - template [[nodiscard]] auto test_tests_02_ranges::regex_39_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_39_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6097,11 +5971,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_39_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_39_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6129,11 +6004,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_39_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_39_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6161,10 +6037,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_39_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_39_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -6172,19 +6049,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_39_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_02_ranges::regex_39_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_02_ranges::regex_39_matcher::to_string() -> std::string{return R"(ab?c)"; } + template [[nodiscard]] constexpr auto test_tests_02_ranges::regex_39_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_02_ranges::regex_39_matcher::to_string() -> std::string{return R"(ab?c)"; } - - template [[nodiscard]] auto test_tests_02_ranges::regex_40_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_40_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6212,11 +6089,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_40_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_40_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6244,11 +6122,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_40_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_40_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6276,10 +6155,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_40_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_02_ranges::regex_40_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -6287,15 +6167,16 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_02_ranges::regex_40_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_02_ranges::regex_40_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_02_ranges::regex_40_matcher::to_string() -> std::string{return R"(ab{0,1}c)"; } + template [[nodiscard]] constexpr auto test_tests_02_ranges::regex_40_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_02_ranges::regex_40_matcher::to_string() -> std::string{return R"(ab{0,1}c)"; } -#line 251 "pure2-regex_02_ranges.cpp2" +#line 252 "pure2-regex_02_ranges.cpp2" auto main() -> int{ CPP2_UFCS(run)(test_tests_02_ranges()); } diff --git a/regression-tests/test-results/pure2-regex_03_wildcard.cpp b/regression-tests/test-results/pure2-regex_03_wildcard.cpp index 7fabdc2d8..340e8a97a 100644 --- a/regression-tests/test-results/pure2-regex_03_wildcard.cpp +++ b/regression-tests/test-results/pure2-regex_03_wildcard.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes #include "cpp2regex.h" //=== Cpp2 type declarations ==================================================== @@ -9,7 +9,7 @@ #line 1 "pure2-regex_03_wildcard.cpp2" -#line 165 "pure2-regex_03_wildcard.cpp2" +#line 166 "pure2-regex_03_wildcard.cpp2" class test_tests_03_wildcard; @@ -18,47 +18,41 @@ class test_tests_03_wildcard; #line 1 "pure2-regex_03_wildcard.cpp2" [[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string; -#line 112 "pure2-regex_03_wildcard.cpp2" +#line 113 "pure2-regex_03_wildcard.cpp2" [[nodiscard]] auto sanitize(std::string str) -> std::string; -#line 124 "pure2-regex_03_wildcard.cpp2" +#line 125 "pure2-regex_03_wildcard.cpp2" template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, cpp2::impl::in resultExpected) -> void; -#line 165 "pure2-regex_03_wildcard.cpp2" +#line 166 "pure2-regex_03_wildcard.cpp2" class test_tests_03_wildcard { -#line 186 "pure2-regex_03_wildcard.cpp2" +#line 187 "pure2-regex_03_wildcard.cpp2" public: auto run() const& -> void; - public: class regex_01_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: template class regex_01_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_01_matcher() = default; public: regex_01_matcher(regex_01_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -66,35 +60,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_01 {}; public: class regex_02_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_01 {}; public: template class regex_02_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_02_matcher() = default; public: regex_02_matcher(regex_02_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -102,35 +90,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_02 {}; public: class regex_03_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_02 {}; public: template class regex_03_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_03_matcher() = default; public: regex_03_matcher(regex_03_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -138,35 +120,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_03 {}; public: class regex_04_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_03 {}; public: template class regex_04_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_04_matcher() = default; public: regex_04_matcher(regex_04_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -174,35 +150,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_04 {}; public: class regex_05_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_04 {}; public: template class regex_05_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_05_matcher() = default; public: regex_05_matcher(regex_05_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -210,35 +180,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_05 {}; public: class regex_06_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_05 {}; public: template class regex_06_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_06_matcher() = default; public: regex_06_matcher(regex_06_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -246,35 +210,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_06 {}; public: class regex_07_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_06 {}; public: template class regex_07_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_07_matcher() = default; public: regex_07_matcher(regex_07_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -282,35 +240,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_07 {}; public: class regex_08_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_07 {}; public: template class regex_08_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_08_matcher() = default; public: regex_08_matcher(regex_08_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -318,35 +270,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_08 {}; public: class regex_09_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_08 {}; public: template class regex_09_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_09_matcher() = default; public: regex_09_matcher(regex_09_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -354,35 +300,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_09 {}; public: class regex_10_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_09 {}; public: template class regex_10_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_10_matcher() = default; public: regex_10_matcher(regex_10_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -390,35 +330,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_10 {}; public: class regex_11_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_10 {}; public: template class regex_11_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_11_matcher() = default; public: regex_11_matcher(regex_11_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -426,35 +360,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_11 {}; public: class regex_12_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_11 {}; public: template class regex_12_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_12_matcher() = default; public: regex_12_matcher(regex_12_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -462,35 +390,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_12 {}; public: class regex_13_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_12 {}; public: template class regex_13_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_13_matcher() = default; public: regex_13_matcher(regex_13_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -498,25 +420,19 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_13 {}; public: class regex_14_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_13 {}; public: template class regex_14_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_14_matcher() = default; public: regex_14_matcher(regex_14_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -524,25 +440,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_14 {}; public: class regex_15_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_14 {}; public: template class regex_15_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_15_matcher() = default; public: regex_15_matcher(regex_15_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -550,25 +460,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_15 {}; public: class regex_16_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_15 {}; public: template class regex_16_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_16_matcher() = default; public: regex_16_matcher(regex_16_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -576,35 +480,29 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_16 {}; public: class regex_17_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_16 {}; public: template class regex_17_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_17_matcher() = default; public: regex_17_matcher(regex_17_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -612,35 +510,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_17 {}; public: class regex_18_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_17 {}; public: template class regex_18_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_18_matcher() = default; public: regex_18_matcher(regex_18_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -648,35 +540,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_18 {}; public: class regex_19_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_18 {}; public: template class regex_19_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_19_matcher() = default; public: regex_19_matcher(regex_19_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -684,35 +570,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_19 {}; public: class regex_20_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_19 {}; public: template class regex_20_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_20_matcher() = default; public: regex_20_matcher(regex_20_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -720,13 +600,13 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_20 {}; + public: cpp2::regex::regular_expression> regex_20 {}; public: test_tests_03_wildcard() = default; public: test_tests_03_wildcard(test_tests_03_wildcard const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(test_tests_03_wildcard const&) -> void = delete; -#line 210 "pure2-regex_03_wildcard.cpp2" +#line 211 "pure2-regex_03_wildcard.cpp2" }; auto main() -> int; @@ -830,6 +710,7 @@ auto main() -> int; } result += std::to_string(cpp2::move(pos)); } + ++next; } else { std::cerr << "Not implemented"; @@ -845,7 +726,7 @@ auto main() -> int; return result; } -#line 112 "pure2-regex_03_wildcard.cpp2" +#line 113 "pure2-regex_03_wildcard.cpp2" [[nodiscard]] auto sanitize(std::string str) -> std::string { str = cpp2::string_util::replace_all(str, "\a", "\\a"); @@ -858,7 +739,7 @@ auto main() -> int; return cpp2::move(str); } -#line 124 "pure2-regex_03_wildcard.cpp2" +#line 125 "pure2-regex_03_wildcard.cpp2" template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, cpp2::impl::in resultExpected) -> void{ @@ -899,7 +780,7 @@ template auto test(M const& regex, cpp2::impl::in id, c std::cout << "" + cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(sanitize(str)) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(sanitize(resultExpected)) + "" << std::endl; } -#line 186 "pure2-regex_03_wildcard.cpp2" +#line 187 "pure2-regex_03_wildcard.cpp2" auto test_tests_03_wildcard::run() const& -> void{ std::cout << "Running tests_03_wildcard:" << std::endl; test(regex_01, "01", R"(.{1})", "abbbbc", "y", R"($&)", "a"); @@ -928,8 +809,7 @@ template auto test(M const& regex, cpp2::impl::in id, c - - template [[nodiscard]] auto test_tests_03_wildcard::regex_01_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_01_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -944,11 +824,12 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_01_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_01_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -962,11 +843,12 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_01_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_01_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -980,10 +862,11 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_01_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_01_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -991,19 +874,19 @@ template auto test(M const& regex, cpp2::impl::in id, c return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_01_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_03_wildcard::regex_01_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_03_wildcard::regex_01_matcher::to_string() -> std::string{return R"(.{1})"; } + template [[nodiscard]] constexpr auto test_tests_03_wildcard::regex_01_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_03_wildcard::regex_01_matcher::to_string() -> std::string{return R"(.{1})"; } - - template [[nodiscard]] auto test_tests_03_wildcard::regex_02_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_02_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1018,11 +901,12 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_02_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_02_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1036,11 +920,12 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_02_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_02_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1054,10 +939,11 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_02_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_02_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1065,19 +951,19 @@ template auto test(M const& regex, cpp2::impl::in id, c return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_02_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_03_wildcard::regex_02_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_03_wildcard::regex_02_matcher::to_string() -> std::string{return R"(.{1})"; } - + template [[nodiscard]] constexpr auto test_tests_03_wildcard::regex_02_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_03_wildcard::regex_02_matcher::to_string() -> std::string{return R"(.{1})"; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_03_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_03_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1092,11 +978,12 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_03_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_03_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1110,11 +997,12 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_03_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_03_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1128,10 +1016,11 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_03_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_03_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1139,19 +1028,19 @@ template auto test(M const& regex, cpp2::impl::in id, c return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_03_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_03_wildcard::regex_03_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_03_wildcard::regex_03_matcher::to_string() -> std::string{return R"(.{1})"; } - + template [[nodiscard]] constexpr auto test_tests_03_wildcard::regex_03_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_03_wildcard::regex_03_matcher::to_string() -> std::string{return R"(.{1})"; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_04_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_04_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1166,11 +1055,12 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_04_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_04_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1184,11 +1074,12 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_04_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_04_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1202,10 +1093,11 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_04_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_04_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1213,19 +1105,19 @@ template auto test(M const& regex, cpp2::impl::in id, c return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_04_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_03_wildcard::regex_04_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_03_wildcard::regex_04_matcher::to_string() -> std::string{return R"(.{3,4})"; } + template [[nodiscard]] constexpr auto test_tests_03_wildcard::regex_04_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_03_wildcard::regex_04_matcher::to_string() -> std::string{return R"(.{3,4})"; } - - template [[nodiscard]] auto test_tests_03_wildcard::regex_05_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_05_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1240,11 +1132,12 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_05_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_05_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1258,11 +1151,12 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_05_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_05_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1276,10 +1170,11 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_05_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_05_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1287,19 +1182,19 @@ template auto test(M const& regex, cpp2::impl::in id, c return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_05_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_03_wildcard::regex_05_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_03_wildcard::regex_05_matcher::to_string() -> std::string{return R"(.{3,4})"; } - + template [[nodiscard]] constexpr auto test_tests_03_wildcard::regex_05_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_03_wildcard::regex_05_matcher::to_string() -> std::string{return R"(.{3,4})"; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_06_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_06_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1314,11 +1209,12 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_06_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_06_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1332,11 +1228,12 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_06_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_06_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1350,10 +1247,11 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_06_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_06_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1361,19 +1259,19 @@ template auto test(M const& regex, cpp2::impl::in id, c return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_06_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_03_wildcard::regex_06_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_03_wildcard::regex_06_matcher::to_string() -> std::string{return R"(.{3,4})"; } + template [[nodiscard]] constexpr auto test_tests_03_wildcard::regex_06_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_03_wildcard::regex_06_matcher::to_string() -> std::string{return R"(.{3,4})"; } - - template [[nodiscard]] auto test_tests_03_wildcard::regex_07_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_07_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1388,11 +1286,12 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_07_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_07_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1406,11 +1305,12 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_07_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_07_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1424,10 +1324,11 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_07_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_07_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1435,19 +1336,19 @@ template auto test(M const& regex, cpp2::impl::in id, c return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_07_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_03_wildcard::regex_07_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_03_wildcard::regex_07_matcher::to_string() -> std::string{return R"(\N{1})"; } - + template [[nodiscard]] constexpr auto test_tests_03_wildcard::regex_07_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_03_wildcard::regex_07_matcher::to_string() -> std::string{return R"(\N{1})"; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_08_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_08_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1462,11 +1363,12 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_08_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_08_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1480,11 +1382,12 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_08_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_08_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1498,10 +1401,11 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_08_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_08_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1509,19 +1413,19 @@ template auto test(M const& regex, cpp2::impl::in id, c return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_08_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_03_wildcard::regex_08_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_03_wildcard::regex_08_matcher::to_string() -> std::string{return R"(\N{1})"; } - + template [[nodiscard]] constexpr auto test_tests_03_wildcard::regex_08_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_03_wildcard::regex_08_matcher::to_string() -> std::string{return R"(\N{1})"; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_09_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_09_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1536,11 +1440,12 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_09_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_09_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1554,11 +1459,12 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_09_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_09_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1572,10 +1478,11 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_09_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_09_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1583,19 +1490,19 @@ template auto test(M const& regex, cpp2::impl::in id, c return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_09_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_03_wildcard::regex_09_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_03_wildcard::regex_09_matcher::to_string() -> std::string{return R"(\N{1})"; } + template [[nodiscard]] constexpr auto test_tests_03_wildcard::regex_09_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_03_wildcard::regex_09_matcher::to_string() -> std::string{return R"(\N{1})"; } - - template [[nodiscard]] auto test_tests_03_wildcard::regex_10_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_10_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1610,11 +1517,12 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_10_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_10_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1628,11 +1536,12 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_10_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_10_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1646,10 +1555,11 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_10_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_10_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1657,19 +1567,19 @@ template auto test(M const& regex, cpp2::impl::in id, c return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_10_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_03_wildcard::regex_10_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_03_wildcard::regex_10_matcher::to_string() -> std::string{return R"(\N{3,4})"; } - + template [[nodiscard]] constexpr auto test_tests_03_wildcard::regex_10_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_03_wildcard::regex_10_matcher::to_string() -> std::string{return R"(\N{3,4})"; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_11_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_11_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1684,11 +1594,12 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_11_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_11_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1702,11 +1613,12 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_11_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_11_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1720,10 +1632,11 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_11_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_11_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1731,19 +1644,19 @@ template auto test(M const& regex, cpp2::impl::in id, c return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_11_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_03_wildcard::regex_11_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_03_wildcard::regex_11_matcher::to_string() -> std::string{return R"(\N{3,4})"; } + template [[nodiscard]] constexpr auto test_tests_03_wildcard::regex_11_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_03_wildcard::regex_11_matcher::to_string() -> std::string{return R"(\N{3,4})"; } - - template [[nodiscard]] auto test_tests_03_wildcard::regex_12_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_12_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1758,11 +1671,12 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_12_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_12_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1776,11 +1690,12 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_12_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_12_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1794,10 +1709,11 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_12_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_12_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1805,19 +1721,19 @@ template auto test(M const& regex, cpp2::impl::in id, c return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_12_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_03_wildcard::regex_12_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_03_wildcard::regex_12_matcher::to_string() -> std::string{return R"(\N{3,4})"; } - + template [[nodiscard]] constexpr auto test_tests_03_wildcard::regex_12_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_03_wildcard::regex_12_matcher::to_string() -> std::string{return R"(\N{3,4})"; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_13_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_13_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1832,11 +1748,12 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_13_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_13_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1850,11 +1767,12 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_13_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_13_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1868,10 +1786,11 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_13_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_13_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1879,19 +1798,19 @@ template auto test(M const& regex, cpp2::impl::in id, c return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_13_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_03_wildcard::regex_13_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_03_wildcard::regex_13_matcher::to_string() -> std::string{return R"(\N{3,4})"; } - + template [[nodiscard]] constexpr auto test_tests_03_wildcard::regex_13_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_03_wildcard::regex_13_matcher::to_string() -> std::string{return R"(\N{3,4})"; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_14_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_14_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1934,10 +1853,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_14_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_14_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1945,19 +1865,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_14_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_03_wildcard::regex_14_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_03_wildcard::regex_14_matcher::to_string() -> std::string{return R"(a.c)"; } + template [[nodiscard]] constexpr auto test_tests_03_wildcard::regex_14_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_03_wildcard::regex_14_matcher::to_string() -> std::string{return R"(a.c)"; } - - template [[nodiscard]] auto test_tests_03_wildcard::regex_15_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_15_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2000,10 +1920,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_15_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_15_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2011,19 +1932,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_15_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_03_wildcard::regex_15_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_03_wildcard::regex_15_matcher::to_string() -> std::string{return R"(a.c)"; } - + template [[nodiscard]] constexpr auto test_tests_03_wildcard::regex_15_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_03_wildcard::regex_15_matcher::to_string() -> std::string{return R"(a.c)"; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_16_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_16_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2066,10 +1987,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_16_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_16_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2077,19 +1999,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_16_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_03_wildcard::regex_16_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_03_wildcard::regex_16_matcher::to_string() -> std::string{return R"(a\Nc)"; } + template [[nodiscard]] constexpr auto test_tests_03_wildcard::regex_16_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_03_wildcard::regex_16_matcher::to_string() -> std::string{return R"(a\Nc)"; } - - template [[nodiscard]] auto test_tests_03_wildcard::regex_17_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_17_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2104,11 +2026,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_17_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_17_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2136,11 +2059,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_17_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_17_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2168,10 +2092,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_17_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_17_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2179,19 +2104,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_17_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_03_wildcard::regex_17_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_03_wildcard::regex_17_matcher::to_string() -> std::string{return R"(a.*c)"; } - + template [[nodiscard]] constexpr auto test_tests_03_wildcard::regex_17_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_03_wildcard::regex_17_matcher::to_string() -> std::string{return R"(a.*c)"; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_18_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_18_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2206,11 +2131,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_18_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_18_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2238,11 +2164,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_18_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_18_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2270,10 +2197,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_18_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_18_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2281,19 +2209,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_18_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_03_wildcard::regex_18_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_03_wildcard::regex_18_matcher::to_string() -> std::string{return R"(a\N*c)"; } - + template [[nodiscard]] constexpr auto test_tests_03_wildcard::regex_18_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_03_wildcard::regex_18_matcher::to_string() -> std::string{return R"(a\N*c)"; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_19_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_19_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2308,11 +2236,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_19_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_19_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2340,11 +2269,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_19_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_19_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2372,10 +2302,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_19_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_19_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2383,19 +2314,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_19_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_03_wildcard::regex_19_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_03_wildcard::regex_19_matcher::to_string() -> std::string{return R"(a.*c)"; } + template [[nodiscard]] constexpr auto test_tests_03_wildcard::regex_19_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_03_wildcard::regex_19_matcher::to_string() -> std::string{return R"(a.*c)"; } - - template [[nodiscard]] auto test_tests_03_wildcard::regex_20_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_20_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2410,11 +2341,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_20_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_20_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2442,11 +2374,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_20_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_20_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2474,10 +2407,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_20_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_03_wildcard::regex_20_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2485,15 +2419,16 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_03_wildcard::regex_20_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_03_wildcard::regex_20_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_03_wildcard::regex_20_matcher::to_string() -> std::string{return R"(a\N*c)"; } + template [[nodiscard]] constexpr auto test_tests_03_wildcard::regex_20_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_03_wildcard::regex_20_matcher::to_string() -> std::string{return R"(a\N*c)"; } -#line 211 "pure2-regex_03_wildcard.cpp2" +#line 212 "pure2-regex_03_wildcard.cpp2" auto main() -> int{ CPP2_UFCS(run)(test_tests_03_wildcard()); } diff --git a/regression-tests/test-results/pure2-regex_04_start_end.cpp b/regression-tests/test-results/pure2-regex_04_start_end.cpp index 04aed896b..df0594e4d 100644 --- a/regression-tests/test-results/pure2-regex_04_start_end.cpp +++ b/regression-tests/test-results/pure2-regex_04_start_end.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes #include "cpp2regex.h" //=== Cpp2 type declarations ==================================================== @@ -9,7 +9,7 @@ #line 1 "pure2-regex_04_start_end.cpp2" -#line 165 "pure2-regex_04_start_end.cpp2" +#line 166 "pure2-regex_04_start_end.cpp2" class test_tests_04_start_end; @@ -18,37 +18,31 @@ class test_tests_04_start_end; #line 1 "pure2-regex_04_start_end.cpp2" [[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string; -#line 112 "pure2-regex_04_start_end.cpp2" +#line 113 "pure2-regex_04_start_end.cpp2" [[nodiscard]] auto sanitize(std::string str) -> std::string; -#line 124 "pure2-regex_04_start_end.cpp2" +#line 125 "pure2-regex_04_start_end.cpp2" template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, cpp2::impl::in resultExpected) -> void; -#line 165 "pure2-regex_04_start_end.cpp2" +#line 166 "pure2-regex_04_start_end.cpp2" class test_tests_04_start_end { -#line 175 "pure2-regex_04_start_end.cpp2" +#line 177 "pure2-regex_04_start_end.cpp2" public: auto run() const& -> void; - public: class regex_01_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: template class regex_01_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_01_matcher() = default; public: regex_01_matcher(regex_01_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -56,25 +50,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_01 {}; public: class regex_02_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_01 {}; public: template class regex_02_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_02_matcher() = default; public: regex_02_matcher(regex_02_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -82,25 +70,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_02 {}; public: class regex_03_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_02 {}; public: template class regex_03_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_03_matcher() = default; public: regex_03_matcher(regex_03_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -108,25 +90,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_03 {}; public: class regex_04_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_03 {}; public: template class regex_04_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_04_matcher() = default; public: regex_04_matcher(regex_04_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -134,25 +110,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_04 {}; public: class regex_05_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_04 {}; public: template class regex_05_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_05_matcher() = default; public: regex_05_matcher(regex_05_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -160,25 +130,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_05 {}; public: class regex_06_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_05 {}; public: template class regex_06_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_06_matcher() = default; public: regex_06_matcher(regex_06_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -186,25 +150,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_06 {}; public: class regex_07_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_06 {}; public: template class regex_07_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_07_matcher() = default; public: regex_07_matcher(regex_07_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -212,25 +170,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_07 {}; public: class regex_08_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_07 {}; public: template class regex_08_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_08_matcher() = default; public: regex_08_matcher(regex_08_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -238,25 +190,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_08 {}; public: class regex_09_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_08 {}; public: template class regex_09_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_09_matcher() = default; public: regex_09_matcher(regex_09_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -264,13 +210,43 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_09 {}; + public: cpp2::regex::regular_expression> regex_09 {}; public: template class regex_10_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_10_matcher() = default; + public: regex_10_matcher(regex_10_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_10_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_10 {}; public: test_tests_04_start_end() = default; public: test_tests_04_start_end(test_tests_04_start_end const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(test_tests_04_start_end const&) -> void = delete; -#line 188 "pure2-regex_04_start_end.cpp2" +#line 191 "pure2-regex_04_start_end.cpp2" }; auto main() -> int; @@ -374,6 +350,7 @@ auto main() -> int; } result += std::to_string(cpp2::move(pos)); } + ++next; } else { std::cerr << "Not implemented"; @@ -389,7 +366,7 @@ auto main() -> int; return result; } -#line 112 "pure2-regex_04_start_end.cpp2" +#line 113 "pure2-regex_04_start_end.cpp2" [[nodiscard]] auto sanitize(std::string str) -> std::string { str = cpp2::string_util::replace_all(str, "\a", "\\a"); @@ -402,7 +379,7 @@ auto main() -> int; return cpp2::move(str); } -#line 124 "pure2-regex_04_start_end.cpp2" +#line 125 "pure2-regex_04_start_end.cpp2" template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, cpp2::impl::in resultExpected) -> void{ @@ -443,7 +420,7 @@ template auto test(M const& regex, cpp2::impl::in id, c std::cout << "" + cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(sanitize(str)) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(sanitize(resultExpected)) + "" << std::endl; } -#line 175 "pure2-regex_04_start_end.cpp2" +#line 177 "pure2-regex_04_start_end.cpp2" auto test_tests_04_start_end::run() const& -> void{ std::cout << "Running tests_04_start_end:" << std::endl; test(regex_01, "01", R"(^abc$)", "abc", "y", R"($&)", "abc"); @@ -455,14 +432,14 @@ template auto test(M const& regex, cpp2::impl::in id, c test(regex_07, "07", R"(^)", "abc", "y", R"($&)", ""); test(regex_08, "08", R"($)", "abc", "y", R"($&)", ""); test(regex_09, "09", R"($b)", "b", "n", R"(-)", "-"); + test(regex_10, "10", R"(\GX.*X)", "aaaXbX", "n", R"(-)", "-"); std::cout << std::endl; } - - template [[nodiscard]] auto test_tests_04_start_end::regex_01_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_04_start_end::regex_01_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -492,10 +469,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_04_start_end::regex_01_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_04_start_end::regex_01_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -503,19 +481,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_04_start_end::regex_01_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_04_start_end::regex_01_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_04_start_end::regex_01_matcher::to_string() -> std::string{return R"(^abc$)"; } + template [[nodiscard]] constexpr auto test_tests_04_start_end::regex_01_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_04_start_end::regex_01_matcher::to_string() -> std::string{return R"(^abc$)"; } - - template [[nodiscard]] auto test_tests_04_start_end::regex_02_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_04_start_end::regex_02_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -545,10 +523,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_04_start_end::regex_02_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_04_start_end::regex_02_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -556,19 +535,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_04_start_end::regex_02_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_04_start_end::regex_02_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_04_start_end::regex_02_matcher::to_string() -> std::string{return R"(^abc$)"; } - + template [[nodiscard]] constexpr auto test_tests_04_start_end::regex_02_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_04_start_end::regex_02_matcher::to_string() -> std::string{return R"(^abc$)"; } - template [[nodiscard]] auto test_tests_04_start_end::regex_03_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_04_start_end::regex_03_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -597,10 +576,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_04_start_end::regex_03_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_04_start_end::regex_03_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -608,19 +588,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_04_start_end::regex_03_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_04_start_end::regex_03_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_04_start_end::regex_03_matcher::to_string() -> std::string{return R"(^abc)"; } - + template [[nodiscard]] constexpr auto test_tests_04_start_end::regex_03_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_04_start_end::regex_03_matcher::to_string() -> std::string{return R"(^abc)"; } - template [[nodiscard]] auto test_tests_04_start_end::regex_04_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_04_start_end::regex_04_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -650,10 +630,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_04_start_end::regex_04_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_04_start_end::regex_04_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -661,19 +642,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_04_start_end::regex_04_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_04_start_end::regex_04_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_04_start_end::regex_04_matcher::to_string() -> std::string{return R"(^abc$)"; } + template [[nodiscard]] constexpr auto test_tests_04_start_end::regex_04_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_04_start_end::regex_04_matcher::to_string() -> std::string{return R"(^abc$)"; } - - template [[nodiscard]] auto test_tests_04_start_end::regex_05_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_04_start_end::regex_05_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -702,10 +683,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_04_start_end::regex_05_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_04_start_end::regex_05_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -713,19 +695,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_04_start_end::regex_05_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_04_start_end::regex_05_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_04_start_end::regex_05_matcher::to_string() -> std::string{return R"(abc$)"; } - + template [[nodiscard]] constexpr auto test_tests_04_start_end::regex_05_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_04_start_end::regex_05_matcher::to_string() -> std::string{return R"(abc$)"; } - template [[nodiscard]] auto test_tests_04_start_end::regex_06_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_04_start_end::regex_06_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -754,10 +736,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_04_start_end::regex_06_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_04_start_end::regex_06_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -765,19 +748,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_04_start_end::regex_06_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_04_start_end::regex_06_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_04_start_end::regex_06_matcher::to_string() -> std::string{return R"(abc$)"; } + template [[nodiscard]] constexpr auto test_tests_04_start_end::regex_06_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_04_start_end::regex_06_matcher::to_string() -> std::string{return R"(abc$)"; } - - template [[nodiscard]] auto test_tests_04_start_end::regex_07_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_04_start_end::regex_07_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -792,10 +775,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_04_start_end::regex_07_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_04_start_end::regex_07_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -803,19 +787,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_04_start_end::regex_07_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_04_start_end::regex_07_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_04_start_end::regex_07_matcher::to_string() -> std::string{return R"(^)"; } - + template [[nodiscard]] constexpr auto test_tests_04_start_end::regex_07_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_04_start_end::regex_07_matcher::to_string() -> std::string{return R"(^)"; } - template [[nodiscard]] auto test_tests_04_start_end::regex_08_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_04_start_end::regex_08_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -830,10 +814,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_04_start_end::regex_08_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_04_start_end::regex_08_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -841,19 +826,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_04_start_end::regex_08_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_04_start_end::regex_08_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_04_start_end::regex_08_matcher::to_string() -> std::string{return R"($)"; } + template [[nodiscard]] constexpr auto test_tests_04_start_end::regex_08_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_04_start_end::regex_08_matcher::to_string() -> std::string{return R"($)"; } - - template [[nodiscard]] auto test_tests_04_start_end::regex_09_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_04_start_end::regex_09_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -882,10 +867,116 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_04_start_end::regex_09_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_04_start_end::regex_09_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_04_start_end::regex_09_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_04_start_end::regex_09_matcher::to_string() -> std::string{return R"($b)"; } + + + + + + template template [[nodiscard]] auto test_tests_04_start_end::regex_10_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_04_start_end::regex_10_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"X"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_04_start_end::regex_10_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"X"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_04_start_end::regex_09_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_04_start_end::regex_10_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -893,15 +984,16 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_04_start_end::regex_09_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_04_start_end::regex_10_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_04_start_end::regex_09_matcher::to_string() -> std::string{return R"($b)"; } + template [[nodiscard]] constexpr auto test_tests_04_start_end::regex_10_matcher::is_start_match() -> bool { return true; } +template [[nodiscard]] auto test_tests_04_start_end::regex_10_matcher::to_string() -> std::string{return R"(\GX.*X)"; } -#line 189 "pure2-regex_04_start_end.cpp2" +#line 192 "pure2-regex_04_start_end.cpp2" auto main() -> int{ CPP2_UFCS(run)(test_tests_04_start_end()); } diff --git a/regression-tests/test-results/pure2-regex_05_classes.cpp b/regression-tests/test-results/pure2-regex_05_classes.cpp index 68a660bb5..7e0fb430a 100644 --- a/regression-tests/test-results/pure2-regex_05_classes.cpp +++ b/regression-tests/test-results/pure2-regex_05_classes.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes #include "cpp2regex.h" //=== Cpp2 type declarations ==================================================== @@ -9,7 +9,7 @@ #line 1 "pure2-regex_05_classes.cpp2" -#line 165 "pure2-regex_05_classes.cpp2" +#line 166 "pure2-regex_05_classes.cpp2" class test_tests_05_classes; @@ -18,37 +18,31 @@ class test_tests_05_classes; #line 1 "pure2-regex_05_classes.cpp2" [[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string; -#line 112 "pure2-regex_05_classes.cpp2" +#line 113 "pure2-regex_05_classes.cpp2" [[nodiscard]] auto sanitize(std::string str) -> std::string; -#line 124 "pure2-regex_05_classes.cpp2" +#line 125 "pure2-regex_05_classes.cpp2" template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, cpp2::impl::in resultExpected) -> void; -#line 165 "pure2-regex_05_classes.cpp2" +#line 166 "pure2-regex_05_classes.cpp2" class test_tests_05_classes { -#line 185 "pure2-regex_05_classes.cpp2" +#line 186 "pure2-regex_05_classes.cpp2" public: auto run() const& -> void; - public: class regex_01_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: template class regex_01_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_01_matcher() = default; public: regex_01_matcher(regex_01_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -56,25 +50,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_01 {}; public: class regex_02_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_01 {}; public: template class regex_02_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_02_matcher() = default; public: regex_02_matcher(regex_02_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -82,25 +70,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_02 {}; public: class regex_03_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_02 {}; public: template class regex_03_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_03_matcher() = default; public: regex_03_matcher(regex_03_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -108,25 +90,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_03 {}; public: class regex_04_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_03 {}; public: template class regex_04_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_04_matcher() = default; public: regex_04_matcher(regex_04_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -134,25 +110,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_04 {}; public: class regex_05_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_04 {}; public: template class regex_05_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_05_matcher() = default; public: regex_05_matcher(regex_05_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -160,25 +130,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_05 {}; public: class regex_06_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_05 {}; public: template class regex_06_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_06_matcher() = default; public: regex_06_matcher(regex_06_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -186,25 +150,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_06 {}; public: class regex_07_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_06 {}; public: template class regex_07_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_07_matcher() = default; public: regex_07_matcher(regex_07_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -212,25 +170,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_07 {}; public: class regex_08_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_07 {}; public: template class regex_08_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_08_matcher() = default; public: regex_08_matcher(regex_08_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -238,25 +190,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_08 {}; public: class regex_09_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_08 {}; public: template class regex_09_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_09_matcher() = default; public: regex_09_matcher(regex_09_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -264,25 +210,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_09 {}; public: class regex_10_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_09 {}; public: template class regex_10_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_10_matcher() = default; public: regex_10_matcher(regex_10_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -290,25 +230,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_10 {}; public: class regex_11_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_10 {}; public: template class regex_11_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_11_matcher() = default; public: regex_11_matcher(regex_11_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -316,25 +250,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_11 {}; public: class regex_12_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_11 {}; public: template class regex_12_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_12_matcher() = default; public: regex_12_matcher(regex_12_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -342,25 +270,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_12 {}; public: class regex_13_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_12 {}; public: template class regex_13_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_13_matcher() = default; public: regex_13_matcher(regex_13_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -368,25 +290,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_13 {}; public: class regex_14_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_13 {}; public: template class regex_14_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_14_matcher() = default; public: regex_14_matcher(regex_14_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -394,25 +310,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_14 {}; public: class regex_15_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_14 {}; public: template class regex_15_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_15_matcher() = default; public: regex_15_matcher(regex_15_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -420,25 +330,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_15 {}; public: class regex_16_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_15 {}; public: template class regex_16_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_16_matcher() = default; public: regex_16_matcher(regex_16_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -446,25 +350,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_16 {}; public: class regex_17_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_16 {}; public: template class regex_17_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_17_matcher() = default; public: regex_17_matcher(regex_17_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -472,25 +370,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_17 {}; public: class regex_18_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_17 {}; public: template class regex_18_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_18_matcher() = default; public: regex_18_matcher(regex_18_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -498,25 +390,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_18 {}; public: class regex_19_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_18 {}; public: template class regex_19_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_19_matcher() = default; public: regex_19_matcher(regex_19_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -524,13 +410,13 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_19 {}; + public: cpp2::regex::regular_expression> regex_19 {}; public: test_tests_05_classes() = default; public: test_tests_05_classes(test_tests_05_classes const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(test_tests_05_classes const&) -> void = delete; -#line 208 "pure2-regex_05_classes.cpp2" +#line 209 "pure2-regex_05_classes.cpp2" }; auto main() -> int; @@ -634,6 +520,7 @@ auto main() -> int; } result += std::to_string(cpp2::move(pos)); } + ++next; } else { std::cerr << "Not implemented"; @@ -649,7 +536,7 @@ auto main() -> int; return result; } -#line 112 "pure2-regex_05_classes.cpp2" +#line 113 "pure2-regex_05_classes.cpp2" [[nodiscard]] auto sanitize(std::string str) -> std::string { str = cpp2::string_util::replace_all(str, "\a", "\\a"); @@ -662,7 +549,7 @@ auto main() -> int; return cpp2::move(str); } -#line 124 "pure2-regex_05_classes.cpp2" +#line 125 "pure2-regex_05_classes.cpp2" template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, cpp2::impl::in resultExpected) -> void{ @@ -703,7 +590,7 @@ template auto test(M const& regex, cpp2::impl::in id, c std::cout << "" + cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(sanitize(str)) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(sanitize(resultExpected)) + "" << std::endl; } -#line 185 "pure2-regex_05_classes.cpp2" +#line 186 "pure2-regex_05_classes.cpp2" auto test_tests_05_classes::run() const& -> void{ std::cout << "Running tests_05_classes:" << std::endl; test(regex_01, "01", R"(a[bc]d)", "abc", "n", R"(-)", "-"); @@ -731,8 +618,7 @@ template auto test(M const& regex, cpp2::impl::in id, c - - template [[nodiscard]] auto test_tests_05_classes::regex_01_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_05_classes::regex_01_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -775,10 +661,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_05_classes::regex_01_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_05_classes::regex_01_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -786,19 +673,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_05_classes::regex_01_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_05_classes::regex_01_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_05_classes::regex_01_matcher::to_string() -> std::string{return R"(a[bc]d)"; } + template [[nodiscard]] constexpr auto test_tests_05_classes::regex_01_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_05_classes::regex_01_matcher::to_string() -> std::string{return R"(a[bc]d)"; } - - template [[nodiscard]] auto test_tests_05_classes::regex_02_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_05_classes::regex_02_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -841,10 +728,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_05_classes::regex_02_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_05_classes::regex_02_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -852,19 +740,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_05_classes::regex_02_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_05_classes::regex_02_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_05_classes::regex_02_matcher::to_string() -> std::string{return R"(a[bc]d)"; } - + template [[nodiscard]] constexpr auto test_tests_05_classes::regex_02_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_05_classes::regex_02_matcher::to_string() -> std::string{return R"(a[bc]d)"; } - template [[nodiscard]] auto test_tests_05_classes::regex_03_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_05_classes::regex_03_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -907,10 +795,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_05_classes::regex_03_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_05_classes::regex_03_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -918,19 +807,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_05_classes::regex_03_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_05_classes::regex_03_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_05_classes::regex_03_matcher::to_string() -> std::string{return R"(a[b]d)"; } - + template [[nodiscard]] constexpr auto test_tests_05_classes::regex_03_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_05_classes::regex_03_matcher::to_string() -> std::string{return R"(a[b]d)"; } - template [[nodiscard]] auto test_tests_05_classes::regex_04_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_05_classes::regex_04_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -947,10 +836,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_05_classes::regex_04_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_05_classes::regex_04_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -958,19 +848,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_05_classes::regex_04_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_05_classes::regex_04_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_05_classes::regex_04_matcher::to_string() -> std::string{return R"([a][b][d])"; } + template [[nodiscard]] constexpr auto test_tests_05_classes::regex_04_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_05_classes::regex_04_matcher::to_string() -> std::string{return R"([a][b][d])"; } - - template [[nodiscard]] auto test_tests_05_classes::regex_05_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_05_classes::regex_05_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -987,10 +877,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_05_classes::regex_05_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_05_classes::regex_05_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -998,19 +889,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_05_classes::regex_05_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_05_classes::regex_05_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_05_classes::regex_05_matcher::to_string() -> std::string{return R"(.[b].)"; } - + template [[nodiscard]] constexpr auto test_tests_05_classes::regex_05_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_05_classes::regex_05_matcher::to_string() -> std::string{return R"(.[b].)"; } - template [[nodiscard]] auto test_tests_05_classes::regex_06_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_05_classes::regex_06_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1027,10 +918,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_05_classes::regex_06_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_05_classes::regex_06_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1038,19 +930,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_05_classes::regex_06_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_05_classes::regex_06_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_05_classes::regex_06_matcher::to_string() -> std::string{return R"(.[b].)"; } + template [[nodiscard]] constexpr auto test_tests_05_classes::regex_06_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_05_classes::regex_06_matcher::to_string() -> std::string{return R"(.[b].)"; } - - template [[nodiscard]] auto test_tests_05_classes::regex_07_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_05_classes::regex_07_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1093,10 +985,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_05_classes::regex_07_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_05_classes::regex_07_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1104,19 +997,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_05_classes::regex_07_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_05_classes::regex_07_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_05_classes::regex_07_matcher::to_string() -> std::string{return R"(a[b-d]e)"; } - + template [[nodiscard]] constexpr auto test_tests_05_classes::regex_07_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_05_classes::regex_07_matcher::to_string() -> std::string{return R"(a[b-d]e)"; } - template [[nodiscard]] auto test_tests_05_classes::regex_08_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_05_classes::regex_08_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1159,10 +1052,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_05_classes::regex_08_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_05_classes::regex_08_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1170,19 +1064,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_05_classes::regex_08_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_05_classes::regex_08_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_05_classes::regex_08_matcher::to_string() -> std::string{return R"(a[b-d]e)"; } - + template [[nodiscard]] constexpr auto test_tests_05_classes::regex_08_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_05_classes::regex_08_matcher::to_string() -> std::string{return R"(a[b-d]e)"; } - template [[nodiscard]] auto test_tests_05_classes::regex_09_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_05_classes::regex_09_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1211,10 +1105,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_05_classes::regex_09_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_05_classes::regex_09_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1222,19 +1117,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_05_classes::regex_09_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_05_classes::regex_09_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_05_classes::regex_09_matcher::to_string() -> std::string{return R"(a[b-d])"; } + template [[nodiscard]] constexpr auto test_tests_05_classes::regex_09_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_05_classes::regex_09_matcher::to_string() -> std::string{return R"(a[b-d])"; } - - template [[nodiscard]] auto test_tests_05_classes::regex_10_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_05_classes::regex_10_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1263,10 +1158,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_05_classes::regex_10_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_05_classes::regex_10_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1274,19 +1170,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_05_classes::regex_10_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_05_classes::regex_10_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_05_classes::regex_10_matcher::to_string() -> std::string{return R"(a[-b])"; } - + template [[nodiscard]] constexpr auto test_tests_05_classes::regex_10_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_05_classes::regex_10_matcher::to_string() -> std::string{return R"(a[-b])"; } - template [[nodiscard]] auto test_tests_05_classes::regex_11_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_05_classes::regex_11_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1315,10 +1211,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_05_classes::regex_11_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_05_classes::regex_11_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1326,19 +1223,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_05_classes::regex_11_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_05_classes::regex_11_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_05_classes::regex_11_matcher::to_string() -> std::string{return R"(a[b-])"; } + template [[nodiscard]] constexpr auto test_tests_05_classes::regex_11_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_05_classes::regex_11_matcher::to_string() -> std::string{return R"(a[b-])"; } - - template [[nodiscard]] auto test_tests_05_classes::regex_12_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_05_classes::regex_12_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1366,10 +1263,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_05_classes::regex_12_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_05_classes::regex_12_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1377,19 +1275,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_05_classes::regex_12_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_05_classes::regex_12_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_05_classes::regex_12_matcher::to_string() -> std::string{return R"(a])"; } - + template [[nodiscard]] constexpr auto test_tests_05_classes::regex_12_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_05_classes::regex_12_matcher::to_string() -> std::string{return R"(a])"; } - template [[nodiscard]] auto test_tests_05_classes::regex_13_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_05_classes::regex_13_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1432,10 +1330,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_05_classes::regex_13_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_05_classes::regex_13_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1443,19 +1342,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_05_classes::regex_13_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_05_classes::regex_13_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_05_classes::regex_13_matcher::to_string() -> std::string{return R"(a[]]b)"; } - + template [[nodiscard]] constexpr auto test_tests_05_classes::regex_13_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_05_classes::regex_13_matcher::to_string() -> std::string{return R"(a[]]b)"; } - template [[nodiscard]] auto test_tests_05_classes::regex_14_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_05_classes::regex_14_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1498,10 +1397,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_05_classes::regex_14_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_05_classes::regex_14_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1509,19 +1409,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_05_classes::regex_14_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_05_classes::regex_14_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_05_classes::regex_14_matcher::to_string() -> std::string{return R"(a[^bc]d)"; } + template [[nodiscard]] constexpr auto test_tests_05_classes::regex_14_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_05_classes::regex_14_matcher::to_string() -> std::string{return R"(a[^bc]d)"; } - - template [[nodiscard]] auto test_tests_05_classes::regex_15_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_05_classes::regex_15_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1564,10 +1464,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_05_classes::regex_15_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_05_classes::regex_15_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1575,19 +1476,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_05_classes::regex_15_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_05_classes::regex_15_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_05_classes::regex_15_matcher::to_string() -> std::string{return R"(a[^bc]d)"; } - + template [[nodiscard]] constexpr auto test_tests_05_classes::regex_15_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_05_classes::regex_15_matcher::to_string() -> std::string{return R"(a[^bc]d)"; } - template [[nodiscard]] auto test_tests_05_classes::regex_16_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_05_classes::regex_16_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1630,10 +1531,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_05_classes::regex_16_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_05_classes::regex_16_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1641,19 +1543,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_05_classes::regex_16_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_05_classes::regex_16_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_05_classes::regex_16_matcher::to_string() -> std::string{return R"(a[^-b]c)"; } + template [[nodiscard]] constexpr auto test_tests_05_classes::regex_16_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_05_classes::regex_16_matcher::to_string() -> std::string{return R"(a[^-b]c)"; } - - template [[nodiscard]] auto test_tests_05_classes::regex_17_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_05_classes::regex_17_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1696,10 +1598,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_05_classes::regex_17_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_05_classes::regex_17_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1707,19 +1610,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_05_classes::regex_17_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_05_classes::regex_17_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_05_classes::regex_17_matcher::to_string() -> std::string{return R"(a[^-b]c)"; } - + template [[nodiscard]] constexpr auto test_tests_05_classes::regex_17_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_05_classes::regex_17_matcher::to_string() -> std::string{return R"(a[^-b]c)"; } - template [[nodiscard]] auto test_tests_05_classes::regex_18_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_05_classes::regex_18_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1762,10 +1665,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_05_classes::regex_18_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_05_classes::regex_18_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1773,19 +1677,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_05_classes::regex_18_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_05_classes::regex_18_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_05_classes::regex_18_matcher::to_string() -> std::string{return R"(a[^]b]c)"; } + template [[nodiscard]] constexpr auto test_tests_05_classes::regex_18_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_05_classes::regex_18_matcher::to_string() -> std::string{return R"(a[^]b]c)"; } - - template [[nodiscard]] auto test_tests_05_classes::regex_19_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_05_classes::regex_19_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1828,10 +1732,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_05_classes::regex_19_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_05_classes::regex_19_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1839,15 +1744,16 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_05_classes::regex_19_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_05_classes::regex_19_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_05_classes::regex_19_matcher::to_string() -> std::string{return R"(a[^]b]c)"; } + template [[nodiscard]] constexpr auto test_tests_05_classes::regex_19_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_05_classes::regex_19_matcher::to_string() -> std::string{return R"(a[^]b]c)"; } -#line 209 "pure2-regex_05_classes.cpp2" +#line 210 "pure2-regex_05_classes.cpp2" auto main() -> int{ CPP2_UFCS(run)(test_tests_05_classes()); } diff --git a/regression-tests/test-results/pure2-regex_06_boundaries.cpp b/regression-tests/test-results/pure2-regex_06_boundaries.cpp index db9bf5e83..700e1f9f1 100644 --- a/regression-tests/test-results/pure2-regex_06_boundaries.cpp +++ b/regression-tests/test-results/pure2-regex_06_boundaries.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes #include "cpp2regex.h" //=== Cpp2 type declarations ==================================================== @@ -9,7 +9,7 @@ #line 1 "pure2-regex_06_boundaries.cpp2" -#line 165 "pure2-regex_06_boundaries.cpp2" +#line 166 "pure2-regex_06_boundaries.cpp2" class test_tests_06_boundaries; @@ -18,37 +18,31 @@ class test_tests_06_boundaries; #line 1 "pure2-regex_06_boundaries.cpp2" [[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string; -#line 112 "pure2-regex_06_boundaries.cpp2" +#line 113 "pure2-regex_06_boundaries.cpp2" [[nodiscard]] auto sanitize(std::string str) -> std::string; -#line 124 "pure2-regex_06_boundaries.cpp2" +#line 125 "pure2-regex_06_boundaries.cpp2" template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, cpp2::impl::in resultExpected) -> void; -#line 165 "pure2-regex_06_boundaries.cpp2" +#line 166 "pure2-regex_06_boundaries.cpp2" class test_tests_06_boundaries { -#line 183 "pure2-regex_06_boundaries.cpp2" +#line 184 "pure2-regex_06_boundaries.cpp2" public: auto run() const& -> void; - public: class regex_01_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: template class regex_01_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_01_matcher() = default; public: regex_01_matcher(regex_01_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -56,25 +50,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_01 {}; public: class regex_02_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_01 {}; public: template class regex_02_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_02_matcher() = default; public: regex_02_matcher(regex_02_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -82,25 +70,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_02 {}; public: class regex_03_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_02 {}; public: template class regex_03_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_03_matcher() = default; public: regex_03_matcher(regex_03_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -108,25 +90,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_03 {}; public: class regex_04_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_03 {}; public: template class regex_04_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_04_matcher() = default; public: regex_04_matcher(regex_04_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -134,25 +110,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_04 {}; public: class regex_05_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_04 {}; public: template class regex_05_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_05_matcher() = default; public: regex_05_matcher(regex_05_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -160,25 +130,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_05 {}; public: class regex_06_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_05 {}; public: template class regex_06_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_06_matcher() = default; public: regex_06_matcher(regex_06_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -186,25 +150,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_06 {}; public: class regex_07_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_06 {}; public: template class regex_07_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_07_matcher() = default; public: regex_07_matcher(regex_07_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -212,25 +170,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_07 {}; public: class regex_08_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_07 {}; public: template class regex_08_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_08_matcher() = default; public: regex_08_matcher(regex_08_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -238,25 +190,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_08 {}; public: class regex_09_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_08 {}; public: template class regex_09_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_09_matcher() = default; public: regex_09_matcher(regex_09_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -264,25 +210,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_09 {}; public: class regex_10_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_09 {}; public: template class regex_10_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_10_matcher() = default; public: regex_10_matcher(regex_10_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -290,25 +230,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_10 {}; public: class regex_11_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_10 {}; public: template class regex_11_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_11_matcher() = default; public: regex_11_matcher(regex_11_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -316,25 +250,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_11 {}; public: class regex_12_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_11 {}; public: template class regex_12_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_12_matcher() = default; public: regex_12_matcher(regex_12_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -342,25 +270,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_12 {}; public: class regex_13_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_12 {}; public: template class regex_13_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_13_matcher() = default; public: regex_13_matcher(regex_13_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -368,25 +290,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_13 {}; public: class regex_14_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_13 {}; public: template class regex_14_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_14_matcher() = default; public: regex_14_matcher(regex_14_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -394,25 +310,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_14 {}; public: class regex_15_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_14 {}; public: template class regex_15_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_15_matcher() = default; public: regex_15_matcher(regex_15_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -420,25 +330,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_15 {}; public: class regex_16_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_15 {}; public: template class regex_16_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_16_matcher() = default; public: regex_16_matcher(regex_16_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -446,25 +350,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_16 {}; public: class regex_17_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_16 {}; public: template class regex_17_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_17_matcher() = default; public: regex_17_matcher(regex_17_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -472,13 +370,13 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_17 {}; + public: cpp2::regex::regular_expression> regex_17 {}; public: test_tests_06_boundaries() = default; public: test_tests_06_boundaries(test_tests_06_boundaries const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(test_tests_06_boundaries const&) -> void = delete; -#line 204 "pure2-regex_06_boundaries.cpp2" +#line 205 "pure2-regex_06_boundaries.cpp2" }; auto main() -> int; @@ -582,6 +480,7 @@ auto main() -> int; } result += std::to_string(cpp2::move(pos)); } + ++next; } else { std::cerr << "Not implemented"; @@ -597,7 +496,7 @@ auto main() -> int; return result; } -#line 112 "pure2-regex_06_boundaries.cpp2" +#line 113 "pure2-regex_06_boundaries.cpp2" [[nodiscard]] auto sanitize(std::string str) -> std::string { str = cpp2::string_util::replace_all(str, "\a", "\\a"); @@ -610,7 +509,7 @@ auto main() -> int; return cpp2::move(str); } -#line 124 "pure2-regex_06_boundaries.cpp2" +#line 125 "pure2-regex_06_boundaries.cpp2" template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, cpp2::impl::in resultExpected) -> void{ @@ -651,7 +550,7 @@ template auto test(M const& regex, cpp2::impl::in id, c std::cout << "" + cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(sanitize(str)) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(sanitize(resultExpected)) + "" << std::endl; } -#line 183 "pure2-regex_06_boundaries.cpp2" +#line 184 "pure2-regex_06_boundaries.cpp2" auto test_tests_06_boundaries::run() const& -> void{ std::cout << "Running tests_06_boundaries:" << std::endl; test(regex_01, "01", R"(\ba\b)", "a-", "y", R"(-)", "-"); @@ -677,8 +576,7 @@ template auto test(M const& regex, cpp2::impl::in id, c - - template [[nodiscard]] auto test_tests_06_boundaries::regex_01_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_06_boundaries::regex_01_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -708,10 +606,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_06_boundaries::regex_01_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_06_boundaries::regex_01_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -719,19 +618,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_06_boundaries::regex_01_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_06_boundaries::regex_01_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_06_boundaries::regex_01_matcher::to_string() -> std::string{return R"(\ba\b)"; } + template [[nodiscard]] constexpr auto test_tests_06_boundaries::regex_01_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_06_boundaries::regex_01_matcher::to_string() -> std::string{return R"(\ba\b)"; } - - template [[nodiscard]] auto test_tests_06_boundaries::regex_02_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_06_boundaries::regex_02_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -761,10 +660,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_06_boundaries::regex_02_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_06_boundaries::regex_02_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -772,19 +672,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_06_boundaries::regex_02_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_06_boundaries::regex_02_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_06_boundaries::regex_02_matcher::to_string() -> std::string{return R"(\ba\b)"; } - + template [[nodiscard]] constexpr auto test_tests_06_boundaries::regex_02_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_06_boundaries::regex_02_matcher::to_string() -> std::string{return R"(\ba\b)"; } - template [[nodiscard]] auto test_tests_06_boundaries::regex_03_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_06_boundaries::regex_03_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -814,10 +714,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_06_boundaries::regex_03_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_06_boundaries::regex_03_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -825,19 +726,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_06_boundaries::regex_03_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_06_boundaries::regex_03_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_06_boundaries::regex_03_matcher::to_string() -> std::string{return R"(\ba\b)"; } - + template [[nodiscard]] constexpr auto test_tests_06_boundaries::regex_03_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_06_boundaries::regex_03_matcher::to_string() -> std::string{return R"(\ba\b)"; } - template [[nodiscard]] auto test_tests_06_boundaries::regex_04_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_06_boundaries::regex_04_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -867,10 +768,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_06_boundaries::regex_04_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_06_boundaries::regex_04_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -878,19 +780,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_06_boundaries::regex_04_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_06_boundaries::regex_04_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_06_boundaries::regex_04_matcher::to_string() -> std::string{return R"(\by\b)"; } + template [[nodiscard]] constexpr auto test_tests_06_boundaries::regex_04_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_06_boundaries::regex_04_matcher::to_string() -> std::string{return R"(\by\b)"; } - - template [[nodiscard]] auto test_tests_06_boundaries::regex_05_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_06_boundaries::regex_05_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -920,10 +822,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_06_boundaries::regex_05_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_06_boundaries::regex_05_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -931,19 +834,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_06_boundaries::regex_05_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_06_boundaries::regex_05_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_06_boundaries::regex_05_matcher::to_string() -> std::string{return R"(\by\b)"; } - + template [[nodiscard]] constexpr auto test_tests_06_boundaries::regex_05_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_06_boundaries::regex_05_matcher::to_string() -> std::string{return R"(\by\b)"; } - template [[nodiscard]] auto test_tests_06_boundaries::regex_06_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_06_boundaries::regex_06_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -973,10 +876,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_06_boundaries::regex_06_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_06_boundaries::regex_06_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -984,19 +888,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_06_boundaries::regex_06_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_06_boundaries::regex_06_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_06_boundaries::regex_06_matcher::to_string() -> std::string{return R"(\by\b)"; } + template [[nodiscard]] constexpr auto test_tests_06_boundaries::regex_06_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_06_boundaries::regex_06_matcher::to_string() -> std::string{return R"(\by\b)"; } - - template [[nodiscard]] auto test_tests_06_boundaries::regex_07_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_06_boundaries::regex_07_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1026,10 +930,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_06_boundaries::regex_07_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_06_boundaries::regex_07_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1037,19 +942,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_06_boundaries::regex_07_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_06_boundaries::regex_07_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_06_boundaries::regex_07_matcher::to_string() -> std::string{return R"(\Ba\B)"; } - + template [[nodiscard]] constexpr auto test_tests_06_boundaries::regex_07_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_06_boundaries::regex_07_matcher::to_string() -> std::string{return R"(\Ba\B)"; } - template [[nodiscard]] auto test_tests_06_boundaries::regex_08_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_06_boundaries::regex_08_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1079,10 +984,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_06_boundaries::regex_08_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_06_boundaries::regex_08_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1090,19 +996,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_06_boundaries::regex_08_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_06_boundaries::regex_08_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_06_boundaries::regex_08_matcher::to_string() -> std::string{return R"(\Ba\B)"; } + template [[nodiscard]] constexpr auto test_tests_06_boundaries::regex_08_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_06_boundaries::regex_08_matcher::to_string() -> std::string{return R"(\Ba\B)"; } - - template [[nodiscard]] auto test_tests_06_boundaries::regex_09_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_06_boundaries::regex_09_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1132,10 +1038,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_06_boundaries::regex_09_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_06_boundaries::regex_09_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1143,19 +1050,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_06_boundaries::regex_09_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_06_boundaries::regex_09_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_06_boundaries::regex_09_matcher::to_string() -> std::string{return R"(\Ba\B)"; } - + template [[nodiscard]] constexpr auto test_tests_06_boundaries::regex_09_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_06_boundaries::regex_09_matcher::to_string() -> std::string{return R"(\Ba\B)"; } - template [[nodiscard]] auto test_tests_06_boundaries::regex_10_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_06_boundaries::regex_10_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1185,10 +1092,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_06_boundaries::regex_10_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_06_boundaries::regex_10_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1196,19 +1104,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_06_boundaries::regex_10_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_06_boundaries::regex_10_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_06_boundaries::regex_10_matcher::to_string() -> std::string{return R"(\By\b)"; } + template [[nodiscard]] constexpr auto test_tests_06_boundaries::regex_10_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_06_boundaries::regex_10_matcher::to_string() -> std::string{return R"(\By\b)"; } - - template [[nodiscard]] auto test_tests_06_boundaries::regex_11_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_06_boundaries::regex_11_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1238,10 +1146,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_06_boundaries::regex_11_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_06_boundaries::regex_11_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1249,19 +1158,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_06_boundaries::regex_11_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_06_boundaries::regex_11_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_06_boundaries::regex_11_matcher::to_string() -> std::string{return R"(\By\b)"; } - + template [[nodiscard]] constexpr auto test_tests_06_boundaries::regex_11_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_06_boundaries::regex_11_matcher::to_string() -> std::string{return R"(\By\b)"; } - template [[nodiscard]] auto test_tests_06_boundaries::regex_12_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_06_boundaries::regex_12_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1291,10 +1200,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_06_boundaries::regex_12_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_06_boundaries::regex_12_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1302,19 +1212,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_06_boundaries::regex_12_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_06_boundaries::regex_12_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_06_boundaries::regex_12_matcher::to_string() -> std::string{return R"(\By\b)"; } + template [[nodiscard]] constexpr auto test_tests_06_boundaries::regex_12_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_06_boundaries::regex_12_matcher::to_string() -> std::string{return R"(\By\b)"; } - - template [[nodiscard]] auto test_tests_06_boundaries::regex_13_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_06_boundaries::regex_13_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1344,10 +1254,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_06_boundaries::regex_13_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_06_boundaries::regex_13_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1355,19 +1266,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_06_boundaries::regex_13_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_06_boundaries::regex_13_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_06_boundaries::regex_13_matcher::to_string() -> std::string{return R"(\By\b)"; } - + template [[nodiscard]] constexpr auto test_tests_06_boundaries::regex_13_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_06_boundaries::regex_13_matcher::to_string() -> std::string{return R"(\By\b)"; } - template [[nodiscard]] auto test_tests_06_boundaries::regex_14_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_06_boundaries::regex_14_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1397,10 +1308,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_06_boundaries::regex_14_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_06_boundaries::regex_14_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1408,19 +1320,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_06_boundaries::regex_14_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_06_boundaries::regex_14_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_06_boundaries::regex_14_matcher::to_string() -> std::string{return R"(\by\B)"; } + template [[nodiscard]] constexpr auto test_tests_06_boundaries::regex_14_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_06_boundaries::regex_14_matcher::to_string() -> std::string{return R"(\by\B)"; } - - template [[nodiscard]] auto test_tests_06_boundaries::regex_15_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_06_boundaries::regex_15_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1450,10 +1362,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_06_boundaries::regex_15_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_06_boundaries::regex_15_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1461,19 +1374,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_06_boundaries::regex_15_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_06_boundaries::regex_15_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_06_boundaries::regex_15_matcher::to_string() -> std::string{return R"(\By\B)"; } - + template [[nodiscard]] constexpr auto test_tests_06_boundaries::regex_15_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_06_boundaries::regex_15_matcher::to_string() -> std::string{return R"(\By\B)"; } - template [[nodiscard]] auto test_tests_06_boundaries::regex_16_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_06_boundaries::regex_16_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1488,10 +1401,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_06_boundaries::regex_16_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_06_boundaries::regex_16_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1499,19 +1413,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_06_boundaries::regex_16_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_06_boundaries::regex_16_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_06_boundaries::regex_16_matcher::to_string() -> std::string{return R"(\b)"; } + template [[nodiscard]] constexpr auto test_tests_06_boundaries::regex_16_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_06_boundaries::regex_16_matcher::to_string() -> std::string{return R"(\b)"; } - - template [[nodiscard]] auto test_tests_06_boundaries::regex_17_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_06_boundaries::regex_17_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1526,10 +1440,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_06_boundaries::regex_17_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_06_boundaries::regex_17_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1537,15 +1452,16 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_06_boundaries::regex_17_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_06_boundaries::regex_17_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_06_boundaries::regex_17_matcher::to_string() -> std::string{return R"(\B)"; } + template [[nodiscard]] constexpr auto test_tests_06_boundaries::regex_17_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_06_boundaries::regex_17_matcher::to_string() -> std::string{return R"(\B)"; } -#line 205 "pure2-regex_06_boundaries.cpp2" +#line 206 "pure2-regex_06_boundaries.cpp2" auto main() -> int{ CPP2_UFCS(run)(test_tests_06_boundaries()); } diff --git a/regression-tests/test-results/pure2-regex_07_short_classes.cpp b/regression-tests/test-results/pure2-regex_07_short_classes.cpp index 82c9fe36f..29e44106b 100644 --- a/regression-tests/test-results/pure2-regex_07_short_classes.cpp +++ b/regression-tests/test-results/pure2-regex_07_short_classes.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes #include "cpp2regex.h" //=== Cpp2 type declarations ==================================================== @@ -9,7 +9,7 @@ #line 1 "pure2-regex_07_short_classes.cpp2" -#line 165 "pure2-regex_07_short_classes.cpp2" +#line 166 "pure2-regex_07_short_classes.cpp2" class test_tests_07_short_classes; @@ -18,37 +18,31 @@ class test_tests_07_short_classes; #line 1 "pure2-regex_07_short_classes.cpp2" [[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string; -#line 112 "pure2-regex_07_short_classes.cpp2" +#line 113 "pure2-regex_07_short_classes.cpp2" [[nodiscard]] auto sanitize(std::string str) -> std::string; -#line 124 "pure2-regex_07_short_classes.cpp2" +#line 125 "pure2-regex_07_short_classes.cpp2" template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, cpp2::impl::in resultExpected) -> void; -#line 165 "pure2-regex_07_short_classes.cpp2" +#line 166 "pure2-regex_07_short_classes.cpp2" class test_tests_07_short_classes { -#line 190 "pure2-regex_07_short_classes.cpp2" +#line 191 "pure2-regex_07_short_classes.cpp2" public: auto run() const& -> void; - public: class regex_01_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: template class regex_01_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_01_matcher() = default; public: regex_01_matcher(regex_01_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -56,25 +50,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_01 {}; public: class regex_02_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_01 {}; public: template class regex_02_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_02_matcher() = default; public: regex_02_matcher(regex_02_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -82,25 +70,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_02 {}; public: class regex_03_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_02 {}; public: template class regex_03_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_03_matcher() = default; public: regex_03_matcher(regex_03_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -108,25 +90,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_03 {}; public: class regex_04_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_03 {}; public: template class regex_04_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_04_matcher() = default; public: regex_04_matcher(regex_04_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -134,25 +110,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_04 {}; public: class regex_05_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_04 {}; public: template class regex_05_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_05_matcher() = default; public: regex_05_matcher(regex_05_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -160,25 +130,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_05 {}; public: class regex_06_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_05 {}; public: template class regex_06_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_06_matcher() = default; public: regex_06_matcher(regex_06_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -186,25 +150,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_06 {}; public: class regex_07_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_06 {}; public: template class regex_07_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_07_matcher() = default; public: regex_07_matcher(regex_07_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -212,25 +170,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_07 {}; public: class regex_08_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_07 {}; public: template class regex_08_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_08_matcher() = default; public: regex_08_matcher(regex_08_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -238,25 +190,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_08 {}; public: class regex_09_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_08 {}; public: template class regex_09_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_09_matcher() = default; public: regex_09_matcher(regex_09_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -264,25 +210,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_09 {}; public: class regex_10_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_09 {}; public: template class regex_10_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_10_matcher() = default; public: regex_10_matcher(regex_10_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -290,25 +230,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_10 {}; public: class regex_11_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_10 {}; public: template class regex_11_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_11_matcher() = default; public: regex_11_matcher(regex_11_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -316,25 +250,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_11 {}; public: class regex_12_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_11 {}; public: template class regex_12_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_12_matcher() = default; public: regex_12_matcher(regex_12_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -342,25 +270,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_12 {}; public: class regex_13_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_12 {}; public: template class regex_13_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_13_matcher() = default; public: regex_13_matcher(regex_13_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -368,25 +290,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_13 {}; public: class regex_14_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_13 {}; public: template class regex_14_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_14_matcher() = default; public: regex_14_matcher(regex_14_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -394,25 +310,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_14 {}; public: class regex_15_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_14 {}; public: template class regex_15_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_15_matcher() = default; public: regex_15_matcher(regex_15_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -420,25 +330,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_15 {}; public: class regex_16_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_15 {}; public: template class regex_16_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_16_matcher() = default; public: regex_16_matcher(regex_16_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -446,25 +350,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_16 {}; public: class regex_17_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_16 {}; public: template class regex_17_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_17_matcher() = default; public: regex_17_matcher(regex_17_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -472,25 +370,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_17 {}; public: class regex_18_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_17 {}; public: template class regex_18_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_18_matcher() = default; public: regex_18_matcher(regex_18_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -498,25 +390,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_18 {}; public: class regex_19_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_18 {}; public: template class regex_19_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_19_matcher() = default; public: regex_19_matcher(regex_19_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -524,25 +410,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_19 {}; public: class regex_20_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_19 {}; public: template class regex_20_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_20_matcher() = default; public: regex_20_matcher(regex_20_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -550,25 +430,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_20 {}; public: class regex_21_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_20 {}; public: template class regex_21_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_21_matcher() = default; public: regex_21_matcher(regex_21_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -576,25 +450,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_21 {}; public: class regex_22_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_21 {}; public: template class regex_22_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_22_matcher() = default; public: regex_22_matcher(regex_22_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -602,25 +470,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_22 {}; public: class regex_23_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_22 {}; public: template class regex_23_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_23_matcher() = default; public: regex_23_matcher(regex_23_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -628,25 +490,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_23 {}; public: class regex_24_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_23 {}; public: template class regex_24_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_24_matcher() = default; public: regex_24_matcher(regex_24_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -654,13 +510,13 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_24 {}; + public: cpp2::regex::regular_expression> regex_24 {}; public: test_tests_07_short_classes() = default; public: test_tests_07_short_classes(test_tests_07_short_classes const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(test_tests_07_short_classes const&) -> void = delete; -#line 218 "pure2-regex_07_short_classes.cpp2" +#line 219 "pure2-regex_07_short_classes.cpp2" }; auto main() -> int; @@ -764,6 +620,7 @@ auto main() -> int; } result += std::to_string(cpp2::move(pos)); } + ++next; } else { std::cerr << "Not implemented"; @@ -779,7 +636,7 @@ auto main() -> int; return result; } -#line 112 "pure2-regex_07_short_classes.cpp2" +#line 113 "pure2-regex_07_short_classes.cpp2" [[nodiscard]] auto sanitize(std::string str) -> std::string { str = cpp2::string_util::replace_all(str, "\a", "\\a"); @@ -792,7 +649,7 @@ auto main() -> int; return cpp2::move(str); } -#line 124 "pure2-regex_07_short_classes.cpp2" +#line 125 "pure2-regex_07_short_classes.cpp2" template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, cpp2::impl::in resultExpected) -> void{ @@ -833,7 +690,7 @@ template auto test(M const& regex, cpp2::impl::in id, c std::cout << "" + cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(sanitize(str)) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(sanitize(resultExpected)) + "" << std::endl; } -#line 190 "pure2-regex_07_short_classes.cpp2" +#line 191 "pure2-regex_07_short_classes.cpp2" auto test_tests_07_short_classes::run() const& -> void{ std::cout << "Running tests_07_short_classes:" << std::endl; test(regex_01, "01", R"(\w)", "a", "y", R"(-)", "-"); @@ -866,8 +723,7 @@ template auto test(M const& regex, cpp2::impl::in id, c - - template [[nodiscard]] auto test_tests_07_short_classes::regex_01_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_07_short_classes::regex_01_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -882,10 +738,11 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_07_short_classes::regex_01_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_07_short_classes::regex_01_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -893,19 +750,19 @@ template auto test(M const& regex, cpp2::impl::in id, c return r; } - template [[nodiscard]] auto test_tests_07_short_classes::regex_01_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_07_short_classes::regex_01_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_07_short_classes::regex_01_matcher::to_string() -> std::string{return R"(\w)"; } + template [[nodiscard]] constexpr auto test_tests_07_short_classes::regex_01_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_07_short_classes::regex_01_matcher::to_string() -> std::string{return R"(\w)"; } - - template [[nodiscard]] auto test_tests_07_short_classes::regex_02_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_07_short_classes::regex_02_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -920,10 +777,11 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_07_short_classes::regex_02_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_07_short_classes::regex_02_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -931,19 +789,19 @@ template auto test(M const& regex, cpp2::impl::in id, c return r; } - template [[nodiscard]] auto test_tests_07_short_classes::regex_02_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_07_short_classes::regex_02_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_07_short_classes::regex_02_matcher::to_string() -> std::string{return R"(\w)"; } - + template [[nodiscard]] constexpr auto test_tests_07_short_classes::regex_02_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_07_short_classes::regex_02_matcher::to_string() -> std::string{return R"(\w)"; } - template [[nodiscard]] auto test_tests_07_short_classes::regex_03_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_07_short_classes::regex_03_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -958,10 +816,11 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_07_short_classes::regex_03_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_07_short_classes::regex_03_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -969,19 +828,19 @@ template auto test(M const& regex, cpp2::impl::in id, c return r; } - template [[nodiscard]] auto test_tests_07_short_classes::regex_03_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_07_short_classes::regex_03_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_07_short_classes::regex_03_matcher::to_string() -> std::string{return R"(\W)"; } - + template [[nodiscard]] constexpr auto test_tests_07_short_classes::regex_03_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_07_short_classes::regex_03_matcher::to_string() -> std::string{return R"(\W)"; } - template [[nodiscard]] auto test_tests_07_short_classes::regex_04_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_07_short_classes::regex_04_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -996,10 +855,11 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_07_short_classes::regex_04_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_07_short_classes::regex_04_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1007,19 +867,19 @@ template auto test(M const& regex, cpp2::impl::in id, c return r; } - template [[nodiscard]] auto test_tests_07_short_classes::regex_04_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_07_short_classes::regex_04_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_07_short_classes::regex_04_matcher::to_string() -> std::string{return R"(\W)"; } + template [[nodiscard]] constexpr auto test_tests_07_short_classes::regex_04_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_07_short_classes::regex_04_matcher::to_string() -> std::string{return R"(\W)"; } - - template [[nodiscard]] auto test_tests_07_short_classes::regex_05_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_07_short_classes::regex_05_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1062,10 +922,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_07_short_classes::regex_05_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_07_short_classes::regex_05_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1073,19 +934,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_07_short_classes::regex_05_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_07_short_classes::regex_05_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_07_short_classes::regex_05_matcher::to_string() -> std::string{return R"(a\sb)"; } - + template [[nodiscard]] constexpr auto test_tests_07_short_classes::regex_05_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_07_short_classes::regex_05_matcher::to_string() -> std::string{return R"(a\sb)"; } - template [[nodiscard]] auto test_tests_07_short_classes::regex_06_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_07_short_classes::regex_06_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1128,10 +989,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_07_short_classes::regex_06_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_07_short_classes::regex_06_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1139,19 +1001,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_07_short_classes::regex_06_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_07_short_classes::regex_06_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_07_short_classes::regex_06_matcher::to_string() -> std::string{return R"(a\sb)"; } - + template [[nodiscard]] constexpr auto test_tests_07_short_classes::regex_06_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_07_short_classes::regex_06_matcher::to_string() -> std::string{return R"(a\sb)"; } - template [[nodiscard]] auto test_tests_07_short_classes::regex_07_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_07_short_classes::regex_07_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1194,10 +1056,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_07_short_classes::regex_07_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_07_short_classes::regex_07_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1205,19 +1068,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_07_short_classes::regex_07_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_07_short_classes::regex_07_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_07_short_classes::regex_07_matcher::to_string() -> std::string{return R"(a\Sb)"; } + template [[nodiscard]] constexpr auto test_tests_07_short_classes::regex_07_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_07_short_classes::regex_07_matcher::to_string() -> std::string{return R"(a\Sb)"; } - - template [[nodiscard]] auto test_tests_07_short_classes::regex_08_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_07_short_classes::regex_08_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1260,10 +1123,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_07_short_classes::regex_08_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_07_short_classes::regex_08_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1271,19 +1135,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_07_short_classes::regex_08_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_07_short_classes::regex_08_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_07_short_classes::regex_08_matcher::to_string() -> std::string{return R"(a\Sb)"; } - + template [[nodiscard]] constexpr auto test_tests_07_short_classes::regex_08_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_07_short_classes::regex_08_matcher::to_string() -> std::string{return R"(a\Sb)"; } - template [[nodiscard]] auto test_tests_07_short_classes::regex_09_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_07_short_classes::regex_09_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1298,10 +1162,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_07_short_classes::regex_09_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_07_short_classes::regex_09_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1309,19 +1174,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_07_short_classes::regex_09_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_07_short_classes::regex_09_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_07_short_classes::regex_09_matcher::to_string() -> std::string{return R"(\d)"; } - + template [[nodiscard]] constexpr auto test_tests_07_short_classes::regex_09_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_07_short_classes::regex_09_matcher::to_string() -> std::string{return R"(\d)"; } - template [[nodiscard]] auto test_tests_07_short_classes::regex_10_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_07_short_classes::regex_10_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1336,10 +1201,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_07_short_classes::regex_10_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_07_short_classes::regex_10_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1347,19 +1213,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_07_short_classes::regex_10_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_07_short_classes::regex_10_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_07_short_classes::regex_10_matcher::to_string() -> std::string{return R"(\d)"; } + template [[nodiscard]] constexpr auto test_tests_07_short_classes::regex_10_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_07_short_classes::regex_10_matcher::to_string() -> std::string{return R"(\d)"; } - - template [[nodiscard]] auto test_tests_07_short_classes::regex_11_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_07_short_classes::regex_11_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1374,10 +1240,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_07_short_classes::regex_11_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_07_short_classes::regex_11_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1385,19 +1252,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_07_short_classes::regex_11_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_07_short_classes::regex_11_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_07_short_classes::regex_11_matcher::to_string() -> std::string{return R"(\D)"; } - + template [[nodiscard]] constexpr auto test_tests_07_short_classes::regex_11_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_07_short_classes::regex_11_matcher::to_string() -> std::string{return R"(\D)"; } - template [[nodiscard]] auto test_tests_07_short_classes::regex_12_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_07_short_classes::regex_12_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1412,10 +1279,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_07_short_classes::regex_12_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_07_short_classes::regex_12_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1423,19 +1291,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_07_short_classes::regex_12_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_07_short_classes::regex_12_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_07_short_classes::regex_12_matcher::to_string() -> std::string{return R"(\D)"; } - + template [[nodiscard]] constexpr auto test_tests_07_short_classes::regex_12_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_07_short_classes::regex_12_matcher::to_string() -> std::string{return R"(\D)"; } - template [[nodiscard]] auto test_tests_07_short_classes::regex_13_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_07_short_classes::regex_13_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1450,10 +1318,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_07_short_classes::regex_13_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_07_short_classes::regex_13_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1461,19 +1330,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_07_short_classes::regex_13_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_07_short_classes::regex_13_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_07_short_classes::regex_13_matcher::to_string() -> std::string{return R"([\w])"; } + template [[nodiscard]] constexpr auto test_tests_07_short_classes::regex_13_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_07_short_classes::regex_13_matcher::to_string() -> std::string{return R"([\w])"; } - - template [[nodiscard]] auto test_tests_07_short_classes::regex_14_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_07_short_classes::regex_14_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1488,10 +1357,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_07_short_classes::regex_14_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_07_short_classes::regex_14_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1499,19 +1369,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_07_short_classes::regex_14_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_07_short_classes::regex_14_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_07_short_classes::regex_14_matcher::to_string() -> std::string{return R"([\w])"; } - + template [[nodiscard]] constexpr auto test_tests_07_short_classes::regex_14_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_07_short_classes::regex_14_matcher::to_string() -> std::string{return R"([\w])"; } - template [[nodiscard]] auto test_tests_07_short_classes::regex_15_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_07_short_classes::regex_15_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1526,10 +1396,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_07_short_classes::regex_15_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_07_short_classes::regex_15_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1537,19 +1408,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_07_short_classes::regex_15_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_07_short_classes::regex_15_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_07_short_classes::regex_15_matcher::to_string() -> std::string{return R"([\W])"; } - + template [[nodiscard]] constexpr auto test_tests_07_short_classes::regex_15_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_07_short_classes::regex_15_matcher::to_string() -> std::string{return R"([\W])"; } - template [[nodiscard]] auto test_tests_07_short_classes::regex_16_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_07_short_classes::regex_16_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1564,10 +1435,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_07_short_classes::regex_16_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_07_short_classes::regex_16_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1575,19 +1447,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_07_short_classes::regex_16_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_07_short_classes::regex_16_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_07_short_classes::regex_16_matcher::to_string() -> std::string{return R"([\W])"; } + template [[nodiscard]] constexpr auto test_tests_07_short_classes::regex_16_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_07_short_classes::regex_16_matcher::to_string() -> std::string{return R"([\W])"; } - - template [[nodiscard]] auto test_tests_07_short_classes::regex_17_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_07_short_classes::regex_17_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1630,10 +1502,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_07_short_classes::regex_17_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_07_short_classes::regex_17_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1641,19 +1514,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_07_short_classes::regex_17_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_07_short_classes::regex_17_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_07_short_classes::regex_17_matcher::to_string() -> std::string{return R"(a[\s]b)"; } - + template [[nodiscard]] constexpr auto test_tests_07_short_classes::regex_17_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_07_short_classes::regex_17_matcher::to_string() -> std::string{return R"(a[\s]b)"; } - template [[nodiscard]] auto test_tests_07_short_classes::regex_18_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_07_short_classes::regex_18_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1696,10 +1569,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_07_short_classes::regex_18_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_07_short_classes::regex_18_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1707,19 +1581,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_07_short_classes::regex_18_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_07_short_classes::regex_18_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_07_short_classes::regex_18_matcher::to_string() -> std::string{return R"(a[\s]b)"; } - + template [[nodiscard]] constexpr auto test_tests_07_short_classes::regex_18_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_07_short_classes::regex_18_matcher::to_string() -> std::string{return R"(a[\s]b)"; } - template [[nodiscard]] auto test_tests_07_short_classes::regex_19_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_07_short_classes::regex_19_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1762,10 +1636,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_07_short_classes::regex_19_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_07_short_classes::regex_19_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1773,19 +1648,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_07_short_classes::regex_19_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_07_short_classes::regex_19_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_07_short_classes::regex_19_matcher::to_string() -> std::string{return R"(a[\S]b)"; } + template [[nodiscard]] constexpr auto test_tests_07_short_classes::regex_19_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_07_short_classes::regex_19_matcher::to_string() -> std::string{return R"(a[\S]b)"; } - - template [[nodiscard]] auto test_tests_07_short_classes::regex_20_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_07_short_classes::regex_20_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1828,10 +1703,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_07_short_classes::regex_20_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_07_short_classes::regex_20_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1839,19 +1715,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_07_short_classes::regex_20_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_07_short_classes::regex_20_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_07_short_classes::regex_20_matcher::to_string() -> std::string{return R"(a[\S]b)"; } - + template [[nodiscard]] constexpr auto test_tests_07_short_classes::regex_20_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_07_short_classes::regex_20_matcher::to_string() -> std::string{return R"(a[\S]b)"; } - template [[nodiscard]] auto test_tests_07_short_classes::regex_21_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_07_short_classes::regex_21_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1866,10 +1742,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_07_short_classes::regex_21_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_07_short_classes::regex_21_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1877,19 +1754,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_07_short_classes::regex_21_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_07_short_classes::regex_21_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_07_short_classes::regex_21_matcher::to_string() -> std::string{return R"([\d])"; } - + template [[nodiscard]] constexpr auto test_tests_07_short_classes::regex_21_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_07_short_classes::regex_21_matcher::to_string() -> std::string{return R"([\d])"; } - template [[nodiscard]] auto test_tests_07_short_classes::regex_22_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_07_short_classes::regex_22_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1904,10 +1781,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_07_short_classes::regex_22_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_07_short_classes::regex_22_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1915,19 +1793,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_07_short_classes::regex_22_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_07_short_classes::regex_22_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_07_short_classes::regex_22_matcher::to_string() -> std::string{return R"([\d])"; } + template [[nodiscard]] constexpr auto test_tests_07_short_classes::regex_22_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_07_short_classes::regex_22_matcher::to_string() -> std::string{return R"([\d])"; } - - template [[nodiscard]] auto test_tests_07_short_classes::regex_23_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_07_short_classes::regex_23_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1942,10 +1820,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_07_short_classes::regex_23_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_07_short_classes::regex_23_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1953,19 +1832,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_07_short_classes::regex_23_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_07_short_classes::regex_23_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_07_short_classes::regex_23_matcher::to_string() -> std::string{return R"([\D])"; } - + template [[nodiscard]] constexpr auto test_tests_07_short_classes::regex_23_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_07_short_classes::regex_23_matcher::to_string() -> std::string{return R"([\D])"; } - template [[nodiscard]] auto test_tests_07_short_classes::regex_24_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_07_short_classes::regex_24_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1980,10 +1859,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_07_short_classes::regex_24_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_07_short_classes::regex_24_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1991,15 +1871,16 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_07_short_classes::regex_24_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_07_short_classes::regex_24_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_07_short_classes::regex_24_matcher::to_string() -> std::string{return R"([\D])"; } + template [[nodiscard]] constexpr auto test_tests_07_short_classes::regex_24_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_07_short_classes::regex_24_matcher::to_string() -> std::string{return R"([\D])"; } -#line 219 "pure2-regex_07_short_classes.cpp2" +#line 220 "pure2-regex_07_short_classes.cpp2" auto main() -> int{ CPP2_UFCS(run)(test_tests_07_short_classes()); } diff --git a/regression-tests/test-results/pure2-regex_08_alternatives.cpp b/regression-tests/test-results/pure2-regex_08_alternatives.cpp index fce990d18..769229c34 100644 --- a/regression-tests/test-results/pure2-regex_08_alternatives.cpp +++ b/regression-tests/test-results/pure2-regex_08_alternatives.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes #include "cpp2regex.h" //=== Cpp2 type declarations ==================================================== @@ -9,7 +9,7 @@ #line 1 "pure2-regex_08_alternatives.cpp2" -#line 165 "pure2-regex_08_alternatives.cpp2" +#line 166 "pure2-regex_08_alternatives.cpp2" class test_tests_08_alternatives; @@ -18,52 +18,46 @@ class test_tests_08_alternatives; #line 1 "pure2-regex_08_alternatives.cpp2" [[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string; -#line 112 "pure2-regex_08_alternatives.cpp2" +#line 113 "pure2-regex_08_alternatives.cpp2" [[nodiscard]] auto sanitize(std::string str) -> std::string; -#line 124 "pure2-regex_08_alternatives.cpp2" +#line 125 "pure2-regex_08_alternatives.cpp2" template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, cpp2::impl::in resultExpected) -> void; -#line 165 "pure2-regex_08_alternatives.cpp2" +#line 166 "pure2-regex_08_alternatives.cpp2" class test_tests_08_alternatives { -#line 168 "pure2-regex_08_alternatives.cpp2" +#line 169 "pure2-regex_08_alternatives.cpp2" public: auto run() const& -> void; - public: class regex_01_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: template class regex_01_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_01_matcher() = default; public: regex_01_matcher(regex_01_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -71,40 +65,34 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_01 {}; public: class regex_02_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_01 {}; public: template class regex_02_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_02_matcher() = default; public: regex_02_matcher(regex_02_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -112,13 +100,13 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_02 {}; + public: cpp2::regex::regular_expression> regex_02 {}; public: test_tests_08_alternatives() = default; public: test_tests_08_alternatives(test_tests_08_alternatives const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(test_tests_08_alternatives const&) -> void = delete; -#line 174 "pure2-regex_08_alternatives.cpp2" +#line 175 "pure2-regex_08_alternatives.cpp2" }; auto main() -> int; @@ -222,6 +210,7 @@ auto main() -> int; } result += std::to_string(cpp2::move(pos)); } + ++next; } else { std::cerr << "Not implemented"; @@ -237,7 +226,7 @@ auto main() -> int; return result; } -#line 112 "pure2-regex_08_alternatives.cpp2" +#line 113 "pure2-regex_08_alternatives.cpp2" [[nodiscard]] auto sanitize(std::string str) -> std::string { str = cpp2::string_util::replace_all(str, "\a", "\\a"); @@ -250,7 +239,7 @@ auto main() -> int; return cpp2::move(str); } -#line 124 "pure2-regex_08_alternatives.cpp2" +#line 125 "pure2-regex_08_alternatives.cpp2" template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, cpp2::impl::in resultExpected) -> void{ @@ -291,7 +280,7 @@ template auto test(M const& regex, cpp2::impl::in id, c std::cout << "" + cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(sanitize(str)) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(sanitize(resultExpected)) + "" << std::endl; } -#line 168 "pure2-regex_08_alternatives.cpp2" +#line 169 "pure2-regex_08_alternatives.cpp2" auto test_tests_08_alternatives::run() const& -> void{ std::cout << "Running tests_08_alternatives:" << std::endl; test(regex_01, "01", R"(ab|cd)", "abc", "y", R"($&)", "ab"); @@ -302,8 +291,7 @@ template auto test(M const& regex, cpp2::impl::in id, c - - template [[nodiscard]] auto test_tests_08_alternatives::regex_01_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_08_alternatives::regex_01_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -331,11 +319,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_08_alternatives::regex_01_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_08_alternatives::regex_01_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -363,11 +352,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_08_alternatives::regex_01_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_08_alternatives::regex_01_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -381,11 +371,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_08_alternatives::regex_01_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_08_alternatives::regex_01_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -399,10 +390,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_08_alternatives::regex_01_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_08_alternatives::regex_01_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -410,19 +402,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_08_alternatives::regex_01_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_08_alternatives::regex_01_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_08_alternatives::regex_01_matcher::to_string() -> std::string{return R"(ab|cd)"; } + template [[nodiscard]] constexpr auto test_tests_08_alternatives::regex_01_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_08_alternatives::regex_01_matcher::to_string() -> std::string{return R"(ab|cd)"; } - - template [[nodiscard]] auto test_tests_08_alternatives::regex_02_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_08_alternatives::regex_02_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -450,11 +442,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_08_alternatives::regex_02_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_08_alternatives::regex_02_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -482,11 +475,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_08_alternatives::regex_02_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_08_alternatives::regex_02_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -500,11 +494,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_08_alternatives::regex_02_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_08_alternatives::regex_02_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -518,10 +513,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_08_alternatives::regex_02_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_08_alternatives::regex_02_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -529,15 +525,16 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_08_alternatives::regex_02_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_08_alternatives::regex_02_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_08_alternatives::regex_02_matcher::to_string() -> std::string{return R"(ab|cd)"; } + template [[nodiscard]] constexpr auto test_tests_08_alternatives::regex_02_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_08_alternatives::regex_02_matcher::to_string() -> std::string{return R"(ab|cd)"; } -#line 175 "pure2-regex_08_alternatives.cpp2" +#line 176 "pure2-regex_08_alternatives.cpp2" auto main() -> int{ CPP2_UFCS(run)(test_tests_08_alternatives()); } diff --git a/regression-tests/test-results/pure2-regex_09_groups.cpp b/regression-tests/test-results/pure2-regex_09_groups.cpp index 041fd6120..5e36105b1 100644 --- a/regression-tests/test-results/pure2-regex_09_groups.cpp +++ b/regression-tests/test-results/pure2-regex_09_groups.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes #include "cpp2regex.h" //=== Cpp2 type declarations ==================================================== @@ -9,7 +9,7 @@ #line 1 "pure2-regex_09_groups.cpp2" -#line 165 "pure2-regex_09_groups.cpp2" +#line 166 "pure2-regex_09_groups.cpp2" class test_tests_09_groups; @@ -18,37 +18,31 @@ class test_tests_09_groups; #line 1 "pure2-regex_09_groups.cpp2" [[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string; -#line 112 "pure2-regex_09_groups.cpp2" +#line 113 "pure2-regex_09_groups.cpp2" [[nodiscard]] auto sanitize(std::string str) -> std::string; -#line 124 "pure2-regex_09_groups.cpp2" +#line 125 "pure2-regex_09_groups.cpp2" template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, cpp2::impl::in resultExpected) -> void; -#line 165 "pure2-regex_09_groups.cpp2" +#line 166 "pure2-regex_09_groups.cpp2" class test_tests_09_groups { -#line 177 "pure2-regex_09_groups.cpp2" +#line 178 "pure2-regex_09_groups.cpp2" public: auto run() const& -> void; - public: class regex_01_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: template class regex_01_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_01_matcher() = default; public: regex_01_matcher(regex_01_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -56,25 +50,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_01 {}; public: class regex_02_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_01 {}; public: template class regex_02_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_02_matcher() = default; public: regex_02_matcher(regex_02_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -82,25 +70,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_02 {}; public: class regex_03_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_02 {}; public: template class regex_03_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_03_matcher() = default; public: regex_03_matcher(regex_03_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -108,25 +90,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_03 {}; public: class regex_04_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_03 {}; public: template class regex_04_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_04_matcher() = default; public: regex_04_matcher(regex_04_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -134,25 +110,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_04 {}; public: class regex_05_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_04 {}; public: template class regex_05_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_05_matcher() = default; public: regex_05_matcher(regex_05_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -160,25 +130,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_05 {}; public: class regex_06_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_05 {}; public: template class regex_06_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_06_matcher() = default; public: regex_06_matcher(regex_06_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -186,25 +150,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_06 {}; public: class regex_07_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_06 {}; public: template class regex_07_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_07_matcher() = default; public: regex_07_matcher(regex_07_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -212,25 +170,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_07 {}; public: class regex_08_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_07 {}; public: template class regex_08_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_08_matcher() = default; public: regex_08_matcher(regex_08_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -238,25 +190,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_08 {}; public: class regex_09_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_08 {}; public: template class regex_09_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_09_matcher() = default; public: regex_09_matcher(regex_09_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -264,25 +210,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_09 {}; public: class regex_10_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_09 {}; public: template class regex_10_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_10_matcher() = default; public: regex_10_matcher(regex_10_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -290,25 +230,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_10 {}; public: class regex_11_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_10 {}; public: template class regex_11_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_11_matcher() = default; public: regex_11_matcher(regex_11_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -316,13 +250,13 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_11 {}; + public: cpp2::regex::regular_expression> regex_11 {}; public: test_tests_09_groups() = default; public: test_tests_09_groups(test_tests_09_groups const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(test_tests_09_groups const&) -> void = delete; -#line 192 "pure2-regex_09_groups.cpp2" +#line 193 "pure2-regex_09_groups.cpp2" }; auto main() -> int; @@ -426,6 +360,7 @@ auto main() -> int; } result += std::to_string(cpp2::move(pos)); } + ++next; } else { std::cerr << "Not implemented"; @@ -441,7 +376,7 @@ auto main() -> int; return result; } -#line 112 "pure2-regex_09_groups.cpp2" +#line 113 "pure2-regex_09_groups.cpp2" [[nodiscard]] auto sanitize(std::string str) -> std::string { str = cpp2::string_util::replace_all(str, "\a", "\\a"); @@ -454,7 +389,7 @@ auto main() -> int; return cpp2::move(str); } -#line 124 "pure2-regex_09_groups.cpp2" +#line 125 "pure2-regex_09_groups.cpp2" template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, cpp2::impl::in resultExpected) -> void{ @@ -495,7 +430,7 @@ template auto test(M const& regex, cpp2::impl::in id, c std::cout << "" + cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(sanitize(str)) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(sanitize(resultExpected)) + "" << std::endl; } -#line 177 "pure2-regex_09_groups.cpp2" +#line 178 "pure2-regex_09_groups.cpp2" auto test_tests_09_groups::run() const& -> void{ std::cout << "Running tests_09_groups:" << std::endl; test(regex_01, "01", R"(()ef)", "def", "y", R"($&-$1)", "ef-"); @@ -515,8 +450,7 @@ template auto test(M const& regex, cpp2::impl::in id, c - - template [[nodiscard]] auto test_tests_09_groups::regex_01_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_09_groups::regex_01_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -557,10 +491,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_09_groups::regex_01_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_09_groups::regex_01_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -568,19 +503,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_09_groups::regex_01_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_09_groups::regex_01_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_09_groups::regex_01_matcher::to_string() -> std::string{return R"(()ef)"; } + template [[nodiscard]] constexpr auto test_tests_09_groups::regex_01_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_09_groups::regex_01_matcher::to_string() -> std::string{return R"(()ef)"; } - - template [[nodiscard]] auto test_tests_09_groups::regex_02_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_09_groups::regex_02_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -621,10 +556,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_09_groups::regex_02_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_09_groups::regex_02_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -632,19 +568,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_09_groups::regex_02_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_09_groups::regex_02_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_09_groups::regex_02_matcher::to_string() -> std::string{return R"(()ef)"; } - + template [[nodiscard]] constexpr auto test_tests_09_groups::regex_02_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_09_groups::regex_02_matcher::to_string() -> std::string{return R"(()ef)"; } - template [[nodiscard]] auto test_tests_09_groups::regex_03_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_09_groups::regex_03_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -685,10 +621,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_09_groups::regex_03_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_09_groups::regex_03_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -696,19 +633,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_09_groups::regex_03_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_09_groups::regex_03_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_09_groups::regex_03_matcher::to_string() -> std::string{return R"(()ef)"; } - + template [[nodiscard]] constexpr auto test_tests_09_groups::regex_03_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_09_groups::regex_03_matcher::to_string() -> std::string{return R"(()ef)"; } - template [[nodiscard]] auto test_tests_09_groups::regex_04_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_09_groups::regex_04_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -749,10 +686,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_09_groups::regex_04_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_09_groups::regex_04_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -760,19 +698,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_09_groups::regex_04_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_09_groups::regex_04_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_09_groups::regex_04_matcher::to_string() -> std::string{return R"(()ef)"; } + template [[nodiscard]] constexpr auto test_tests_09_groups::regex_04_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_09_groups::regex_04_matcher::to_string() -> std::string{return R"(()ef)"; } - - template [[nodiscard]] auto test_tests_09_groups::regex_05_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_09_groups::regex_05_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -813,10 +751,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_09_groups::regex_05_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_09_groups::regex_05_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -824,19 +763,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_09_groups::regex_05_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_09_groups::regex_05_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_09_groups::regex_05_matcher::to_string() -> std::string{return R"(()ef)"; } - + template [[nodiscard]] constexpr auto test_tests_09_groups::regex_05_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_09_groups::regex_05_matcher::to_string() -> std::string{return R"(()ef)"; } - template [[nodiscard]] auto test_tests_09_groups::regex_06_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_09_groups::regex_06_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -890,10 +829,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_09_groups::regex_06_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_09_groups::regex_06_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -901,19 +841,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_09_groups::regex_06_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_09_groups::regex_06_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_09_groups::regex_06_matcher::to_string() -> std::string{return R"(((a)))"; } - + template [[nodiscard]] constexpr auto test_tests_09_groups::regex_06_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_09_groups::regex_06_matcher::to_string() -> std::string{return R"(((a)))"; } - template [[nodiscard]] auto test_tests_09_groups::regex_07_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_09_groups::regex_07_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -967,10 +907,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_09_groups::regex_07_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_09_groups::regex_07_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -978,19 +919,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_09_groups::regex_07_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_09_groups::regex_07_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_09_groups::regex_07_matcher::to_string() -> std::string{return R"(((a)))"; } + template [[nodiscard]] constexpr auto test_tests_09_groups::regex_07_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_09_groups::regex_07_matcher::to_string() -> std::string{return R"(((a)))"; } - - template [[nodiscard]] auto test_tests_09_groups::regex_08_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_09_groups::regex_08_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1044,10 +985,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_09_groups::regex_08_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_09_groups::regex_08_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1055,19 +997,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_09_groups::regex_08_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_09_groups::regex_08_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_09_groups::regex_08_matcher::to_string() -> std::string{return R"(((a)))"; } - + template [[nodiscard]] constexpr auto test_tests_09_groups::regex_08_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_09_groups::regex_08_matcher::to_string() -> std::string{return R"(((a)))"; } - template [[nodiscard]] auto test_tests_09_groups::regex_09_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_09_groups::regex_09_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1149,10 +1091,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_09_groups::regex_09_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_09_groups::regex_09_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1160,19 +1103,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_09_groups::regex_09_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_09_groups::regex_09_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_09_groups::regex_09_matcher::to_string() -> std::string{return R"((a)b(c))"; } - + template [[nodiscard]] constexpr auto test_tests_09_groups::regex_09_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_09_groups::regex_09_matcher::to_string() -> std::string{return R"((a)b(c))"; } - template [[nodiscard]] auto test_tests_09_groups::regex_10_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_09_groups::regex_10_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1254,10 +1197,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_09_groups::regex_10_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_09_groups::regex_10_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1265,19 +1209,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_09_groups::regex_10_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_09_groups::regex_10_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_09_groups::regex_10_matcher::to_string() -> std::string{return R"((a)b(c))"; } + template [[nodiscard]] constexpr auto test_tests_09_groups::regex_10_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_09_groups::regex_10_matcher::to_string() -> std::string{return R"((a)b(c))"; } - - template [[nodiscard]] auto test_tests_09_groups::regex_11_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_09_groups::regex_11_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1359,10 +1303,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_09_groups::regex_11_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_09_groups::regex_11_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1370,15 +1315,16 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_09_groups::regex_11_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_09_groups::regex_11_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_09_groups::regex_11_matcher::to_string() -> std::string{return R"((a)b(c))"; } + template [[nodiscard]] constexpr auto test_tests_09_groups::regex_11_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_09_groups::regex_11_matcher::to_string() -> std::string{return R"((a)b(c))"; } -#line 193 "pure2-regex_09_groups.cpp2" +#line 194 "pure2-regex_09_groups.cpp2" auto main() -> int{ CPP2_UFCS(run)(test_tests_09_groups()); } diff --git a/regression-tests/test-results/pure2-regex_10_escapes.cpp b/regression-tests/test-results/pure2-regex_10_escapes.cpp index fe0137c11..803914851 100644 --- a/regression-tests/test-results/pure2-regex_10_escapes.cpp +++ b/regression-tests/test-results/pure2-regex_10_escapes.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes #include "cpp2regex.h" //=== Cpp2 type declarations ==================================================== @@ -9,7 +9,7 @@ #line 1 "pure2-regex_10_escapes.cpp2" -#line 165 "pure2-regex_10_escapes.cpp2" +#line 166 "pure2-regex_10_escapes.cpp2" class test_tests_10_escapes; @@ -18,37 +18,31 @@ class test_tests_10_escapes; #line 1 "pure2-regex_10_escapes.cpp2" [[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string; -#line 112 "pure2-regex_10_escapes.cpp2" +#line 113 "pure2-regex_10_escapes.cpp2" [[nodiscard]] auto sanitize(std::string str) -> std::string; -#line 124 "pure2-regex_10_escapes.cpp2" +#line 125 "pure2-regex_10_escapes.cpp2" template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, cpp2::impl::in resultExpected) -> void; -#line 165 "pure2-regex_10_escapes.cpp2" +#line 166 "pure2-regex_10_escapes.cpp2" class test_tests_10_escapes { -#line 186 "pure2-regex_10_escapes.cpp2" +#line 187 "pure2-regex_10_escapes.cpp2" public: auto run() const& -> void; - public: class regex_01_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: template class regex_01_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_01_matcher() = default; public: regex_01_matcher(regex_01_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -56,35 +50,29 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_01 {}; public: class regex_02_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_01 {}; public: template class regex_02_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_02_matcher() = default; public: regex_02_matcher(regex_02_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -92,35 +80,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_02 {}; public: class regex_03_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_02 {}; public: template class regex_03_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_03_matcher() = default; public: regex_03_matcher(regex_03_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -128,25 +110,19 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_03 {}; public: class regex_04_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_03 {}; public: template class regex_04_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_04_matcher() = default; public: regex_04_matcher(regex_04_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -154,35 +130,29 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_04 {}; public: class regex_05_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_04 {}; public: template class regex_05_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_05_matcher() = default; public: regex_05_matcher(regex_05_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -190,35 +160,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_05 {}; public: class regex_06_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_05 {}; public: template class regex_06_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_06_matcher() = default; public: regex_06_matcher(regex_06_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -226,35 +190,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_06 {}; public: class regex_07_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_06 {}; public: template class regex_07_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_07_matcher() = default; public: regex_07_matcher(regex_07_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -262,25 +220,19 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_07 {}; public: class regex_08_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_07 {}; public: template class regex_08_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_08_matcher() = default; public: regex_08_matcher(regex_08_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -288,25 +240,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_08 {}; public: class regex_09_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_08 {}; public: template class regex_09_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_09_matcher() = default; public: regex_09_matcher(regex_09_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -314,25 +260,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_09 {}; public: class regex_10_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_09 {}; public: template class regex_10_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_10_matcher() = default; public: regex_10_matcher(regex_10_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -340,35 +280,29 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_10 {}; public: class regex_11_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_10 {}; public: template class regex_11_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_11_matcher() = default; public: regex_11_matcher(regex_11_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -376,35 +310,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_11 {}; public: class regex_12_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_11 {}; public: template class regex_12_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_12_matcher() = default; public: regex_12_matcher(regex_12_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -412,35 +340,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_12 {}; public: class regex_13_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_12 {}; public: template class regex_13_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_13_matcher() = default; public: regex_13_matcher(regex_13_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -448,25 +370,19 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_13 {}; public: class regex_14_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_13 {}; public: template class regex_14_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_14_matcher() = default; public: regex_14_matcher(regex_14_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -474,25 +390,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_14 {}; public: class regex_15_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_14 {}; public: template class regex_15_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_15_matcher() = default; public: regex_15_matcher(regex_15_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -500,25 +410,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_15 {}; public: class regex_16_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_15 {}; public: template class regex_16_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_16_matcher() = default; public: regex_16_matcher(regex_16_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -526,25 +430,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_16 {}; public: class regex_17_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_16 {}; public: template class regex_17_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_17_matcher() = default; public: regex_17_matcher(regex_17_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -552,25 +450,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_17 {}; public: class regex_18_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_17 {}; public: template class regex_18_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_18_matcher() = default; public: regex_18_matcher(regex_18_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -578,25 +470,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_18 {}; public: class regex_19_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_18 {}; public: template class regex_19_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_19_matcher() = default; public: regex_19_matcher(regex_19_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -604,25 +490,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_19 {}; public: class regex_20_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_19 {}; public: template class regex_20_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_20_matcher() = default; public: regex_20_matcher(regex_20_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -630,13 +510,13 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_20 {}; + public: cpp2::regex::regular_expression> regex_20 {}; public: test_tests_10_escapes() = default; public: test_tests_10_escapes(test_tests_10_escapes const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(test_tests_10_escapes const&) -> void = delete; -#line 210 "pure2-regex_10_escapes.cpp2" +#line 211 "pure2-regex_10_escapes.cpp2" }; auto main() -> int; @@ -740,6 +620,7 @@ auto main() -> int; } result += std::to_string(cpp2::move(pos)); } + ++next; } else { std::cerr << "Not implemented"; @@ -755,7 +636,7 @@ auto main() -> int; return result; } -#line 112 "pure2-regex_10_escapes.cpp2" +#line 113 "pure2-regex_10_escapes.cpp2" [[nodiscard]] auto sanitize(std::string str) -> std::string { str = cpp2::string_util::replace_all(str, "\a", "\\a"); @@ -768,7 +649,7 @@ auto main() -> int; return cpp2::move(str); } -#line 124 "pure2-regex_10_escapes.cpp2" +#line 125 "pure2-regex_10_escapes.cpp2" template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, cpp2::impl::in resultExpected) -> void{ @@ -809,7 +690,7 @@ template auto test(M const& regex, cpp2::impl::in id, c std::cout << "" + cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(sanitize(str)) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(sanitize(resultExpected)) + "" << std::endl; } -#line 186 "pure2-regex_10_escapes.cpp2" +#line 187 "pure2-regex_10_escapes.cpp2" auto test_tests_10_escapes::run() const& -> void{ std::cout << "Running tests_10_escapes:" << std::endl; test(regex_01, "01", R"(a\(b)", "a(b", "y", R"($&-$1)", "a(b-"); @@ -838,8 +719,7 @@ template auto test(M const& regex, cpp2::impl::in id, c - - template [[nodiscard]] auto test_tests_10_escapes::regex_01_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_10_escapes::regex_01_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -867,10 +747,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_10_escapes::regex_01_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_10_escapes::regex_01_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -878,19 +759,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_10_escapes::regex_01_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_10_escapes::regex_01_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_10_escapes::regex_01_matcher::to_string() -> std::string{return R"(a\(b)"; } + template [[nodiscard]] constexpr auto test_tests_10_escapes::regex_01_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_10_escapes::regex_01_matcher::to_string() -> std::string{return R"(a\(b)"; } - - template [[nodiscard]] auto test_tests_10_escapes::regex_02_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_10_escapes::regex_02_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -918,11 +799,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_10_escapes::regex_02_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_10_escapes::regex_02_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -950,11 +832,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_10_escapes::regex_02_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_10_escapes::regex_02_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -982,10 +865,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_10_escapes::regex_02_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_10_escapes::regex_02_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -993,19 +877,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_10_escapes::regex_02_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_10_escapes::regex_02_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_10_escapes::regex_02_matcher::to_string() -> std::string{return R"(a\(*b)"; } - + template [[nodiscard]] constexpr auto test_tests_10_escapes::regex_02_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_10_escapes::regex_02_matcher::to_string() -> std::string{return R"(a\(*b)"; } - template [[nodiscard]] auto test_tests_10_escapes::regex_03_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_10_escapes::regex_03_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1033,11 +917,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_10_escapes::regex_03_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_10_escapes::regex_03_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1065,11 +950,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_10_escapes::regex_03_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_10_escapes::regex_03_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1097,10 +983,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_10_escapes::regex_03_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_10_escapes::regex_03_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1108,19 +995,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_10_escapes::regex_03_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_10_escapes::regex_03_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_10_escapes::regex_03_matcher::to_string() -> std::string{return R"(a\(*b)"; } - + template [[nodiscard]] constexpr auto test_tests_10_escapes::regex_03_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_10_escapes::regex_03_matcher::to_string() -> std::string{return R"(a\(*b)"; } - template [[nodiscard]] auto test_tests_10_escapes::regex_04_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_10_escapes::regex_04_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1148,10 +1035,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_10_escapes::regex_04_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_10_escapes::regex_04_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1159,19 +1047,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_10_escapes::regex_04_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_10_escapes::regex_04_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_10_escapes::regex_04_matcher::to_string() -> std::string{return R"(a\\b)"; } + template [[nodiscard]] constexpr auto test_tests_10_escapes::regex_04_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_10_escapes::regex_04_matcher::to_string() -> std::string{return R"(a\\b)"; } - - template [[nodiscard]] auto test_tests_10_escapes::regex_05_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_10_escapes::regex_05_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1186,11 +1074,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_10_escapes::regex_05_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_10_escapes::regex_05_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1219,11 +1108,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_10_escapes::regex_05_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_10_escapes::regex_05_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1263,10 +1153,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_10_escapes::regex_05_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_10_escapes::regex_05_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1274,19 +1165,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_10_escapes::regex_05_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_10_escapes::regex_05_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_10_escapes::regex_05_matcher::to_string() -> std::string{return R"(foo(\h+)bar)"; } - + template [[nodiscard]] constexpr auto test_tests_10_escapes::regex_05_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_10_escapes::regex_05_matcher::to_string() -> std::string{return R"(foo(\h+)bar)"; } - template [[nodiscard]] auto test_tests_10_escapes::regex_06_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_10_escapes::regex_06_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1301,11 +1192,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_10_escapes::regex_06_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_10_escapes::regex_06_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1320,11 +1212,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_10_escapes::regex_06_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_10_escapes::regex_06_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1364,10 +1257,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_10_escapes::regex_06_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_10_escapes::regex_06_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1375,19 +1269,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_10_escapes::regex_06_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_10_escapes::regex_06_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_10_escapes::regex_06_matcher::to_string() -> std::string{return R"((\H+)(\h))"; } + template [[nodiscard]] constexpr auto test_tests_10_escapes::regex_06_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_10_escapes::regex_06_matcher::to_string() -> std::string{return R"((\H+)(\h))"; } - - template [[nodiscard]] auto test_tests_10_escapes::regex_07_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_10_escapes::regex_07_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1402,11 +1296,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_10_escapes::regex_07_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_10_escapes::regex_07_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1421,11 +1316,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_10_escapes::regex_07_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_10_escapes::regex_07_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1465,10 +1361,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_10_escapes::regex_07_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_10_escapes::regex_07_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1476,19 +1373,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_10_escapes::regex_07_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_10_escapes::regex_07_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_10_escapes::regex_07_matcher::to_string() -> std::string{return R"((\h+)(\H))"; } - + template [[nodiscard]] constexpr auto test_tests_10_escapes::regex_07_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_10_escapes::regex_07_matcher::to_string() -> std::string{return R"((\h+)(\H))"; } - template [[nodiscard]] auto test_tests_10_escapes::regex_08_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_10_escapes::regex_08_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1544,10 +1441,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_10_escapes::regex_08_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_10_escapes::regex_08_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1555,19 +1453,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_10_escapes::regex_08_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_10_escapes::regex_08_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_10_escapes::regex_08_matcher::to_string() -> std::string{return R"(foo(\h)bar)"; } - + template [[nodiscard]] constexpr auto test_tests_10_escapes::regex_08_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_10_escapes::regex_08_matcher::to_string() -> std::string{return R"(foo(\h)bar)"; } - template [[nodiscard]] auto test_tests_10_escapes::regex_09_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_10_escapes::regex_09_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1609,10 +1507,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_10_escapes::regex_09_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_10_escapes::regex_09_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1620,19 +1519,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_10_escapes::regex_09_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_10_escapes::regex_09_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_10_escapes::regex_09_matcher::to_string() -> std::string{return R"((\H)(\h))"; } + template [[nodiscard]] constexpr auto test_tests_10_escapes::regex_09_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_10_escapes::regex_09_matcher::to_string() -> std::string{return R"((\H)(\h))"; } - - template [[nodiscard]] auto test_tests_10_escapes::regex_10_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_10_escapes::regex_10_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1674,10 +1573,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_10_escapes::regex_10_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_10_escapes::regex_10_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1685,19 +1585,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_10_escapes::regex_10_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_10_escapes::regex_10_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_10_escapes::regex_10_matcher::to_string() -> std::string{return R"((\h)(\H))"; } - + template [[nodiscard]] constexpr auto test_tests_10_escapes::regex_10_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_10_escapes::regex_10_matcher::to_string() -> std::string{return R"((\h)(\H))"; } - template [[nodiscard]] auto test_tests_10_escapes::regex_11_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_10_escapes::regex_11_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1712,11 +1612,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_10_escapes::regex_11_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_10_escapes::regex_11_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1745,11 +1646,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_10_escapes::regex_11_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_10_escapes::regex_11_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1789,10 +1691,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_10_escapes::regex_11_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_10_escapes::regex_11_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1800,19 +1703,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_10_escapes::regex_11_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_10_escapes::regex_11_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_10_escapes::regex_11_matcher::to_string() -> std::string{return R"(foo(\v+)bar)"; } + template [[nodiscard]] constexpr auto test_tests_10_escapes::regex_11_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_10_escapes::regex_11_matcher::to_string() -> std::string{return R"(foo(\v+)bar)"; } - - template [[nodiscard]] auto test_tests_10_escapes::regex_12_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_10_escapes::regex_12_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1827,11 +1730,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_10_escapes::regex_12_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_10_escapes::regex_12_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1846,11 +1750,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_10_escapes::regex_12_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_10_escapes::regex_12_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1890,10 +1795,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_10_escapes::regex_12_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_10_escapes::regex_12_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1901,19 +1807,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_10_escapes::regex_12_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_10_escapes::regex_12_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_10_escapes::regex_12_matcher::to_string() -> std::string{return R"((\V+)(\v))"; } - + template [[nodiscard]] constexpr auto test_tests_10_escapes::regex_12_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_10_escapes::regex_12_matcher::to_string() -> std::string{return R"((\V+)(\v))"; } - template [[nodiscard]] auto test_tests_10_escapes::regex_13_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_10_escapes::regex_13_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1928,11 +1834,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_10_escapes::regex_13_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_10_escapes::regex_13_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1947,11 +1854,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_10_escapes::regex_13_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_10_escapes::regex_13_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1991,10 +1899,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_10_escapes::regex_13_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_10_escapes::regex_13_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2002,19 +1911,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_10_escapes::regex_13_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_10_escapes::regex_13_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_10_escapes::regex_13_matcher::to_string() -> std::string{return R"((\v+)(\V))"; } - + template [[nodiscard]] constexpr auto test_tests_10_escapes::regex_13_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_10_escapes::regex_13_matcher::to_string() -> std::string{return R"((\v+)(\V))"; } - template [[nodiscard]] auto test_tests_10_escapes::regex_14_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_10_escapes::regex_14_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2070,10 +1979,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_10_escapes::regex_14_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_10_escapes::regex_14_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2081,19 +1991,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_10_escapes::regex_14_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_10_escapes::regex_14_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_10_escapes::regex_14_matcher::to_string() -> std::string{return R"(foo(\v)bar)"; } + template [[nodiscard]] constexpr auto test_tests_10_escapes::regex_14_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_10_escapes::regex_14_matcher::to_string() -> std::string{return R"(foo(\v)bar)"; } - - template [[nodiscard]] auto test_tests_10_escapes::regex_15_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_10_escapes::regex_15_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2135,10 +2045,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_10_escapes::regex_15_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_10_escapes::regex_15_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2146,19 +2057,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_10_escapes::regex_15_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_10_escapes::regex_15_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_10_escapes::regex_15_matcher::to_string() -> std::string{return R"((\V)(\v))"; } - + template [[nodiscard]] constexpr auto test_tests_10_escapes::regex_15_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_10_escapes::regex_15_matcher::to_string() -> std::string{return R"((\V)(\v))"; } - template [[nodiscard]] auto test_tests_10_escapes::regex_16_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_10_escapes::regex_16_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2200,10 +2111,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_10_escapes::regex_16_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_10_escapes::regex_16_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2211,19 +2123,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_10_escapes::regex_16_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_10_escapes::regex_16_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_10_escapes::regex_16_matcher::to_string() -> std::string{return R"((\v)(\V))"; } + template [[nodiscard]] constexpr auto test_tests_10_escapes::regex_16_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_10_escapes::regex_16_matcher::to_string() -> std::string{return R"((\v)(\V))"; } - - template [[nodiscard]] auto test_tests_10_escapes::regex_17_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_10_escapes::regex_17_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2251,10 +2163,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_10_escapes::regex_17_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_10_escapes::regex_17_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2262,19 +2175,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_10_escapes::regex_17_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_10_escapes::regex_17_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_10_escapes::regex_17_matcher::to_string() -> std::string{return R"(foo\t\n\r\f\a\ebar)"; } - + template [[nodiscard]] constexpr auto test_tests_10_escapes::regex_17_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_10_escapes::regex_17_matcher::to_string() -> std::string{return R"(foo\t\n\r\f\a\ebar)"; } - template [[nodiscard]] auto test_tests_10_escapes::regex_18_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_10_escapes::regex_18_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2317,10 +2230,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_10_escapes::regex_18_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_10_escapes::regex_18_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2328,19 +2242,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_10_escapes::regex_18_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_10_escapes::regex_18_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_10_escapes::regex_18_matcher::to_string() -> std::string{return R"(foo\Kbar)"; } - + template [[nodiscard]] constexpr auto test_tests_10_escapes::regex_18_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_10_escapes::regex_18_matcher::to_string() -> std::string{return R"(foo\Kbar)"; } - template [[nodiscard]] auto test_tests_10_escapes::regex_19_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_10_escapes::regex_19_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2368,10 +2282,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_10_escapes::regex_19_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_10_escapes::regex_19_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2379,19 +2294,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_10_escapes::regex_19_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_10_escapes::regex_19_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_10_escapes::regex_19_matcher::to_string() -> std::string{return R"(\x41\x42)"; } + template [[nodiscard]] constexpr auto test_tests_10_escapes::regex_19_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_10_escapes::regex_19_matcher::to_string() -> std::string{return R"(\x41\x42)"; } - - template [[nodiscard]] auto test_tests_10_escapes::regex_20_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_10_escapes::regex_20_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2419,10 +2334,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_10_escapes::regex_20_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_10_escapes::regex_20_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2430,15 +2346,16 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_10_escapes::regex_20_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_10_escapes::regex_20_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_10_escapes::regex_20_matcher::to_string() -> std::string{return R"(\101\o{102})"; } + template [[nodiscard]] constexpr auto test_tests_10_escapes::regex_20_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_10_escapes::regex_20_matcher::to_string() -> std::string{return R"(\101\o{102})"; } -#line 211 "pure2-regex_10_escapes.cpp2" +#line 212 "pure2-regex_10_escapes.cpp2" auto main() -> int{ CPP2_UFCS(run)(test_tests_10_escapes()); } diff --git a/regression-tests/test-results/pure2-regex_11_group_references.cpp b/regression-tests/test-results/pure2-regex_11_group_references.cpp index 64aa1f5c2..a318ba529 100644 --- a/regression-tests/test-results/pure2-regex_11_group_references.cpp +++ b/regression-tests/test-results/pure2-regex_11_group_references.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes #include "cpp2regex.h" //=== Cpp2 type declarations ==================================================== @@ -9,7 +9,7 @@ #line 1 "pure2-regex_11_group_references.cpp2" -#line 165 "pure2-regex_11_group_references.cpp2" +#line 166 "pure2-regex_11_group_references.cpp2" class test_tests_11_group_references; @@ -18,37 +18,31 @@ class test_tests_11_group_references; #line 1 "pure2-regex_11_group_references.cpp2" [[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string; -#line 112 "pure2-regex_11_group_references.cpp2" +#line 113 "pure2-regex_11_group_references.cpp2" [[nodiscard]] auto sanitize(std::string str) -> std::string; -#line 124 "pure2-regex_11_group_references.cpp2" +#line 125 "pure2-regex_11_group_references.cpp2" template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, cpp2::impl::in resultExpected) -> void; -#line 165 "pure2-regex_11_group_references.cpp2" +#line 166 "pure2-regex_11_group_references.cpp2" class test_tests_11_group_references { -#line 190 "pure2-regex_11_group_references.cpp2" +#line 191 "pure2-regex_11_group_references.cpp2" public: auto run() const& -> void; - public: class regex_01_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: template class regex_01_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_01_matcher() = default; public: regex_01_matcher(regex_01_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -56,25 +50,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_01 {}; public: class regex_02_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_01 {}; public: template class regex_02_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_02_matcher() = default; public: regex_02_matcher(regex_02_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -82,45 +70,39 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_02 {}; public: class regex_03_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_02 {}; public: template class regex_03_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_03_matcher() = default; public: regex_03_matcher(regex_03_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -128,25 +110,19 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_03 {}; public: class regex_04_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_03 {}; public: template class regex_04_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_04_matcher() = default; public: regex_04_matcher(regex_04_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -154,25 +130,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_04 {}; public: class regex_05_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_04 {}; public: template class regex_05_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_05_matcher() = default; public: regex_05_matcher(regex_05_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -180,25 +150,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_05 {}; public: class regex_06_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_05 {}; public: template class regex_06_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_06_matcher() = default; public: regex_06_matcher(regex_06_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -206,25 +170,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_06 {}; public: class regex_07_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_06 {}; public: template class regex_07_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_07_matcher() = default; public: regex_07_matcher(regex_07_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -232,25 +190,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_07 {}; public: class regex_08_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_07 {}; public: template class regex_08_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_08_matcher() = default; public: regex_08_matcher(regex_08_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -258,25 +210,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_08 {}; public: class regex_09_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_08 {}; public: template class regex_09_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_09_matcher() = default; public: regex_09_matcher(regex_09_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -284,45 +230,39 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_09 {}; public: class regex_10_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_09 {}; public: template class regex_10_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_10_matcher() = default; public: regex_10_matcher(regex_10_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -330,25 +270,19 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_10 {}; public: class regex_11_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_10 {}; public: template class regex_11_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_11_matcher() = default; public: regex_11_matcher(regex_11_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -356,25 +290,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_11 {}; public: class regex_12_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_11 {}; public: template class regex_12_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_12_matcher() = default; public: regex_12_matcher(regex_12_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -382,25 +310,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_12 {}; public: class regex_13_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_12 {}; public: template class regex_13_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_13_matcher() = default; public: regex_13_matcher(regex_13_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -408,25 +330,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_13 {}; public: class regex_14_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_13 {}; public: template class regex_14_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_14_matcher() = default; public: regex_14_matcher(regex_14_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -434,25 +350,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_14 {}; public: class regex_15_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_14 {}; public: template class regex_15_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_15_matcher() = default; public: regex_15_matcher(regex_15_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -460,25 +370,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_15 {}; public: class regex_16_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_15 {}; public: template class regex_16_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_16_matcher() = default; public: regex_16_matcher(regex_16_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -486,25 +390,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_16 {}; public: class regex_17_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_16 {}; public: template class regex_17_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_17_matcher() = default; public: regex_17_matcher(regex_17_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -512,25 +410,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_17 {}; public: class regex_18_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_17 {}; public: template class regex_18_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_18_matcher() = default; public: regex_18_matcher(regex_18_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -538,25 +430,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_18 {}; public: class regex_19_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_18 {}; public: template class regex_19_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_19_matcher() = default; public: regex_19_matcher(regex_19_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -564,25 +450,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_19 {}; public: class regex_20_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_19 {}; public: template class regex_20_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_20_matcher() = default; public: regex_20_matcher(regex_20_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -590,45 +470,39 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_20 {}; public: class regex_21_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_20 {}; public: template class regex_21_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_21_matcher() = default; public: regex_21_matcher(regex_21_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -636,45 +510,39 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_21 {}; public: class regex_22_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_21 {}; public: template class regex_22_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_22_matcher() = default; public: regex_22_matcher(regex_22_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -682,45 +550,39 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_22 {}; public: class regex_23_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_22 {}; public: template class regex_23_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_23_matcher() = default; public: regex_23_matcher(regex_23_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -728,45 +590,39 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_23 {}; public: class regex_24_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_23 {}; public: template class regex_24_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_24_matcher() = default; public: regex_24_matcher(regex_24_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -774,13 +630,13 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_24 {}; + public: cpp2::regex::regular_expression> regex_24 {}; public: test_tests_11_group_references() = default; public: test_tests_11_group_references(test_tests_11_group_references const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(test_tests_11_group_references const&) -> void = delete; -#line 218 "pure2-regex_11_group_references.cpp2" +#line 219 "pure2-regex_11_group_references.cpp2" }; auto main() -> int; @@ -884,6 +740,7 @@ auto main() -> int; } result += std::to_string(cpp2::move(pos)); } + ++next; } else { std::cerr << "Not implemented"; @@ -899,7 +756,7 @@ auto main() -> int; return result; } -#line 112 "pure2-regex_11_group_references.cpp2" +#line 113 "pure2-regex_11_group_references.cpp2" [[nodiscard]] auto sanitize(std::string str) -> std::string { str = cpp2::string_util::replace_all(str, "\a", "\\a"); @@ -912,7 +769,7 @@ auto main() -> int; return cpp2::move(str); } -#line 124 "pure2-regex_11_group_references.cpp2" +#line 125 "pure2-regex_11_group_references.cpp2" template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, cpp2::impl::in resultExpected) -> void{ @@ -953,7 +810,7 @@ template auto test(M const& regex, cpp2::impl::in id, c std::cout << "" + cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(sanitize(str)) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(sanitize(resultExpected)) + "" << std::endl; } -#line 190 "pure2-regex_11_group_references.cpp2" +#line 191 "pure2-regex_11_group_references.cpp2" auto test_tests_11_group_references::run() const& -> void{ std::cout << "Running tests_11_group_references:" << std::endl; test(regex_01, "01", R"((foo)(\g-2))", "foofoo", "y", R"($1-$2)", "foo-foo"); @@ -986,8 +843,7 @@ template auto test(M const& regex, cpp2::impl::in id, c - - template [[nodiscard]] auto test_tests_11_group_references::regex_01_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_01_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1019,7 +875,7 @@ int i{0}; auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; static_cast(cpp2::move(tmp_1)); ctx.set_group_start(2, r.pos); - if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} ctx.set_group_end(2, r.pos); auto tmp_2_func { @@ -1042,10 +898,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_01_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_01_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1053,19 +910,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_01_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_11_group_references::regex_01_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_11_group_references::regex_01_matcher::to_string() -> std::string{return R"((foo)(\g-2))"; } + template [[nodiscard]] constexpr auto test_tests_11_group_references::regex_01_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_11_group_references::regex_01_matcher::to_string() -> std::string{return R"((foo)(\g-2))"; } - - template [[nodiscard]] auto test_tests_11_group_references::regex_02_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_02_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1097,7 +954,7 @@ int i{0}; auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; static_cast(cpp2::move(tmp_1)); ctx.set_group_start(2, r.pos); - if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} ctx.set_group_end(2, r.pos); auto tmp_2_func { @@ -1138,7 +995,7 @@ int i{0}; auto tmp_4 {cpp2::regex::make_on_return(cpp2::move(tmp_4_func))}; static_cast(cpp2::move(tmp_4)); ctx.set_group_start(4, r.pos); - if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} ctx.set_group_end(4, r.pos); auto tmp_5_func { @@ -1161,10 +1018,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_02_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_02_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1172,19 +1030,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_02_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_11_group_references::regex_02_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_11_group_references::regex_02_matcher::to_string() -> std::string{return R"((foo)(\g-2)(foo)(\g-2))"; } - + template [[nodiscard]] constexpr auto test_tests_11_group_references::regex_02_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_11_group_references::regex_02_matcher::to_string() -> std::string{return R"((foo)(\g-2)(foo)(\g-2))"; } - template [[nodiscard]] auto test_tests_11_group_references::regex_03_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_03_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1199,11 +1057,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_03_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_03_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1219,11 +1078,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_03_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_03_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1238,11 +1098,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_03_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_03_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1272,7 +1133,7 @@ int i{0}; } if (r.matched) {r.pos += 1;} else {break;} - if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} ctx.set_group_end(1, r.pos); auto tmp_2_func { @@ -1297,11 +1158,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_03_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_03_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1331,7 +1193,7 @@ int i{0}; } if (r.matched) {r.pos += 1;} else {break;} - if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} ctx.set_group_end(3, r.pos); auto tmp_5_func { @@ -1354,10 +1216,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_03_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_03_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1365,19 +1228,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_03_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_11_group_references::regex_03_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_11_group_references::regex_03_matcher::to_string() -> std::string{return R"((([abc]+) \g-1)(([abc]+) \g{-1}))"; } - + template [[nodiscard]] constexpr auto test_tests_11_group_references::regex_03_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_11_group_references::regex_03_matcher::to_string() -> std::string{return R"((([abc]+) \g-1)(([abc]+) \g{-1}))"; } - template [[nodiscard]] auto test_tests_11_group_references::regex_04_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_04_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1462,9 +1325,9 @@ int i{0}; auto tmp_5 {cpp2::regex::make_on_return(cpp2::move(tmp_5_func))}; static_cast(cpp2::move(tmp_5)); - if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} - if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} - if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} } while ( false @@ -1475,10 +1338,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_04_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_04_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1486,19 +1350,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_04_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_11_group_references::regex_04_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_11_group_references::regex_04_matcher::to_string() -> std::string{return R"((a)(b)(c)\g1\g2\g3)"; } + template [[nodiscard]] constexpr auto test_tests_11_group_references::regex_04_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_11_group_references::regex_04_matcher::to_string() -> std::string{return R"((a)(b)(c)\g1\g2\g3)"; } - - template [[nodiscard]] auto test_tests_11_group_references::regex_05_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_05_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1543,7 +1407,7 @@ int i{0}; } if (r.matched) {r.pos += 1;} else {break;} - if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} } while ( false @@ -1554,10 +1418,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_05_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_05_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1565,18 +1430,18 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_05_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_11_group_references::regex_05_matcher::get_named_group_index(auto const& name) -> int{ if (name == "n") {return 1; }else {return -1; } } - [[nodiscard]] auto test_tests_11_group_references::regex_05_matcher::to_string() -> std::string{return R"(/(?'n'foo) \g{n}/)"; } - + template [[nodiscard]] constexpr auto test_tests_11_group_references::regex_05_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_11_group_references::regex_05_matcher::to_string() -> std::string{return R"(/(?'n'foo) \g{n}/)"; } - template [[nodiscard]] auto test_tests_11_group_references::regex_06_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_06_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1621,7 +1486,7 @@ int i{0}; } if (r.matched) {r.pos += 1;} else {break;} - if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} } while ( false @@ -1632,10 +1497,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_06_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_06_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1643,18 +1509,18 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_06_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_11_group_references::regex_06_matcher::get_named_group_index(auto const& name) -> int{ if (name == "n") {return 1; }else {return -1; } } - [[nodiscard]] auto test_tests_11_group_references::regex_06_matcher::to_string() -> std::string{return R"(/(?'n'foo) \g{ n }/)"; } - + template [[nodiscard]] constexpr auto test_tests_11_group_references::regex_06_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_11_group_references::regex_06_matcher::to_string() -> std::string{return R"(/(?'n'foo) \g{ n }/)"; } - template [[nodiscard]] auto test_tests_11_group_references::regex_07_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_07_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1699,7 +1565,7 @@ int i{0}; } if (r.matched) {r.pos += 1;} else {break;} - if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} } while ( false @@ -1710,10 +1576,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_07_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_07_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1721,18 +1588,18 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_07_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_11_group_references::regex_07_matcher::get_named_group_index(auto const& name) -> int{ if (name == "n") {return 1; }else {return -1; } } - [[nodiscard]] auto test_tests_11_group_references::regex_07_matcher::to_string() -> std::string{return R"(/(?'n'foo) \g{n}/)"; } + template [[nodiscard]] constexpr auto test_tests_11_group_references::regex_07_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_11_group_references::regex_07_matcher::to_string() -> std::string{return R"(/(?'n'foo) \g{n}/)"; } - - template [[nodiscard]] auto test_tests_11_group_references::regex_08_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_08_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1777,7 +1644,7 @@ int i{0}; } if (r.matched) {r.pos += 1;} else {break;} - if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} } while ( false @@ -1788,10 +1655,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_08_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_08_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1799,18 +1667,18 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_08_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_11_group_references::regex_08_matcher::get_named_group_index(auto const& name) -> int{ if (name == "n") {return 1; }else {return -1; } } - [[nodiscard]] auto test_tests_11_group_references::regex_08_matcher::to_string() -> std::string{return R"(/(?foo) \g{n}/)"; } - + template [[nodiscard]] constexpr auto test_tests_11_group_references::regex_08_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_11_group_references::regex_08_matcher::to_string() -> std::string{return R"(/(?foo) \g{n}/)"; } - template [[nodiscard]] auto test_tests_11_group_references::regex_09_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_09_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1855,7 +1723,7 @@ int i{0}; } if (r.matched) {r.pos += 1;} else {break;} - if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} } while ( false @@ -1866,10 +1734,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_09_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_09_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1877,18 +1746,18 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_09_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_11_group_references::regex_09_matcher::get_named_group_index(auto const& name) -> int{ if (name == "n") {return 1; }else {return -1; } } - [[nodiscard]] auto test_tests_11_group_references::regex_09_matcher::to_string() -> std::string{return R"(/(?foo) \g{n}/)"; } - + template [[nodiscard]] constexpr auto test_tests_11_group_references::regex_09_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_11_group_references::regex_09_matcher::to_string() -> std::string{return R"(/(?foo) \g{n}/)"; } - template [[nodiscard]] auto test_tests_11_group_references::regex_10_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_10_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1903,11 +1772,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_10_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_10_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1963,11 +1833,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_10_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_10_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1982,11 +1853,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_10_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_10_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2016,7 +1888,7 @@ int i{0}; } if (r.matched) {r.pos += 1;} else {break;} - if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} std::array str_tmp_5 {" "}; if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { @@ -2042,11 +1914,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_10_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_10_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2072,10 +1945,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_10_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_10_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2083,18 +1957,18 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_10_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_11_group_references::regex_10_matcher::get_named_group_index(auto const& name) -> int{ if (name == "as") {return 1; }else {return -1; } } - [[nodiscard]] auto test_tests_11_group_references::regex_10_matcher::to_string() -> std::string{return R"(/(?as) (\w+) \g{as} (\w+)/)"; } + template [[nodiscard]] constexpr auto test_tests_11_group_references::regex_10_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_11_group_references::regex_10_matcher::to_string() -> std::string{return R"(/(?as) (\w+) \g{as} (\w+)/)"; } - - template [[nodiscard]] auto test_tests_11_group_references::regex_11_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_11_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2139,7 +2013,7 @@ int i{0}; } if (r.matched) {r.pos += 1;} else {break;} - if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} } while ( false @@ -2150,10 +2024,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_11_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_11_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2161,18 +2036,18 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_11_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_11_group_references::regex_11_matcher::get_named_group_index(auto const& name) -> int{ if (name == "n") {return 1; }else {return -1; } } - [[nodiscard]] auto test_tests_11_group_references::regex_11_matcher::to_string() -> std::string{return R"(/(?'n'foo) \k/)"; } - + template [[nodiscard]] constexpr auto test_tests_11_group_references::regex_11_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_11_group_references::regex_11_matcher::to_string() -> std::string{return R"(/(?'n'foo) \k/)"; } - template [[nodiscard]] auto test_tests_11_group_references::regex_12_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_12_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2217,7 +2092,7 @@ int i{0}; } if (r.matched) {r.pos += 1;} else {break;} - if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} } while ( false @@ -2228,10 +2103,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_12_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_12_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2239,18 +2115,18 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_12_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_11_group_references::regex_12_matcher::get_named_group_index(auto const& name) -> int{ if (name == "n") {return 1; }else {return -1; } } - [[nodiscard]] auto test_tests_11_group_references::regex_12_matcher::to_string() -> std::string{return R"(/(?'n'foo) \k/)"; } - + template [[nodiscard]] constexpr auto test_tests_11_group_references::regex_12_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_11_group_references::regex_12_matcher::to_string() -> std::string{return R"(/(?'n'foo) \k/)"; } - template [[nodiscard]] auto test_tests_11_group_references::regex_13_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_13_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2295,7 +2171,7 @@ int i{0}; } if (r.matched) {r.pos += 1;} else {break;} - if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} } while ( false @@ -2306,10 +2182,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_13_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_13_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2317,18 +2194,18 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_13_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_11_group_references::regex_13_matcher::get_named_group_index(auto const& name) -> int{ if (name == "n") {return 1; }else {return -1; } } - [[nodiscard]] auto test_tests_11_group_references::regex_13_matcher::to_string() -> std::string{return R"(/(?foo) \k'n'/)"; } + template [[nodiscard]] constexpr auto test_tests_11_group_references::regex_13_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_11_group_references::regex_13_matcher::to_string() -> std::string{return R"(/(?foo) \k'n'/)"; } - - template [[nodiscard]] auto test_tests_11_group_references::regex_14_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_14_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2373,7 +2250,7 @@ int i{0}; } if (r.matched) {r.pos += 1;} else {break;} - if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} } while ( false @@ -2384,10 +2261,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_14_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_14_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2395,18 +2273,18 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_14_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_11_group_references::regex_14_matcher::get_named_group_index(auto const& name) -> int{ if (name == "n") {return 1; }else {return -1; } } - [[nodiscard]] auto test_tests_11_group_references::regex_14_matcher::to_string() -> std::string{return R"(/(?foo) \k'n'/)"; } - + template [[nodiscard]] constexpr auto test_tests_11_group_references::regex_14_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_11_group_references::regex_14_matcher::to_string() -> std::string{return R"(/(?foo) \k'n'/)"; } - template [[nodiscard]] auto test_tests_11_group_references::regex_15_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_15_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2451,7 +2329,7 @@ int i{0}; } if (r.matched) {r.pos += 1;} else {break;} - if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} } while ( false @@ -2462,10 +2340,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_15_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_15_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2473,18 +2352,18 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_15_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_11_group_references::regex_15_matcher::get_named_group_index(auto const& name) -> int{ if (name == "a1") {return 1; }else {return -1; } } - [[nodiscard]] auto test_tests_11_group_references::regex_15_matcher::to_string() -> std::string{return R"(/(?'a1'foo) \k'a1'/)"; } - + template [[nodiscard]] constexpr auto test_tests_11_group_references::regex_15_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_11_group_references::regex_15_matcher::to_string() -> std::string{return R"(/(?'a1'foo) \k'a1'/)"; } - template [[nodiscard]] auto test_tests_11_group_references::regex_16_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_16_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2529,7 +2408,7 @@ int i{0}; } if (r.matched) {r.pos += 1;} else {break;} - if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} } while ( false @@ -2540,10 +2419,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_16_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_16_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2551,18 +2431,18 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_16_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_11_group_references::regex_16_matcher::get_named_group_index(auto const& name) -> int{ if (name == "a1") {return 1; }else {return -1; } } - [[nodiscard]] auto test_tests_11_group_references::regex_16_matcher::to_string() -> std::string{return R"(/(?foo) \k/)"; } + template [[nodiscard]] constexpr auto test_tests_11_group_references::regex_16_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_11_group_references::regex_16_matcher::to_string() -> std::string{return R"(/(?foo) \k/)"; } - - template [[nodiscard]] auto test_tests_11_group_references::regex_17_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_17_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2607,7 +2487,7 @@ int i{0}; } if (r.matched) {r.pos += 1;} else {break;} - if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} } while ( false @@ -2618,10 +2498,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_17_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_17_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2629,18 +2510,18 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_17_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_11_group_references::regex_17_matcher::get_named_group_index(auto const& name) -> int{ if (name == "_") {return 1; }else {return -1; } } - [[nodiscard]] auto test_tests_11_group_references::regex_17_matcher::to_string() -> std::string{return R"(/(?'_'foo) \k'_'/)"; } - + template [[nodiscard]] constexpr auto test_tests_11_group_references::regex_17_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_11_group_references::regex_17_matcher::to_string() -> std::string{return R"(/(?'_'foo) \k'_'/)"; } - template [[nodiscard]] auto test_tests_11_group_references::regex_18_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_18_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2685,7 +2566,7 @@ int i{0}; } if (r.matched) {r.pos += 1;} else {break;} - if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} } while ( false @@ -2696,10 +2577,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_18_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_18_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2707,18 +2589,18 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_18_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_11_group_references::regex_18_matcher::get_named_group_index(auto const& name) -> int{ if (name == "_") {return 1; }else {return -1; } } - [[nodiscard]] auto test_tests_11_group_references::regex_18_matcher::to_string() -> std::string{return R"(/(?<_>foo) \k<_>/)"; } - + template [[nodiscard]] constexpr auto test_tests_11_group_references::regex_18_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_11_group_references::regex_18_matcher::to_string() -> std::string{return R"(/(?<_>foo) \k<_>/)"; } - template [[nodiscard]] auto test_tests_11_group_references::regex_19_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_19_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2763,7 +2645,7 @@ int i{0}; } if (r.matched) {r.pos += 1;} else {break;} - if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} } while ( false @@ -2774,10 +2656,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_19_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_19_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2785,18 +2668,18 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_19_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_11_group_references::regex_19_matcher::get_named_group_index(auto const& name) -> int{ if (name == "_0_") {return 1; }else {return -1; } } - [[nodiscard]] auto test_tests_11_group_references::regex_19_matcher::to_string() -> std::string{return R"(/(?'_0_'foo) \k'_0_'/)"; } + template [[nodiscard]] constexpr auto test_tests_11_group_references::regex_19_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_11_group_references::regex_19_matcher::to_string() -> std::string{return R"(/(?'_0_'foo) \k'_0_'/)"; } - - template [[nodiscard]] auto test_tests_11_group_references::regex_20_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_20_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2841,7 +2724,7 @@ int i{0}; } if (r.matched) {r.pos += 1;} else {break;} - if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} } while ( false @@ -2852,10 +2735,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_20_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_20_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2863,18 +2747,18 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_20_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_11_group_references::regex_20_matcher::get_named_group_index(auto const& name) -> int{ if (name == "_0_") {return 1; }else {return -1; } } - [[nodiscard]] auto test_tests_11_group_references::regex_20_matcher::to_string() -> std::string{return R"(/(?<_0_>foo) \k<_0_>/)"; } - + template [[nodiscard]] constexpr auto test_tests_11_group_references::regex_20_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_11_group_references::regex_20_matcher::to_string() -> std::string{return R"(/(?<_0_>foo) \k<_0_>/)"; } - template [[nodiscard]] auto test_tests_11_group_references::regex_21_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_21_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2889,11 +2773,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_21_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_21_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2949,11 +2834,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_21_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_21_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2968,11 +2854,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_21_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_21_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3002,7 +2889,7 @@ int i{0}; } if (r.matched) {r.pos += 1;} else {break;} - if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} std::array str_tmp_5 {" "}; if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { @@ -3028,11 +2915,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_21_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_21_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3058,10 +2946,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_21_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_21_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -3069,18 +2958,18 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_21_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_11_group_references::regex_21_matcher::get_named_group_index(auto const& name) -> int{ if (name == "as") {return 1; }else {return -1; } } - [[nodiscard]] auto test_tests_11_group_references::regex_21_matcher::to_string() -> std::string{return R"(/(?as) (\w+) \k (\w+)/)"; } - + template [[nodiscard]] constexpr auto test_tests_11_group_references::regex_21_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_11_group_references::regex_21_matcher::to_string() -> std::string{return R"(/(?as) (\w+) \k (\w+)/)"; } - template [[nodiscard]] auto test_tests_11_group_references::regex_22_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_22_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3095,11 +2984,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_22_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_22_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3155,11 +3045,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_22_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_22_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3174,11 +3065,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_22_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_22_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3208,7 +3100,7 @@ int i{0}; } if (r.matched) {r.pos += 1;} else {break;} - if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} std::array str_tmp_5 {" "}; if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { @@ -3234,11 +3126,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_22_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_22_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3264,10 +3157,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_22_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_22_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -3275,18 +3169,18 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_22_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_11_group_references::regex_22_matcher::get_named_group_index(auto const& name) -> int{ if (name == "as") {return 1; }else {return -1; } } - [[nodiscard]] auto test_tests_11_group_references::regex_22_matcher::to_string() -> std::string{return R"(/(?as) (\w+) \k{as} (\w+)/)"; } + template [[nodiscard]] constexpr auto test_tests_11_group_references::regex_22_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_11_group_references::regex_22_matcher::to_string() -> std::string{return R"(/(?as) (\w+) \k{as} (\w+)/)"; } - - template [[nodiscard]] auto test_tests_11_group_references::regex_23_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_23_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3301,11 +3195,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_23_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_23_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3361,11 +3256,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_23_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_23_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3380,11 +3276,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_23_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_23_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3414,7 +3311,7 @@ int i{0}; } if (r.matched) {r.pos += 1;} else {break;} - if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} std::array str_tmp_5 {" "}; if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { @@ -3440,11 +3337,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_23_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_23_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3470,10 +3368,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_23_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_23_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -3481,18 +3380,18 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_23_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_11_group_references::regex_23_matcher::get_named_group_index(auto const& name) -> int{ if (name == "as") {return 1; }else {return -1; } } - [[nodiscard]] auto test_tests_11_group_references::regex_23_matcher::to_string() -> std::string{return R"(/(?as) (\w+) \k'as' (\w+)/)"; } - + template [[nodiscard]] constexpr auto test_tests_11_group_references::regex_23_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_11_group_references::regex_23_matcher::to_string() -> std::string{return R"(/(?as) (\w+) \k'as' (\w+)/)"; } - template [[nodiscard]] auto test_tests_11_group_references::regex_24_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_24_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3507,11 +3406,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_24_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_24_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3567,11 +3467,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_24_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_24_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3586,11 +3487,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_24_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_24_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3620,7 +3522,7 @@ int i{0}; } if (r.matched) {r.pos += 1;} else {break;} - if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} std::array str_tmp_5 {" "}; if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { @@ -3646,11 +3548,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_24_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_24_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3676,10 +3579,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_24_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_11_group_references::regex_24_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -3687,14 +3591,15 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_11_group_references::regex_24_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_11_group_references::regex_24_matcher::get_named_group_index(auto const& name) -> int{ if (name == "as") {return 1; }else {return -1; } } - [[nodiscard]] auto test_tests_11_group_references::regex_24_matcher::to_string() -> std::string{return R"(/(?as) (\w+) \k{ as } (\w+)/)"; } + template [[nodiscard]] constexpr auto test_tests_11_group_references::regex_24_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_11_group_references::regex_24_matcher::to_string() -> std::string{return R"(/(?as) (\w+) \k{ as } (\w+)/)"; } -#line 219 "pure2-regex_11_group_references.cpp2" +#line 220 "pure2-regex_11_group_references.cpp2" auto main() -> int{ CPP2_UFCS(run)(test_tests_11_group_references()); } diff --git a/regression-tests/test-results/pure2-regex_12_case_insensitive.cpp b/regression-tests/test-results/pure2-regex_12_case_insensitive.cpp index 66b0183cb..63017682f 100644 --- a/regression-tests/test-results/pure2-regex_12_case_insensitive.cpp +++ b/regression-tests/test-results/pure2-regex_12_case_insensitive.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes #include "cpp2regex.h" //=== Cpp2 type declarations ==================================================== @@ -9,7 +9,7 @@ #line 1 "pure2-regex_12_case_insensitive.cpp2" -#line 165 "pure2-regex_12_case_insensitive.cpp2" +#line 166 "pure2-regex_12_case_insensitive.cpp2" class test_tests_12_case_insensitive; @@ -18,37 +18,31 @@ class test_tests_12_case_insensitive; #line 1 "pure2-regex_12_case_insensitive.cpp2" [[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string; -#line 112 "pure2-regex_12_case_insensitive.cpp2" +#line 113 "pure2-regex_12_case_insensitive.cpp2" [[nodiscard]] auto sanitize(std::string str) -> std::string; -#line 124 "pure2-regex_12_case_insensitive.cpp2" +#line 125 "pure2-regex_12_case_insensitive.cpp2" template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, cpp2::impl::in resultExpected) -> void; -#line 165 "pure2-regex_12_case_insensitive.cpp2" +#line 166 "pure2-regex_12_case_insensitive.cpp2" class test_tests_12_case_insensitive { -#line 285 "pure2-regex_12_case_insensitive.cpp2" +#line 286 "pure2-regex_12_case_insensitive.cpp2" public: auto run() const& -> void; - public: class regex_01_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: template class regex_01_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_01_matcher() = default; public: regex_01_matcher(regex_01_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -56,25 +50,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_01 {}; public: class regex_02_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_01 {}; public: template class regex_02_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_02_matcher() = default; public: regex_02_matcher(regex_02_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -82,25 +70,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_02 {}; public: class regex_03_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_02 {}; public: template class regex_03_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_03_matcher() = default; public: regex_03_matcher(regex_03_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -108,25 +90,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_03 {}; public: class regex_04_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_03 {}; public: template class regex_04_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_04_matcher() = default; public: regex_04_matcher(regex_04_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -134,25 +110,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_04 {}; public: class regex_05_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_04 {}; public: template class regex_05_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_05_matcher() = default; public: regex_05_matcher(regex_05_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -160,25 +130,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_05 {}; public: class regex_06_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_05 {}; public: template class regex_06_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_06_matcher() = default; public: regex_06_matcher(regex_06_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -186,35 +150,29 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_06 {}; public: class regex_07_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_06 {}; public: template class regex_07_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_07_matcher() = default; public: regex_07_matcher(regex_07_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -222,35 +180,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_07 {}; public: class regex_08_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_07 {}; public: template class regex_08_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_08_matcher() = default; public: regex_08_matcher(regex_08_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -258,35 +210,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_08 {}; public: class regex_09_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_08 {}; public: template class regex_09_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_09_matcher() = default; public: regex_09_matcher(regex_09_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -294,35 +240,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_09 {}; public: class regex_10_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_09 {}; public: template class regex_10_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_10_matcher() = default; public: regex_10_matcher(regex_10_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -330,35 +270,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_10 {}; public: class regex_100_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_10 {}; public: template class regex_100_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_100_matcher() = default; public: regex_100_matcher(regex_100_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -366,36 +300,35 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_100 {}; public: class regex_101_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_100 {}; public: template class regex_101_matcher { + public: template using context = cpp2::regex::match_context; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_5 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_6 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -405,31 +338,26 @@ public: class func_3 { }; public: class func_7 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_8 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_101_matcher() = default; public: regex_101_matcher(regex_101_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -437,66 +365,65 @@ public: class func_3 { }; - public: cpp2::regex::regular_expression regex_101 {}; public: class regex_102_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_101 {}; public: template class regex_102_matcher { + public: template using context = cpp2::regex::match_context; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_5 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_6 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_8 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_7 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_10 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_11 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_9 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_12 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -506,26 +433,21 @@ public: class func_2 { }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_13 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_102_matcher() = default; public: regex_102_matcher(regex_102_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -533,66 +455,65 @@ public: class func_2 { }; - public: cpp2::regex::regular_expression regex_102 {}; public: class regex_103_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_102 {}; public: template class regex_103_matcher { + public: template using context = cpp2::regex::match_context; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_5 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_6 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_8 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_7 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_10 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_11 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_9 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_12 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -602,26 +523,21 @@ public: class func_2 { }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_13 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_103_matcher() = default; public: regex_103_matcher(regex_103_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -629,66 +545,65 @@ public: class func_2 { }; - public: cpp2::regex::regular_expression regex_103 {}; public: class regex_104_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_103 {}; public: template class regex_104_matcher { + public: template using context = cpp2::regex::match_context; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_5 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_6 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_8 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_7 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_10 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_11 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_9 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_12 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -698,26 +613,21 @@ public: class func_2 { }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_13 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_104_matcher() = default; public: regex_104_matcher(regex_104_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -725,66 +635,65 @@ public: class func_2 { }; - public: cpp2::regex::regular_expression regex_104 {}; public: class regex_105_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_104 {}; public: template class regex_105_matcher { + public: template using context = cpp2::regex::match_context; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_5 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_6 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_8 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_7 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_10 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_11 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_9 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_12 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -794,26 +703,21 @@ public: class func_2 { }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_13 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_105_matcher() = default; public: regex_105_matcher(regex_105_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -821,66 +725,65 @@ public: class func_2 { }; - public: cpp2::regex::regular_expression regex_105 {}; public: class regex_106_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_105 {}; public: template class regex_106_matcher { + public: template using context = cpp2::regex::match_context; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_5 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_6 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_8 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_7 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_10 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_11 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_9 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_12 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -890,26 +793,21 @@ public: class func_2 { }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_13 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_106_matcher() = default; public: regex_106_matcher(regex_106_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -917,25 +815,19 @@ public: class func_2 { }; - public: cpp2::regex::regular_expression regex_106 {}; public: class regex_107_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_106 {}; public: template class regex_107_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_107_matcher() = default; public: regex_107_matcher(regex_107_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -943,25 +835,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_107 {}; public: class regex_108_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_107 {}; public: template class regex_108_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_108_matcher() = default; public: regex_108_matcher(regex_108_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -969,25 +855,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_108 {}; public: class regex_109_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_108 {}; public: template class regex_109_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_109_matcher() = default; public: regex_109_matcher(regex_109_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -995,35 +875,29 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_109 {}; public: class regex_11_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_109 {}; public: template class regex_11_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_11_matcher() = default; public: regex_11_matcher(regex_11_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1031,25 +905,19 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_11 {}; public: class regex_110_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_11 {}; public: template class regex_110_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_110_matcher() = default; public: regex_110_matcher(regex_110_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1057,25 +925,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_110 {}; public: class regex_111_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_110 {}; public: template class regex_111_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_111_matcher() = default; public: regex_111_matcher(regex_111_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1083,45 +945,39 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_111 {}; public: class regex_112_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_111 {}; public: template class regex_112_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_112_matcher() = default; public: regex_112_matcher(regex_112_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1129,45 +985,39 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_112 {}; public: class regex_113_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_112 {}; public: template class regex_113_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_113_matcher() = default; public: regex_113_matcher(regex_113_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1175,25 +1025,19 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_113 {}; public: class regex_114_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_113 {}; public: template class regex_114_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_114_matcher() = default; public: regex_114_matcher(regex_114_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1201,25 +1045,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_114 {}; public: class regex_115_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_114 {}; public: template class regex_115_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_115_matcher() = default; public: regex_115_matcher(regex_115_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1227,25 +1065,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_115 {}; public: class regex_116_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_115 {}; public: template class regex_116_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_116_matcher() = default; public: regex_116_matcher(regex_116_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1253,35 +1085,29 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_116 {}; public: class regex_117_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_116 {}; public: template class regex_117_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_117_matcher() = default; public: regex_117_matcher(regex_117_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1289,25 +1115,19 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_117 {}; public: class regex_118_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_117 {}; public: template class regex_118_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_118_matcher() = default; public: regex_118_matcher(regex_118_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1315,35 +1135,29 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_118 {}; public: class regex_119_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_118 {}; public: template class regex_119_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_119_matcher() = default; public: regex_119_matcher(regex_119_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1351,35 +1165,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_119 {}; public: class regex_12_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_119 {}; public: template class regex_12_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_12_matcher() = default; public: regex_12_matcher(regex_12_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1387,35 +1195,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_12 {}; public: class regex_13_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_12 {}; public: template class regex_13_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_13_matcher() = default; public: regex_13_matcher(regex_13_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1423,35 +1225,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_13 {}; public: class regex_14_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_13 {}; public: template class regex_14_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_14_matcher() = default; public: regex_14_matcher(regex_14_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1459,35 +1255,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_14 {}; public: class regex_15_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_14 {}; public: template class regex_15_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_15_matcher() = default; public: regex_15_matcher(regex_15_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1495,35 +1285,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_15 {}; public: class regex_16_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_15 {}; public: template class regex_16_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_16_matcher() = default; public: regex_16_matcher(regex_16_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1531,35 +1315,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_16 {}; public: class regex_17_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_16 {}; public: template class regex_17_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_17_matcher() = default; public: regex_17_matcher(regex_17_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1567,35 +1345,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_17 {}; public: class regex_18_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_17 {}; public: template class regex_18_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_18_matcher() = default; public: regex_18_matcher(regex_18_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1603,35 +1375,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_18 {}; public: class regex_19_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_18 {}; public: template class regex_19_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_19_matcher() = default; public: regex_19_matcher(regex_19_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1639,35 +1405,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_19 {}; public: class regex_20_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_19 {}; public: template class regex_20_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_20_matcher() = default; public: regex_20_matcher(regex_20_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1675,35 +1435,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_20 {}; public: class regex_21_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_20 {}; public: template class regex_21_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_21_matcher() = default; public: regex_21_matcher(regex_21_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1711,35 +1465,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_21 {}; public: class regex_22_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_21 {}; public: template class regex_22_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_22_matcher() = default; public: regex_22_matcher(regex_22_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1747,35 +1495,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_22 {}; public: class regex_23_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_22 {}; public: template class regex_23_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_23_matcher() = default; public: regex_23_matcher(regex_23_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1783,35 +1525,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_23 {}; public: class regex_24_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_23 {}; public: template class regex_24_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_24_matcher() = default; public: regex_24_matcher(regex_24_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1819,35 +1555,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_24 {}; public: class regex_25_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_24 {}; public: template class regex_25_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_25_matcher() = default; public: regex_25_matcher(regex_25_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1855,35 +1585,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_25 {}; public: class regex_26_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_25 {}; public: template class regex_26_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_26_matcher() = default; public: regex_26_matcher(regex_26_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1891,25 +1615,19 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_26 {}; public: class regex_27_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_26 {}; public: template class regex_27_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_27_matcher() = default; public: regex_27_matcher(regex_27_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1917,25 +1635,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_27 {}; public: class regex_28_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_27 {}; public: template class regex_28_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_28_matcher() = default; public: regex_28_matcher(regex_28_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1943,25 +1655,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_28 {}; public: class regex_29_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_28 {}; public: template class regex_29_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_29_matcher() = default; public: regex_29_matcher(regex_29_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1969,25 +1675,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_29 {}; public: class regex_30_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_29 {}; public: template class regex_30_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_30_matcher() = default; public: regex_30_matcher(regex_30_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1995,25 +1695,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_30 {}; public: class regex_31_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_30 {}; public: template class regex_31_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_31_matcher() = default; public: regex_31_matcher(regex_31_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2021,25 +1715,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_31 {}; public: class regex_32_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_31 {}; public: template class regex_32_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_32_matcher() = default; public: regex_32_matcher(regex_32_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2047,25 +1735,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_32 {}; public: class regex_33_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_32 {}; public: template class regex_33_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_33_matcher() = default; public: regex_33_matcher(regex_33_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2073,25 +1755,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_33 {}; public: class regex_34_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_33 {}; public: template class regex_34_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_34_matcher() = default; public: regex_34_matcher(regex_34_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2099,25 +1775,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_34 {}; public: class regex_35_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_34 {}; public: template class regex_35_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_35_matcher() = default; public: regex_35_matcher(regex_35_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2125,25 +1795,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_35 {}; public: class regex_36_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_35 {}; public: template class regex_36_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_36_matcher() = default; public: regex_36_matcher(regex_36_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2151,35 +1815,29 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_36 {}; public: class regex_37_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_36 {}; public: template class regex_37_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_37_matcher() = default; public: regex_37_matcher(regex_37_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2187,35 +1845,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_37 {}; public: class regex_38_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_37 {}; public: template class regex_38_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_38_matcher() = default; public: regex_38_matcher(regex_38_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2223,25 +1875,19 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_38 {}; public: class regex_39_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_38 {}; public: template class regex_39_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_39_matcher() = default; public: regex_39_matcher(regex_39_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2249,25 +1895,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_39 {}; public: class regex_40_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_39 {}; public: template class regex_40_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_40_matcher() = default; public: regex_40_matcher(regex_40_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2275,25 +1915,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_40 {}; public: class regex_41_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_40 {}; public: template class regex_41_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_41_matcher() = default; public: regex_41_matcher(regex_41_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2301,25 +1935,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_41 {}; public: class regex_42_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_41 {}; public: template class regex_42_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_42_matcher() = default; public: regex_42_matcher(regex_42_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2327,25 +1955,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_42 {}; public: class regex_43_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_42 {}; public: template class regex_43_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_43_matcher() = default; public: regex_43_matcher(regex_43_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2353,25 +1975,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_43 {}; public: class regex_44_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_43 {}; public: template class regex_44_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_44_matcher() = default; public: regex_44_matcher(regex_44_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2379,25 +1995,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_44 {}; public: class regex_45_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_44 {}; public: template class regex_45_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_45_matcher() = default; public: regex_45_matcher(regex_45_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2405,25 +2015,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_45 {}; public: class regex_46_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_45 {}; public: template class regex_46_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_46_matcher() = default; public: regex_46_matcher(regex_46_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2431,25 +2035,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_46 {}; public: class regex_47_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_46 {}; public: template class regex_47_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_47_matcher() = default; public: regex_47_matcher(regex_47_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2457,25 +2055,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_47 {}; public: class regex_48_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_47 {}; public: template class regex_48_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_48_matcher() = default; public: regex_48_matcher(regex_48_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2483,25 +2075,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_48 {}; public: class regex_49_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_48 {}; public: template class regex_49_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_49_matcher() = default; public: regex_49_matcher(regex_49_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2509,25 +2095,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_49 {}; public: class regex_50_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_49 {}; public: template class regex_50_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_50_matcher() = default; public: regex_50_matcher(regex_50_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2535,25 +2115,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_50 {}; public: class regex_51_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_50 {}; public: template class regex_51_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_51_matcher() = default; public: regex_51_matcher(regex_51_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2561,25 +2135,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_51 {}; public: class regex_52_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_51 {}; public: template class regex_52_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_52_matcher() = default; public: regex_52_matcher(regex_52_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2587,25 +2155,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_52 {}; public: class regex_53_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_52 {}; public: template class regex_53_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_53_matcher() = default; public: regex_53_matcher(regex_53_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2613,40 +2175,34 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_53 {}; public: class regex_54_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_53 {}; public: template class regex_54_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_54_matcher() = default; public: regex_54_matcher(regex_54_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2654,40 +2210,34 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_54 {}; public: class regex_55_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_54 {}; public: template class regex_55_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_55_matcher() = default; public: regex_55_matcher(regex_55_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2695,25 +2245,19 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_55 {}; public: class regex_56_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_55 {}; public: template class regex_56_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_56_matcher() = default; public: regex_56_matcher(regex_56_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2721,25 +2265,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_56 {}; public: class regex_57_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_56 {}; public: template class regex_57_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_57_matcher() = default; public: regex_57_matcher(regex_57_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2747,25 +2285,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_57 {}; public: class regex_58_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_57 {}; public: template class regex_58_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_58_matcher() = default; public: regex_58_matcher(regex_58_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2773,35 +2305,29 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_58 {}; public: class regex_59_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_58 {}; public: template class regex_59_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_59_matcher() = default; public: regex_59_matcher(regex_59_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2809,35 +2335,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_59 {}; public: class regex_60_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_59 {}; public: template class regex_60_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_60_matcher() = default; public: regex_60_matcher(regex_60_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2845,25 +2365,19 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_60 {}; public: class regex_61_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_60 {}; public: template class regex_61_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_61_matcher() = default; public: regex_61_matcher(regex_61_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2871,25 +2385,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_61 {}; public: class regex_62_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_61 {}; public: template class regex_62_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_62_matcher() = default; public: regex_62_matcher(regex_62_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2897,25 +2405,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_62 {}; public: class regex_63_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_62 {}; public: template class regex_63_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_63_matcher() = default; public: regex_63_matcher(regex_63_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2923,45 +2425,39 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_63 {}; public: class regex_64_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_63 {}; public: template class regex_64_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_64_matcher() = default; public: regex_64_matcher(regex_64_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2969,45 +2465,39 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_64 {}; public: class regex_65_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_64 {}; public: template class regex_65_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_65_matcher() = default; public: regex_65_matcher(regex_65_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -3015,35 +2505,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_65 {}; public: class regex_66_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_65 {}; public: template class regex_66_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_66_matcher() = default; public: regex_66_matcher(regex_66_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -3051,35 +2535,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_66 {}; public: class regex_67_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_66 {}; public: template class regex_67_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_67_matcher() = default; public: regex_67_matcher(regex_67_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -3087,35 +2565,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_67 {}; public: class regex_68_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_67 {}; public: template class regex_68_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_68_matcher() = default; public: regex_68_matcher(regex_68_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -3123,36 +2595,35 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_68 {}; public: class regex_69_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_68 {}; public: template class regex_69_matcher { + public: template using context = cpp2::regex::match_context; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_5 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_6 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -3162,26 +2633,21 @@ public: class func_3 { }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_7 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_69_matcher() = default; public: regex_69_matcher(regex_69_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -3189,36 +2655,35 @@ public: class func_3 { }; - public: cpp2::regex::regular_expression regex_69 {}; public: class regex_70_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_69 {}; public: template class regex_70_matcher { + public: template using context = cpp2::regex::match_context; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_5 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_6 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -3228,26 +2693,21 @@ public: class func_3 { }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_7 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_70_matcher() = default; public: regex_70_matcher(regex_70_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -3255,36 +2715,35 @@ public: class func_3 { }; - public: cpp2::regex::regular_expression regex_70 {}; public: class regex_71_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_70 {}; public: template class regex_71_matcher { + public: template using context = cpp2::regex::match_context; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_5 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_6 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -3294,26 +2753,21 @@ public: class func_3 { }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_7 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_71_matcher() = default; public: regex_71_matcher(regex_71_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -3321,36 +2775,35 @@ public: class func_3 { }; - public: cpp2::regex::regular_expression regex_71 {}; public: class regex_72_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_71 {}; public: template class regex_72_matcher { + public: template using context = cpp2::regex::match_context; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_5 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_6 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -3360,26 +2813,21 @@ public: class func_3 { }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_7 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_72_matcher() = default; public: regex_72_matcher(regex_72_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -3387,36 +2835,35 @@ public: class func_3 { }; - public: cpp2::regex::regular_expression regex_72 {}; public: class regex_73_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_72 {}; public: template class regex_73_matcher { + public: template using context = cpp2::regex::match_context; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_5 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_6 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -3426,26 +2873,21 @@ public: class func_3 { }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_7 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_73_matcher() = default; public: regex_73_matcher(regex_73_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -3453,36 +2895,35 @@ public: class func_3 { }; - public: cpp2::regex::regular_expression regex_73 {}; public: class regex_74_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_73 {}; public: template class regex_74_matcher { + public: template using context = cpp2::regex::match_context; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_5 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_6 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -3492,26 +2933,21 @@ public: class func_3 { }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_7 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_74_matcher() = default; public: regex_74_matcher(regex_74_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -3519,36 +2955,35 @@ public: class func_3 { }; - public: cpp2::regex::regular_expression regex_74 {}; public: class regex_75_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_74 {}; public: template class regex_75_matcher { + public: template using context = cpp2::regex::match_context; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_5 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_6 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -3558,26 +2993,21 @@ public: class func_3 { }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_7 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_75_matcher() = default; public: regex_75_matcher(regex_75_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -3585,35 +3015,29 @@ public: class func_3 { }; - public: cpp2::regex::regular_expression regex_75 {}; public: class regex_76_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_75 {}; public: template class regex_76_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_76_matcher() = default; public: regex_76_matcher(regex_76_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -3621,25 +3045,19 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_76 {}; public: class regex_77_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_76 {}; public: template class regex_77_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_77_matcher() = default; public: regex_77_matcher(regex_77_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -3647,35 +3065,29 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_77 {}; public: class regex_78_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_77 {}; public: template class regex_78_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_78_matcher() = default; public: regex_78_matcher(regex_78_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -3683,11 +3095,10 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_78 {}; public: class regex_79_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_78 {}; public: template class regex_79_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -3697,26 +3108,21 @@ public: class func_1 { }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_79_matcher() = default; public: regex_79_matcher(regex_79_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -3724,11 +3130,10 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_79 {}; public: class regex_80_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_79 {}; public: template class regex_80_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -3738,26 +3143,21 @@ public: class func_1 { }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_80_matcher() = default; public: regex_80_matcher(regex_80_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -3765,55 +3165,49 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_80 {}; public: class regex_81_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_80 {}; public: template class regex_81_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_5 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_6 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_81_matcher() = default; public: regex_81_matcher(regex_81_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -3821,55 +3215,49 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_81 {}; public: class regex_82_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_81 {}; public: template class regex_82_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_5 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_6 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_82_matcher() = default; public: regex_82_matcher(regex_82_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -3877,35 +3265,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_82 {}; public: class regex_83_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_82 {}; public: template class regex_83_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_83_matcher() = default; public: regex_83_matcher(regex_83_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -3913,35 +3295,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_83 {}; public: class regex_84_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_83 {}; public: template class regex_84_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_84_matcher() = default; public: regex_84_matcher(regex_84_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -3949,35 +3325,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_84 {}; public: class regex_85_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_84 {}; public: template class regex_85_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_85_matcher() = default; public: regex_85_matcher(regex_85_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -3985,40 +3355,34 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_85 {}; public: class regex_86_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_85 {}; public: template class regex_86_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_86_matcher() = default; public: regex_86_matcher(regex_86_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -4026,25 +3390,19 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_86 {}; public: class regex_87_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_86 {}; public: template class regex_87_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_87_matcher() = default; public: regex_87_matcher(regex_87_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -4052,40 +3410,34 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_87 {}; public: class regex_88_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_87 {}; public: template class regex_88_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_88_matcher() = default; public: regex_88_matcher(regex_88_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -4093,40 +3445,34 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_88 {}; public: class regex_89_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_88 {}; public: template class regex_89_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_89_matcher() = default; public: regex_89_matcher(regex_89_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -4134,50 +3480,44 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_89 {}; public: class regex_90_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_89 {}; public: template class regex_90_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_5 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_90_matcher() = default; public: regex_90_matcher(regex_90_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -4185,50 +3525,44 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_90 {}; public: class regex_91_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_90 {}; public: template class regex_91_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_5 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_91_matcher() = default; public: regex_91_matcher(regex_91_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -4236,45 +3570,39 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_91 {}; public: class regex_92_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_91 {}; public: template class regex_92_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_92_matcher() = default; public: regex_92_matcher(regex_92_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -4282,45 +3610,39 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_92 {}; public: class regex_93_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_92 {}; public: template class regex_93_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_93_matcher() = default; public: regex_93_matcher(regex_93_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -4328,45 +3650,39 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_93 {}; public: class regex_94_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_93 {}; public: template class regex_94_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_94_matcher() = default; public: regex_94_matcher(regex_94_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -4374,45 +3690,39 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_94 {}; public: class regex_95_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_94 {}; public: template class regex_95_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_95_matcher() = default; public: regex_95_matcher(regex_95_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -4420,35 +3730,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_95 {}; public: class regex_96_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_95 {}; public: template class regex_96_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_96_matcher() = default; public: regex_96_matcher(regex_96_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -4456,35 +3760,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_96 {}; public: class regex_97_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_96 {}; public: template class regex_97_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_97_matcher() = default; public: regex_97_matcher(regex_97_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -4492,50 +3790,44 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_97 {}; public: class regex_98_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_97 {}; public: template class regex_98_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_5 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_98_matcher() = default; public: regex_98_matcher(regex_98_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -4543,25 +3835,19 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_98 {}; public: class regex_99_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_98 {}; public: template class regex_99_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_99_matcher() = default; public: regex_99_matcher(regex_99_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -4569,13 +3855,13 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_99 {}; + public: cpp2::regex::regular_expression> regex_99 {}; public: test_tests_12_case_insensitive() = default; public: test_tests_12_case_insensitive(test_tests_12_case_insensitive const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(test_tests_12_case_insensitive const&) -> void = delete; -#line 408 "pure2-regex_12_case_insensitive.cpp2" +#line 409 "pure2-regex_12_case_insensitive.cpp2" }; auto main() -> int; @@ -4679,6 +3965,7 @@ auto main() -> int; } result += std::to_string(cpp2::move(pos)); } + ++next; } else { std::cerr << "Not implemented"; @@ -4694,7 +3981,7 @@ auto main() -> int; return result; } -#line 112 "pure2-regex_12_case_insensitive.cpp2" +#line 113 "pure2-regex_12_case_insensitive.cpp2" [[nodiscard]] auto sanitize(std::string str) -> std::string { str = cpp2::string_util::replace_all(str, "\a", "\\a"); @@ -4707,7 +3994,7 @@ auto main() -> int; return cpp2::move(str); } -#line 124 "pure2-regex_12_case_insensitive.cpp2" +#line 125 "pure2-regex_12_case_insensitive.cpp2" template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, cpp2::impl::in resultExpected) -> void{ @@ -4748,7 +4035,7 @@ template auto test(M const& regex, cpp2::impl::in id, c std::cout << "" + cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(sanitize(str)) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(sanitize(resultExpected)) + "" << std::endl; } -#line 285 "pure2-regex_12_case_insensitive.cpp2" +#line 286 "pure2-regex_12_case_insensitive.cpp2" auto test_tests_12_case_insensitive::run() const& -> void{ std::cout << "Running tests_12_case_insensitive:" << std::endl; test(regex_01, "01", R"('abc'i)", "ABC", "y", R"($&)", "ABC"); @@ -4876,8 +4163,7 @@ template auto test(M const& regex, cpp2::impl::in id, c - - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_01_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_01_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4907,10 +4193,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_01_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_01_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -4918,19 +4205,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_01_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_01_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_01_matcher::to_string() -> std::string{return R"('abc'i)"; } + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_01_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_01_matcher::to_string() -> std::string{return R"('abc'i)"; } - - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_02_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_02_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4960,10 +4247,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_02_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_02_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -4971,19 +4259,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_02_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_02_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_02_matcher::to_string() -> std::string{return R"('abc'i)"; } - + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_02_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_02_matcher::to_string() -> std::string{return R"('abc'i)"; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_03_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_03_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5013,10 +4301,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_03_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_03_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -5024,19 +4313,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_03_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_03_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_03_matcher::to_string() -> std::string{return R"('abc'i)"; } + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_03_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_03_matcher::to_string() -> std::string{return R"('abc'i)"; } - - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_04_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_04_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5066,10 +4355,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_04_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_04_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -5077,19 +4367,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_04_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_04_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_04_matcher::to_string() -> std::string{return R"('abc'i)"; } - + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_04_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_04_matcher::to_string() -> std::string{return R"('abc'i)"; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_05_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_05_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5119,10 +4409,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_05_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_05_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -5130,19 +4421,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_05_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_05_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_05_matcher::to_string() -> std::string{return R"('abc'i)"; } + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_05_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_05_matcher::to_string() -> std::string{return R"('abc'i)"; } - - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_06_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_06_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5172,10 +4463,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_06_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_06_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -5183,19 +4475,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_06_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_06_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_06_matcher::to_string() -> std::string{return R"('abc'i)"; } - + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_06_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_06_matcher::to_string() -> std::string{return R"('abc'i)"; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_07_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_07_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5225,11 +4517,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_07_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_07_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5259,11 +4552,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_07_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_07_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5293,10 +4587,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_07_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_07_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -5304,19 +4599,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_07_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_07_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_07_matcher::to_string() -> std::string{return R"('ab*c'i)"; } + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_07_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_07_matcher::to_string() -> std::string{return R"('ab*c'i)"; } - - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_08_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_08_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5346,11 +4641,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_08_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_08_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5380,11 +4676,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_08_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_08_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5414,10 +4711,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_08_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_08_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -5425,19 +4723,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_08_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_08_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_08_matcher::to_string() -> std::string{return R"('ab*bc'i)"; } - + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_08_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_08_matcher::to_string() -> std::string{return R"('ab*bc'i)"; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_09_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_09_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5467,11 +4765,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_09_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_09_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5501,11 +4800,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_09_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_09_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5535,10 +4835,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_09_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_09_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -5546,19 +4847,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_09_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_09_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_09_matcher::to_string() -> std::string{return R"('ab*bc'i)"; } + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_09_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_09_matcher::to_string() -> std::string{return R"('ab*bc'i)"; } - - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_10_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_10_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5588,11 +4889,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_10_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_10_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5622,11 +4924,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_10_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_10_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5656,10 +4959,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_10_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_10_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -5667,19 +4971,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_10_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_10_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_10_matcher::to_string() -> std::string{return R"('ab*?bc'i)"; } - + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_10_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_10_matcher::to_string() -> std::string{return R"('ab*?bc'i)"; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_100_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_100_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5694,11 +4998,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_100_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_100_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5713,11 +5018,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_100_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_100_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5731,10 +5037,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_100_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_100_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -5742,19 +5049,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_100_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_100_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_100_matcher::to_string() -> std::string{return R"('[a-zA-Z_][a-zA-Z0-9_]*'i)"; } + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_100_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_100_matcher::to_string() -> std::string{return R"('[a-zA-Z_][a-zA-Z0-9_]*'i)"; } - - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_101_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_101_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5784,11 +5091,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_101_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_101_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5818,11 +5126,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_101_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_101_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5836,11 +5145,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_101_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_101_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5871,11 +5181,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_101_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_101_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5907,11 +5218,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_101_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_101_matcher::func_6::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5953,16 +5265,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_12_case_insensitive::regex_101_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_12_case_insensitive::regex_101_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_101_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_101_matcher::func_7::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5994,11 +5307,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_101_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_101_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6012,11 +5326,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_101_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_101_matcher::func_8::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6030,10 +5345,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_101_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_101_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -6041,19 +5357,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_101_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_101_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_101_matcher::to_string() -> std::string{return R"('^a(bc+|b[eh])g|.h$'i)"; } - + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_101_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_101_matcher::to_string() -> std::string{return R"('^a(bc+|b[eh])g|.h$'i)"; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6083,11 +5399,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6117,11 +5434,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6152,11 +5470,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6186,11 +5505,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6220,11 +5540,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::func_6::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6255,11 +5576,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::func_8::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6289,11 +5611,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::func_7::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6307,11 +5630,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::wrap::func_10::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::func_10::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6341,11 +5665,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::wrap::func_11::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::func_11::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6375,11 +5700,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::wrap::func_9::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::func_9::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6410,11 +5736,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::wrap::func_12::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::func_12::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6440,16 +5767,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_12_case_insensitive::regex_102_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_12_case_insensitive::regex_102_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(2); } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6464,11 +5792,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::wrap::func_13::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::func_13::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6494,10 +5823,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -6505,19 +5835,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::to_string() -> std::string{return R"('(bc+d$|ef*g.|h?i(j|k))'i)"; } + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_102_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::to_string() -> std::string{return R"('(bc+d$|ef*g.|h?i(j|k))'i)"; } - - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6547,11 +5877,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6581,11 +5912,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6616,11 +5948,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6650,11 +5983,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6684,11 +6018,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::func_6::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6719,11 +6054,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::func_8::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6753,11 +6089,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::func_7::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6771,11 +6108,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::wrap::func_10::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::func_10::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6805,11 +6143,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::wrap::func_11::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::func_11::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6839,11 +6178,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::wrap::func_9::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::func_9::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6874,11 +6214,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::wrap::func_12::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::func_12::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6904,16 +6245,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_12_case_insensitive::regex_103_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_12_case_insensitive::regex_103_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(2); } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6928,11 +6270,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::wrap::func_13::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::func_13::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6958,10 +6301,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -6969,19 +6313,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::to_string() -> std::string{return R"('(bc+d$|ef*g.|h?i(j|k))'i)"; } - + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_103_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::to_string() -> std::string{return R"('(bc+d$|ef*g.|h?i(j|k))'i)"; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7011,11 +6355,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7045,11 +6390,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7080,11 +6426,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7114,11 +6461,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7148,11 +6496,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::func_6::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7183,11 +6532,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::func_8::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7217,11 +6567,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::func_7::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7235,11 +6586,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::wrap::func_10::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::func_10::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7269,11 +6621,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::wrap::func_11::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::func_11::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7303,11 +6656,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::wrap::func_9::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::func_9::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7338,11 +6692,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::wrap::func_12::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::func_12::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7368,16 +6723,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_12_case_insensitive::regex_104_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_12_case_insensitive::regex_104_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(2); } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7392,11 +6748,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::wrap::func_13::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::func_13::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7422,10 +6779,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -7433,19 +6791,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::to_string() -> std::string{return R"('(bc+d$|ef*g.|h?i(j|k))'i)"; } - + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_104_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::to_string() -> std::string{return R"('(bc+d$|ef*g.|h?i(j|k))'i)"; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7475,11 +6833,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7509,11 +6868,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7544,11 +6904,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7578,11 +6939,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7612,11 +6974,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::func_6::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7647,11 +7010,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::func_8::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7681,11 +7045,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::func_7::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7699,11 +7064,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::wrap::func_10::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::func_10::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7733,11 +7099,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::wrap::func_11::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::func_11::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7767,11 +7134,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::wrap::func_9::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::func_9::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7802,11 +7170,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::wrap::func_12::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::func_12::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7832,16 +7201,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_12_case_insensitive::regex_105_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_12_case_insensitive::regex_105_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(2); } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7856,11 +7226,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::wrap::func_13::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::func_13::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7886,10 +7257,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -7897,19 +7269,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::to_string() -> std::string{return R"('(bc+d$|ef*g.|h?i(j|k))'i)"; } + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_105_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::to_string() -> std::string{return R"('(bc+d$|ef*g.|h?i(j|k))'i)"; } - - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7939,11 +7311,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7973,11 +7346,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8008,11 +7382,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8042,11 +7417,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8076,11 +7452,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::func_6::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8111,11 +7488,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::func_8::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8145,11 +7523,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::func_7::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8163,11 +7542,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::wrap::func_10::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::func_10::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8197,11 +7577,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::wrap::func_11::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::func_11::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8231,11 +7612,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::wrap::func_9::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::func_9::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8266,11 +7648,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::wrap::func_12::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::func_12::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8296,16 +7679,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_12_case_insensitive::regex_106_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_12_case_insensitive::regex_106_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(2); } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8320,11 +7704,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::wrap::func_13::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::func_13::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8350,10 +7735,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -8361,19 +7747,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::to_string() -> std::string{return R"('(bc+d$|ef*g.|h?i(j|k))'i)"; } - + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_106_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::to_string() -> std::string{return R"('(bc+d$|ef*g.|h?i(j|k))'i)"; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_107_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_107_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8533,10 +7919,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_107_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_107_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -8544,19 +7931,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_107_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_107_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_107_matcher::to_string() -> std::string{return R"('((((((((((a))))))))))'i)"; } + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_107_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_107_matcher::to_string() -> std::string{return R"('((((((((((a))))))))))'i)"; } - - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_108_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_108_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8706,7 +8093,7 @@ int i{0}; auto tmp_10 {cpp2::regex::make_on_return(cpp2::move(tmp_10_func))}; static_cast(cpp2::move(tmp_10)); - if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} } while ( false @@ -8717,10 +8104,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_108_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_108_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -8728,19 +8116,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_108_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_108_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_108_matcher::to_string() -> std::string{return R"('((((((((((a))))))))))\10'i)"; } - + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_108_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_108_matcher::to_string() -> std::string{return R"('((((((((((a))))))))))\10'i)"; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_109_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_109_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8887,10 +8275,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_109_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_109_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -8898,19 +8287,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_109_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_109_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_109_matcher::to_string() -> std::string{return R"('(((((((((a)))))))))'i)"; } + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_109_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_109_matcher::to_string() -> std::string{return R"('(((((((((a)))))))))'i)"; } - - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_11_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_11_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8940,11 +8329,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_11_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_11_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8974,11 +8364,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_11_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_11_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9008,10 +8399,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_11_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_11_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -9019,19 +8411,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_11_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_11_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_11_matcher::to_string() -> std::string{return R"('ab{0,}?bc'i)"; } - + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_11_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_11_matcher::to_string() -> std::string{return R"('ab{0,}?bc'i)"; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_110_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_110_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9061,10 +8453,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_110_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_110_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -9072,19 +8465,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_110_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_110_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_110_matcher::to_string() -> std::string{return R"('multiple words of text'i)"; } + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_110_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_110_matcher::to_string() -> std::string{return R"('multiple words of text'i)"; } - - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_111_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_111_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9114,10 +8507,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_111_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_111_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -9125,19 +8519,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_111_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_111_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_111_matcher::to_string() -> std::string{return R"('multiple words'i)"; } - + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_111_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_111_matcher::to_string() -> std::string{return R"('multiple words'i)"; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_112_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_112_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9152,11 +8546,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_112_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_112_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9171,11 +8566,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_112_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_112_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9190,11 +8586,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_112_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_112_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9237,11 +8634,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_112_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_112_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9267,10 +8665,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_112_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_112_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -9278,19 +8677,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_112_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_112_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_112_matcher::to_string() -> std::string{return R"('(.*)c(.*)'i)"; } + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_112_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_112_matcher::to_string() -> std::string{return R"('(.*)c(.*)'i)"; } - - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_113_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_113_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9305,11 +8704,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_113_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_113_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9338,11 +8738,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_113_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_113_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9357,11 +8758,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_113_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_113_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9402,11 +8804,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_113_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_113_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9446,10 +8849,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_113_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_113_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -9457,19 +8861,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_113_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_113_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_113_matcher::to_string() -> std::string{return R"('\((.*), (.*)\)'i)"; } - + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_113_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_113_matcher::to_string() -> std::string{return R"('\((.*), (.*)\)'i)"; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_114_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_114_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9484,10 +8888,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_114_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_114_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -9495,19 +8900,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_114_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_114_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_114_matcher::to_string() -> std::string{return R"('[k]'i)"; } + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_114_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_114_matcher::to_string() -> std::string{return R"('[k]'i)"; } - - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_115_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_115_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9537,10 +8942,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_115_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_115_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -9548,19 +8954,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_115_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_115_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_115_matcher::to_string() -> std::string{return R"('abcd'i)"; } - + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_115_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_115_matcher::to_string() -> std::string{return R"('abcd'i)"; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_116_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_116_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9635,10 +9041,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_116_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_116_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -9646,19 +9053,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_116_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_116_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_116_matcher::to_string() -> std::string{return R"('a(bc)d'i)"; } + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_116_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_116_matcher::to_string() -> std::string{return R"('a(bc)d'i)"; } - - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_117_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_117_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9673,11 +9080,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_117_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_117_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9707,11 +9115,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_117_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_117_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9741,10 +9150,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_117_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_117_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -9752,19 +9162,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_117_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_117_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_117_matcher::to_string() -> std::string{return R"('a[-]?c'i)"; } - + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_117_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_117_matcher::to_string() -> std::string{return R"('a[-]?c'i)"; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_118_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_118_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9797,7 +9207,7 @@ int i{0}; auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; static_cast(cpp2::move(tmp_1)); - if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} } while ( false @@ -9808,10 +9218,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_118_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_118_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -9819,19 +9230,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_118_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_118_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_118_matcher::to_string() -> std::string{return R"('(abc)\1'i)"; } - + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_118_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_118_matcher::to_string() -> std::string{return R"('(abc)\1'i)"; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_119_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_119_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9846,11 +9257,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_119_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_119_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9865,11 +9277,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_119_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_119_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9885,7 +9298,7 @@ int i{0}; auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; static_cast(cpp2::move(tmp_0)); - if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} } while ( false @@ -9896,10 +9309,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_119_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_119_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -9907,19 +9321,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_119_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_119_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_119_matcher::to_string() -> std::string{return R"('([a-c]*)\1'i)"; } + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_119_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_119_matcher::to_string() -> std::string{return R"('([a-c]*)\1'i)"; } - - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_12_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_12_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9949,11 +9363,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_12_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_12_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9983,11 +9398,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_12_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_12_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -10017,10 +9433,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_12_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_12_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -10028,19 +9445,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_12_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_12_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_12_matcher::to_string() -> std::string{return R"('ab+?bc'i)"; } - + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_12_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_12_matcher::to_string() -> std::string{return R"('ab+?bc'i)"; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_13_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_13_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -10070,11 +9487,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_13_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_13_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -10104,11 +9522,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_13_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_13_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -10138,10 +9557,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_13_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_13_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -10149,19 +9569,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_13_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_13_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_13_matcher::to_string() -> std::string{return R"('ab+bc'i)"; } + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_13_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_13_matcher::to_string() -> std::string{return R"('ab+bc'i)"; } - - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_14_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_14_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -10191,11 +9611,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_14_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_14_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -10225,11 +9646,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_14_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_14_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -10259,10 +9681,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_14_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_14_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -10270,19 +9693,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_14_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_14_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_14_matcher::to_string() -> std::string{return R"('ab+bc'i)"; } - + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_14_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_14_matcher::to_string() -> std::string{return R"('ab+bc'i)"; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_15_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_15_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -10312,11 +9735,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_15_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_15_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -10346,11 +9770,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_15_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_15_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -10380,10 +9805,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_15_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_15_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -10391,19 +9817,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_15_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_15_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_15_matcher::to_string() -> std::string{return R"('ab{1,}bc'i)"; } + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_15_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_15_matcher::to_string() -> std::string{return R"('ab{1,}bc'i)"; } - - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_16_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_16_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -10433,11 +9859,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_16_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_16_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -10467,11 +9894,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_16_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_16_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -10501,10 +9929,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_16_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_16_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -10512,19 +9941,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_16_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_16_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_16_matcher::to_string() -> std::string{return R"('ab+bc'i)"; } - + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_16_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_16_matcher::to_string() -> std::string{return R"('ab+bc'i)"; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_17_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_17_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -10554,11 +9983,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_17_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_17_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -10588,11 +10018,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_17_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_17_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -10622,10 +10053,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_17_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_17_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -10633,19 +10065,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_17_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_17_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_17_matcher::to_string() -> std::string{return R"('ab{1,}?bc'i)"; } + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_17_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_17_matcher::to_string() -> std::string{return R"('ab{1,}?bc'i)"; } - - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_18_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_18_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -10675,11 +10107,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_18_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_18_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -10709,11 +10142,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_18_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_18_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -10743,10 +10177,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_18_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_18_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -10754,19 +10189,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_18_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_18_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_18_matcher::to_string() -> std::string{return R"('ab{1,3}?bc'i)"; } - + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_18_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_18_matcher::to_string() -> std::string{return R"('ab{1,3}?bc'i)"; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_19_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_19_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -10796,11 +10231,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_19_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_19_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -10830,11 +10266,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_19_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_19_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -10864,10 +10301,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_19_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_19_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -10875,19 +10313,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_19_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_19_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_19_matcher::to_string() -> std::string{return R"('ab{3,4}?bc'i)"; } + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_19_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_19_matcher::to_string() -> std::string{return R"('ab{3,4}?bc'i)"; } - - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_20_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_20_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -10917,11 +10355,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_20_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_20_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -10951,11 +10390,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_20_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_20_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -10985,10 +10425,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_20_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_20_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -10996,19 +10437,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_20_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_20_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_20_matcher::to_string() -> std::string{return R"('ab{4,5}?bc'i)"; } - + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_20_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_20_matcher::to_string() -> std::string{return R"('ab{4,5}?bc'i)"; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_21_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_21_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -11038,11 +10479,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_21_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_21_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -11072,11 +10514,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_21_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_21_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -11106,10 +10549,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_21_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_21_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -11117,19 +10561,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_21_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_21_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_21_matcher::to_string() -> std::string{return R"('ab??bc'i)"; } + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_21_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_21_matcher::to_string() -> std::string{return R"('ab??bc'i)"; } - - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_22_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_22_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -11159,11 +10603,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_22_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_22_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -11193,11 +10638,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_22_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_22_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -11227,10 +10673,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_22_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_22_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -11238,19 +10685,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_22_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_22_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_22_matcher::to_string() -> std::string{return R"('ab??bc'i)"; } - + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_22_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_22_matcher::to_string() -> std::string{return R"('ab??bc'i)"; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_23_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_23_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -11280,11 +10727,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_23_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_23_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -11314,11 +10762,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_23_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_23_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -11348,10 +10797,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_23_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_23_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -11359,19 +10809,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_23_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_23_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_23_matcher::to_string() -> std::string{return R"('ab{0,1}?bc'i)"; } + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_23_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_23_matcher::to_string() -> std::string{return R"('ab{0,1}?bc'i)"; } - - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_24_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_24_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -11401,11 +10851,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_24_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_24_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -11435,11 +10886,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_24_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_24_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -11469,10 +10921,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_24_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_24_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -11480,19 +10933,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_24_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_24_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_24_matcher::to_string() -> std::string{return R"('ab??bc'i)"; } - + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_24_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_24_matcher::to_string() -> std::string{return R"('ab??bc'i)"; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_25_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_25_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -11522,11 +10975,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_25_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_25_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -11556,11 +11010,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_25_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_25_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -11590,10 +11045,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_25_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_25_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -11601,19 +11057,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_25_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_25_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_25_matcher::to_string() -> std::string{return R"('ab??c'i)"; } - + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_25_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_25_matcher::to_string() -> std::string{return R"('ab??c'i)"; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_26_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_26_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -11643,11 +11099,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_26_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_26_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -11677,11 +11134,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_26_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_26_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -11711,10 +11169,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_26_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_26_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -11722,19 +11181,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_26_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_26_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_26_matcher::to_string() -> std::string{return R"('ab{0,1}?c'i)"; } + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_26_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_26_matcher::to_string() -> std::string{return R"('ab{0,1}?c'i)"; } - - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_27_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_27_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -11766,10 +11225,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_27_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_27_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -11777,19 +11237,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_27_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_27_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_27_matcher::to_string() -> std::string{return R"('^abc$'i)"; } - + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_27_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_27_matcher::to_string() -> std::string{return R"('^abc$'i)"; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_28_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_28_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -11821,10 +11281,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_28_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_28_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -11832,19 +11293,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_28_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_28_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_28_matcher::to_string() -> std::string{return R"('^abc$'i)"; } + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_28_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_28_matcher::to_string() -> std::string{return R"('^abc$'i)"; } - - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_29_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_29_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -11875,10 +11336,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_29_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_29_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -11886,19 +11348,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_29_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_29_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_29_matcher::to_string() -> std::string{return R"('^abc'i)"; } - + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_29_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_29_matcher::to_string() -> std::string{return R"('^abc'i)"; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_30_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_30_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -11930,10 +11392,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_30_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_30_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -11941,19 +11404,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_30_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_30_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_30_matcher::to_string() -> std::string{return R"('^abc$'i)"; } + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_30_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_30_matcher::to_string() -> std::string{return R"('^abc$'i)"; } - - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_31_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_31_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -11984,10 +11447,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_31_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_31_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -11995,19 +11459,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_31_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_31_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_31_matcher::to_string() -> std::string{return R"('abc$'i)"; } - + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_31_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_31_matcher::to_string() -> std::string{return R"('abc$'i)"; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_32_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_32_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -12022,10 +11486,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_32_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_32_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -12033,19 +11498,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_32_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_32_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_32_matcher::to_string() -> std::string{return R"('^'i)"; } + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_32_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_32_matcher::to_string() -> std::string{return R"('^'i)"; } - - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_33_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_33_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -12060,10 +11525,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_33_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_33_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -12071,19 +11537,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_33_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_33_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_33_matcher::to_string() -> std::string{return R"('$'i)"; } - + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_33_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_33_matcher::to_string() -> std::string{return R"('$'i)"; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_34_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_34_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -12130,10 +11596,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_34_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_34_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -12141,19 +11608,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_34_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_34_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_34_matcher::to_string() -> std::string{return R"('a.c'i)"; } + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_34_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_34_matcher::to_string() -> std::string{return R"('a.c'i)"; } - - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_35_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_35_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -12200,10 +11667,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_35_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_35_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -12211,19 +11679,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_35_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_35_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_35_matcher::to_string() -> std::string{return R"('a.c'i)"; } - + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_35_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_35_matcher::to_string() -> std::string{return R"('a.c'i)"; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_36_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_36_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -12270,10 +11738,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_36_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_36_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -12281,19 +11750,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_36_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_36_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_36_matcher::to_string() -> std::string{return R"('a\Nc'i)"; } + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_36_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_36_matcher::to_string() -> std::string{return R"('a\Nc'i)"; } - - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_37_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_37_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -12308,11 +11777,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_37_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_37_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -12342,11 +11812,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_37_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_37_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -12376,10 +11847,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_37_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_37_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -12387,19 +11859,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_37_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_37_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_37_matcher::to_string() -> std::string{return R"('a.*?c'i)"; } - + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_37_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_37_matcher::to_string() -> std::string{return R"('a.*?c'i)"; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_38_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_38_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -12414,11 +11886,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_38_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_38_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -12448,11 +11921,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_38_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_38_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -12482,10 +11956,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_38_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_38_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -12493,19 +11968,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_38_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_38_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_38_matcher::to_string() -> std::string{return R"('a.*c'i)"; } + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_38_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_38_matcher::to_string() -> std::string{return R"('a.*c'i)"; } - - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_39_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_39_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -12552,10 +12027,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_39_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_39_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -12563,19 +12039,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_39_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_39_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_39_matcher::to_string() -> std::string{return R"('a[bc]d'i)"; } - + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_39_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_39_matcher::to_string() -> std::string{return R"('a[bc]d'i)"; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_40_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_40_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -12622,10 +12098,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_40_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_40_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -12633,19 +12110,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_40_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_40_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_40_matcher::to_string() -> std::string{return R"('a[bc]d'i)"; } - + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_40_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_40_matcher::to_string() -> std::string{return R"('a[bc]d'i)"; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_41_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_41_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -12692,10 +12169,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_41_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_41_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -12703,19 +12181,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_41_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_41_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_41_matcher::to_string() -> std::string{return R"('a[b-d]e'i)"; } + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_41_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_41_matcher::to_string() -> std::string{return R"('a[b-d]e'i)"; } - - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_42_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_42_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -12762,10 +12240,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_42_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_42_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -12773,19 +12252,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_42_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_42_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_42_matcher::to_string() -> std::string{return R"('a[b-d]e'i)"; } - + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_42_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_42_matcher::to_string() -> std::string{return R"('a[b-d]e'i)"; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_43_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_43_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -12816,10 +12295,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_43_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_43_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -12827,19 +12307,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_43_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_43_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_43_matcher::to_string() -> std::string{return R"('a[b-d]'i)"; } + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_43_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_43_matcher::to_string() -> std::string{return R"('a[b-d]'i)"; } - - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_44_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_44_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -12870,10 +12350,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_44_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_44_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -12881,19 +12362,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_44_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_44_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_44_matcher::to_string() -> std::string{return R"('a[-b]'i)"; } - + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_44_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_44_matcher::to_string() -> std::string{return R"('a[-b]'i)"; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_45_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_45_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -12924,10 +12405,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_45_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_45_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -12935,19 +12417,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_45_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_45_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_45_matcher::to_string() -> std::string{return R"('a[b-]'i)"; } + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_45_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_45_matcher::to_string() -> std::string{return R"('a[b-]'i)"; } - - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_46_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_46_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -12977,10 +12459,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_46_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_46_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -12988,19 +12471,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_46_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_46_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_46_matcher::to_string() -> std::string{return R"('a]'i)"; } - + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_46_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_46_matcher::to_string() -> std::string{return R"('a]'i)"; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_47_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_47_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -13047,10 +12530,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_47_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_47_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -13058,19 +12542,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_47_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_47_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_47_matcher::to_string() -> std::string{return R"('a[]]b'i)"; } + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_47_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_47_matcher::to_string() -> std::string{return R"('a[]]b'i)"; } - - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_48_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_48_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -13117,10 +12601,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_48_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_48_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -13128,19 +12613,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_48_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_48_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_48_matcher::to_string() -> std::string{return R"('a[^bc]d'i)"; } - + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_48_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_48_matcher::to_string() -> std::string{return R"('a[^bc]d'i)"; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_49_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_49_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -13187,10 +12672,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_49_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_49_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -13198,19 +12684,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_49_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_49_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_49_matcher::to_string() -> std::string{return R"('a[^bc]d'i)"; } + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_49_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_49_matcher::to_string() -> std::string{return R"('a[^bc]d'i)"; } - - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_50_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_50_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -13257,10 +12743,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_50_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_50_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -13268,19 +12755,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_50_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_50_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_50_matcher::to_string() -> std::string{return R"('a[^-b]c'i)"; } - + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_50_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_50_matcher::to_string() -> std::string{return R"('a[^-b]c'i)"; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_51_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_51_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -13327,10 +12814,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_51_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_51_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -13338,19 +12826,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_51_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_51_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_51_matcher::to_string() -> std::string{return R"('a[^-b]c'i)"; } + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_51_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_51_matcher::to_string() -> std::string{return R"('a[^-b]c'i)"; } - - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_52_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_52_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -13397,10 +12885,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_52_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_52_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -13408,19 +12897,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_52_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_52_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_52_matcher::to_string() -> std::string{return R"('a[^]b]c'i)"; } - + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_52_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_52_matcher::to_string() -> std::string{return R"('a[^]b]c'i)"; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_53_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_53_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -13467,10 +12956,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_53_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_53_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -13478,19 +12968,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_53_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_53_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_53_matcher::to_string() -> std::string{return R"('a[^]b]c'i)"; } + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_53_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_53_matcher::to_string() -> std::string{return R"('a[^]b]c'i)"; } - - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_54_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_54_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -13520,11 +13010,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_54_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_54_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -13554,11 +13045,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_54_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_54_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -13572,11 +13064,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_54_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_54_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -13590,10 +13083,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_54_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_54_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -13601,19 +13095,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_54_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_54_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_54_matcher::to_string() -> std::string{return R"('ab|cd'i)"; } - + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_54_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_54_matcher::to_string() -> std::string{return R"('ab|cd'i)"; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_55_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_55_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -13643,11 +13137,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_55_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_55_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -13677,11 +13172,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_55_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_55_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -13695,11 +13191,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_55_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_55_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -13713,10 +13210,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_55_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_55_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -13724,19 +13222,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_55_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_55_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_55_matcher::to_string() -> std::string{return R"('ab|cd'i)"; } - + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_55_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_55_matcher::to_string() -> std::string{return R"('ab|cd'i)"; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_56_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_56_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -13779,10 +13277,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_56_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_56_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -13790,19 +13289,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_56_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_56_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_56_matcher::to_string() -> std::string{return R"('()ef'i)"; } + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_56_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_56_matcher::to_string() -> std::string{return R"('()ef'i)"; } - - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_57_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_57_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -13833,10 +13332,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_57_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_57_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -13844,19 +13344,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_57_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_57_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_57_matcher::to_string() -> std::string{return R"('$b'i)"; } - + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_57_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_57_matcher::to_string() -> std::string{return R"('$b'i)"; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_58_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_58_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -13886,10 +13386,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_58_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_58_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -13897,19 +13398,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_58_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_58_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_58_matcher::to_string() -> std::string{return R"('a\(b'i)"; } + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_58_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_58_matcher::to_string() -> std::string{return R"('a\(b'i)"; } - - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_59_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_59_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -13937,11 +13438,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_59_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_59_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -13971,11 +13473,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_59_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_59_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -14005,10 +13508,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_59_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_59_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -14016,19 +13520,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_59_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_59_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_59_matcher::to_string() -> std::string{return R"('a\(*b'i)"; } - + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_59_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_59_matcher::to_string() -> std::string{return R"('a\(*b'i)"; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_60_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_60_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -14056,11 +13560,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_60_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_60_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -14090,11 +13595,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_60_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_60_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -14124,10 +13630,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_60_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_60_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -14135,19 +13642,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_60_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_60_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_60_matcher::to_string() -> std::string{return R"('a\(*b'i)"; } + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_60_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_60_matcher::to_string() -> std::string{return R"('a\(*b'i)"; } - - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_61_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_61_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -14177,10 +13684,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_61_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_61_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -14188,19 +13696,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_61_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_61_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_61_matcher::to_string() -> std::string{return R"('a\\b'i)"; } - + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_61_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_61_matcher::to_string() -> std::string{return R"('a\\b'i)"; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_62_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_62_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -14256,10 +13764,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_62_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_62_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -14267,19 +13776,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_62_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_62_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_62_matcher::to_string() -> std::string{return R"('((a))'i)"; } + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_62_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_62_matcher::to_string() -> std::string{return R"('((a))'i)"; } - - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_63_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_63_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -14367,10 +13876,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_63_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_63_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -14378,19 +13888,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_63_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_63_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_63_matcher::to_string() -> std::string{return R"('(a)b(c)'i)"; } - + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_63_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_63_matcher::to_string() -> std::string{return R"('(a)b(c)'i)"; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_64_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_64_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -14420,11 +13930,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_64_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_64_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -14438,11 +13949,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_64_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_64_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -14472,11 +13984,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_64_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_64_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -14490,11 +14003,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_64_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_64_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -14524,10 +14038,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_64_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_64_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -14535,19 +14050,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_64_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_64_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_64_matcher::to_string() -> std::string{return R"('a+b+c'i)"; } + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_64_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_64_matcher::to_string() -> std::string{return R"('a+b+c'i)"; } - - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_65_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_65_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -14577,11 +14092,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_65_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_65_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -14595,11 +14111,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_65_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_65_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -14629,11 +14146,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_65_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_65_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -14647,11 +14165,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_65_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_65_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -14681,10 +14200,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_65_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_65_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -14692,19 +14212,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_65_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_65_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_65_matcher::to_string() -> std::string{return R"('a{1,}b{1,}c'i)"; } - + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_65_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_65_matcher::to_string() -> std::string{return R"('a{1,}b{1,}c'i)"; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_66_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_66_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -14719,11 +14239,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_66_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_66_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -14753,11 +14274,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_66_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_66_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -14787,10 +14309,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_66_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_66_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -14798,19 +14321,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_66_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_66_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_66_matcher::to_string() -> std::string{return R"('a.+?c'i)"; } + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_66_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_66_matcher::to_string() -> std::string{return R"('a.+?c'i)"; } - - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_67_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_67_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -14825,11 +14348,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_67_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_67_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -14859,11 +14383,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_67_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_67_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -14893,10 +14418,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_67_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_67_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -14904,19 +14430,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_67_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_67_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_67_matcher::to_string() -> std::string{return R"('a.*?c'i)"; } - + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_67_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_67_matcher::to_string() -> std::string{return R"('a.*?c'i)"; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_68_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_68_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -14931,11 +14457,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_68_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_68_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -14965,11 +14492,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_68_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_68_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -14999,10 +14527,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_68_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_68_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -15010,19 +14539,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_68_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_68_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_68_matcher::to_string() -> std::string{return R"('a.{0,5}?c'i)"; } + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_68_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_68_matcher::to_string() -> std::string{return R"('a.{0,5}?c'i)"; } - - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_69_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_69_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -15052,11 +14581,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_69_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_69_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -15070,11 +14600,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_69_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_69_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -15088,11 +14619,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_69_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_69_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -15122,11 +14654,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_69_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_69_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -15141,11 +14674,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_69_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_69_matcher::func_6::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -15171,16 +14705,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_12_case_insensitive::regex_69_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_12_case_insensitive::regex_69_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_69_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_69_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -15194,11 +14729,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_69_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_69_matcher::func_7::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -15212,10 +14748,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_69_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_69_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -15223,19 +14760,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_69_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_69_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_69_matcher::to_string() -> std::string{return R"('(a+|b)*'i)"; } - + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_69_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_69_matcher::to_string() -> std::string{return R"('(a+|b)*'i)"; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_70_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_70_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -15265,11 +14802,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_70_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_70_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -15283,11 +14821,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_70_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_70_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -15301,11 +14840,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_70_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_70_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -15335,11 +14875,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_70_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_70_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -15354,11 +14895,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_70_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_70_matcher::func_6::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -15384,16 +14926,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_12_case_insensitive::regex_70_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_12_case_insensitive::regex_70_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_70_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_70_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -15407,11 +14950,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_70_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_70_matcher::func_7::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -15425,10 +14969,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_70_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_70_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -15436,19 +14981,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_70_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_70_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_70_matcher::to_string() -> std::string{return R"('(a+|b){0,}'i)"; } - + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_70_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_70_matcher::to_string() -> std::string{return R"('(a+|b){0,}'i)"; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_71_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_71_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -15478,11 +15023,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_71_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_71_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -15496,11 +15042,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_71_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_71_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -15514,11 +15061,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_71_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_71_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -15548,11 +15096,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_71_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_71_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -15567,11 +15116,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_71_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_71_matcher::func_6::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -15597,16 +15147,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_12_case_insensitive::regex_71_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_12_case_insensitive::regex_71_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_71_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_71_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -15620,11 +15171,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_71_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_71_matcher::func_7::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -15638,10 +15190,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_71_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_71_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -15649,19 +15202,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_71_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_71_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_71_matcher::to_string() -> std::string{return R"('(a+|b)+'i)"; } + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_71_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_71_matcher::to_string() -> std::string{return R"('(a+|b)+'i)"; } - - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_72_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_72_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -15691,11 +15244,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_72_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_72_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -15709,11 +15263,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_72_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_72_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -15727,11 +15282,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_72_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_72_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -15761,11 +15317,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_72_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_72_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -15780,11 +15337,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_72_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_72_matcher::func_6::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -15810,16 +15368,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_12_case_insensitive::regex_72_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_12_case_insensitive::regex_72_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_72_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_72_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -15833,11 +15392,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_72_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_72_matcher::func_7::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -15851,10 +15411,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_72_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_72_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -15862,19 +15423,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_72_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_72_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_72_matcher::to_string() -> std::string{return R"('(a+|b){1,}'i)"; } - + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_72_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_72_matcher::to_string() -> std::string{return R"('(a+|b){1,}'i)"; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_73_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_73_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -15904,11 +15465,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_73_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_73_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -15922,11 +15484,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_73_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_73_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -15940,11 +15503,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_73_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_73_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -15974,11 +15538,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_73_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_73_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -15993,11 +15558,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_73_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_73_matcher::func_6::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -16023,16 +15589,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_12_case_insensitive::regex_73_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_12_case_insensitive::regex_73_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_73_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_73_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -16046,11 +15613,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_73_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_73_matcher::func_7::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -16064,10 +15632,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_73_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_73_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -16075,19 +15644,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_73_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_73_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_73_matcher::to_string() -> std::string{return R"('(a+|b)?'i)"; } + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_73_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_73_matcher::to_string() -> std::string{return R"('(a+|b)?'i)"; } - - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_74_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_74_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -16117,11 +15686,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_74_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_74_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -16135,11 +15705,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_74_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_74_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -16153,11 +15724,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_74_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_74_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -16187,11 +15759,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_74_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_74_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -16206,11 +15779,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_74_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_74_matcher::func_6::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -16236,16 +15810,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_12_case_insensitive::regex_74_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_12_case_insensitive::regex_74_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_74_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_74_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -16259,11 +15834,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_74_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_74_matcher::func_7::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -16277,10 +15853,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_74_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_74_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -16288,19 +15865,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_74_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_74_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_74_matcher::to_string() -> std::string{return R"('(a+|b){0,1}'i)"; } - + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_74_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_74_matcher::to_string() -> std::string{return R"('(a+|b){0,1}'i)"; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_75_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_75_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -16330,11 +15907,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_75_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_75_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -16348,11 +15926,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_75_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_75_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -16366,11 +15945,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_75_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_75_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -16400,11 +15980,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_75_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_75_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -16419,11 +16000,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_75_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_75_matcher::func_6::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -16449,16 +16031,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_12_case_insensitive::regex_75_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_12_case_insensitive::regex_75_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_75_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_75_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -16472,11 +16055,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_75_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_75_matcher::func_7::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -16490,10 +16074,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_75_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_75_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -16501,19 +16086,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_75_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_75_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_75_matcher::to_string() -> std::string{return R"('(a+|b){0,1}?'i)"; } + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_75_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_75_matcher::to_string() -> std::string{return R"('(a+|b){0,1}?'i)"; } - - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_76_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_76_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -16528,11 +16113,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_76_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_76_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -16546,11 +16132,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_76_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_76_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -16564,10 +16151,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_76_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_76_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -16575,19 +16163,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_76_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_76_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_76_matcher::to_string() -> std::string{return R"('[^ab]*'i)"; } - + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_76_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_76_matcher::to_string() -> std::string{return R"('[^ab]*'i)"; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_77_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_77_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -16617,10 +16205,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_77_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_77_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -16628,19 +16217,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_77_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_77_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_77_matcher::to_string() -> std::string{return R"('abc'i)"; } + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_77_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_77_matcher::to_string() -> std::string{return R"('abc'i)"; } - - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_78_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_78_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -16670,11 +16259,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_78_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_78_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -16688,11 +16278,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_78_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_78_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -16706,10 +16297,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_78_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_78_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -16717,19 +16309,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_78_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_78_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_78_matcher::to_string() -> std::string{return R"('a*'i)"; } - + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_78_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_78_matcher::to_string() -> std::string{return R"('a*'i)"; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_79_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_79_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -16757,16 +16349,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_12_case_insensitive::regex_79_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_12_case_insensitive::regex_79_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_79_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_79_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -16780,11 +16373,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_79_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_79_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -16814,10 +16408,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_79_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_79_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -16825,19 +16420,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_79_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_79_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_79_matcher::to_string() -> std::string{return R"('([abc])*d'i)"; } + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_79_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_79_matcher::to_string() -> std::string{return R"('([abc])*d'i)"; } - - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_80_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_80_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -16865,16 +16460,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_12_case_insensitive::regex_80_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_12_case_insensitive::regex_80_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_80_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_80_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -16888,11 +16484,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_80_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_80_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -16922,10 +16519,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_80_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_80_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -16933,19 +16531,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_80_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_80_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_80_matcher::to_string() -> std::string{return R"('([abc])*bcd'i)"; } - + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_80_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_80_matcher::to_string() -> std::string{return R"('([abc])*bcd'i)"; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_81_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_81_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -16975,11 +16573,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_81_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_81_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -17009,11 +16608,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_81_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_81_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -17043,11 +16643,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_81_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_81_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -17077,11 +16678,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_81_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_81_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -17111,11 +16713,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_81_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_81_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -17129,11 +16732,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_81_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_81_matcher::func_6::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -17147,10 +16751,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_81_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_81_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -17158,19 +16763,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_81_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_81_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_81_matcher::to_string() -> std::string{return R"('a|b|c|d|e'i)"; } + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_81_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_81_matcher::to_string() -> std::string{return R"('a|b|c|d|e'i)"; } - - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_82_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_82_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -17200,11 +16805,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_82_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_82_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -17234,11 +16840,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_82_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_82_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -17268,11 +16875,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_82_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_82_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -17302,11 +16910,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_82_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_82_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -17336,11 +16945,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_82_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_82_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -17355,11 +16965,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_82_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_82_matcher::func_6::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -17401,10 +17012,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_82_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_82_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -17412,19 +17024,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_82_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_82_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_82_matcher::to_string() -> std::string{return R"('(a|b|c|d|e)f'i)"; } - + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_82_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_82_matcher::to_string() -> std::string{return R"('(a|b|c|d|e)f'i)"; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_83_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_83_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -17454,11 +17066,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_83_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_83_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -17488,11 +17101,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_83_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_83_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -17522,10 +17136,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_83_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_83_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -17533,19 +17148,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_83_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_83_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_83_matcher::to_string() -> std::string{return R"('abcd*efg'i)"; } + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_83_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_83_matcher::to_string() -> std::string{return R"('abcd*efg'i)"; } - - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_84_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_84_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -17575,11 +17190,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_84_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_84_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -17609,11 +17225,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_84_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_84_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -17627,10 +17244,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_84_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_84_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -17638,19 +17256,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_84_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_84_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_84_matcher::to_string() -> std::string{return R"('ab*'i)"; } - + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_84_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_84_matcher::to_string() -> std::string{return R"('ab*'i)"; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_85_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_85_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -17680,11 +17298,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_85_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_85_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -17714,11 +17333,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_85_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_85_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -17732,10 +17352,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_85_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_85_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -17743,19 +17364,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_85_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_85_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_85_matcher::to_string() -> std::string{return R"('ab*'i)"; } - + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_85_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_85_matcher::to_string() -> std::string{return R"('ab*'i)"; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_86_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_86_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -17785,11 +17406,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_86_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_86_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -17819,11 +17441,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_86_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_86_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -17838,11 +17461,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_86_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_86_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -17884,10 +17508,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_86_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_86_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -17895,19 +17520,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_86_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_86_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_86_matcher::to_string() -> std::string{return R"('(ab|cd)e'i)"; } + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_86_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_86_matcher::to_string() -> std::string{return R"('(ab|cd)e'i)"; } - - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_87_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_87_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -17938,10 +17563,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_87_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_87_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -17949,19 +17575,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_87_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_87_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_87_matcher::to_string() -> std::string{return R"('[abhgefdc]ij'i)"; } - + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_87_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_87_matcher::to_string() -> std::string{return R"('[abhgefdc]ij'i)"; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_88_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_88_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -17991,11 +17617,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_88_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_88_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -18025,11 +17652,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_88_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_88_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -18045,11 +17673,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_88_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_88_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -18091,10 +17720,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_88_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_88_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -18102,19 +17732,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_88_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_88_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_88_matcher::to_string() -> std::string{return R"('^(ab|cd)e'i)"; } + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_88_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_88_matcher::to_string() -> std::string{return R"('^(ab|cd)e'i)"; } - - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_89_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_89_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -18144,11 +17774,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_89_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_89_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -18162,11 +17793,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_89_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_89_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -18181,11 +17813,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_89_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_89_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -18227,10 +17860,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_89_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_89_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -18238,19 +17872,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_89_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_89_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_89_matcher::to_string() -> std::string{return R"('(abc|)ef'i)"; } - + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_89_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_89_matcher::to_string() -> std::string{return R"('(abc|)ef'i)"; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_90_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_90_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -18280,11 +17914,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_90_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_90_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -18314,11 +17949,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_90_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_90_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -18333,11 +17969,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_90_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_90_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -18367,11 +18004,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_90_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_90_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -18397,11 +18035,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_90_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_90_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -18431,10 +18070,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_90_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_90_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -18442,19 +18082,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_90_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_90_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_90_matcher::to_string() -> std::string{return R"('(a|b)c*d'i)"; } + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_90_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_90_matcher::to_string() -> std::string{return R"('(a|b)c*d'i)"; } - - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_91_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_91_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -18484,11 +18124,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_91_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_91_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -18518,11 +18159,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_91_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_91_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -18552,11 +18194,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_91_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_91_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -18570,11 +18213,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_91_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_91_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -18589,11 +18233,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_91_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_91_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -18635,10 +18280,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_91_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_91_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -18646,19 +18292,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_91_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_91_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_91_matcher::to_string() -> std::string{return R"('(ab|ab*)bc'i)"; } - + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_91_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_91_matcher::to_string() -> std::string{return R"('(ab|ab*)bc'i)"; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_92_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_92_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -18673,11 +18319,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_92_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_92_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -18708,11 +18355,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_92_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_92_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -18742,11 +18390,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_92_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_92_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -18772,11 +18421,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_92_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_92_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -18790,10 +18440,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_92_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_92_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -18801,19 +18452,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_92_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_92_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_92_matcher::to_string() -> std::string{return R"('a([bc]*)c*'i)"; } - + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_92_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_92_matcher::to_string() -> std::string{return R"('a([bc]*)c*'i)"; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_93_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_93_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -18828,11 +18479,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_93_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_93_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -18863,11 +18515,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_93_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_93_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -18897,11 +18550,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_93_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_93_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -18928,11 +18582,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_93_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_93_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -18974,10 +18629,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_93_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_93_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -18985,19 +18641,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_93_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_93_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_93_matcher::to_string() -> std::string{return R"('a([bc]*)(c*d)'i)"; } + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_93_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_93_matcher::to_string() -> std::string{return R"('a([bc]*)(c*d)'i)"; } - - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_94_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_94_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -19012,11 +18668,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_94_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_94_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -19047,11 +18704,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_94_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_94_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -19081,11 +18739,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_94_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_94_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -19112,11 +18771,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_94_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_94_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -19158,10 +18818,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_94_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_94_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -19169,19 +18830,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_94_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_94_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_94_matcher::to_string() -> std::string{return R"('a([bc]+)(c*d)'i)"; } - + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_94_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_94_matcher::to_string() -> std::string{return R"('a([bc]+)(c*d)'i)"; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_95_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_95_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -19196,11 +18857,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_95_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_95_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -19231,11 +18893,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_95_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_95_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -19265,11 +18928,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_95_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_95_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -19296,11 +18960,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_95_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_95_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -19342,10 +19007,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_95_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_95_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -19353,19 +19019,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_95_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_95_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_95_matcher::to_string() -> std::string{return R"('a([bc]*)(c+d)'i)"; } + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_95_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_95_matcher::to_string() -> std::string{return R"('a([bc]*)(c+d)'i)"; } - - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_96_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_96_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -19380,11 +19046,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_96_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_96_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -19414,11 +19081,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_96_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_96_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -19448,10 +19116,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_96_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_96_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -19459,19 +19128,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_96_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_96_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_96_matcher::to_string() -> std::string{return R"('a[bcd]*dcdcde'i)"; } - + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_96_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_96_matcher::to_string() -> std::string{return R"('a[bcd]*dcdcde'i)"; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_97_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_97_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -19486,11 +19155,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_97_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_97_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -19520,11 +19190,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_97_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_97_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -19554,10 +19225,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_97_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_97_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -19565,19 +19237,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_97_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_97_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_97_matcher::to_string() -> std::string{return R"('a[bcd]+dcdcde'i)"; } + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_97_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_97_matcher::to_string() -> std::string{return R"('a[bcd]+dcdcde'i)"; } - - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_98_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_98_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -19607,11 +19279,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_98_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_98_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -19641,11 +19314,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_98_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_98_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -19660,11 +19334,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_98_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_98_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -19694,11 +19369,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_98_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_98_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -19724,11 +19400,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_98_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_98_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -19758,10 +19435,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_98_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_98_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -19769,19 +19447,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_98_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_98_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_98_matcher::to_string() -> std::string{return R"('(ab|a)b*c'i)"; } - + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_98_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_98_matcher::to_string() -> std::string{return R"('(ab|a)b*c'i)"; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_99_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_99_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -19911,10 +19589,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_99_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_12_case_insensitive::regex_99_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -19922,15 +19601,16 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_12_case_insensitive::regex_99_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_99_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_12_case_insensitive::regex_99_matcher::to_string() -> std::string{return R"('((a)(b)c)(d)'i)"; } + template [[nodiscard]] constexpr auto test_tests_12_case_insensitive::regex_99_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_12_case_insensitive::regex_99_matcher::to_string() -> std::string{return R"('((a)(b)c)(d)'i)"; } -#line 409 "pure2-regex_12_case_insensitive.cpp2" +#line 410 "pure2-regex_12_case_insensitive.cpp2" auto main() -> int{ CPP2_UFCS(run)(test_tests_12_case_insensitive()); } diff --git a/regression-tests/test-results/pure2-regex_13_possessive_modifier.cpp b/regression-tests/test-results/pure2-regex_13_possessive_modifier.cpp index ff9242c4a..04dfdb81b 100644 --- a/regression-tests/test-results/pure2-regex_13_possessive_modifier.cpp +++ b/regression-tests/test-results/pure2-regex_13_possessive_modifier.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes #include "cpp2regex.h" //=== Cpp2 type declarations ==================================================== @@ -9,7 +9,7 @@ #line 1 "pure2-regex_13_possessive_modifier.cpp2" -#line 165 "pure2-regex_13_possessive_modifier.cpp2" +#line 166 "pure2-regex_13_possessive_modifier.cpp2" class test_tests_13_possessive_modifier; @@ -18,47 +18,41 @@ class test_tests_13_possessive_modifier; #line 1 "pure2-regex_13_possessive_modifier.cpp2" [[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string; -#line 112 "pure2-regex_13_possessive_modifier.cpp2" +#line 113 "pure2-regex_13_possessive_modifier.cpp2" [[nodiscard]] auto sanitize(std::string str) -> std::string; -#line 124 "pure2-regex_13_possessive_modifier.cpp2" +#line 125 "pure2-regex_13_possessive_modifier.cpp2" template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, cpp2::impl::in resultExpected) -> void; -#line 165 "pure2-regex_13_possessive_modifier.cpp2" +#line 166 "pure2-regex_13_possessive_modifier.cpp2" class test_tests_13_possessive_modifier { -#line 214 "pure2-regex_13_possessive_modifier.cpp2" +#line 215 "pure2-regex_13_possessive_modifier.cpp2" public: auto run() const& -> void; - public: class regex_01_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: template class regex_01_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_01_matcher() = default; public: regex_01_matcher(regex_01_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -66,35 +60,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_01 {}; public: class regex_02_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_01 {}; public: template class regex_02_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_02_matcher() = default; public: regex_02_matcher(regex_02_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -102,35 +90,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_02 {}; public: class regex_03_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_02 {}; public: template class regex_03_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_03_matcher() = default; public: regex_03_matcher(regex_03_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -138,35 +120,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_03 {}; public: class regex_04_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_03 {}; public: template class regex_04_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_04_matcher() = default; public: regex_04_matcher(regex_04_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -174,35 +150,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_04 {}; public: class regex_05_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_04 {}; public: template class regex_05_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_05_matcher() = default; public: regex_05_matcher(regex_05_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -210,35 +180,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_05 {}; public: class regex_06_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_05 {}; public: template class regex_06_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_06_matcher() = default; public: regex_06_matcher(regex_06_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -246,35 +210,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_06 {}; public: class regex_07_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_06 {}; public: template class regex_07_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_07_matcher() = default; public: regex_07_matcher(regex_07_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -282,35 +240,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_07 {}; public: class regex_08_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_07 {}; public: template class regex_08_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_08_matcher() = default; public: regex_08_matcher(regex_08_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -318,35 +270,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_08 {}; public: class regex_09_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_08 {}; public: template class regex_09_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_09_matcher() = default; public: regex_09_matcher(regex_09_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -354,35 +300,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_09 {}; public: class regex_10_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_09 {}; public: template class regex_10_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_10_matcher() = default; public: regex_10_matcher(regex_10_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -390,35 +330,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_10 {}; public: class regex_11_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_10 {}; public: template class regex_11_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_11_matcher() = default; public: regex_11_matcher(regex_11_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -426,35 +360,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_11 {}; public: class regex_12_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_11 {}; public: template class regex_12_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_12_matcher() = default; public: regex_12_matcher(regex_12_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -462,35 +390,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_12 {}; public: class regex_13_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_12 {}; public: template class regex_13_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_13_matcher() = default; public: regex_13_matcher(regex_13_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -498,35 +420,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_13 {}; public: class regex_14_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_13 {}; public: template class regex_14_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_14_matcher() = default; public: regex_14_matcher(regex_14_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -534,35 +450,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_14 {}; public: class regex_15_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_14 {}; public: template class regex_15_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_15_matcher() = default; public: regex_15_matcher(regex_15_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -570,35 +480,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_15 {}; public: class regex_16_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_15 {}; public: template class regex_16_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_16_matcher() = default; public: regex_16_matcher(regex_16_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -606,11 +510,10 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_16 {}; public: class regex_17_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_16 {}; public: template class regex_17_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -620,26 +523,21 @@ public: class func_1 { }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_17_matcher() = default; public: regex_17_matcher(regex_17_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -647,26 +545,25 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_17 {}; public: class regex_18_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_17 {}; public: template class regex_18_matcher { + public: template using context = cpp2::regex::match_context; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -676,41 +573,36 @@ public: class func_2 { }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_6 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_7 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_5 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_8 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_18_matcher() = default; public: regex_18_matcher(regex_18_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -718,11 +610,10 @@ public: class func_2 { }; - public: cpp2::regex::regular_expression regex_18 {}; public: class regex_19_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_18 {}; public: template class regex_19_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -732,26 +623,21 @@ public: class func_1 { }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_19_matcher() = default; public: regex_19_matcher(regex_19_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -759,26 +645,25 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_19 {}; public: class regex_20_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_19 {}; public: template class regex_20_matcher { + public: template using context = cpp2::regex::match_context; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -788,41 +673,36 @@ public: class func_2 { }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_6 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_7 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_5 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_8 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_20_matcher() = default; public: regex_20_matcher(regex_20_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -830,11 +710,10 @@ public: class func_2 { }; - public: cpp2::regex::regular_expression regex_20 {}; public: class regex_21_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_20 {}; public: template class regex_21_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -844,26 +723,21 @@ public: class func_1 { }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_21_matcher() = default; public: regex_21_matcher(regex_21_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -871,26 +745,25 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_21 {}; public: class regex_22_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_21 {}; public: template class regex_22_matcher { + public: template using context = cpp2::regex::match_context; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -900,41 +773,36 @@ public: class func_2 { }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_6 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_7 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_5 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_8 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_22_matcher() = default; public: regex_22_matcher(regex_22_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -942,11 +810,10 @@ public: class func_2 { }; - public: cpp2::regex::regular_expression regex_22 {}; public: class regex_23_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_22 {}; public: template class regex_23_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -956,26 +823,21 @@ public: class func_1 { }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_23_matcher() = default; public: regex_23_matcher(regex_23_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -983,26 +845,25 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_23 {}; public: class regex_24_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_23 {}; public: template class regex_24_matcher { + public: template using context = cpp2::regex::match_context; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -1012,41 +873,36 @@ public: class func_2 { }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_6 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_7 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_5 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_8 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_24_matcher() = default; public: regex_24_matcher(regex_24_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1054,11 +910,10 @@ public: class func_2 { }; - public: cpp2::regex::regular_expression regex_24 {}; public: class regex_25_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_24 {}; public: template class regex_25_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -1068,26 +923,21 @@ public: class func_1 { }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_25_matcher() = default; public: regex_25_matcher(regex_25_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1095,26 +945,25 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_25 {}; public: class regex_26_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_25 {}; public: template class regex_26_matcher { + public: template using context = cpp2::regex::match_context; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -1124,26 +973,21 @@ public: class func_2 { }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_5 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_26_matcher() = default; public: regex_26_matcher(regex_26_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1151,11 +995,10 @@ public: class func_2 { }; - public: cpp2::regex::regular_expression regex_26 {}; public: class regex_27_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_26 {}; public: template class regex_27_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -1165,26 +1008,21 @@ public: class func_1 { }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_27_matcher() = default; public: regex_27_matcher(regex_27_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1192,26 +1030,25 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_27 {}; public: class regex_28_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_27 {}; public: template class regex_28_matcher { + public: template using context = cpp2::regex::match_context; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -1221,26 +1058,21 @@ public: class func_2 { }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_5 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_28_matcher() = default; public: regex_28_matcher(regex_28_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1248,11 +1080,10 @@ public: class func_2 { }; - public: cpp2::regex::regular_expression regex_28 {}; public: class regex_29_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_28 {}; public: template class regex_29_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -1262,26 +1093,21 @@ public: class func_1 { }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_29_matcher() = default; public: regex_29_matcher(regex_29_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1289,26 +1115,25 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_29 {}; public: class regex_30_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_29 {}; public: template class regex_30_matcher { + public: template using context = cpp2::regex::match_context; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -1318,26 +1143,21 @@ public: class func_2 { }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_5 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_30_matcher() = default; public: regex_30_matcher(regex_30_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1345,11 +1165,10 @@ public: class func_2 { }; - public: cpp2::regex::regular_expression regex_30 {}; public: class regex_31_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_30 {}; public: template class regex_31_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -1359,26 +1178,21 @@ public: class func_1 { }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_31_matcher() = default; public: regex_31_matcher(regex_31_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1386,26 +1200,25 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_31 {}; public: class regex_32_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_31 {}; public: template class regex_32_matcher { + public: template using context = cpp2::regex::match_context; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -1415,26 +1228,21 @@ public: class func_2 { }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_5 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_32_matcher() = default; public: regex_32_matcher(regex_32_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1442,11 +1250,10 @@ public: class func_2 { }; - public: cpp2::regex::regular_expression regex_32 {}; public: class regex_33_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_32 {}; public: template class regex_33_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -1456,26 +1263,21 @@ public: class func_1 { }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_33_matcher() = default; public: regex_33_matcher(regex_33_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1483,26 +1285,25 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_33 {}; public: class regex_34_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_33 {}; public: template class regex_34_matcher { + public: template using context = cpp2::regex::match_context; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -1512,41 +1313,36 @@ public: class func_2 { }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_6 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_7 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_5 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_8 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_34_matcher() = default; public: regex_34_matcher(regex_34_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1554,11 +1350,10 @@ public: class func_2 { }; - public: cpp2::regex::regular_expression regex_34 {}; public: class regex_35_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_34 {}; public: template class regex_35_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -1568,26 +1363,21 @@ public: class func_1 { }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_35_matcher() = default; public: regex_35_matcher(regex_35_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1595,26 +1385,25 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_35 {}; public: class regex_36_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_35 {}; public: template class regex_36_matcher { + public: template using context = cpp2::regex::match_context; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -1624,41 +1413,36 @@ public: class func_2 { }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_6 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_7 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_5 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_8 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_36_matcher() = default; public: regex_36_matcher(regex_36_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1666,11 +1450,10 @@ public: class func_2 { }; - public: cpp2::regex::regular_expression regex_36 {}; public: class regex_37_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_36 {}; public: template class regex_37_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -1680,26 +1463,21 @@ public: class func_1 { }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_37_matcher() = default; public: regex_37_matcher(regex_37_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1707,26 +1485,25 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_37 {}; public: class regex_38_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_37 {}; public: template class regex_38_matcher { + public: template using context = cpp2::regex::match_context; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -1736,41 +1513,36 @@ public: class func_2 { }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_6 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_7 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_5 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_8 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_38_matcher() = default; public: regex_38_matcher(regex_38_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1778,11 +1550,10 @@ public: class func_2 { }; - public: cpp2::regex::regular_expression regex_38 {}; public: class regex_39_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_38 {}; public: template class regex_39_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -1792,26 +1563,21 @@ public: class func_1 { }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_39_matcher() = default; public: regex_39_matcher(regex_39_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1819,26 +1585,25 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_39 {}; public: class regex_40_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_39 {}; public: template class regex_40_matcher { + public: template using context = cpp2::regex::match_context; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -1848,41 +1613,36 @@ public: class func_2 { }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_6 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_7 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_5 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_8 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_40_matcher() = default; public: regex_40_matcher(regex_40_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1890,11 +1650,10 @@ public: class func_2 { }; - public: cpp2::regex::regular_expression regex_40 {}; public: class regex_41_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_40 {}; public: template class regex_41_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -1904,26 +1663,21 @@ public: class func_1 { }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_41_matcher() = default; public: regex_41_matcher(regex_41_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1931,26 +1685,25 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_41 {}; public: class regex_42_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_41 {}; public: template class regex_42_matcher { + public: template using context = cpp2::regex::match_context; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -1960,26 +1713,21 @@ public: class func_2 { }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_5 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_42_matcher() = default; public: regex_42_matcher(regex_42_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1987,11 +1735,10 @@ public: class func_2 { }; - public: cpp2::regex::regular_expression regex_42 {}; public: class regex_43_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_42 {}; public: template class regex_43_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -2001,26 +1748,21 @@ public: class func_1 { }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_43_matcher() = default; public: regex_43_matcher(regex_43_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2028,26 +1770,25 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_43 {}; public: class regex_44_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_43 {}; public: template class regex_44_matcher { + public: template using context = cpp2::regex::match_context; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -2057,26 +1798,21 @@ public: class func_2 { }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_5 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_44_matcher() = default; public: regex_44_matcher(regex_44_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2084,11 +1820,10 @@ public: class func_2 { }; - public: cpp2::regex::regular_expression regex_44 {}; public: class regex_45_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_44 {}; public: template class regex_45_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -2098,26 +1833,21 @@ public: class func_1 { }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_45_matcher() = default; public: regex_45_matcher(regex_45_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2125,26 +1855,25 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_45 {}; public: class regex_46_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_45 {}; public: template class regex_46_matcher { + public: template using context = cpp2::regex::match_context; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -2154,26 +1883,21 @@ public: class func_2 { }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_5 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_46_matcher() = default; public: regex_46_matcher(regex_46_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2181,11 +1905,10 @@ public: class func_2 { }; - public: cpp2::regex::regular_expression regex_46 {}; public: class regex_47_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_46 {}; public: template class regex_47_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -2195,26 +1918,21 @@ public: class func_1 { }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_47_matcher() = default; public: regex_47_matcher(regex_47_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2222,26 +1940,25 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_47 {}; public: class regex_48_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_47 {}; public: template class regex_48_matcher { + public: template using context = cpp2::regex::match_context; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -2251,26 +1968,21 @@ public: class func_2 { }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_5 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_48_matcher() = default; public: regex_48_matcher(regex_48_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2278,13 +1990,13 @@ public: class func_2 { }; - public: cpp2::regex::regular_expression regex_48 {}; + public: cpp2::regex::regular_expression> regex_48 {}; public: test_tests_13_possessive_modifier() = default; public: test_tests_13_possessive_modifier(test_tests_13_possessive_modifier const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(test_tests_13_possessive_modifier const&) -> void = delete; -#line 266 "pure2-regex_13_possessive_modifier.cpp2" +#line 267 "pure2-regex_13_possessive_modifier.cpp2" }; auto main() -> int; @@ -2388,6 +2100,7 @@ auto main() -> int; } result += std::to_string(cpp2::move(pos)); } + ++next; } else { std::cerr << "Not implemented"; @@ -2403,7 +2116,7 @@ auto main() -> int; return result; } -#line 112 "pure2-regex_13_possessive_modifier.cpp2" +#line 113 "pure2-regex_13_possessive_modifier.cpp2" [[nodiscard]] auto sanitize(std::string str) -> std::string { str = cpp2::string_util::replace_all(str, "\a", "\\a"); @@ -2416,7 +2129,7 @@ auto main() -> int; return cpp2::move(str); } -#line 124 "pure2-regex_13_possessive_modifier.cpp2" +#line 125 "pure2-regex_13_possessive_modifier.cpp2" template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, cpp2::impl::in resultExpected) -> void{ @@ -2457,7 +2170,7 @@ template auto test(M const& regex, cpp2::impl::in id, c std::cout << "" + cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(sanitize(str)) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(sanitize(resultExpected)) + "" << std::endl; } -#line 214 "pure2-regex_13_possessive_modifier.cpp2" +#line 215 "pure2-regex_13_possessive_modifier.cpp2" auto test_tests_13_possessive_modifier::run() const& -> void{ std::cout << "Running tests_13_possessive_modifier:" << std::endl; test(regex_01, "01", R"(a++a)", "aaaaa", "n", R"(-)", "-"); @@ -2514,8 +2227,7 @@ template auto test(M const& regex, cpp2::impl::in id, c - - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_01_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_01_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2543,11 +2255,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_01_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_01_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2561,11 +2274,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_01_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_01_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2593,10 +2307,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_01_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_01_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2604,19 +2319,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_01_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_01_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_13_possessive_modifier::regex_01_matcher::to_string() -> std::string{return R"(a++a)"; } + template [[nodiscard]] constexpr auto test_tests_13_possessive_modifier::regex_01_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_01_matcher::to_string() -> std::string{return R"(a++a)"; } - - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_02_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_02_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2644,11 +2359,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_02_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_02_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2662,11 +2378,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_02_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_02_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2694,10 +2411,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_02_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_02_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2705,19 +2423,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_02_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_02_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_13_possessive_modifier::regex_02_matcher::to_string() -> std::string{return R"(a*+a)"; } - + template [[nodiscard]] constexpr auto test_tests_13_possessive_modifier::regex_02_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_02_matcher::to_string() -> std::string{return R"(a*+a)"; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_03_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_03_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2745,11 +2463,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_03_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_03_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2763,11 +2482,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_03_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_03_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2795,10 +2515,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_03_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_03_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2806,19 +2527,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_03_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_03_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_13_possessive_modifier::regex_03_matcher::to_string() -> std::string{return R"(a{1,5}+a)"; } - + template [[nodiscard]] constexpr auto test_tests_13_possessive_modifier::regex_03_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_03_matcher::to_string() -> std::string{return R"(a{1,5}+a)"; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_04_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_04_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2846,11 +2567,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_04_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_04_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2864,11 +2586,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_04_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_04_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2896,10 +2619,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_04_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_04_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2907,19 +2631,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_04_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_04_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_13_possessive_modifier::regex_04_matcher::to_string() -> std::string{return R"(a?+a)"; } + template [[nodiscard]] constexpr auto test_tests_13_possessive_modifier::regex_04_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_04_matcher::to_string() -> std::string{return R"(a?+a)"; } - - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_05_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_05_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2947,11 +2671,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_05_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_05_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2965,11 +2690,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_05_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_05_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2997,10 +2723,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_05_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_05_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -3008,19 +2735,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_05_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_05_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_13_possessive_modifier::regex_05_matcher::to_string() -> std::string{return R"(a++b)"; } - + template [[nodiscard]] constexpr auto test_tests_13_possessive_modifier::regex_05_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_05_matcher::to_string() -> std::string{return R"(a++b)"; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_06_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_06_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3048,11 +2775,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_06_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_06_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3066,11 +2794,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_06_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_06_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3098,10 +2827,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_06_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_06_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -3109,19 +2839,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_06_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_06_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_13_possessive_modifier::regex_06_matcher::to_string() -> std::string{return R"(a*+b)"; } - + template [[nodiscard]] constexpr auto test_tests_13_possessive_modifier::regex_06_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_06_matcher::to_string() -> std::string{return R"(a*+b)"; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_07_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_07_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3149,11 +2879,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_07_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_07_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3167,11 +2898,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_07_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_07_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3199,10 +2931,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_07_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_07_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -3210,19 +2943,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_07_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_07_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_13_possessive_modifier::regex_07_matcher::to_string() -> std::string{return R"(a{1,5}+b)"; } + template [[nodiscard]] constexpr auto test_tests_13_possessive_modifier::regex_07_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_07_matcher::to_string() -> std::string{return R"(a{1,5}+b)"; } - - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_08_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_08_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3250,11 +2983,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_08_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_08_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3268,11 +3002,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_08_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_08_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3300,10 +3035,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_08_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_08_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -3311,19 +3047,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_08_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_08_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_13_possessive_modifier::regex_08_matcher::to_string() -> std::string{return R"(a?+b)"; } - + template [[nodiscard]] constexpr auto test_tests_13_possessive_modifier::regex_08_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_08_matcher::to_string() -> std::string{return R"(a?+b)"; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_09_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_09_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3351,11 +3087,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_09_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_09_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3383,11 +3120,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_09_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_09_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3415,10 +3153,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_09_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_09_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -3426,19 +3165,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_09_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_09_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_13_possessive_modifier::regex_09_matcher::to_string() -> std::string{return R"(fooa++a)"; } - + template [[nodiscard]] constexpr auto test_tests_13_possessive_modifier::regex_09_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_09_matcher::to_string() -> std::string{return R"(fooa++a)"; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_10_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_10_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3466,11 +3205,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_10_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_10_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3498,11 +3238,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_10_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_10_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3530,10 +3271,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_10_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_10_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -3541,19 +3283,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_10_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_10_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_13_possessive_modifier::regex_10_matcher::to_string() -> std::string{return R"(fooa*+a)"; } + template [[nodiscard]] constexpr auto test_tests_13_possessive_modifier::regex_10_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_10_matcher::to_string() -> std::string{return R"(fooa*+a)"; } - - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_11_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_11_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3581,11 +3323,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_11_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_11_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3613,11 +3356,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_11_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_11_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3645,10 +3389,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_11_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_11_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -3656,19 +3401,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_11_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_11_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_13_possessive_modifier::regex_11_matcher::to_string() -> std::string{return R"(fooa{1,5}+a)"; } - + template [[nodiscard]] constexpr auto test_tests_13_possessive_modifier::regex_11_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_11_matcher::to_string() -> std::string{return R"(fooa{1,5}+a)"; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_12_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_12_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3696,11 +3441,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_12_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_12_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3728,11 +3474,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_12_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_12_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3760,10 +3507,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_12_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_12_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -3771,19 +3519,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_12_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_12_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_13_possessive_modifier::regex_12_matcher::to_string() -> std::string{return R"(fooa?+a)"; } - + template [[nodiscard]] constexpr auto test_tests_13_possessive_modifier::regex_12_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_12_matcher::to_string() -> std::string{return R"(fooa?+a)"; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_13_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_13_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3811,11 +3559,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_13_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_13_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3843,11 +3592,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_13_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_13_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3875,10 +3625,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_13_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_13_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -3886,19 +3637,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_13_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_13_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_13_possessive_modifier::regex_13_matcher::to_string() -> std::string{return R"(fooa++b)"; } + template [[nodiscard]] constexpr auto test_tests_13_possessive_modifier::regex_13_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_13_matcher::to_string() -> std::string{return R"(fooa++b)"; } - - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_14_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_14_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3926,11 +3677,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_14_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_14_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3958,11 +3710,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_14_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_14_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3990,10 +3743,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_14_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_14_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -4001,19 +3755,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_14_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_14_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_13_possessive_modifier::regex_14_matcher::to_string() -> std::string{return R"(fooa*+b)"; } - + template [[nodiscard]] constexpr auto test_tests_13_possessive_modifier::regex_14_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_14_matcher::to_string() -> std::string{return R"(fooa*+b)"; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_15_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_15_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4041,11 +3795,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_15_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_15_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4073,11 +3828,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_15_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_15_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4105,10 +3861,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_15_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_15_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -4116,19 +3873,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_15_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_15_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_13_possessive_modifier::regex_15_matcher::to_string() -> std::string{return R"(fooa{1,5}+b)"; } - + template [[nodiscard]] constexpr auto test_tests_13_possessive_modifier::regex_15_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_15_matcher::to_string() -> std::string{return R"(fooa{1,5}+b)"; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_16_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_16_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4156,11 +3913,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_16_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_16_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4188,11 +3946,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_16_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_16_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4220,10 +3979,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_16_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_16_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -4231,19 +3991,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_16_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_16_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_13_possessive_modifier::regex_16_matcher::to_string() -> std::string{return R"(fooa?+b)"; } + template [[nodiscard]] constexpr auto test_tests_13_possessive_modifier::regex_16_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_16_matcher::to_string() -> std::string{return R"(fooa?+b)"; } - - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_17_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_17_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4284,16 +4044,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_13_possessive_modifier::regex_17_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_13_possessive_modifier::regex_17_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_17_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_17_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4307,11 +4068,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_17_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_17_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4352,10 +4114,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_17_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_17_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -4363,19 +4126,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_17_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_17_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_13_possessive_modifier::regex_17_matcher::to_string() -> std::string{return R"((aA)++(aA))"; } - + template [[nodiscard]] constexpr auto test_tests_13_possessive_modifier::regex_17_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_17_matcher::to_string() -> std::string{return R"((aA)++(aA))"; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_18_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_18_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4403,11 +4166,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_18_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_18_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4435,11 +4199,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_18_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_18_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4454,11 +4219,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_18_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_18_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4484,16 +4250,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_13_possessive_modifier::regex_18_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_13_possessive_modifier::regex_18_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_18_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_18_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4507,11 +4274,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_18_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_18_matcher::func_6::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4539,11 +4307,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_18_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_18_matcher::func_7::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4571,11 +4340,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_18_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_18_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4590,11 +4360,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_18_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_18_matcher::func_8::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4620,10 +4391,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_18_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_18_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -4631,19 +4403,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_18_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_18_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_13_possessive_modifier::regex_18_matcher::to_string() -> std::string{return R"((aA|bB)++(aA|bB))"; } - + template [[nodiscard]] constexpr auto test_tests_13_possessive_modifier::regex_18_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_18_matcher::to_string() -> std::string{return R"((aA|bB)++(aA|bB))"; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_19_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_19_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4684,16 +4456,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_13_possessive_modifier::regex_19_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_13_possessive_modifier::regex_19_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_19_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_19_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4707,11 +4480,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_19_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_19_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4752,10 +4526,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_19_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_19_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -4763,19 +4538,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_19_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_19_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_13_possessive_modifier::regex_19_matcher::to_string() -> std::string{return R"((aA)*+(aA))"; } + template [[nodiscard]] constexpr auto test_tests_13_possessive_modifier::regex_19_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_19_matcher::to_string() -> std::string{return R"((aA)*+(aA))"; } - - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_20_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_20_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4803,11 +4578,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_20_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_20_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4835,11 +4611,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_20_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_20_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4854,11 +4631,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_20_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_20_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4884,16 +4662,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_13_possessive_modifier::regex_20_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_13_possessive_modifier::regex_20_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_20_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_20_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4907,11 +4686,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_20_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_20_matcher::func_6::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4939,11 +4719,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_20_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_20_matcher::func_7::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4971,11 +4752,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_20_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_20_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4990,11 +4772,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_20_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_20_matcher::func_8::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5020,10 +4803,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_20_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_20_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -5031,19 +4815,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_20_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_20_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_13_possessive_modifier::regex_20_matcher::to_string() -> std::string{return R"((aA|bB)*+(aA|bB))"; } - + template [[nodiscard]] constexpr auto test_tests_13_possessive_modifier::regex_20_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_20_matcher::to_string() -> std::string{return R"((aA|bB)*+(aA|bB))"; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_21_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_21_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5084,16 +4868,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_13_possessive_modifier::regex_21_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_13_possessive_modifier::regex_21_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_21_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_21_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5107,11 +4892,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_21_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_21_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5152,10 +4938,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_21_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_21_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -5163,19 +4950,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_21_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_21_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_13_possessive_modifier::regex_21_matcher::to_string() -> std::string{return R"((aA){1,5}+(aA))"; } - + template [[nodiscard]] constexpr auto test_tests_13_possessive_modifier::regex_21_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_21_matcher::to_string() -> std::string{return R"((aA){1,5}+(aA))"; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_22_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_22_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5203,11 +4990,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_22_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_22_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5235,11 +5023,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_22_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_22_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5254,11 +5043,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_22_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_22_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5284,16 +5074,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_13_possessive_modifier::regex_22_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_13_possessive_modifier::regex_22_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_22_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_22_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5307,11 +5098,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_22_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_22_matcher::func_6::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5339,11 +5131,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_22_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_22_matcher::func_7::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5371,11 +5164,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_22_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_22_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5390,11 +5184,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_22_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_22_matcher::func_8::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5420,10 +5215,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_22_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_22_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -5431,19 +5227,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_22_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_22_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_13_possessive_modifier::regex_22_matcher::to_string() -> std::string{return R"((aA|bB){1,5}+(aA|bB))"; } + template [[nodiscard]] constexpr auto test_tests_13_possessive_modifier::regex_22_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_22_matcher::to_string() -> std::string{return R"((aA|bB){1,5}+(aA|bB))"; } - - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_23_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_23_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5484,16 +5280,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_13_possessive_modifier::regex_23_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_13_possessive_modifier::regex_23_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_23_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_23_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5507,11 +5304,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_23_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_23_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5552,10 +5350,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_23_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_23_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -5563,19 +5362,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_23_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_23_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_13_possessive_modifier::regex_23_matcher::to_string() -> std::string{return R"((aA)?+(aA))"; } - + template [[nodiscard]] constexpr auto test_tests_13_possessive_modifier::regex_23_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_23_matcher::to_string() -> std::string{return R"((aA)?+(aA))"; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_24_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_24_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5603,11 +5402,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_24_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_24_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5635,11 +5435,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_24_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_24_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5654,11 +5455,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_24_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_24_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5684,16 +5486,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_13_possessive_modifier::regex_24_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_13_possessive_modifier::regex_24_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_24_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_24_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5707,11 +5510,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_24_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_24_matcher::func_6::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5739,11 +5543,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_24_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_24_matcher::func_7::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5771,11 +5576,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_24_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_24_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5790,11 +5596,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_24_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_24_matcher::func_8::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5820,10 +5627,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_24_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_24_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -5831,19 +5639,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_24_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_24_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_13_possessive_modifier::regex_24_matcher::to_string() -> std::string{return R"((aA|bB)?+(aA|bB))"; } - + template [[nodiscard]] constexpr auto test_tests_13_possessive_modifier::regex_24_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_24_matcher::to_string() -> std::string{return R"((aA|bB)?+(aA|bB))"; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_25_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_25_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5884,16 +5692,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_13_possessive_modifier::regex_25_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_13_possessive_modifier::regex_25_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_25_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_25_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5907,11 +5716,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_25_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_25_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5939,10 +5749,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_25_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_25_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -5950,19 +5761,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_25_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_25_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_13_possessive_modifier::regex_25_matcher::to_string() -> std::string{return R"((aA)++b)"; } + template [[nodiscard]] constexpr auto test_tests_13_possessive_modifier::regex_25_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_25_matcher::to_string() -> std::string{return R"((aA)++b)"; } - - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_26_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_26_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5990,11 +5801,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_26_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_26_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6022,11 +5834,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_26_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_26_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6041,11 +5854,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_26_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_26_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6071,16 +5885,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_13_possessive_modifier::regex_26_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_13_possessive_modifier::regex_26_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_26_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_26_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6094,11 +5909,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_26_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_26_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6126,10 +5942,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_26_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_26_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -6137,19 +5954,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_26_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_26_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_13_possessive_modifier::regex_26_matcher::to_string() -> std::string{return R"((aA|bB)++b)"; } - + template [[nodiscard]] constexpr auto test_tests_13_possessive_modifier::regex_26_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_26_matcher::to_string() -> std::string{return R"((aA|bB)++b)"; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_27_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_27_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6190,16 +6007,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_13_possessive_modifier::regex_27_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_13_possessive_modifier::regex_27_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_27_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_27_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6213,11 +6031,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_27_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_27_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6245,10 +6064,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_27_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_27_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -6256,19 +6076,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_27_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_27_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_13_possessive_modifier::regex_27_matcher::to_string() -> std::string{return R"((aA)*+b)"; } - + template [[nodiscard]] constexpr auto test_tests_13_possessive_modifier::regex_27_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_27_matcher::to_string() -> std::string{return R"((aA)*+b)"; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_28_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_28_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6296,11 +6116,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_28_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_28_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6328,11 +6149,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_28_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_28_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6347,11 +6169,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_28_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_28_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6377,16 +6200,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_13_possessive_modifier::regex_28_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_13_possessive_modifier::regex_28_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_28_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_28_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6400,11 +6224,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_28_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_28_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6432,10 +6257,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_28_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_28_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -6443,19 +6269,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_28_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_28_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_13_possessive_modifier::regex_28_matcher::to_string() -> std::string{return R"((aA|bB)*+b)"; } + template [[nodiscard]] constexpr auto test_tests_13_possessive_modifier::regex_28_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_28_matcher::to_string() -> std::string{return R"((aA|bB)*+b)"; } - - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_29_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_29_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6496,16 +6322,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_13_possessive_modifier::regex_29_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_13_possessive_modifier::regex_29_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_29_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_29_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6519,11 +6346,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_29_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_29_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6551,10 +6379,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_29_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_29_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -6562,19 +6391,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_29_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_29_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_13_possessive_modifier::regex_29_matcher::to_string() -> std::string{return R"((aA){1,5}+b)"; } - + template [[nodiscard]] constexpr auto test_tests_13_possessive_modifier::regex_29_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_29_matcher::to_string() -> std::string{return R"((aA){1,5}+b)"; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_30_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_30_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6602,11 +6431,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_30_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_30_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6634,11 +6464,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_30_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_30_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6653,11 +6484,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_30_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_30_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6683,16 +6515,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_13_possessive_modifier::regex_30_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_13_possessive_modifier::regex_30_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_30_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_30_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6706,11 +6539,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_30_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_30_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6738,10 +6572,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_30_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_30_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -6749,19 +6584,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_30_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_30_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_13_possessive_modifier::regex_30_matcher::to_string() -> std::string{return R"((aA|bB){1,5}+b)"; } - + template [[nodiscard]] constexpr auto test_tests_13_possessive_modifier::regex_30_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_30_matcher::to_string() -> std::string{return R"((aA|bB){1,5}+b)"; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_31_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_31_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6802,16 +6637,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_13_possessive_modifier::regex_31_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_13_possessive_modifier::regex_31_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_31_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_31_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6825,11 +6661,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_31_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_31_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6857,10 +6694,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_31_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_31_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -6868,19 +6706,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_31_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_31_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_13_possessive_modifier::regex_31_matcher::to_string() -> std::string{return R"((aA)?+b)"; } + template [[nodiscard]] constexpr auto test_tests_13_possessive_modifier::regex_31_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_31_matcher::to_string() -> std::string{return R"((aA)?+b)"; } - - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_32_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_32_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6908,11 +6746,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_32_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_32_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6940,11 +6779,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_32_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_32_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6959,11 +6799,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_32_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_32_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6989,16 +6830,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_13_possessive_modifier::regex_32_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_13_possessive_modifier::regex_32_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_32_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_32_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7012,11 +6854,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_32_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_32_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7044,10 +6887,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_32_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_32_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -7055,19 +6899,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_32_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_32_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_13_possessive_modifier::regex_32_matcher::to_string() -> std::string{return R"((aA|bB)?+b)"; } - + template [[nodiscard]] constexpr auto test_tests_13_possessive_modifier::regex_32_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_32_matcher::to_string() -> std::string{return R"((aA|bB)?+b)"; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_33_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_33_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7108,16 +6952,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_13_possessive_modifier::regex_33_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_13_possessive_modifier::regex_33_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_33_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_33_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7145,11 +6990,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_33_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_33_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7190,10 +7036,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_33_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_33_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -7201,19 +7048,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_33_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_33_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_13_possessive_modifier::regex_33_matcher::to_string() -> std::string{return R"(foo(aA)++(aA))"; } - + template [[nodiscard]] constexpr auto test_tests_13_possessive_modifier::regex_33_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_33_matcher::to_string() -> std::string{return R"(foo(aA)++(aA))"; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_34_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_34_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7241,11 +7088,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_34_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_34_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7273,11 +7121,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_34_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_34_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7292,11 +7141,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_34_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_34_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7322,16 +7172,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_13_possessive_modifier::regex_34_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_13_possessive_modifier::regex_34_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_34_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_34_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7359,11 +7210,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_34_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_34_matcher::func_6::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7391,11 +7243,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_34_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_34_matcher::func_7::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7423,11 +7276,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_34_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_34_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7442,11 +7296,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_34_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_34_matcher::func_8::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7472,10 +7327,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_34_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_34_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -7483,19 +7339,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_34_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_34_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_13_possessive_modifier::regex_34_matcher::to_string() -> std::string{return R"(foo(aA|bB)++(aA|bB))"; } + template [[nodiscard]] constexpr auto test_tests_13_possessive_modifier::regex_34_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_34_matcher::to_string() -> std::string{return R"(foo(aA|bB)++(aA|bB))"; } - - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_35_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_35_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7536,16 +7392,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_13_possessive_modifier::regex_35_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_13_possessive_modifier::regex_35_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_35_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_35_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7573,11 +7430,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_35_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_35_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7618,10 +7476,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_35_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_35_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -7629,19 +7488,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_35_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_35_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_13_possessive_modifier::regex_35_matcher::to_string() -> std::string{return R"(foo(aA)*+(aA))"; } - + template [[nodiscard]] constexpr auto test_tests_13_possessive_modifier::regex_35_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_35_matcher::to_string() -> std::string{return R"(foo(aA)*+(aA))"; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_36_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_36_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7669,11 +7528,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_36_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_36_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7701,11 +7561,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_36_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_36_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7720,11 +7581,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_36_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_36_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7750,16 +7612,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_13_possessive_modifier::regex_36_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_13_possessive_modifier::regex_36_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_36_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_36_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7787,11 +7650,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_36_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_36_matcher::func_6::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7819,11 +7683,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_36_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_36_matcher::func_7::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7851,11 +7716,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_36_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_36_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7870,11 +7736,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_36_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_36_matcher::func_8::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7900,10 +7767,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_36_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_36_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -7911,19 +7779,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_36_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_36_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_13_possessive_modifier::regex_36_matcher::to_string() -> std::string{return R"(foo(aA|bB)*+(aA|bB))"; } - + template [[nodiscard]] constexpr auto test_tests_13_possessive_modifier::regex_36_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_36_matcher::to_string() -> std::string{return R"(foo(aA|bB)*+(aA|bB))"; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_37_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_37_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7964,16 +7832,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_13_possessive_modifier::regex_37_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_13_possessive_modifier::regex_37_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_37_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_37_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8001,11 +7870,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_37_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_37_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8046,10 +7916,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_37_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_37_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -8057,19 +7928,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_37_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_37_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_13_possessive_modifier::regex_37_matcher::to_string() -> std::string{return R"(foo(aA){1,5}+(aA))"; } + template [[nodiscard]] constexpr auto test_tests_13_possessive_modifier::regex_37_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_37_matcher::to_string() -> std::string{return R"(foo(aA){1,5}+(aA))"; } - - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_38_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_38_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8097,11 +7968,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_38_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_38_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8129,11 +8001,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_38_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_38_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8148,11 +8021,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_38_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_38_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8178,16 +8052,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_13_possessive_modifier::regex_38_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_13_possessive_modifier::regex_38_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_38_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_38_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8215,11 +8090,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_38_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_38_matcher::func_6::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8247,11 +8123,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_38_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_38_matcher::func_7::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8279,11 +8156,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_38_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_38_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8298,11 +8176,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_38_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_38_matcher::func_8::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8328,10 +8207,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_38_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_38_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -8339,19 +8219,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_38_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_38_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_13_possessive_modifier::regex_38_matcher::to_string() -> std::string{return R"(foo(aA|bB){1,5}+(aA|bB))"; } - + template [[nodiscard]] constexpr auto test_tests_13_possessive_modifier::regex_38_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_38_matcher::to_string() -> std::string{return R"(foo(aA|bB){1,5}+(aA|bB))"; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_39_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_39_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8392,16 +8272,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_13_possessive_modifier::regex_39_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_13_possessive_modifier::regex_39_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_39_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_39_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8429,11 +8310,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_39_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_39_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8474,10 +8356,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_39_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_39_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -8485,19 +8368,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_39_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_39_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_13_possessive_modifier::regex_39_matcher::to_string() -> std::string{return R"(foo(aA)?+(aA))"; } - + template [[nodiscard]] constexpr auto test_tests_13_possessive_modifier::regex_39_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_39_matcher::to_string() -> std::string{return R"(foo(aA)?+(aA))"; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_40_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_40_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8525,11 +8408,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_40_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_40_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8557,11 +8441,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_40_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_40_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8576,11 +8461,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_40_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_40_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8606,16 +8492,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_13_possessive_modifier::regex_40_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_13_possessive_modifier::regex_40_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_40_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_40_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8643,11 +8530,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_40_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_40_matcher::func_6::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8675,11 +8563,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_40_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_40_matcher::func_7::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8707,11 +8596,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_40_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_40_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8726,11 +8616,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_40_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_40_matcher::func_8::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8756,10 +8647,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_40_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_40_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -8767,19 +8659,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_40_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_40_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_13_possessive_modifier::regex_40_matcher::to_string() -> std::string{return R"(foo(aA|bB)?+(aA|bB))"; } + template [[nodiscard]] constexpr auto test_tests_13_possessive_modifier::regex_40_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_40_matcher::to_string() -> std::string{return R"(foo(aA|bB)?+(aA|bB))"; } - - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_41_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_41_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8820,16 +8712,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_13_possessive_modifier::regex_41_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_13_possessive_modifier::regex_41_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_41_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_41_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8857,11 +8750,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_41_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_41_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8889,10 +8783,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_41_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_41_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -8900,19 +8795,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_41_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_41_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_13_possessive_modifier::regex_41_matcher::to_string() -> std::string{return R"(foo(aA)++b)"; } - + template [[nodiscard]] constexpr auto test_tests_13_possessive_modifier::regex_41_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_41_matcher::to_string() -> std::string{return R"(foo(aA)++b)"; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_42_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_42_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8940,11 +8835,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_42_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_42_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8972,11 +8868,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_42_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_42_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8991,11 +8888,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_42_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_42_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9021,16 +8919,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_13_possessive_modifier::regex_42_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_13_possessive_modifier::regex_42_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_42_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_42_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9058,11 +8957,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_42_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_42_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9090,10 +8990,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_42_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_42_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -9101,19 +9002,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_42_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_42_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_13_possessive_modifier::regex_42_matcher::to_string() -> std::string{return R"(foo(aA|bB)++b)"; } - + template [[nodiscard]] constexpr auto test_tests_13_possessive_modifier::regex_42_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_42_matcher::to_string() -> std::string{return R"(foo(aA|bB)++b)"; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_43_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_43_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9154,16 +9055,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_13_possessive_modifier::regex_43_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_13_possessive_modifier::regex_43_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_43_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_43_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9191,11 +9093,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_43_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_43_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9223,10 +9126,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_43_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_43_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -9234,19 +9138,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_43_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_43_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_13_possessive_modifier::regex_43_matcher::to_string() -> std::string{return R"(foo(aA)*+b)"; } + template [[nodiscard]] constexpr auto test_tests_13_possessive_modifier::regex_43_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_43_matcher::to_string() -> std::string{return R"(foo(aA)*+b)"; } - - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_44_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_44_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9274,11 +9178,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_44_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_44_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9306,11 +9211,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_44_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_44_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9325,11 +9231,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_44_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_44_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9355,16 +9262,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_13_possessive_modifier::regex_44_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_13_possessive_modifier::regex_44_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_44_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_44_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9392,11 +9300,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_44_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_44_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9424,10 +9333,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_44_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_44_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -9435,19 +9345,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_44_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_44_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_13_possessive_modifier::regex_44_matcher::to_string() -> std::string{return R"(foo(aA|bB)*+b)"; } - + template [[nodiscard]] constexpr auto test_tests_13_possessive_modifier::regex_44_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_44_matcher::to_string() -> std::string{return R"(foo(aA|bB)*+b)"; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_45_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_45_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9488,16 +9398,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_13_possessive_modifier::regex_45_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_13_possessive_modifier::regex_45_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_45_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_45_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9525,11 +9436,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_45_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_45_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9557,10 +9469,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_45_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_45_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -9568,19 +9481,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_45_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_45_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_13_possessive_modifier::regex_45_matcher::to_string() -> std::string{return R"(foo(aA){1,5}+b)"; } - + template [[nodiscard]] constexpr auto test_tests_13_possessive_modifier::regex_45_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_45_matcher::to_string() -> std::string{return R"(foo(aA){1,5}+b)"; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_46_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_46_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9608,11 +9521,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_46_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_46_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9640,11 +9554,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_46_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_46_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9659,11 +9574,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_46_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_46_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9689,16 +9605,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_13_possessive_modifier::regex_46_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_13_possessive_modifier::regex_46_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_46_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_46_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9726,11 +9643,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_46_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_46_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9758,10 +9676,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_46_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_46_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -9769,19 +9688,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_46_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_46_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_13_possessive_modifier::regex_46_matcher::to_string() -> std::string{return R"(foo(aA|bB){1,5}+b)"; } + template [[nodiscard]] constexpr auto test_tests_13_possessive_modifier::regex_46_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_46_matcher::to_string() -> std::string{return R"(foo(aA|bB){1,5}+b)"; } - - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_47_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_47_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9822,16 +9741,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_13_possessive_modifier::regex_47_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_13_possessive_modifier::regex_47_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_47_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_47_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9859,11 +9779,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_47_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_47_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9891,10 +9812,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_47_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_47_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -9902,19 +9824,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_47_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_47_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_13_possessive_modifier::regex_47_matcher::to_string() -> std::string{return R"(foo(aA)?+b)"; } - + template [[nodiscard]] constexpr auto test_tests_13_possessive_modifier::regex_47_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_47_matcher::to_string() -> std::string{return R"(foo(aA)?+b)"; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_48_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_48_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9942,11 +9864,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_48_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_48_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9974,11 +9897,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_48_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_48_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9993,11 +9917,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_48_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_48_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -10023,16 +9948,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_13_possessive_modifier::regex_48_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_13_possessive_modifier::regex_48_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_48_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_48_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -10060,11 +9986,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_48_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_48_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -10092,10 +10019,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_48_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_48_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -10103,15 +10031,16 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_48_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_48_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_13_possessive_modifier::regex_48_matcher::to_string() -> std::string{return R"(foo(aA|bB)?+b)"; } + template [[nodiscard]] constexpr auto test_tests_13_possessive_modifier::regex_48_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_48_matcher::to_string() -> std::string{return R"(foo(aA|bB)?+b)"; } -#line 267 "pure2-regex_13_possessive_modifier.cpp2" +#line 268 "pure2-regex_13_possessive_modifier.cpp2" auto main() -> int{ CPP2_UFCS(run)(test_tests_13_possessive_modifier()); } diff --git a/regression-tests/test-results/pure2-regex_14_multiline_modifier.cpp b/regression-tests/test-results/pure2-regex_14_multiline_modifier.cpp index eea7dae18..1e931fcf9 100644 --- a/regression-tests/test-results/pure2-regex_14_multiline_modifier.cpp +++ b/regression-tests/test-results/pure2-regex_14_multiline_modifier.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes #include "cpp2regex.h" //=== Cpp2 type declarations ==================================================== @@ -9,7 +9,7 @@ #line 1 "pure2-regex_14_multiline_modifier.cpp2" -#line 165 "pure2-regex_14_multiline_modifier.cpp2" +#line 166 "pure2-regex_14_multiline_modifier.cpp2" class test_tests_14_multiline_modifier; @@ -18,37 +18,31 @@ class test_tests_14_multiline_modifier; #line 1 "pure2-regex_14_multiline_modifier.cpp2" [[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string; -#line 112 "pure2-regex_14_multiline_modifier.cpp2" +#line 113 "pure2-regex_14_multiline_modifier.cpp2" [[nodiscard]] auto sanitize(std::string str) -> std::string; -#line 124 "pure2-regex_14_multiline_modifier.cpp2" +#line 125 "pure2-regex_14_multiline_modifier.cpp2" template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, cpp2::impl::in resultExpected) -> void; -#line 165 "pure2-regex_14_multiline_modifier.cpp2" +#line 166 "pure2-regex_14_multiline_modifier.cpp2" class test_tests_14_multiline_modifier { -#line 365 "pure2-regex_14_multiline_modifier.cpp2" +#line 366 "pure2-regex_14_multiline_modifier.cpp2" public: auto run() const& -> void; - public: class regex_01_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: template class regex_01_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_01_matcher() = default; public: regex_01_matcher(regex_01_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -56,25 +50,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_01 {}; public: class regex_02_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_01 {}; public: template class regex_02_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_02_matcher() = default; public: regex_02_matcher(regex_02_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -82,25 +70,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_02 {}; public: class regex_03_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_02 {}; public: template class regex_03_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_03_matcher() = default; public: regex_03_matcher(regex_03_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -108,25 +90,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_03 {}; public: class regex_04_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_03 {}; public: template class regex_04_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_04_matcher() = default; public: regex_04_matcher(regex_04_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -134,25 +110,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_04 {}; public: class regex_05_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_04 {}; public: template class regex_05_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_05_matcher() = default; public: regex_05_matcher(regex_05_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -160,25 +130,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_05 {}; public: class regex_06_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_05 {}; public: template class regex_06_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_06_matcher() = default; public: regex_06_matcher(regex_06_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -186,25 +150,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_06 {}; public: class regex_07_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_06 {}; public: template class regex_07_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_07_matcher() = default; public: regex_07_matcher(regex_07_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -212,25 +170,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_07 {}; public: class regex_08_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_07 {}; public: template class regex_08_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_08_matcher() = default; public: regex_08_matcher(regex_08_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -238,25 +190,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_08 {}; public: class regex_09_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_08 {}; public: template class regex_09_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_09_matcher() = default; public: regex_09_matcher(regex_09_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -264,25 +210,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_09 {}; public: class regex_10_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_09 {}; public: template class regex_10_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_10_matcher() = default; public: regex_10_matcher(regex_10_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -290,25 +230,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_10 {}; public: class regex_100_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_10 {}; public: template class regex_100_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_100_matcher() = default; public: regex_100_matcher(regex_100_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -316,25 +250,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_100 {}; public: class regex_101_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_100 {}; public: template class regex_101_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_101_matcher() = default; public: regex_101_matcher(regex_101_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -342,25 +270,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_101 {}; public: class regex_102_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_101 {}; public: template class regex_102_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_102_matcher() = default; public: regex_102_matcher(regex_102_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -368,25 +290,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_102 {}; public: class regex_103_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_102 {}; public: template class regex_103_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_103_matcher() = default; public: regex_103_matcher(regex_103_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -394,25 +310,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_103 {}; public: class regex_104_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_103 {}; public: template class regex_104_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_104_matcher() = default; public: regex_104_matcher(regex_104_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -420,25 +330,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_104 {}; public: class regex_105_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_104 {}; public: template class regex_105_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_105_matcher() = default; public: regex_105_matcher(regex_105_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -446,25 +350,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_105 {}; public: class regex_106_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_105 {}; public: template class regex_106_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_106_matcher() = default; public: regex_106_matcher(regex_106_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -472,25 +370,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_106 {}; public: class regex_107_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_106 {}; public: template class regex_107_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_107_matcher() = default; public: regex_107_matcher(regex_107_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -498,25 +390,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_107 {}; public: class regex_108_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_107 {}; public: template class regex_108_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_108_matcher() = default; public: regex_108_matcher(regex_108_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -524,25 +410,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_108 {}; public: class regex_109_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_108 {}; public: template class regex_109_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_109_matcher() = default; public: regex_109_matcher(regex_109_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -550,25 +430,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_109 {}; public: class regex_11_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_109 {}; public: template class regex_11_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_11_matcher() = default; public: regex_11_matcher(regex_11_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -576,25 +450,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_11 {}; public: class regex_110_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_11 {}; public: template class regex_110_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_110_matcher() = default; public: regex_110_matcher(regex_110_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -602,25 +470,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_110 {}; public: class regex_111_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_110 {}; public: template class regex_111_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_111_matcher() = default; public: regex_111_matcher(regex_111_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -628,25 +490,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_111 {}; public: class regex_112_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_111 {}; public: template class regex_112_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_112_matcher() = default; public: regex_112_matcher(regex_112_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -654,25 +510,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_112 {}; public: class regex_113_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_112 {}; public: template class regex_113_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_113_matcher() = default; public: regex_113_matcher(regex_113_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -680,25 +530,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_113 {}; public: class regex_114_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_113 {}; public: template class regex_114_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_114_matcher() = default; public: regex_114_matcher(regex_114_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -706,25 +550,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_114 {}; public: class regex_115_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_114 {}; public: template class regex_115_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_115_matcher() = default; public: regex_115_matcher(regex_115_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -732,25 +570,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_115 {}; public: class regex_116_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_115 {}; public: template class regex_116_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_116_matcher() = default; public: regex_116_matcher(regex_116_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -758,25 +590,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_116 {}; public: class regex_117_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_116 {}; public: template class regex_117_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_117_matcher() = default; public: regex_117_matcher(regex_117_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -784,25 +610,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_117 {}; public: class regex_118_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_117 {}; public: template class regex_118_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_118_matcher() = default; public: regex_118_matcher(regex_118_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -810,25 +630,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_118 {}; public: class regex_119_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_118 {}; public: template class regex_119_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_119_matcher() = default; public: regex_119_matcher(regex_119_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -836,25 +650,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_119 {}; public: class regex_12_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_119 {}; public: template class regex_12_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_12_matcher() = default; public: regex_12_matcher(regex_12_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -862,25 +670,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_12 {}; public: class regex_120_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_12 {}; public: template class regex_120_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_120_matcher() = default; public: regex_120_matcher(regex_120_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -888,25 +690,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_120 {}; public: class regex_121_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_120 {}; public: template class regex_121_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_121_matcher() = default; public: regex_121_matcher(regex_121_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -914,25 +710,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_121 {}; public: class regex_122_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_121 {}; public: template class regex_122_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_122_matcher() = default; public: regex_122_matcher(regex_122_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -940,25 +730,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_122 {}; public: class regex_123_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_122 {}; public: template class regex_123_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_123_matcher() = default; public: regex_123_matcher(regex_123_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -966,25 +750,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_123 {}; public: class regex_124_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_123 {}; public: template class regex_124_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_124_matcher() = default; public: regex_124_matcher(regex_124_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -992,25 +770,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_124 {}; public: class regex_125_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_124 {}; public: template class regex_125_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_125_matcher() = default; public: regex_125_matcher(regex_125_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1018,25 +790,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_125 {}; public: class regex_126_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_125 {}; public: template class regex_126_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_126_matcher() = default; public: regex_126_matcher(regex_126_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1044,25 +810,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_126 {}; public: class regex_127_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_126 {}; public: template class regex_127_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_127_matcher() = default; public: regex_127_matcher(regex_127_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1070,25 +830,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_127 {}; public: class regex_128_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_127 {}; public: template class regex_128_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_128_matcher() = default; public: regex_128_matcher(regex_128_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1096,25 +850,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_128 {}; public: class regex_129_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_128 {}; public: template class regex_129_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_129_matcher() = default; public: regex_129_matcher(regex_129_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1122,25 +870,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_129 {}; public: class regex_13_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_129 {}; public: template class regex_13_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_13_matcher() = default; public: regex_13_matcher(regex_13_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1148,25 +890,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_13 {}; public: class regex_130_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_13 {}; public: template class regex_130_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_130_matcher() = default; public: regex_130_matcher(regex_130_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1174,25 +910,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_130 {}; public: class regex_131_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_130 {}; public: template class regex_131_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_131_matcher() = default; public: regex_131_matcher(regex_131_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1200,25 +930,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_131 {}; public: class regex_132_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_131 {}; public: template class regex_132_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_132_matcher() = default; public: regex_132_matcher(regex_132_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1226,25 +950,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_132 {}; public: class regex_133_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_132 {}; public: template class regex_133_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_133_matcher() = default; public: regex_133_matcher(regex_133_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1252,25 +970,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_133 {}; public: class regex_134_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_133 {}; public: template class regex_134_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_134_matcher() = default; public: regex_134_matcher(regex_134_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1278,25 +990,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_134 {}; public: class regex_135_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_134 {}; public: template class regex_135_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_135_matcher() = default; public: regex_135_matcher(regex_135_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1304,25 +1010,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_135 {}; public: class regex_136_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_135 {}; public: template class regex_136_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_136_matcher() = default; public: regex_136_matcher(regex_136_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1330,25 +1030,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_136 {}; public: class regex_137_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_136 {}; public: template class regex_137_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_137_matcher() = default; public: regex_137_matcher(regex_137_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1356,25 +1050,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_137 {}; public: class regex_138_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_137 {}; public: template class regex_138_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_138_matcher() = default; public: regex_138_matcher(regex_138_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1382,25 +1070,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_138 {}; public: class regex_139_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_138 {}; public: template class regex_139_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_139_matcher() = default; public: regex_139_matcher(regex_139_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1408,25 +1090,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_139 {}; public: class regex_14_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_139 {}; public: template class regex_14_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_14_matcher() = default; public: regex_14_matcher(regex_14_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1434,25 +1110,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_14 {}; public: class regex_140_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_14 {}; public: template class regex_140_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_140_matcher() = default; public: regex_140_matcher(regex_140_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1460,25 +1130,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_140 {}; public: class regex_141_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_140 {}; public: template class regex_141_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_141_matcher() = default; public: regex_141_matcher(regex_141_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1486,25 +1150,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_141 {}; public: class regex_142_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_141 {}; public: template class regex_142_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_142_matcher() = default; public: regex_142_matcher(regex_142_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1512,25 +1170,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_142 {}; public: class regex_143_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_142 {}; public: template class regex_143_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_143_matcher() = default; public: regex_143_matcher(regex_143_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1538,25 +1190,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_143 {}; public: class regex_144_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_143 {}; public: template class regex_144_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_144_matcher() = default; public: regex_144_matcher(regex_144_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1564,25 +1210,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_144 {}; public: class regex_145_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_144 {}; public: template class regex_145_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_145_matcher() = default; public: regex_145_matcher(regex_145_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1590,25 +1230,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_145 {}; public: class regex_146_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_145 {}; public: template class regex_146_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_146_matcher() = default; public: regex_146_matcher(regex_146_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1616,25 +1250,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_146 {}; public: class regex_147_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_146 {}; public: template class regex_147_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_147_matcher() = default; public: regex_147_matcher(regex_147_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1642,25 +1270,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_147 {}; public: class regex_148_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_147 {}; public: template class regex_148_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_148_matcher() = default; public: regex_148_matcher(regex_148_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1668,25 +1290,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_148 {}; public: class regex_149_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_148 {}; public: template class regex_149_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_149_matcher() = default; public: regex_149_matcher(regex_149_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1694,25 +1310,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_149 {}; public: class regex_15_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_149 {}; public: template class regex_15_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_15_matcher() = default; public: regex_15_matcher(regex_15_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1720,25 +1330,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_15 {}; public: class regex_150_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_15 {}; public: template class regex_150_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_150_matcher() = default; public: regex_150_matcher(regex_150_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1746,25 +1350,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_150 {}; public: class regex_151_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_150 {}; public: template class regex_151_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_151_matcher() = default; public: regex_151_matcher(regex_151_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1772,25 +1370,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_151 {}; public: class regex_152_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_151 {}; public: template class regex_152_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_152_matcher() = default; public: regex_152_matcher(regex_152_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1798,25 +1390,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_152 {}; public: class regex_153_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_152 {}; public: template class regex_153_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_153_matcher() = default; public: regex_153_matcher(regex_153_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1824,25 +1410,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_153 {}; public: class regex_154_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_153 {}; public: template class regex_154_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_154_matcher() = default; public: regex_154_matcher(regex_154_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1850,25 +1430,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_154 {}; public: class regex_155_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_154 {}; public: template class regex_155_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_155_matcher() = default; public: regex_155_matcher(regex_155_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1876,25 +1450,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_155 {}; public: class regex_156_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_155 {}; public: template class regex_156_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_156_matcher() = default; public: regex_156_matcher(regex_156_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1902,25 +1470,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_156 {}; public: class regex_157_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_156 {}; public: template class regex_157_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_157_matcher() = default; public: regex_157_matcher(regex_157_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1928,25 +1490,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_157 {}; public: class regex_158_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_157 {}; public: template class regex_158_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_158_matcher() = default; public: regex_158_matcher(regex_158_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1954,25 +1510,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_158 {}; public: class regex_159_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_158 {}; public: template class regex_159_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_159_matcher() = default; public: regex_159_matcher(regex_159_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1980,25 +1530,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_159 {}; public: class regex_16_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_159 {}; public: template class regex_16_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_16_matcher() = default; public: regex_16_matcher(regex_16_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2006,25 +1550,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_16 {}; public: class regex_160_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_16 {}; public: template class regex_160_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_160_matcher() = default; public: regex_160_matcher(regex_160_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2032,25 +1570,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_160 {}; public: class regex_161_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_160 {}; public: template class regex_161_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_161_matcher() = default; public: regex_161_matcher(regex_161_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2058,25 +1590,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_161 {}; public: class regex_162_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_161 {}; public: template class regex_162_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_162_matcher() = default; public: regex_162_matcher(regex_162_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2084,25 +1610,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_162 {}; public: class regex_163_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_162 {}; public: template class regex_163_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_163_matcher() = default; public: regex_163_matcher(regex_163_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2110,25 +1630,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_163 {}; public: class regex_164_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_163 {}; public: template class regex_164_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_164_matcher() = default; public: regex_164_matcher(regex_164_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2136,25 +1650,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_164 {}; public: class regex_165_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_164 {}; public: template class regex_165_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_165_matcher() = default; public: regex_165_matcher(regex_165_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2162,25 +1670,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_165 {}; public: class regex_166_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_165 {}; public: template class regex_166_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_166_matcher() = default; public: regex_166_matcher(regex_166_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2188,25 +1690,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_166 {}; public: class regex_167_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_166 {}; public: template class regex_167_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_167_matcher() = default; public: regex_167_matcher(regex_167_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2214,25 +1710,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_167 {}; public: class regex_168_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_167 {}; public: template class regex_168_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_168_matcher() = default; public: regex_168_matcher(regex_168_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2240,25 +1730,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_168 {}; public: class regex_169_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_168 {}; public: template class regex_169_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_169_matcher() = default; public: regex_169_matcher(regex_169_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2266,25 +1750,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_169 {}; public: class regex_17_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_169 {}; public: template class regex_17_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_17_matcher() = default; public: regex_17_matcher(regex_17_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2292,25 +1770,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_17 {}; public: class regex_170_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_17 {}; public: template class regex_170_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_170_matcher() = default; public: regex_170_matcher(regex_170_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2318,25 +1790,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_170 {}; public: class regex_171_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_170 {}; public: template class regex_171_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_171_matcher() = default; public: regex_171_matcher(regex_171_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2344,25 +1810,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_171 {}; public: class regex_172_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_171 {}; public: template class regex_172_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_172_matcher() = default; public: regex_172_matcher(regex_172_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2370,25 +1830,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_172 {}; public: class regex_173_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_172 {}; public: template class regex_173_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_173_matcher() = default; public: regex_173_matcher(regex_173_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2396,25 +1850,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_173 {}; public: class regex_174_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_173 {}; public: template class regex_174_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_174_matcher() = default; public: regex_174_matcher(regex_174_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2422,25 +1870,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_174 {}; public: class regex_175_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_174 {}; public: template class regex_175_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_175_matcher() = default; public: regex_175_matcher(regex_175_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2448,25 +1890,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_175 {}; public: class regex_176_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_175 {}; public: template class regex_176_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_176_matcher() = default; public: regex_176_matcher(regex_176_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2474,25 +1910,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_176 {}; public: class regex_177_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_176 {}; public: template class regex_177_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_177_matcher() = default; public: regex_177_matcher(regex_177_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2500,25 +1930,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_177 {}; public: class regex_178_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_177 {}; public: template class regex_178_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; - public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_178_matcher() = default; public: regex_178_matcher(regex_178_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2526,25 +1950,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_178 {}; public: class regex_179_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_178 {}; public: template class regex_179_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_179_matcher() = default; public: regex_179_matcher(regex_179_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2552,25 +1970,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_179 {}; public: class regex_18_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_179 {}; public: template class regex_18_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_18_matcher() = default; public: regex_18_matcher(regex_18_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2578,25 +1990,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_18 {}; public: class regex_180_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_18 {}; public: template class regex_180_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_180_matcher() = default; public: regex_180_matcher(regex_180_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2604,25 +2010,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_180 {}; public: class regex_181_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_180 {}; public: template class regex_181_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_181_matcher() = default; public: regex_181_matcher(regex_181_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2630,25 +2030,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_181 {}; public: class regex_182_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_181 {}; public: template class regex_182_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_182_matcher() = default; public: regex_182_matcher(regex_182_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2656,25 +2050,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_182 {}; public: class regex_183_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_182 {}; public: template class regex_183_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_183_matcher() = default; public: regex_183_matcher(regex_183_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2682,25 +2070,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_183 {}; public: class regex_184_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_183 {}; public: template class regex_184_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_184_matcher() = default; public: regex_184_matcher(regex_184_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2708,25 +2090,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_184 {}; public: class regex_185_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_184 {}; public: template class regex_185_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_185_matcher() = default; public: regex_185_matcher(regex_185_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2734,25 +2110,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_185 {}; public: class regex_186_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_185 {}; public: template class regex_186_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_186_matcher() = default; public: regex_186_matcher(regex_186_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2760,25 +2130,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_186 {}; public: class regex_187_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_186 {}; public: template class regex_187_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_187_matcher() = default; public: regex_187_matcher(regex_187_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2786,25 +2150,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_187 {}; public: class regex_188_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_187 {}; public: template class regex_188_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_188_matcher() = default; public: regex_188_matcher(regex_188_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2812,25 +2170,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_188 {}; public: class regex_189_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_188 {}; public: template class regex_189_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_189_matcher() = default; public: regex_189_matcher(regex_189_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2838,25 +2190,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_189 {}; public: class regex_19_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_189 {}; public: template class regex_19_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_19_matcher() = default; public: regex_19_matcher(regex_19_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2864,25 +2210,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_19 {}; public: class regex_190_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_19 {}; public: template class regex_190_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_190_matcher() = default; public: regex_190_matcher(regex_190_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2890,25 +2230,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_190 {}; public: class regex_191_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_190 {}; public: template class regex_191_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_191_matcher() = default; public: regex_191_matcher(regex_191_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2916,25 +2250,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_191 {}; public: class regex_192_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_191 {}; public: template class regex_192_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_192_matcher() = default; public: regex_192_matcher(regex_192_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2942,25 +2270,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_192 {}; public: class regex_193_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_192 {}; public: template class regex_193_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_193_matcher() = default; public: regex_193_matcher(regex_193_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2968,25 +2290,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_193 {}; public: class regex_194_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_193 {}; public: template class regex_194_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_194_matcher() = default; public: regex_194_matcher(regex_194_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2994,25 +2310,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_194 {}; public: class regex_195_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_194 {}; public: template class regex_195_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_195_matcher() = default; public: regex_195_matcher(regex_195_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -3020,25 +2330,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_195 {}; public: class regex_196_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_195 {}; public: template class regex_196_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_196_matcher() = default; public: regex_196_matcher(regex_196_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -3046,25 +2350,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_196 {}; public: class regex_197_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_196 {}; public: template class regex_197_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_197_matcher() = default; public: regex_197_matcher(regex_197_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -3072,25 +2370,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_197 {}; public: class regex_198_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_197 {}; public: template class regex_198_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_198_matcher() = default; public: regex_198_matcher(regex_198_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -3098,25 +2390,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_198 {}; public: class regex_199_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_198 {}; public: template class regex_199_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_199_matcher() = default; public: regex_199_matcher(regex_199_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -3124,25 +2410,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_199 {}; public: class regex_20_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_199 {}; public: template class regex_20_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_20_matcher() = default; public: regex_20_matcher(regex_20_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -3150,25 +2430,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_20 {}; public: class regex_21_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_20 {}; public: template class regex_21_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_21_matcher() = default; public: regex_21_matcher(regex_21_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -3176,25 +2450,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_21 {}; public: class regex_22_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_21 {}; public: template class regex_22_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_22_matcher() = default; public: regex_22_matcher(regex_22_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -3202,25 +2470,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_22 {}; public: class regex_23_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_22 {}; public: template class regex_23_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_23_matcher() = default; public: regex_23_matcher(regex_23_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -3228,25 +2490,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_23 {}; public: class regex_24_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_23 {}; public: template class regex_24_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_24_matcher() = default; public: regex_24_matcher(regex_24_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -3254,25 +2510,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_24 {}; public: class regex_25_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_24 {}; public: template class regex_25_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_25_matcher() = default; public: regex_25_matcher(regex_25_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -3280,25 +2530,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_25 {}; public: class regex_26_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_25 {}; public: template class regex_26_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_26_matcher() = default; public: regex_26_matcher(regex_26_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -3306,25 +2550,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_26 {}; public: class regex_27_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_26 {}; public: template class regex_27_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_27_matcher() = default; public: regex_27_matcher(regex_27_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -3332,25 +2570,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_27 {}; public: class regex_28_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_27 {}; public: template class regex_28_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_28_matcher() = default; public: regex_28_matcher(regex_28_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -3358,25 +2590,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_28 {}; public: class regex_29_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_28 {}; public: template class regex_29_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_29_matcher() = default; public: regex_29_matcher(regex_29_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -3384,25 +2610,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_29 {}; public: class regex_30_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_29 {}; public: template class regex_30_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_30_matcher() = default; public: regex_30_matcher(regex_30_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -3410,25 +2630,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_30 {}; public: class regex_31_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_30 {}; public: template class regex_31_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_31_matcher() = default; public: regex_31_matcher(regex_31_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -3436,25 +2650,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_31 {}; public: class regex_32_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_31 {}; public: template class regex_32_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_32_matcher() = default; public: regex_32_matcher(regex_32_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -3462,25 +2670,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_32 {}; public: class regex_33_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_32 {}; public: template class regex_33_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_33_matcher() = default; public: regex_33_matcher(regex_33_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -3488,25 +2690,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_33 {}; public: class regex_34_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_33 {}; public: template class regex_34_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_34_matcher() = default; public: regex_34_matcher(regex_34_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -3514,25 +2710,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_34 {}; public: class regex_35_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_34 {}; public: template class regex_35_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_35_matcher() = default; public: regex_35_matcher(regex_35_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -3540,25 +2730,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_35 {}; public: class regex_36_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_35 {}; public: template class regex_36_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_36_matcher() = default; public: regex_36_matcher(regex_36_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -3566,25 +2750,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_36 {}; public: class regex_37_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_36 {}; public: template class regex_37_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_37_matcher() = default; public: regex_37_matcher(regex_37_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -3592,25 +2770,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_37 {}; public: class regex_38_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_37 {}; public: template class regex_38_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_38_matcher() = default; public: regex_38_matcher(regex_38_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -3618,25 +2790,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_38 {}; public: class regex_39_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_38 {}; public: template class regex_39_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_39_matcher() = default; public: regex_39_matcher(regex_39_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -3644,25 +2810,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_39 {}; public: class regex_40_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_39 {}; public: template class regex_40_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_40_matcher() = default; public: regex_40_matcher(regex_40_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -3670,25 +2830,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_40 {}; public: class regex_41_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_40 {}; public: template class regex_41_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_41_matcher() = default; public: regex_41_matcher(regex_41_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -3696,25 +2850,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_41 {}; public: class regex_42_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_41 {}; public: template class regex_42_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_42_matcher() = default; public: regex_42_matcher(regex_42_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -3722,25 +2870,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_42 {}; public: class regex_43_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_42 {}; public: template class regex_43_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_43_matcher() = default; public: regex_43_matcher(regex_43_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -3748,25 +2890,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_43 {}; public: class regex_44_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_43 {}; public: template class regex_44_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_44_matcher() = default; public: regex_44_matcher(regex_44_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -3774,25 +2910,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_44 {}; public: class regex_45_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_44 {}; public: template class regex_45_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_45_matcher() = default; public: regex_45_matcher(regex_45_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -3800,25 +2930,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_45 {}; public: class regex_46_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_45 {}; public: template class regex_46_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_46_matcher() = default; public: regex_46_matcher(regex_46_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -3826,25 +2950,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_46 {}; public: class regex_47_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_46 {}; public: template class regex_47_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_47_matcher() = default; public: regex_47_matcher(regex_47_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -3852,25 +2970,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_47 {}; public: class regex_48_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_47 {}; public: template class regex_48_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_48_matcher() = default; public: regex_48_matcher(regex_48_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -3878,25 +2990,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_48 {}; public: class regex_49_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_48 {}; public: template class regex_49_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_49_matcher() = default; public: regex_49_matcher(regex_49_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -3904,25 +3010,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_49 {}; public: class regex_50_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_49 {}; public: template class regex_50_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_50_matcher() = default; public: regex_50_matcher(regex_50_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -3930,25 +3030,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_50 {}; public: class regex_51_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_50 {}; public: template class regex_51_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_51_matcher() = default; public: regex_51_matcher(regex_51_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -3956,25 +3050,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_51 {}; public: class regex_52_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_51 {}; public: template class regex_52_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_52_matcher() = default; public: regex_52_matcher(regex_52_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -3982,25 +3070,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_52 {}; public: class regex_53_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_52 {}; public: template class regex_53_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_53_matcher() = default; public: regex_53_matcher(regex_53_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -4008,25 +3090,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_53 {}; public: class regex_54_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_53 {}; public: template class regex_54_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_54_matcher() = default; public: regex_54_matcher(regex_54_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -4034,25 +3110,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_54 {}; public: class regex_55_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_54 {}; public: template class regex_55_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_55_matcher() = default; public: regex_55_matcher(regex_55_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -4060,25 +3130,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_55 {}; public: class regex_56_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_55 {}; public: template class regex_56_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_56_matcher() = default; public: regex_56_matcher(regex_56_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -4086,25 +3150,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_56 {}; public: class regex_57_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_56 {}; public: template class regex_57_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_57_matcher() = default; public: regex_57_matcher(regex_57_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -4112,25 +3170,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_57 {}; public: class regex_58_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_57 {}; public: template class regex_58_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_58_matcher() = default; public: regex_58_matcher(regex_58_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -4138,25 +3190,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_58 {}; public: class regex_59_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_58 {}; public: template class regex_59_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_59_matcher() = default; public: regex_59_matcher(regex_59_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -4164,25 +3210,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_59 {}; public: class regex_60_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_59 {}; public: template class regex_60_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_60_matcher() = default; public: regex_60_matcher(regex_60_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -4190,25 +3230,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_60 {}; public: class regex_61_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_60 {}; public: template class regex_61_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_61_matcher() = default; public: regex_61_matcher(regex_61_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -4216,25 +3250,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_61 {}; public: class regex_62_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_61 {}; public: template class regex_62_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_62_matcher() = default; public: regex_62_matcher(regex_62_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -4242,25 +3270,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_62 {}; public: class regex_63_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_62 {}; public: template class regex_63_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_63_matcher() = default; public: regex_63_matcher(regex_63_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -4268,25 +3290,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_63 {}; public: class regex_64_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_63 {}; public: template class regex_64_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_64_matcher() = default; public: regex_64_matcher(regex_64_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -4294,25 +3310,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_64 {}; public: class regex_65_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_64 {}; public: template class regex_65_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_65_matcher() = default; public: regex_65_matcher(regex_65_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -4320,25 +3330,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_65 {}; public: class regex_66_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_65 {}; public: template class regex_66_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_66_matcher() = default; public: regex_66_matcher(regex_66_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -4346,25 +3350,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_66 {}; public: class regex_67_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_66 {}; public: template class regex_67_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_67_matcher() = default; public: regex_67_matcher(regex_67_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -4372,25 +3370,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_67 {}; public: class regex_68_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_67 {}; public: template class regex_68_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_68_matcher() = default; public: regex_68_matcher(regex_68_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -4398,25 +3390,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_68 {}; public: class regex_69_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_68 {}; public: template class regex_69_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_69_matcher() = default; public: regex_69_matcher(regex_69_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -4424,25 +3410,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_69 {}; public: class regex_70_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_69 {}; public: template class regex_70_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_70_matcher() = default; public: regex_70_matcher(regex_70_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -4450,25 +3430,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_70 {}; public: class regex_71_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_70 {}; public: template class regex_71_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_71_matcher() = default; public: regex_71_matcher(regex_71_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -4476,25 +3450,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_71 {}; public: class regex_72_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_71 {}; public: template class regex_72_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_72_matcher() = default; public: regex_72_matcher(regex_72_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -4502,25 +3470,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_72 {}; public: class regex_73_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_72 {}; public: template class regex_73_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_73_matcher() = default; public: regex_73_matcher(regex_73_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -4528,25 +3490,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_73 {}; public: class regex_74_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_73 {}; public: template class regex_74_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_74_matcher() = default; public: regex_74_matcher(regex_74_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -4554,25 +3510,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_74 {}; public: class regex_75_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_74 {}; public: template class regex_75_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_75_matcher() = default; public: regex_75_matcher(regex_75_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -4580,25 +3530,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_75 {}; public: class regex_76_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_75 {}; public: template class regex_76_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_76_matcher() = default; public: regex_76_matcher(regex_76_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -4606,25 +3550,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_76 {}; public: class regex_77_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_76 {}; public: template class regex_77_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_77_matcher() = default; public: regex_77_matcher(regex_77_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -4632,25 +3570,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_77 {}; public: class regex_78_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_77 {}; public: template class regex_78_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_78_matcher() = default; public: regex_78_matcher(regex_78_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -4658,25 +3590,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_78 {}; public: class regex_79_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_78 {}; public: template class regex_79_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_79_matcher() = default; public: regex_79_matcher(regex_79_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -4684,25 +3610,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_79 {}; public: class regex_80_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_79 {}; public: template class regex_80_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_80_matcher() = default; public: regex_80_matcher(regex_80_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -4710,25 +3630,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_80 {}; public: class regex_81_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_80 {}; public: template class regex_81_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_81_matcher() = default; public: regex_81_matcher(regex_81_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -4736,25 +3650,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_81 {}; public: class regex_82_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_81 {}; public: template class regex_82_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_82_matcher() = default; public: regex_82_matcher(regex_82_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -4762,25 +3670,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_82 {}; public: class regex_83_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_82 {}; public: template class regex_83_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_83_matcher() = default; public: regex_83_matcher(regex_83_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -4788,25 +3690,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_83 {}; public: class regex_84_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_83 {}; public: template class regex_84_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_84_matcher() = default; public: regex_84_matcher(regex_84_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -4814,25 +3710,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_84 {}; public: class regex_85_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_84 {}; public: template class regex_85_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_85_matcher() = default; public: regex_85_matcher(regex_85_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -4840,25 +3730,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_85 {}; public: class regex_86_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_85 {}; public: template class regex_86_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_86_matcher() = default; public: regex_86_matcher(regex_86_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -4866,25 +3750,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_86 {}; public: class regex_87_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_86 {}; public: template class regex_87_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_87_matcher() = default; public: regex_87_matcher(regex_87_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -4892,25 +3770,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_87 {}; public: class regex_88_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_87 {}; public: template class regex_88_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_88_matcher() = default; public: regex_88_matcher(regex_88_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -4918,25 +3790,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_88 {}; public: class regex_89_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_88 {}; public: template class regex_89_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_89_matcher() = default; public: regex_89_matcher(regex_89_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -4944,25 +3810,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_89 {}; public: class regex_90_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_89 {}; public: template class regex_90_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_90_matcher() = default; public: regex_90_matcher(regex_90_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -4970,25 +3830,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_90 {}; public: class regex_91_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_90 {}; public: template class regex_91_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_91_matcher() = default; public: regex_91_matcher(regex_91_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -4996,25 +3850,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_91 {}; public: class regex_92_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_91 {}; public: template class regex_92_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_92_matcher() = default; public: regex_92_matcher(regex_92_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -5022,25 +3870,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_92 {}; public: class regex_93_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_92 {}; public: template class regex_93_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_93_matcher() = default; public: regex_93_matcher(regex_93_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -5048,25 +3890,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_93 {}; public: class regex_94_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_93 {}; public: template class regex_94_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_94_matcher() = default; public: regex_94_matcher(regex_94_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -5074,25 +3910,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_94 {}; public: class regex_95_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_94 {}; public: template class regex_95_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_95_matcher() = default; public: regex_95_matcher(regex_95_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -5100,25 +3930,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_95 {}; public: class regex_96_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_95 {}; public: template class regex_96_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_96_matcher() = default; public: regex_96_matcher(regex_96_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -5126,25 +3950,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_96 {}; public: class regex_97_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_96 {}; public: template class regex_97_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_97_matcher() = default; public: regex_97_matcher(regex_97_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -5152,25 +3970,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_97 {}; public: class regex_98_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_97 {}; public: template class regex_98_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_98_matcher() = default; public: regex_98_matcher(regex_98_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -5178,25 +3990,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_98 {}; public: class regex_99_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_98 {}; public: template class regex_99_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_99_matcher() = default; public: regex_99_matcher(regex_99_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -5204,13 +4010,13 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_99 {}; + public: cpp2::regex::regular_expression> regex_99 {}; public: test_tests_14_multiline_modifier() = default; public: test_tests_14_multiline_modifier(test_tests_14_multiline_modifier const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(test_tests_14_multiline_modifier const&) -> void = delete; -#line 568 "pure2-regex_14_multiline_modifier.cpp2" +#line 569 "pure2-regex_14_multiline_modifier.cpp2" }; auto main() -> int; @@ -5314,6 +4120,7 @@ auto main() -> int; } result += std::to_string(cpp2::move(pos)); } + ++next; } else { std::cerr << "Not implemented"; @@ -5329,7 +4136,7 @@ auto main() -> int; return result; } -#line 112 "pure2-regex_14_multiline_modifier.cpp2" +#line 113 "pure2-regex_14_multiline_modifier.cpp2" [[nodiscard]] auto sanitize(std::string str) -> std::string { str = cpp2::string_util::replace_all(str, "\a", "\\a"); @@ -5342,7 +4149,7 @@ auto main() -> int; return cpp2::move(str); } -#line 124 "pure2-regex_14_multiline_modifier.cpp2" +#line 125 "pure2-regex_14_multiline_modifier.cpp2" template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, cpp2::impl::in resultExpected) -> void{ @@ -5383,7 +4190,7 @@ template auto test(M const& regex, cpp2::impl::in id, c std::cout << "" + cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(sanitize(str)) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(sanitize(resultExpected)) + "" << std::endl; } -#line 365 "pure2-regex_14_multiline_modifier.cpp2" +#line 366 "pure2-regex_14_multiline_modifier.cpp2" auto test_tests_14_multiline_modifier::run() const& -> void{ std::cout << "Running tests_14_multiline_modifier:" << std::endl; test(regex_01, "01", R"(\Z)", "a\nb\n", "y", R"($-[0])", "3"); @@ -5591,8 +4398,7 @@ template auto test(M const& regex, cpp2::impl::in id, c - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_01_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_01_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5607,10 +4413,11 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_01_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_01_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -5618,19 +4425,19 @@ template auto test(M const& regex, cpp2::impl::in id, c return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_01_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_01_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_01_matcher::to_string() -> std::string{return R"(\Z)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_01_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_01_matcher::to_string() -> std::string{return R"(\Z)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_02_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_02_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5645,10 +4452,11 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_02_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_02_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -5656,19 +4464,19 @@ template auto test(M const& regex, cpp2::impl::in id, c return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_02_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_02_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_02_matcher::to_string() -> std::string{return R"(\z)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_02_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_02_matcher::to_string() -> std::string{return R"(\z)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_03_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_03_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5683,10 +4491,11 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_03_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_03_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -5694,19 +4503,19 @@ template auto test(M const& regex, cpp2::impl::in id, c return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_03_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_03_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_03_matcher::to_string() -> std::string{return R"($)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_03_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_03_matcher::to_string() -> std::string{return R"($)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_04_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_04_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5721,10 +4530,11 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_04_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_04_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -5732,19 +4542,19 @@ template auto test(M const& regex, cpp2::impl::in id, c return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_04_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_04_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_04_matcher::to_string() -> std::string{return R"(\Z)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_04_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_04_matcher::to_string() -> std::string{return R"(\Z)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_05_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_05_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5759,10 +4569,11 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_05_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_05_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -5770,19 +4581,19 @@ template auto test(M const& regex, cpp2::impl::in id, c return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_05_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_05_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_05_matcher::to_string() -> std::string{return R"(\z)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_05_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_05_matcher::to_string() -> std::string{return R"(\z)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_06_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_06_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5797,10 +4608,11 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_06_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_06_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -5808,19 +4620,19 @@ template auto test(M const& regex, cpp2::impl::in id, c return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_06_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_06_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_06_matcher::to_string() -> std::string{return R"($)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_06_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_06_matcher::to_string() -> std::string{return R"($)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_07_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_07_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5835,10 +4647,11 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_07_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_07_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -5846,19 +4659,19 @@ template auto test(M const& regex, cpp2::impl::in id, c return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_07_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_07_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_07_matcher::to_string() -> std::string{return R"(\Z)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_07_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_07_matcher::to_string() -> std::string{return R"(\Z)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_08_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_08_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5873,10 +4686,11 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_08_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_08_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -5884,19 +4698,19 @@ template auto test(M const& regex, cpp2::impl::in id, c return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_08_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_08_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_08_matcher::to_string() -> std::string{return R"(\z)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_08_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_08_matcher::to_string() -> std::string{return R"(\z)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_09_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_09_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5911,10 +4725,11 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_09_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_09_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -5922,19 +4737,19 @@ template auto test(M const& regex, cpp2::impl::in id, c return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_09_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_09_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_09_matcher::to_string() -> std::string{return R"($)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_09_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_09_matcher::to_string() -> std::string{return R"($)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_10_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_10_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5949,10 +4764,11 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_10_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_10_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -5960,19 +4776,19 @@ template auto test(M const& regex, cpp2::impl::in id, c return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_10_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_10_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_10_matcher::to_string() -> std::string{return R"('\Z'm)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_10_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_10_matcher::to_string() -> std::string{return R"('\Z'm)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_100_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_100_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6001,10 +4817,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_100_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_100_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -6012,19 +4829,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_100_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_100_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_100_matcher::to_string() -> std::string{return R"('ab\Z'm)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_100_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_100_matcher::to_string() -> std::string{return R"('ab\Z'm)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_101_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_101_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6053,10 +4870,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_101_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_101_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -6064,19 +4882,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_101_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_101_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_101_matcher::to_string() -> std::string{return R"('ab\z'm)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_101_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_101_matcher::to_string() -> std::string{return R"('ab\z'm)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_102_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_102_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6105,10 +4923,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_102_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_102_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -6116,19 +4935,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_102_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_102_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_102_matcher::to_string() -> std::string{return R"('ab$'m)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_102_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_102_matcher::to_string() -> std::string{return R"('ab$'m)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_103_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_103_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6157,10 +4976,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_103_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_103_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -6168,19 +4988,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_103_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_103_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_103_matcher::to_string() -> std::string{return R"('ab\Z'm)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_103_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_103_matcher::to_string() -> std::string{return R"('ab\Z'm)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_104_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_104_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6209,10 +5029,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_104_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_104_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -6220,19 +5041,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_104_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_104_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_104_matcher::to_string() -> std::string{return R"('ab\z'm)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_104_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_104_matcher::to_string() -> std::string{return R"('ab\z'm)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_105_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_105_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6261,10 +5082,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_105_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_105_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -6272,19 +5094,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_105_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_105_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_105_matcher::to_string() -> std::string{return R"('ab$'m)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_105_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_105_matcher::to_string() -> std::string{return R"('ab$'m)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_106_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_106_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6313,10 +5135,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_106_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_106_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -6324,19 +5147,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_106_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_106_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_106_matcher::to_string() -> std::string{return R"('ab\Z'm)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_106_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_106_matcher::to_string() -> std::string{return R"('ab\Z'm)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_107_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_107_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6365,10 +5188,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_107_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_107_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -6376,19 +5200,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_107_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_107_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_107_matcher::to_string() -> std::string{return R"('ab\z'm)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_107_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_107_matcher::to_string() -> std::string{return R"('ab\z'm)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_108_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_108_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6417,10 +5241,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_108_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_108_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -6428,19 +5253,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_108_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_108_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_108_matcher::to_string() -> std::string{return R"('ab$'m)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_108_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_108_matcher::to_string() -> std::string{return R"('ab$'m)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_109_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_109_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6469,10 +5294,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_109_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_109_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -6480,19 +5306,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_109_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_109_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_109_matcher::to_string() -> std::string{return R"(ab\Z)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_109_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_109_matcher::to_string() -> std::string{return R"(ab\Z)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_11_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_11_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6507,10 +5333,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_11_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_11_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -6518,19 +5345,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_11_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_11_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_11_matcher::to_string() -> std::string{return R"('\z'm)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_11_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_11_matcher::to_string() -> std::string{return R"('\z'm)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_110_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_110_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6559,10 +5386,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_110_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_110_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -6570,19 +5398,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_110_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_110_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_110_matcher::to_string() -> std::string{return R"(ab\z)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_110_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_110_matcher::to_string() -> std::string{return R"(ab\z)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_111_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_111_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6611,10 +5439,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_111_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_111_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -6622,19 +5451,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_111_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_111_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_111_matcher::to_string() -> std::string{return R"(ab$)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_111_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_111_matcher::to_string() -> std::string{return R"(ab$)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_112_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_112_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6663,10 +5492,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_112_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_112_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -6674,19 +5504,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_112_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_112_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_112_matcher::to_string() -> std::string{return R"(ab\Z)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_112_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_112_matcher::to_string() -> std::string{return R"(ab\Z)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_113_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_113_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6715,10 +5545,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_113_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_113_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -6726,19 +5557,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_113_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_113_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_113_matcher::to_string() -> std::string{return R"(ab\z)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_113_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_113_matcher::to_string() -> std::string{return R"(ab\z)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_114_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_114_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6767,10 +5598,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_114_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_114_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -6778,19 +5610,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_114_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_114_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_114_matcher::to_string() -> std::string{return R"(ab$)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_114_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_114_matcher::to_string() -> std::string{return R"(ab$)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_115_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_115_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6819,10 +5651,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_115_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_115_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -6830,19 +5663,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_115_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_115_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_115_matcher::to_string() -> std::string{return R"(ab\Z)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_115_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_115_matcher::to_string() -> std::string{return R"(ab\Z)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_116_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_116_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6871,10 +5704,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_116_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_116_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -6882,19 +5716,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_116_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_116_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_116_matcher::to_string() -> std::string{return R"(ab\z)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_116_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_116_matcher::to_string() -> std::string{return R"(ab\z)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_117_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_117_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6923,10 +5757,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_117_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_117_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -6934,19 +5769,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_117_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_117_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_117_matcher::to_string() -> std::string{return R"(ab$)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_117_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_117_matcher::to_string() -> std::string{return R"(ab$)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_118_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_118_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6975,10 +5810,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_118_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_118_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -6986,19 +5822,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_118_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_118_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_118_matcher::to_string() -> std::string{return R"('ab\Z'm)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_118_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_118_matcher::to_string() -> std::string{return R"('ab\Z'm)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_119_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_119_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7027,10 +5863,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_119_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_119_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -7038,19 +5875,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_119_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_119_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_119_matcher::to_string() -> std::string{return R"('ab\z'm)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_119_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_119_matcher::to_string() -> std::string{return R"('ab\z'm)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_12_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_12_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7065,10 +5902,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_12_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_12_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -7076,19 +5914,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_12_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_12_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_12_matcher::to_string() -> std::string{return R"('$'m)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_12_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_12_matcher::to_string() -> std::string{return R"('$'m)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_120_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_120_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7117,10 +5955,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_120_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_120_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -7128,19 +5967,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_120_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_120_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_120_matcher::to_string() -> std::string{return R"('ab$'m)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_120_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_120_matcher::to_string() -> std::string{return R"('ab$'m)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_121_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_121_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7169,10 +6008,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_121_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_121_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -7180,19 +6020,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_121_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_121_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_121_matcher::to_string() -> std::string{return R"('ab\Z'm)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_121_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_121_matcher::to_string() -> std::string{return R"('ab\Z'm)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_122_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_122_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7221,10 +6061,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_122_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_122_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -7232,19 +6073,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_122_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_122_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_122_matcher::to_string() -> std::string{return R"('ab\z'm)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_122_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_122_matcher::to_string() -> std::string{return R"('ab\z'm)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_123_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_123_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7273,10 +6114,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_123_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_123_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -7284,19 +6126,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_123_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_123_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_123_matcher::to_string() -> std::string{return R"('ab$'m)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_123_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_123_matcher::to_string() -> std::string{return R"('ab$'m)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_124_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_124_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7325,10 +6167,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_124_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_124_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -7336,19 +6179,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_124_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_124_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_124_matcher::to_string() -> std::string{return R"('ab\Z'm)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_124_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_124_matcher::to_string() -> std::string{return R"('ab\Z'm)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_125_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_125_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7377,10 +6220,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_125_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_125_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -7388,19 +6232,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_125_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_125_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_125_matcher::to_string() -> std::string{return R"('ab\z'm)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_125_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_125_matcher::to_string() -> std::string{return R"('ab\z'm)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_126_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_126_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7429,10 +6273,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_126_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_126_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -7440,19 +6285,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_126_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_126_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_126_matcher::to_string() -> std::string{return R"('ab$'m)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_126_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_126_matcher::to_string() -> std::string{return R"('ab$'m)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_127_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_127_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7481,10 +6326,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_127_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_127_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -7492,19 +6338,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_127_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_127_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_127_matcher::to_string() -> std::string{return R"(ab\Z)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_127_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_127_matcher::to_string() -> std::string{return R"(ab\Z)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_128_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_128_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7533,10 +6379,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_128_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_128_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -7544,19 +6391,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_128_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_128_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_128_matcher::to_string() -> std::string{return R"(ab\z)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_128_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_128_matcher::to_string() -> std::string{return R"(ab\z)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_129_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_129_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7585,10 +6432,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_129_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_129_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -7596,19 +6444,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_129_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_129_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_129_matcher::to_string() -> std::string{return R"(ab$)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_129_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_129_matcher::to_string() -> std::string{return R"(ab$)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_13_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_13_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7623,10 +6471,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_13_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_13_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -7634,19 +6483,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_13_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_13_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_13_matcher::to_string() -> std::string{return R"('\Z'm)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_13_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_13_matcher::to_string() -> std::string{return R"('\Z'm)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_130_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_130_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7675,10 +6524,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_130_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_130_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -7686,19 +6536,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_130_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_130_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_130_matcher::to_string() -> std::string{return R"(ab\Z)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_130_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_130_matcher::to_string() -> std::string{return R"(ab\Z)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_131_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_131_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7727,10 +6577,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_131_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_131_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -7738,19 +6589,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_131_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_131_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_131_matcher::to_string() -> std::string{return R"(ab\z)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_131_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_131_matcher::to_string() -> std::string{return R"(ab\z)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_132_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_132_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7779,10 +6630,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_132_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_132_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -7790,19 +6642,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_132_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_132_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_132_matcher::to_string() -> std::string{return R"(ab$)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_132_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_132_matcher::to_string() -> std::string{return R"(ab$)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_133_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_133_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7831,10 +6683,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_133_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_133_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -7842,19 +6695,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_133_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_133_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_133_matcher::to_string() -> std::string{return R"(ab\Z)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_133_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_133_matcher::to_string() -> std::string{return R"(ab\Z)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_134_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_134_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7883,10 +6736,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_134_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_134_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -7894,19 +6748,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_134_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_134_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_134_matcher::to_string() -> std::string{return R"(ab\z)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_134_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_134_matcher::to_string() -> std::string{return R"(ab\z)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_135_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_135_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7935,10 +6789,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_135_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_135_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -7946,19 +6801,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_135_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_135_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_135_matcher::to_string() -> std::string{return R"(ab$)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_135_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_135_matcher::to_string() -> std::string{return R"(ab$)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_136_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_136_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7987,10 +6842,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_136_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_136_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -7998,19 +6854,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_136_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_136_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_136_matcher::to_string() -> std::string{return R"('ab\Z'm)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_136_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_136_matcher::to_string() -> std::string{return R"('ab\Z'm)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_137_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_137_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8039,10 +6895,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_137_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_137_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -8050,19 +6907,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_137_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_137_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_137_matcher::to_string() -> std::string{return R"('ab\z'm)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_137_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_137_matcher::to_string() -> std::string{return R"('ab\z'm)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_138_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_138_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8091,10 +6948,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_138_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_138_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -8102,19 +6960,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_138_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_138_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_138_matcher::to_string() -> std::string{return R"('ab$'m)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_138_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_138_matcher::to_string() -> std::string{return R"('ab$'m)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_139_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_139_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8143,10 +7001,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_139_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_139_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -8154,19 +7013,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_139_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_139_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_139_matcher::to_string() -> std::string{return R"('ab\Z'm)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_139_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_139_matcher::to_string() -> std::string{return R"('ab\Z'm)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_14_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_14_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8181,10 +7040,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_14_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_14_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -8192,19 +7052,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_14_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_14_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_14_matcher::to_string() -> std::string{return R"('\z'm)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_14_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_14_matcher::to_string() -> std::string{return R"('\z'm)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_140_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_140_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8233,10 +7093,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_140_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_140_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -8244,19 +7105,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_140_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_140_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_140_matcher::to_string() -> std::string{return R"('ab\z'm)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_140_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_140_matcher::to_string() -> std::string{return R"('ab\z'm)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_141_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_141_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8285,10 +7146,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_141_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_141_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -8296,19 +7158,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_141_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_141_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_141_matcher::to_string() -> std::string{return R"('ab$'m)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_141_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_141_matcher::to_string() -> std::string{return R"('ab$'m)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_142_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_142_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8337,10 +7199,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_142_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_142_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -8348,19 +7211,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_142_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_142_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_142_matcher::to_string() -> std::string{return R"('ab\Z'm)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_142_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_142_matcher::to_string() -> std::string{return R"('ab\Z'm)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_143_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_143_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8389,10 +7252,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_143_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_143_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -8400,19 +7264,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_143_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_143_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_143_matcher::to_string() -> std::string{return R"('ab\z'm)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_143_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_143_matcher::to_string() -> std::string{return R"('ab\z'm)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_144_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_144_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8441,10 +7305,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_144_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_144_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -8452,19 +7317,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_144_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_144_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_144_matcher::to_string() -> std::string{return R"('ab$'m)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_144_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_144_matcher::to_string() -> std::string{return R"('ab$'m)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_145_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_145_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8493,10 +7358,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_145_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_145_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -8504,19 +7370,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_145_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_145_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_145_matcher::to_string() -> std::string{return R"(abb\Z)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_145_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_145_matcher::to_string() -> std::string{return R"(abb\Z)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_146_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_146_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8545,10 +7411,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_146_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_146_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -8556,19 +7423,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_146_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_146_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_146_matcher::to_string() -> std::string{return R"(abb\z)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_146_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_146_matcher::to_string() -> std::string{return R"(abb\z)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_147_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_147_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8597,10 +7464,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_147_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_147_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -8608,19 +7476,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_147_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_147_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_147_matcher::to_string() -> std::string{return R"(abb$)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_147_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_147_matcher::to_string() -> std::string{return R"(abb$)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_148_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_148_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8649,10 +7517,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_148_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_148_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -8660,19 +7529,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_148_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_148_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_148_matcher::to_string() -> std::string{return R"(abb\Z)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_148_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_148_matcher::to_string() -> std::string{return R"(abb\Z)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_149_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_149_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8701,10 +7570,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_149_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_149_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -8712,19 +7582,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_149_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_149_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_149_matcher::to_string() -> std::string{return R"(abb\z)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_149_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_149_matcher::to_string() -> std::string{return R"(abb\z)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_15_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_15_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8739,10 +7609,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_15_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_15_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -8750,19 +7621,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_15_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_15_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_15_matcher::to_string() -> std::string{return R"('$'m)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_15_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_15_matcher::to_string() -> std::string{return R"('$'m)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_150_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_150_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8791,10 +7662,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_150_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_150_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -8802,19 +7674,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_150_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_150_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_150_matcher::to_string() -> std::string{return R"(abb$)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_150_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_150_matcher::to_string() -> std::string{return R"(abb$)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_151_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_151_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8843,10 +7715,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_151_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_151_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -8854,19 +7727,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_151_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_151_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_151_matcher::to_string() -> std::string{return R"(abb\Z)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_151_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_151_matcher::to_string() -> std::string{return R"(abb\Z)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_152_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_152_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8895,10 +7768,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_152_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_152_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -8906,19 +7780,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_152_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_152_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_152_matcher::to_string() -> std::string{return R"(abb\z)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_152_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_152_matcher::to_string() -> std::string{return R"(abb\z)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_153_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_153_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8947,10 +7821,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_153_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_153_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -8958,19 +7833,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_153_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_153_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_153_matcher::to_string() -> std::string{return R"(abb$)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_153_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_153_matcher::to_string() -> std::string{return R"(abb$)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_154_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_154_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8999,10 +7874,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_154_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_154_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -9010,19 +7886,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_154_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_154_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_154_matcher::to_string() -> std::string{return R"('abb\Z'm)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_154_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_154_matcher::to_string() -> std::string{return R"('abb\Z'm)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_155_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_155_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9051,10 +7927,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_155_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_155_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -9062,19 +7939,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_155_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_155_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_155_matcher::to_string() -> std::string{return R"('abb\z'm)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_155_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_155_matcher::to_string() -> std::string{return R"('abb\z'm)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_156_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_156_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9103,10 +7980,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_156_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_156_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -9114,19 +7992,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_156_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_156_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_156_matcher::to_string() -> std::string{return R"('abb$'m)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_156_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_156_matcher::to_string() -> std::string{return R"('abb$'m)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_157_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_157_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9155,10 +8033,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_157_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_157_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -9166,19 +8045,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_157_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_157_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_157_matcher::to_string() -> std::string{return R"('abb\Z'm)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_157_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_157_matcher::to_string() -> std::string{return R"('abb\Z'm)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_158_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_158_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9207,10 +8086,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_158_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_158_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -9218,19 +8098,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_158_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_158_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_158_matcher::to_string() -> std::string{return R"('abb\z'm)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_158_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_158_matcher::to_string() -> std::string{return R"('abb\z'm)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_159_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_159_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9259,10 +8139,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_159_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_159_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -9270,19 +8151,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_159_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_159_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_159_matcher::to_string() -> std::string{return R"('abb$'m)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_159_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_159_matcher::to_string() -> std::string{return R"('abb$'m)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_16_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_16_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9297,10 +8178,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_16_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_16_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -9308,19 +8190,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_16_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_16_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_16_matcher::to_string() -> std::string{return R"('\Z'm)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_16_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_16_matcher::to_string() -> std::string{return R"('\Z'm)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_160_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_160_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9349,10 +8231,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_160_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_160_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -9360,19 +8243,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_160_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_160_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_160_matcher::to_string() -> std::string{return R"('abb\Z'm)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_160_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_160_matcher::to_string() -> std::string{return R"('abb\Z'm)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_161_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_161_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9401,10 +8284,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_161_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_161_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -9412,19 +8296,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_161_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_161_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_161_matcher::to_string() -> std::string{return R"('abb\z'm)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_161_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_161_matcher::to_string() -> std::string{return R"('abb\z'm)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_162_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_162_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9453,10 +8337,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_162_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_162_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -9464,19 +8349,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_162_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_162_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_162_matcher::to_string() -> std::string{return R"('abb$'m)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_162_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_162_matcher::to_string() -> std::string{return R"('abb$'m)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_163_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_163_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9505,10 +8390,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_163_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_163_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -9516,19 +8402,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_163_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_163_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_163_matcher::to_string() -> std::string{return R"(abb\Z)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_163_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_163_matcher::to_string() -> std::string{return R"(abb\Z)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_164_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_164_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9557,10 +8443,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_164_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_164_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -9568,19 +8455,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_164_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_164_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_164_matcher::to_string() -> std::string{return R"(abb\z)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_164_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_164_matcher::to_string() -> std::string{return R"(abb\z)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_165_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_165_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9609,10 +8496,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_165_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_165_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -9620,19 +8508,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_165_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_165_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_165_matcher::to_string() -> std::string{return R"(abb$)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_165_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_165_matcher::to_string() -> std::string{return R"(abb$)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_166_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_166_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9661,10 +8549,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_166_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_166_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -9672,19 +8561,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_166_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_166_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_166_matcher::to_string() -> std::string{return R"(abb\Z)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_166_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_166_matcher::to_string() -> std::string{return R"(abb\Z)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_167_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_167_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9713,10 +8602,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_167_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_167_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -9724,19 +8614,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_167_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_167_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_167_matcher::to_string() -> std::string{return R"(abb\z)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_167_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_167_matcher::to_string() -> std::string{return R"(abb\z)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_168_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_168_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9765,10 +8655,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_168_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_168_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -9776,19 +8667,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_168_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_168_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_168_matcher::to_string() -> std::string{return R"(abb$)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_168_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_168_matcher::to_string() -> std::string{return R"(abb$)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_169_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_169_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9817,10 +8708,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_169_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_169_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -9828,19 +8720,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_169_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_169_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_169_matcher::to_string() -> std::string{return R"(abb\Z)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_169_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_169_matcher::to_string() -> std::string{return R"(abb\Z)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_17_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_17_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9855,10 +8747,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_17_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_17_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -9866,19 +8759,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_17_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_17_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_17_matcher::to_string() -> std::string{return R"('\z'm)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_17_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_17_matcher::to_string() -> std::string{return R"('\z'm)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_170_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_170_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9907,10 +8800,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_170_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_170_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -9918,19 +8812,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_170_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_170_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_170_matcher::to_string() -> std::string{return R"(abb\z)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_170_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_170_matcher::to_string() -> std::string{return R"(abb\z)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_171_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_171_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9959,10 +8853,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_171_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_171_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -9970,19 +8865,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_171_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_171_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_171_matcher::to_string() -> std::string{return R"(abb$)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_171_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_171_matcher::to_string() -> std::string{return R"(abb$)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_172_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_172_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -10011,10 +8906,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_172_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_172_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -10022,19 +8918,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_172_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_172_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_172_matcher::to_string() -> std::string{return R"('abb\Z'm)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_172_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_172_matcher::to_string() -> std::string{return R"('abb\Z'm)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_173_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_173_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -10063,10 +8959,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_173_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_173_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -10074,19 +8971,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_173_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_173_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_173_matcher::to_string() -> std::string{return R"('abb\z'm)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_173_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_173_matcher::to_string() -> std::string{return R"('abb\z'm)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_174_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_174_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -10115,10 +9012,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_174_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_174_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -10126,19 +9024,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_174_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_174_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_174_matcher::to_string() -> std::string{return R"('abb$'m)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_174_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_174_matcher::to_string() -> std::string{return R"('abb$'m)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_175_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_175_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -10167,10 +9065,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_175_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_175_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -10178,19 +9077,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_175_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_175_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_175_matcher::to_string() -> std::string{return R"('abb\Z'm)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_175_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_175_matcher::to_string() -> std::string{return R"('abb\Z'm)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_176_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_176_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -10219,10 +9118,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_176_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_176_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -10230,19 +9130,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_176_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_176_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_176_matcher::to_string() -> std::string{return R"('abb\z'm)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_176_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_176_matcher::to_string() -> std::string{return R"('abb\z'm)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_177_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_177_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -10271,10 +9171,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_177_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_177_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -10282,19 +9183,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_177_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_177_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_177_matcher::to_string() -> std::string{return R"('abb$'m)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_177_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_177_matcher::to_string() -> std::string{return R"('abb$'m)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_178_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_178_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -10323,10 +9224,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_178_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_178_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -10334,19 +9236,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_178_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_178_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_178_matcher::to_string() -> std::string{return R"('abb\Z'm)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_178_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_178_matcher::to_string() -> std::string{return R"('abb\Z'm)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_179_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_179_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -10375,10 +9277,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_179_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_179_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -10386,19 +9289,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_179_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_179_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_179_matcher::to_string() -> std::string{return R"('abb\z'm)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_179_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_179_matcher::to_string() -> std::string{return R"('abb\z'm)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_18_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_18_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -10413,10 +9316,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_18_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_18_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -10424,19 +9328,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_18_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_18_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_18_matcher::to_string() -> std::string{return R"('$'m)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_18_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_18_matcher::to_string() -> std::string{return R"('$'m)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_180_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_180_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -10465,10 +9369,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_180_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_180_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -10476,19 +9381,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_180_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_180_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_180_matcher::to_string() -> std::string{return R"('abb$'m)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_180_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_180_matcher::to_string() -> std::string{return R"('abb$'m)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_181_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_181_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -10517,10 +9422,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_181_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_181_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -10528,19 +9434,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_181_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_181_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_181_matcher::to_string() -> std::string{return R"(abb\Z)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_181_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_181_matcher::to_string() -> std::string{return R"(abb\Z)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_182_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_182_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -10569,10 +9475,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_182_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_182_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -10580,19 +9487,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_182_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_182_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_182_matcher::to_string() -> std::string{return R"(abb\z)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_182_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_182_matcher::to_string() -> std::string{return R"(abb\z)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_183_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_183_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -10621,10 +9528,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_183_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_183_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -10632,19 +9540,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_183_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_183_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_183_matcher::to_string() -> std::string{return R"(abb$)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_183_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_183_matcher::to_string() -> std::string{return R"(abb$)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_184_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_184_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -10673,10 +9581,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_184_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_184_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -10684,19 +9593,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_184_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_184_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_184_matcher::to_string() -> std::string{return R"(abb\Z)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_184_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_184_matcher::to_string() -> std::string{return R"(abb\Z)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_185_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_185_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -10725,10 +9634,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_185_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_185_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -10736,19 +9646,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_185_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_185_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_185_matcher::to_string() -> std::string{return R"(abb\z)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_185_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_185_matcher::to_string() -> std::string{return R"(abb\z)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_186_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_186_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -10777,10 +9687,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_186_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_186_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -10788,19 +9699,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_186_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_186_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_186_matcher::to_string() -> std::string{return R"(abb$)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_186_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_186_matcher::to_string() -> std::string{return R"(abb$)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_187_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_187_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -10829,10 +9740,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_187_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_187_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -10840,19 +9752,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_187_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_187_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_187_matcher::to_string() -> std::string{return R"(abb\Z)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_187_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_187_matcher::to_string() -> std::string{return R"(abb\Z)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_188_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_188_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -10881,10 +9793,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_188_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_188_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -10892,19 +9805,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_188_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_188_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_188_matcher::to_string() -> std::string{return R"(abb\z)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_188_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_188_matcher::to_string() -> std::string{return R"(abb\z)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_189_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_189_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -10933,10 +9846,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_189_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_189_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -10944,19 +9858,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_189_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_189_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_189_matcher::to_string() -> std::string{return R"(abb$)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_189_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_189_matcher::to_string() -> std::string{return R"(abb$)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_19_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_19_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -10985,10 +9899,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_19_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_19_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -10996,19 +9911,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_19_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_19_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_19_matcher::to_string() -> std::string{return R"(a\Z)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_19_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_19_matcher::to_string() -> std::string{return R"(a\Z)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_190_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_190_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -11037,10 +9952,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_190_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_190_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -11048,19 +9964,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_190_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_190_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_190_matcher::to_string() -> std::string{return R"('abb\Z'm)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_190_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_190_matcher::to_string() -> std::string{return R"('abb\Z'm)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_191_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_191_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -11089,10 +10005,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_191_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_191_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -11100,19 +10017,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_191_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_191_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_191_matcher::to_string() -> std::string{return R"('abb\z'm)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_191_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_191_matcher::to_string() -> std::string{return R"('abb\z'm)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_192_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_192_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -11141,10 +10058,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_192_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_192_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -11152,19 +10070,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_192_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_192_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_192_matcher::to_string() -> std::string{return R"('abb$'m)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_192_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_192_matcher::to_string() -> std::string{return R"('abb$'m)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_193_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_193_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -11193,10 +10111,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_193_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_193_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -11204,19 +10123,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_193_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_193_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_193_matcher::to_string() -> std::string{return R"('abb\Z'm)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_193_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_193_matcher::to_string() -> std::string{return R"('abb\Z'm)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_194_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_194_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -11245,10 +10164,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_194_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_194_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -11256,19 +10176,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_194_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_194_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_194_matcher::to_string() -> std::string{return R"('abb\z'm)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_194_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_194_matcher::to_string() -> std::string{return R"('abb\z'm)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_195_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_195_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -11297,10 +10217,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_195_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_195_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -11308,19 +10229,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_195_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_195_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_195_matcher::to_string() -> std::string{return R"('abb$'m)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_195_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_195_matcher::to_string() -> std::string{return R"('abb$'m)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_196_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_196_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -11349,10 +10270,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_196_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_196_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -11360,19 +10282,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_196_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_196_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_196_matcher::to_string() -> std::string{return R"('abb\Z'm)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_196_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_196_matcher::to_string() -> std::string{return R"('abb\Z'm)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_197_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_197_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -11401,10 +10323,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_197_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_197_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -11412,19 +10335,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_197_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_197_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_197_matcher::to_string() -> std::string{return R"('abb\z'm)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_197_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_197_matcher::to_string() -> std::string{return R"('abb\z'm)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_198_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_198_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -11453,10 +10376,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_198_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_198_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -11464,19 +10388,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_198_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_198_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_198_matcher::to_string() -> std::string{return R"('abb$'m)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_198_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_198_matcher::to_string() -> std::string{return R"('abb$'m)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_199_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_199_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -11506,10 +10430,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_199_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_199_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -11517,19 +10442,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_199_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_199_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_199_matcher::to_string() -> std::string{return R"('\Aa$'m)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_199_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_199_matcher::to_string() -> std::string{return R"('\Aa$'m)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_20_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_20_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -11558,10 +10483,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_20_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_20_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -11569,19 +10495,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_20_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_20_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_20_matcher::to_string() -> std::string{return R"(a\z)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_20_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_20_matcher::to_string() -> std::string{return R"(a\z)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_21_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_21_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -11610,10 +10536,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_21_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_21_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -11621,19 +10548,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_21_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_21_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_21_matcher::to_string() -> std::string{return R"(a$)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_21_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_21_matcher::to_string() -> std::string{return R"(a$)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_22_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_22_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -11662,10 +10589,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_22_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_22_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -11673,19 +10601,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_22_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_22_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_22_matcher::to_string() -> std::string{return R"(a\Z)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_22_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_22_matcher::to_string() -> std::string{return R"(a\Z)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_23_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_23_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -11714,10 +10642,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_23_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_23_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -11725,19 +10654,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_23_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_23_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_23_matcher::to_string() -> std::string{return R"(a\z)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_23_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_23_matcher::to_string() -> std::string{return R"(a\z)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_24_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_24_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -11766,10 +10695,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_24_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_24_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -11777,19 +10707,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_24_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_24_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_24_matcher::to_string() -> std::string{return R"(a$)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_24_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_24_matcher::to_string() -> std::string{return R"(a$)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_25_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_25_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -11818,10 +10748,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_25_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_25_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -11829,19 +10760,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_25_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_25_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_25_matcher::to_string() -> std::string{return R"(a\Z)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_25_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_25_matcher::to_string() -> std::string{return R"(a\Z)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_26_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_26_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -11870,10 +10801,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_26_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_26_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -11881,19 +10813,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_26_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_26_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_26_matcher::to_string() -> std::string{return R"(a\z)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_26_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_26_matcher::to_string() -> std::string{return R"(a\z)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_27_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_27_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -11922,10 +10854,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_27_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_27_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -11933,19 +10866,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_27_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_27_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_27_matcher::to_string() -> std::string{return R"(a$)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_27_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_27_matcher::to_string() -> std::string{return R"(a$)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_28_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_28_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -11974,10 +10907,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_28_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_28_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -11985,19 +10919,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_28_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_28_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_28_matcher::to_string() -> std::string{return R"('a\Z'm)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_28_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_28_matcher::to_string() -> std::string{return R"('a\Z'm)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_29_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_29_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -12026,10 +10960,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_29_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_29_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -12037,19 +10972,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_29_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_29_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_29_matcher::to_string() -> std::string{return R"('a\z'm)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_29_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_29_matcher::to_string() -> std::string{return R"('a\z'm)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_30_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_30_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -12078,10 +11013,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_30_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_30_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -12089,19 +11025,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_30_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_30_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_30_matcher::to_string() -> std::string{return R"('a$'m)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_30_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_30_matcher::to_string() -> std::string{return R"('a$'m)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_31_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_31_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -12130,10 +11066,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_31_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_31_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -12141,19 +11078,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_31_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_31_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_31_matcher::to_string() -> std::string{return R"('a\Z'm)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_31_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_31_matcher::to_string() -> std::string{return R"('a\Z'm)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_32_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_32_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -12182,10 +11119,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_32_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_32_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -12193,19 +11131,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_32_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_32_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_32_matcher::to_string() -> std::string{return R"('a\z'm)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_32_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_32_matcher::to_string() -> std::string{return R"('a\z'm)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_33_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_33_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -12234,10 +11172,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_33_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_33_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -12245,19 +11184,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_33_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_33_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_33_matcher::to_string() -> std::string{return R"('a$'m)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_33_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_33_matcher::to_string() -> std::string{return R"('a$'m)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_34_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_34_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -12286,10 +11225,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_34_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_34_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -12297,19 +11237,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_34_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_34_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_34_matcher::to_string() -> std::string{return R"('a\Z'm)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_34_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_34_matcher::to_string() -> std::string{return R"('a\Z'm)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_35_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_35_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -12338,10 +11278,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_35_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_35_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -12349,19 +11290,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_35_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_35_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_35_matcher::to_string() -> std::string{return R"('a\z'm)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_35_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_35_matcher::to_string() -> std::string{return R"('a\z'm)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_36_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_36_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -12390,10 +11331,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_36_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_36_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -12401,19 +11343,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_36_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_36_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_36_matcher::to_string() -> std::string{return R"('a$'m)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_36_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_36_matcher::to_string() -> std::string{return R"('a$'m)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_37_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_37_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -12442,10 +11384,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_37_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_37_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -12453,19 +11396,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_37_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_37_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_37_matcher::to_string() -> std::string{return R"(aa\Z)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_37_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_37_matcher::to_string() -> std::string{return R"(aa\Z)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_38_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_38_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -12494,10 +11437,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_38_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_38_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -12505,19 +11449,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_38_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_38_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_38_matcher::to_string() -> std::string{return R"(aa\z)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_38_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_38_matcher::to_string() -> std::string{return R"(aa\z)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_39_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_39_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -12546,10 +11490,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_39_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_39_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -12557,19 +11502,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_39_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_39_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_39_matcher::to_string() -> std::string{return R"(aa$)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_39_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_39_matcher::to_string() -> std::string{return R"(aa$)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_40_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_40_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -12598,10 +11543,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_40_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_40_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -12609,19 +11555,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_40_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_40_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_40_matcher::to_string() -> std::string{return R"(aa\Z)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_40_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_40_matcher::to_string() -> std::string{return R"(aa\Z)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_41_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_41_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -12650,10 +11596,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_41_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_41_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -12661,19 +11608,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_41_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_41_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_41_matcher::to_string() -> std::string{return R"(aa\z)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_41_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_41_matcher::to_string() -> std::string{return R"(aa\z)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_42_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_42_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -12702,10 +11649,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_42_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_42_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -12713,19 +11661,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_42_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_42_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_42_matcher::to_string() -> std::string{return R"(aa$)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_42_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_42_matcher::to_string() -> std::string{return R"(aa$)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_43_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_43_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -12754,10 +11702,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_43_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_43_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -12765,19 +11714,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_43_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_43_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_43_matcher::to_string() -> std::string{return R"(aa\Z)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_43_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_43_matcher::to_string() -> std::string{return R"(aa\Z)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_44_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_44_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -12806,10 +11755,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_44_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_44_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -12817,19 +11767,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_44_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_44_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_44_matcher::to_string() -> std::string{return R"(aa\z)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_44_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_44_matcher::to_string() -> std::string{return R"(aa\z)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_45_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_45_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -12858,10 +11808,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_45_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_45_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -12869,19 +11820,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_45_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_45_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_45_matcher::to_string() -> std::string{return R"(aa$)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_45_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_45_matcher::to_string() -> std::string{return R"(aa$)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_46_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_46_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -12910,10 +11861,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_46_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_46_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -12921,19 +11873,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_46_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_46_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_46_matcher::to_string() -> std::string{return R"('aa\Z'm)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_46_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_46_matcher::to_string() -> std::string{return R"('aa\Z'm)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_47_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_47_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -12962,10 +11914,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_47_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_47_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -12973,19 +11926,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_47_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_47_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_47_matcher::to_string() -> std::string{return R"('aa\z'm)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_47_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_47_matcher::to_string() -> std::string{return R"('aa\z'm)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_48_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_48_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -13014,10 +11967,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_48_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_48_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -13025,19 +11979,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_48_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_48_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_48_matcher::to_string() -> std::string{return R"('aa$'m)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_48_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_48_matcher::to_string() -> std::string{return R"('aa$'m)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_49_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_49_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -13066,10 +12020,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_49_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_49_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -13077,19 +12032,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_49_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_49_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_49_matcher::to_string() -> std::string{return R"('aa\Z'm)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_49_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_49_matcher::to_string() -> std::string{return R"('aa\Z'm)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_50_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_50_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -13118,10 +12073,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_50_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_50_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -13129,19 +12085,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_50_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_50_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_50_matcher::to_string() -> std::string{return R"('aa\z'm)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_50_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_50_matcher::to_string() -> std::string{return R"('aa\z'm)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_51_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_51_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -13170,10 +12126,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_51_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_51_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -13181,19 +12138,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_51_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_51_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_51_matcher::to_string() -> std::string{return R"('aa$'m)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_51_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_51_matcher::to_string() -> std::string{return R"('aa$'m)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_52_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_52_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -13222,10 +12179,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_52_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_52_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -13233,19 +12191,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_52_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_52_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_52_matcher::to_string() -> std::string{return R"('aa\Z'm)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_52_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_52_matcher::to_string() -> std::string{return R"('aa\Z'm)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_53_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_53_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -13274,10 +12232,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_53_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_53_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -13285,19 +12244,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_53_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_53_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_53_matcher::to_string() -> std::string{return R"('aa\z'm)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_53_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_53_matcher::to_string() -> std::string{return R"('aa\z'm)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_54_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_54_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -13326,10 +12285,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_54_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_54_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -13337,19 +12297,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_54_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_54_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_54_matcher::to_string() -> std::string{return R"('aa$'m)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_54_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_54_matcher::to_string() -> std::string{return R"('aa$'m)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_55_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_55_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -13378,10 +12338,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_55_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_55_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -13389,19 +12350,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_55_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_55_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_55_matcher::to_string() -> std::string{return R"(aa\Z)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_55_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_55_matcher::to_string() -> std::string{return R"(aa\Z)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_56_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_56_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -13430,10 +12391,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_56_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_56_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -13441,19 +12403,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_56_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_56_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_56_matcher::to_string() -> std::string{return R"(aa\z)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_56_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_56_matcher::to_string() -> std::string{return R"(aa\z)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_57_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_57_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -13482,10 +12444,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_57_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_57_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -13493,19 +12456,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_57_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_57_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_57_matcher::to_string() -> std::string{return R"(aa$)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_57_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_57_matcher::to_string() -> std::string{return R"(aa$)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_58_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_58_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -13534,10 +12497,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_58_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_58_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -13545,19 +12509,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_58_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_58_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_58_matcher::to_string() -> std::string{return R"(aa\Z)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_58_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_58_matcher::to_string() -> std::string{return R"(aa\Z)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_59_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_59_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -13586,10 +12550,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_59_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_59_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -13597,19 +12562,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_59_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_59_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_59_matcher::to_string() -> std::string{return R"(aa\z)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_59_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_59_matcher::to_string() -> std::string{return R"(aa\z)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_60_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_60_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -13638,10 +12603,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_60_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_60_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -13649,19 +12615,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_60_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_60_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_60_matcher::to_string() -> std::string{return R"(aa$)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_60_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_60_matcher::to_string() -> std::string{return R"(aa$)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_61_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_61_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -13690,10 +12656,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_61_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_61_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -13701,19 +12668,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_61_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_61_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_61_matcher::to_string() -> std::string{return R"(aa\Z)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_61_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_61_matcher::to_string() -> std::string{return R"(aa\Z)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_62_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_62_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -13742,10 +12709,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_62_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_62_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -13753,19 +12721,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_62_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_62_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_62_matcher::to_string() -> std::string{return R"(aa\z)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_62_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_62_matcher::to_string() -> std::string{return R"(aa\z)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_63_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_63_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -13794,10 +12762,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_63_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_63_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -13805,19 +12774,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_63_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_63_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_63_matcher::to_string() -> std::string{return R"(aa$)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_63_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_63_matcher::to_string() -> std::string{return R"(aa$)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_64_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_64_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -13846,10 +12815,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_64_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_64_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -13857,19 +12827,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_64_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_64_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_64_matcher::to_string() -> std::string{return R"('aa\Z'm)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_64_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_64_matcher::to_string() -> std::string{return R"('aa\Z'm)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_65_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_65_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -13898,10 +12868,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_65_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_65_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -13909,19 +12880,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_65_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_65_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_65_matcher::to_string() -> std::string{return R"('aa\z'm)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_65_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_65_matcher::to_string() -> std::string{return R"('aa\z'm)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_66_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_66_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -13950,10 +12921,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_66_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_66_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -13961,19 +12933,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_66_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_66_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_66_matcher::to_string() -> std::string{return R"('aa$'m)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_66_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_66_matcher::to_string() -> std::string{return R"('aa$'m)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_67_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_67_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -14002,10 +12974,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_67_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_67_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -14013,19 +12986,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_67_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_67_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_67_matcher::to_string() -> std::string{return R"('aa\Z'm)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_67_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_67_matcher::to_string() -> std::string{return R"('aa\Z'm)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_68_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_68_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -14054,10 +13027,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_68_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_68_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -14065,19 +13039,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_68_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_68_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_68_matcher::to_string() -> std::string{return R"('aa\z'm)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_68_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_68_matcher::to_string() -> std::string{return R"('aa\z'm)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_69_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_69_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -14106,10 +13080,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_69_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_69_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -14117,19 +13092,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_69_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_69_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_69_matcher::to_string() -> std::string{return R"('aa$'m)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_69_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_69_matcher::to_string() -> std::string{return R"('aa$'m)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_70_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_70_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -14158,10 +13133,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_70_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_70_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -14169,19 +13145,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_70_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_70_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_70_matcher::to_string() -> std::string{return R"('aa\Z'm)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_70_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_70_matcher::to_string() -> std::string{return R"('aa\Z'm)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_71_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_71_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -14210,10 +13186,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_71_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_71_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -14221,19 +13198,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_71_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_71_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_71_matcher::to_string() -> std::string{return R"('aa\z'm)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_71_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_71_matcher::to_string() -> std::string{return R"('aa\z'm)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_72_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_72_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -14262,10 +13239,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_72_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_72_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -14273,19 +13251,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_72_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_72_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_72_matcher::to_string() -> std::string{return R"('aa$'m)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_72_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_72_matcher::to_string() -> std::string{return R"('aa$'m)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_73_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_73_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -14314,10 +13292,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_73_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_73_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -14325,19 +13304,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_73_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_73_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_73_matcher::to_string() -> std::string{return R"(aa\Z)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_73_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_73_matcher::to_string() -> std::string{return R"(aa\Z)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_74_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_74_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -14366,10 +13345,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_74_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_74_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -14377,19 +13357,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_74_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_74_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_74_matcher::to_string() -> std::string{return R"(aa\z)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_74_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_74_matcher::to_string() -> std::string{return R"(aa\z)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_75_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_75_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -14418,10 +13398,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_75_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_75_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -14429,19 +13410,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_75_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_75_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_75_matcher::to_string() -> std::string{return R"(aa$)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_75_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_75_matcher::to_string() -> std::string{return R"(aa$)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_76_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_76_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -14470,10 +13451,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_76_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_76_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -14481,19 +13463,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_76_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_76_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_76_matcher::to_string() -> std::string{return R"(aa\Z)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_76_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_76_matcher::to_string() -> std::string{return R"(aa\Z)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_77_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_77_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -14522,10 +13504,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_77_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_77_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -14533,19 +13516,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_77_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_77_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_77_matcher::to_string() -> std::string{return R"(aa\z)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_77_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_77_matcher::to_string() -> std::string{return R"(aa\z)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_78_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_78_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -14574,10 +13557,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_78_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_78_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -14585,19 +13569,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_78_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_78_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_78_matcher::to_string() -> std::string{return R"(aa$)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_78_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_78_matcher::to_string() -> std::string{return R"(aa$)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_79_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_79_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -14626,10 +13610,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_79_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_79_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -14637,19 +13622,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_79_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_79_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_79_matcher::to_string() -> std::string{return R"(aa\Z)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_79_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_79_matcher::to_string() -> std::string{return R"(aa\Z)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_80_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_80_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -14678,10 +13663,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_80_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_80_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -14689,19 +13675,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_80_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_80_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_80_matcher::to_string() -> std::string{return R"(aa\z)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_80_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_80_matcher::to_string() -> std::string{return R"(aa\z)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_81_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_81_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -14730,10 +13716,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_81_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_81_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -14741,19 +13728,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_81_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_81_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_81_matcher::to_string() -> std::string{return R"(aa$)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_81_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_81_matcher::to_string() -> std::string{return R"(aa$)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_82_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_82_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -14782,10 +13769,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_82_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_82_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -14793,19 +13781,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_82_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_82_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_82_matcher::to_string() -> std::string{return R"('aa\Z'm)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_82_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_82_matcher::to_string() -> std::string{return R"('aa\Z'm)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_83_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_83_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -14834,10 +13822,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_83_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_83_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -14845,19 +13834,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_83_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_83_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_83_matcher::to_string() -> std::string{return R"('aa\z'm)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_83_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_83_matcher::to_string() -> std::string{return R"('aa\z'm)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_84_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_84_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -14886,10 +13875,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_84_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_84_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -14897,19 +13887,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_84_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_84_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_84_matcher::to_string() -> std::string{return R"('aa$'m)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_84_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_84_matcher::to_string() -> std::string{return R"('aa$'m)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_85_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_85_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -14938,10 +13928,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_85_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_85_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -14949,19 +13940,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_85_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_85_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_85_matcher::to_string() -> std::string{return R"('aa\Z'm)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_85_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_85_matcher::to_string() -> std::string{return R"('aa\Z'm)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_86_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_86_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -14990,10 +13981,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_86_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_86_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -15001,19 +13993,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_86_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_86_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_86_matcher::to_string() -> std::string{return R"('aa\z'm)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_86_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_86_matcher::to_string() -> std::string{return R"('aa\z'm)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_87_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_87_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -15042,10 +14034,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_87_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_87_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -15053,19 +14046,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_87_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_87_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_87_matcher::to_string() -> std::string{return R"('aa$'m)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_87_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_87_matcher::to_string() -> std::string{return R"('aa$'m)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_88_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_88_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -15094,10 +14087,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_88_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_88_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -15105,19 +14099,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_88_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_88_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_88_matcher::to_string() -> std::string{return R"('aa\Z'm)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_88_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_88_matcher::to_string() -> std::string{return R"('aa\Z'm)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_89_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_89_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -15146,10 +14140,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_89_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_89_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -15157,19 +14152,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_89_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_89_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_89_matcher::to_string() -> std::string{return R"('aa\z'm)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_89_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_89_matcher::to_string() -> std::string{return R"('aa\z'm)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_90_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_90_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -15198,10 +14193,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_90_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_90_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -15209,19 +14205,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_90_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_90_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_90_matcher::to_string() -> std::string{return R"('aa$'m)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_90_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_90_matcher::to_string() -> std::string{return R"('aa$'m)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_91_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_91_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -15250,10 +14246,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_91_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_91_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -15261,19 +14258,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_91_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_91_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_91_matcher::to_string() -> std::string{return R"(ab\Z)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_91_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_91_matcher::to_string() -> std::string{return R"(ab\Z)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_92_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_92_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -15302,10 +14299,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_92_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_92_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -15313,19 +14311,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_92_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_92_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_92_matcher::to_string() -> std::string{return R"(ab\z)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_92_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_92_matcher::to_string() -> std::string{return R"(ab\z)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_93_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_93_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -15354,10 +14352,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_93_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_93_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -15365,19 +14364,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_93_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_93_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_93_matcher::to_string() -> std::string{return R"(ab$)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_93_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_93_matcher::to_string() -> std::string{return R"(ab$)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_94_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_94_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -15406,10 +14405,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_94_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_94_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -15417,19 +14417,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_94_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_94_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_94_matcher::to_string() -> std::string{return R"(ab\Z)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_94_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_94_matcher::to_string() -> std::string{return R"(ab\Z)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_95_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_95_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -15458,10 +14458,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_95_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_95_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -15469,19 +14470,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_95_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_95_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_95_matcher::to_string() -> std::string{return R"(ab\z)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_95_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_95_matcher::to_string() -> std::string{return R"(ab\z)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_96_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_96_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -15510,10 +14511,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_96_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_96_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -15521,19 +14523,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_96_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_96_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_96_matcher::to_string() -> std::string{return R"(ab$)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_96_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_96_matcher::to_string() -> std::string{return R"(ab$)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_97_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_97_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -15562,10 +14564,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_97_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_97_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -15573,19 +14576,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_97_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_97_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_97_matcher::to_string() -> std::string{return R"(ab\Z)"; } - + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_97_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_97_matcher::to_string() -> std::string{return R"(ab\Z)"; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_98_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_98_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -15614,10 +14617,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_98_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_98_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -15625,19 +14629,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_98_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_98_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_98_matcher::to_string() -> std::string{return R"(ab\z)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_98_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_98_matcher::to_string() -> std::string{return R"(ab\z)"; } - - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_99_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_99_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -15666,10 +14670,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_99_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_99_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -15677,15 +14682,16 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_99_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_99_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_14_multiline_modifier::regex_99_matcher::to_string() -> std::string{return R"(ab$)"; } + template [[nodiscard]] constexpr auto test_tests_14_multiline_modifier::regex_99_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_99_matcher::to_string() -> std::string{return R"(ab$)"; } -#line 569 "pure2-regex_14_multiline_modifier.cpp2" +#line 570 "pure2-regex_14_multiline_modifier.cpp2" auto main() -> int{ CPP2_UFCS(run)(test_tests_14_multiline_modifier()); } diff --git a/regression-tests/test-results/pure2-regex_15_group_modifiers.cpp b/regression-tests/test-results/pure2-regex_15_group_modifiers.cpp index 4f9b4184d..b9dc88c42 100644 --- a/regression-tests/test-results/pure2-regex_15_group_modifiers.cpp +++ b/regression-tests/test-results/pure2-regex_15_group_modifiers.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes #include "cpp2regex.h" //=== Cpp2 type declarations ==================================================== @@ -9,7 +9,7 @@ #line 1 "pure2-regex_15_group_modifiers.cpp2" -#line 165 "pure2-regex_15_group_modifiers.cpp2" +#line 166 "pure2-regex_15_group_modifiers.cpp2" class test_tests_15_group_modifiers; @@ -18,37 +18,31 @@ class test_tests_15_group_modifiers; #line 1 "pure2-regex_15_group_modifiers.cpp2" [[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string; -#line 112 "pure2-regex_15_group_modifiers.cpp2" +#line 113 "pure2-regex_15_group_modifiers.cpp2" [[nodiscard]] auto sanitize(std::string str) -> std::string; -#line 124 "pure2-regex_15_group_modifiers.cpp2" +#line 125 "pure2-regex_15_group_modifiers.cpp2" template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, cpp2::impl::in resultExpected) -> void; -#line 165 "pure2-regex_15_group_modifiers.cpp2" +#line 166 "pure2-regex_15_group_modifiers.cpp2" class test_tests_15_group_modifiers { -#line 219 "pure2-regex_15_group_modifiers.cpp2" +#line 220 "pure2-regex_15_group_modifiers.cpp2" public: auto run() const& -> void; - public: class regex_01_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: template class regex_01_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_01_matcher() = default; public: regex_01_matcher(regex_01_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -56,25 +50,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_01 {}; public: class regex_02_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_01 {}; public: template class regex_02_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_02_matcher() = default; public: regex_02_matcher(regex_02_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -82,25 +70,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_02 {}; public: class regex_03_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_02 {}; public: template class regex_03_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_03_matcher() = default; public: regex_03_matcher(regex_03_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -108,25 +90,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_03 {}; public: class regex_04_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_03 {}; public: template class regex_04_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_04_matcher() = default; public: regex_04_matcher(regex_04_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -134,25 +110,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_04 {}; public: class regex_05_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_04 {}; public: template class regex_05_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_05_matcher() = default; public: regex_05_matcher(regex_05_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -160,25 +130,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_05 {}; public: class regex_06_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_05 {}; public: template class regex_06_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_06_matcher() = default; public: regex_06_matcher(regex_06_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -186,25 +150,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_06 {}; public: class regex_07_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_06 {}; public: template class regex_07_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_07_matcher() = default; public: regex_07_matcher(regex_07_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -212,25 +170,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_07 {}; public: class regex_08_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_07 {}; public: template class regex_08_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_08_matcher() = default; public: regex_08_matcher(regex_08_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -238,25 +190,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_08 {}; public: class regex_09_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_08 {}; public: template class regex_09_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_09_matcher() = default; public: regex_09_matcher(regex_09_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -264,25 +210,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_09 {}; public: class regex_10_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_09 {}; public: template class regex_10_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_10_matcher() = default; public: regex_10_matcher(regex_10_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -290,25 +230,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_10 {}; public: class regex_11_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_10 {}; public: template class regex_11_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_11_matcher() = default; public: regex_11_matcher(regex_11_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -316,25 +250,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_11 {}; public: class regex_12_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_11 {}; public: template class regex_12_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_12_matcher() = default; public: regex_12_matcher(regex_12_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -342,25 +270,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_12 {}; public: class regex_13_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_12 {}; public: template class regex_13_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_13_matcher() = default; public: regex_13_matcher(regex_13_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -368,25 +290,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_13 {}; public: class regex_14_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_13 {}; public: template class regex_14_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_14_matcher() = default; public: regex_14_matcher(regex_14_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -394,25 +310,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_14 {}; public: class regex_15_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_14 {}; public: template class regex_15_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_15_matcher() = default; public: regex_15_matcher(regex_15_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -420,25 +330,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_15 {}; public: class regex_16_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_15 {}; public: template class regex_16_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_16_matcher() = default; public: regex_16_matcher(regex_16_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -446,25 +350,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_16 {}; public: class regex_17_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_16 {}; public: template class regex_17_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_17_matcher() = default; public: regex_17_matcher(regex_17_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -472,25 +370,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_17 {}; public: class regex_18_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_17 {}; public: template class regex_18_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_18_matcher() = default; public: regex_18_matcher(regex_18_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -498,25 +390,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_18 {}; public: class regex_19_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_18 {}; public: template class regex_19_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_19_matcher() = default; public: regex_19_matcher(regex_19_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -524,25 +410,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_19 {}; public: class regex_20_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_19 {}; public: template class regex_20_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_20_matcher() = default; public: regex_20_matcher(regex_20_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -550,25 +430,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_20 {}; public: class regex_21_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_20 {}; public: template class regex_21_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_21_matcher() = default; public: regex_21_matcher(regex_21_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -576,25 +450,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_21 {}; public: class regex_22_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_21 {}; public: template class regex_22_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_22_matcher() = default; public: regex_22_matcher(regex_22_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -602,25 +470,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_22 {}; public: class regex_23_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_22 {}; public: template class regex_23_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_23_matcher() = default; public: regex_23_matcher(regex_23_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -628,25 +490,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_23 {}; public: class regex_24_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_23 {}; public: template class regex_24_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_24_matcher() = default; public: regex_24_matcher(regex_24_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -654,25 +510,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_24 {}; public: class regex_25_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_24 {}; public: template class regex_25_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_25_matcher() = default; public: regex_25_matcher(regex_25_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -680,25 +530,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_25 {}; public: class regex_26_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_25 {}; public: template class regex_26_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_26_matcher() = default; public: regex_26_matcher(regex_26_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -706,25 +550,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_26 {}; public: class regex_27_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_26 {}; public: template class regex_27_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_27_matcher() = default; public: regex_27_matcher(regex_27_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -732,25 +570,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_27 {}; public: class regex_28_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_27 {}; public: template class regex_28_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_28_matcher() = default; public: regex_28_matcher(regex_28_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -758,25 +590,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_28 {}; public: class regex_29_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_28 {}; public: template class regex_29_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_29_matcher() = default; public: regex_29_matcher(regex_29_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -784,25 +610,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_29 {}; public: class regex_30_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_29 {}; public: template class regex_30_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_30_matcher() = default; public: regex_30_matcher(regex_30_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -810,25 +630,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_30 {}; public: class regex_31_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_30 {}; public: template class regex_31_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_31_matcher() = default; public: regex_31_matcher(regex_31_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -836,25 +650,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_31 {}; public: class regex_32_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_31 {}; public: template class regex_32_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_32_matcher() = default; public: regex_32_matcher(regex_32_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -862,25 +670,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_32 {}; public: class regex_33_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_32 {}; public: template class regex_33_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_33_matcher() = default; public: regex_33_matcher(regex_33_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -888,25 +690,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_33 {}; public: class regex_34_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_33 {}; public: template class regex_34_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_34_matcher() = default; public: regex_34_matcher(regex_34_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -914,25 +710,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_34 {}; public: class regex_35_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_34 {}; public: template class regex_35_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_35_matcher() = default; public: regex_35_matcher(regex_35_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -940,25 +730,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_35 {}; public: class regex_36_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_35 {}; public: template class regex_36_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_36_matcher() = default; public: regex_36_matcher(regex_36_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -966,25 +750,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_36 {}; public: class regex_37_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_36 {}; public: template class regex_37_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_37_matcher() = default; public: regex_37_matcher(regex_37_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -992,25 +770,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_37 {}; public: class regex_38_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_37 {}; public: template class regex_38_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_38_matcher() = default; public: regex_38_matcher(regex_38_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1018,25 +790,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_38 {}; public: class regex_39_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_38 {}; public: template class regex_39_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_39_matcher() = default; public: regex_39_matcher(regex_39_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1044,25 +810,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_39 {}; public: class regex_40_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_39 {}; public: template class regex_40_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_40_matcher() = default; public: regex_40_matcher(regex_40_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1070,55 +830,49 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_40 {}; public: class regex_41_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_40 {}; public: template class regex_41_matcher { + public: template using context = cpp2::regex::match_context; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_5 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_6 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_41_matcher() = default; public: regex_41_matcher(regex_41_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1126,25 +880,19 @@ public: class func_2 { }; - public: cpp2::regex::regular_expression regex_41 {}; public: class regex_42_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_41 {}; public: template class regex_42_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_42_matcher() = default; public: regex_42_matcher(regex_42_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1152,25 +900,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_42 {}; public: class regex_43_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_42 {}; public: template class regex_43_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_43_matcher() = default; public: regex_43_matcher(regex_43_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1178,25 +920,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_43 {}; public: class regex_44_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_43 {}; public: template class regex_44_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_44_matcher() = default; public: regex_44_matcher(regex_44_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1204,25 +940,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_44 {}; public: class regex_45_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_44 {}; public: template class regex_45_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_45_matcher() = default; public: regex_45_matcher(regex_45_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1230,25 +960,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_45 {}; public: class regex_46_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_45 {}; public: template class regex_46_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_46_matcher() = default; public: regex_46_matcher(regex_46_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1256,25 +980,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_46 {}; public: class regex_47_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_46 {}; public: template class regex_47_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_47_matcher() = default; public: regex_47_matcher(regex_47_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1282,25 +1000,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_47 {}; public: class regex_48_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_47 {}; public: template class regex_48_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_48_matcher() = default; public: regex_48_matcher(regex_48_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1308,25 +1020,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_48 {}; public: class regex_49_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_48 {}; public: template class regex_49_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_49_matcher() = default; public: regex_49_matcher(regex_49_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1334,25 +1040,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_49 {}; public: class regex_50_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_49 {}; public: template class regex_50_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_50_matcher() = default; public: regex_50_matcher(regex_50_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1360,25 +1060,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_50 {}; public: class regex_51_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_50 {}; public: template class regex_51_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_51_matcher() = default; public: regex_51_matcher(regex_51_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1386,25 +1080,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_51 {}; public: class regex_52_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_51 {}; public: template class regex_52_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_52_matcher() = default; public: regex_52_matcher(regex_52_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1412,25 +1100,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_52 {}; public: class regex_53_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_52 {}; public: template class regex_53_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_53_matcher() = default; public: regex_53_matcher(regex_53_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1438,13 +1120,13 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_53 {}; + public: cpp2::regex::regular_expression> regex_53 {}; public: test_tests_15_group_modifiers() = default; public: test_tests_15_group_modifiers(test_tests_15_group_modifiers const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(test_tests_15_group_modifiers const&) -> void = delete; -#line 276 "pure2-regex_15_group_modifiers.cpp2" +#line 277 "pure2-regex_15_group_modifiers.cpp2" }; auto main() -> int; @@ -1548,6 +1230,7 @@ auto main() -> int; } result += std::to_string(cpp2::move(pos)); } + ++next; } else { std::cerr << "Not implemented"; @@ -1563,7 +1246,7 @@ auto main() -> int; return result; } -#line 112 "pure2-regex_15_group_modifiers.cpp2" +#line 113 "pure2-regex_15_group_modifiers.cpp2" [[nodiscard]] auto sanitize(std::string str) -> std::string { str = cpp2::string_util::replace_all(str, "\a", "\\a"); @@ -1576,7 +1259,7 @@ auto main() -> int; return cpp2::move(str); } -#line 124 "pure2-regex_15_group_modifiers.cpp2" +#line 125 "pure2-regex_15_group_modifiers.cpp2" template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, cpp2::impl::in resultExpected) -> void{ @@ -1617,7 +1300,7 @@ template auto test(M const& regex, cpp2::impl::in id, c std::cout << "" + cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(sanitize(str)) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(sanitize(resultExpected)) + "" << std::endl; } -#line 219 "pure2-regex_15_group_modifiers.cpp2" +#line 220 "pure2-regex_15_group_modifiers.cpp2" auto test_tests_15_group_modifiers::run() const& -> void{ std::cout << "Running tests_15_group_modifiers:" << std::endl; test(regex_01, "01", R"((?:(?i)a)b)", "ab", "y", R"($&)", "ab"); @@ -1679,8 +1362,7 @@ template auto test(M const& regex, cpp2::impl::in id, c - - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_01_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_01_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1724,10 +1406,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_01_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_01_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1735,19 +1418,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_01_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_01_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_15_group_modifiers::regex_01_matcher::to_string() -> std::string{return R"((?:(?i)a)b)"; } + template [[nodiscard]] constexpr auto test_tests_15_group_modifiers::regex_01_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_15_group_modifiers::regex_01_matcher::to_string() -> std::string{return R"((?:(?i)a)b)"; } - - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_02_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_02_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1804,10 +1487,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_02_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_02_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1815,19 +1499,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_02_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_02_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_15_group_modifiers::regex_02_matcher::to_string() -> std::string{return R"(((?i)a)b)"; } - + template [[nodiscard]] constexpr auto test_tests_15_group_modifiers::regex_02_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_15_group_modifiers::regex_02_matcher::to_string() -> std::string{return R"(((?i)a)b)"; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_03_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_03_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1871,10 +1555,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_03_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_03_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1882,19 +1567,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_03_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_03_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_15_group_modifiers::regex_03_matcher::to_string() -> std::string{return R"((?:(?i)a)b)"; } + template [[nodiscard]] constexpr auto test_tests_15_group_modifiers::regex_03_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_15_group_modifiers::regex_03_matcher::to_string() -> std::string{return R"((?:(?i)a)b)"; } - - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_04_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_04_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1951,10 +1636,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_04_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_04_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1962,19 +1648,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_04_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_04_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_15_group_modifiers::regex_04_matcher::to_string() -> std::string{return R"(((?i)a)b)"; } - + template [[nodiscard]] constexpr auto test_tests_15_group_modifiers::regex_04_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_15_group_modifiers::regex_04_matcher::to_string() -> std::string{return R"(((?i)a)b)"; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_05_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_05_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2018,10 +1704,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_05_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_05_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2029,19 +1716,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_05_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_05_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_15_group_modifiers::regex_05_matcher::to_string() -> std::string{return R"((?:(?i)a)b)"; } + template [[nodiscard]] constexpr auto test_tests_15_group_modifiers::regex_05_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_15_group_modifiers::regex_05_matcher::to_string() -> std::string{return R"((?:(?i)a)b)"; } - - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_06_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_06_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2098,10 +1785,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_06_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_06_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2109,19 +1797,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_06_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_06_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_15_group_modifiers::regex_06_matcher::to_string() -> std::string{return R"(((?i)a)b)"; } - + template [[nodiscard]] constexpr auto test_tests_15_group_modifiers::regex_06_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_15_group_modifiers::regex_06_matcher::to_string() -> std::string{return R"(((?i)a)b)"; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_07_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_07_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2165,10 +1853,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_07_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_07_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2176,19 +1865,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_07_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_07_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_15_group_modifiers::regex_07_matcher::to_string() -> std::string{return R"((?i:a)b)"; } - + template [[nodiscard]] constexpr auto test_tests_15_group_modifiers::regex_07_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_15_group_modifiers::regex_07_matcher::to_string() -> std::string{return R"((?i:a)b)"; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_08_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_08_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2245,10 +1934,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_08_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_08_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2256,19 +1946,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_08_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_08_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_15_group_modifiers::regex_08_matcher::to_string() -> std::string{return R"(((?i:a))b)"; } + template [[nodiscard]] constexpr auto test_tests_15_group_modifiers::regex_08_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_15_group_modifiers::regex_08_matcher::to_string() -> std::string{return R"(((?i:a))b)"; } - - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_09_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_09_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2312,10 +2002,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_09_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_09_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2323,19 +2014,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_09_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_09_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_15_group_modifiers::regex_09_matcher::to_string() -> std::string{return R"((?i:a)b)"; } - + template [[nodiscard]] constexpr auto test_tests_15_group_modifiers::regex_09_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_15_group_modifiers::regex_09_matcher::to_string() -> std::string{return R"((?i:a)b)"; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_10_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_10_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2392,10 +2083,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_10_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_10_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2403,19 +2095,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_10_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_10_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_15_group_modifiers::regex_10_matcher::to_string() -> std::string{return R"(((?i:a))b)"; } + template [[nodiscard]] constexpr auto test_tests_15_group_modifiers::regex_10_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_15_group_modifiers::regex_10_matcher::to_string() -> std::string{return R"(((?i:a))b)"; } - - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_11_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_11_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2459,10 +2151,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_11_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_11_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2470,19 +2163,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_11_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_11_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_15_group_modifiers::regex_11_matcher::to_string() -> std::string{return R"((?i:a)b)"; } - + template [[nodiscard]] constexpr auto test_tests_15_group_modifiers::regex_11_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_15_group_modifiers::regex_11_matcher::to_string() -> std::string{return R"((?i:a)b)"; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_12_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_12_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2539,10 +2232,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_12_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_12_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2550,19 +2244,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_12_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_12_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_15_group_modifiers::regex_12_matcher::to_string() -> std::string{return R"(((?i:a))b)"; } + template [[nodiscard]] constexpr auto test_tests_15_group_modifiers::regex_12_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_15_group_modifiers::regex_12_matcher::to_string() -> std::string{return R"(((?i:a))b)"; } - - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_13_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_13_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2606,10 +2300,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_13_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_13_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2617,19 +2312,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_13_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_13_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_15_group_modifiers::regex_13_matcher::to_string() -> std::string{return R"('(?:(?-i)a)b'i)"; } - + template [[nodiscard]] constexpr auto test_tests_15_group_modifiers::regex_13_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_15_group_modifiers::regex_13_matcher::to_string() -> std::string{return R"('(?:(?-i)a)b'i)"; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_14_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_14_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2686,10 +2381,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_14_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_14_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2697,19 +2393,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_14_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_14_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_15_group_modifiers::regex_14_matcher::to_string() -> std::string{return R"('((?-i)a)b'i)"; } - + template [[nodiscard]] constexpr auto test_tests_15_group_modifiers::regex_14_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_15_group_modifiers::regex_14_matcher::to_string() -> std::string{return R"('((?-i)a)b'i)"; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_15_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_15_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2753,10 +2449,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_15_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_15_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2764,19 +2461,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_15_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_15_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_15_group_modifiers::regex_15_matcher::to_string() -> std::string{return R"('(?:(?-i)a)b'i)"; } + template [[nodiscard]] constexpr auto test_tests_15_group_modifiers::regex_15_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_15_group_modifiers::regex_15_matcher::to_string() -> std::string{return R"('(?:(?-i)a)b'i)"; } - - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_16_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_16_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2833,10 +2530,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_16_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_16_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2844,19 +2542,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_16_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_16_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_15_group_modifiers::regex_16_matcher::to_string() -> std::string{return R"('((?-i)a)b'i)"; } - + template [[nodiscard]] constexpr auto test_tests_15_group_modifiers::regex_16_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_15_group_modifiers::regex_16_matcher::to_string() -> std::string{return R"('((?-i)a)b'i)"; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_17_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_17_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2900,10 +2598,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_17_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_17_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2911,19 +2610,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_17_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_17_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_15_group_modifiers::regex_17_matcher::to_string() -> std::string{return R"('(?:(?-i)a)b'i)"; } + template [[nodiscard]] constexpr auto test_tests_15_group_modifiers::regex_17_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_15_group_modifiers::regex_17_matcher::to_string() -> std::string{return R"('(?:(?-i)a)b'i)"; } - - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_18_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_18_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2980,10 +2679,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_18_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_18_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2991,19 +2691,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_18_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_18_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_15_group_modifiers::regex_18_matcher::to_string() -> std::string{return R"('((?-i)a)b'i)"; } - + template [[nodiscard]] constexpr auto test_tests_15_group_modifiers::regex_18_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_15_group_modifiers::regex_18_matcher::to_string() -> std::string{return R"('((?-i)a)b'i)"; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_19_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_19_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3047,10 +2747,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_19_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_19_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -3058,19 +2759,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_19_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_19_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_15_group_modifiers::regex_19_matcher::to_string() -> std::string{return R"('(?:(?-i)a)b'i)"; } + template [[nodiscard]] constexpr auto test_tests_15_group_modifiers::regex_19_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_15_group_modifiers::regex_19_matcher::to_string() -> std::string{return R"('(?:(?-i)a)b'i)"; } - - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_20_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_20_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3127,10 +2828,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_20_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_20_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -3138,19 +2840,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_20_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_20_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_15_group_modifiers::regex_20_matcher::to_string() -> std::string{return R"('((?-i)a)b'i)"; } - + template [[nodiscard]] constexpr auto test_tests_15_group_modifiers::regex_20_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_15_group_modifiers::regex_20_matcher::to_string() -> std::string{return R"('((?-i)a)b'i)"; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_21_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_21_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3194,10 +2896,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_21_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_21_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -3205,19 +2908,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_21_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_21_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_15_group_modifiers::regex_21_matcher::to_string() -> std::string{return R"('(?:(?-i)a)b'i)"; } - + template [[nodiscard]] constexpr auto test_tests_15_group_modifiers::regex_21_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_15_group_modifiers::regex_21_matcher::to_string() -> std::string{return R"('(?:(?-i)a)b'i)"; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_22_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_22_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3274,10 +2977,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_22_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_22_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -3285,19 +2989,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_22_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_22_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_15_group_modifiers::regex_22_matcher::to_string() -> std::string{return R"('((?-i)a)b'i)"; } + template [[nodiscard]] constexpr auto test_tests_15_group_modifiers::regex_22_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_15_group_modifiers::regex_22_matcher::to_string() -> std::string{return R"('((?-i)a)b'i)"; } - - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_23_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_23_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3341,10 +3045,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_23_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_23_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -3352,19 +3057,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_23_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_23_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_15_group_modifiers::regex_23_matcher::to_string() -> std::string{return R"('(?-i:a)b'i)"; } - + template [[nodiscard]] constexpr auto test_tests_15_group_modifiers::regex_23_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_15_group_modifiers::regex_23_matcher::to_string() -> std::string{return R"('(?-i:a)b'i)"; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_24_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_24_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3421,10 +3126,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_24_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_24_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -3432,19 +3138,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_24_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_24_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_15_group_modifiers::regex_24_matcher::to_string() -> std::string{return R"('((?-i:a))b'i)"; } - + template [[nodiscard]] constexpr auto test_tests_15_group_modifiers::regex_24_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_15_group_modifiers::regex_24_matcher::to_string() -> std::string{return R"('((?-i:a))b'i)"; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_25_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_25_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3488,10 +3194,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_25_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_25_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -3499,19 +3206,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_25_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_25_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_15_group_modifiers::regex_25_matcher::to_string() -> std::string{return R"('(?-i:a)b'i)"; } + template [[nodiscard]] constexpr auto test_tests_15_group_modifiers::regex_25_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_15_group_modifiers::regex_25_matcher::to_string() -> std::string{return R"('(?-i:a)b'i)"; } - - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_26_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_26_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3568,10 +3275,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_26_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_26_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -3579,19 +3287,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_26_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_26_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_15_group_modifiers::regex_26_matcher::to_string() -> std::string{return R"('((?-i:a))b'i)"; } - + template [[nodiscard]] constexpr auto test_tests_15_group_modifiers::regex_26_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_15_group_modifiers::regex_26_matcher::to_string() -> std::string{return R"('((?-i:a))b'i)"; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_27_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_27_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3635,10 +3343,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_27_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_27_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -3646,19 +3355,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_27_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_27_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_15_group_modifiers::regex_27_matcher::to_string() -> std::string{return R"('(?-i:a)b'i)"; } - + template [[nodiscard]] constexpr auto test_tests_15_group_modifiers::regex_27_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_15_group_modifiers::regex_27_matcher::to_string() -> std::string{return R"('(?-i:a)b'i)"; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_28_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_28_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3715,10 +3424,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_28_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_28_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -3726,19 +3436,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_28_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_28_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_15_group_modifiers::regex_28_matcher::to_string() -> std::string{return R"('((?-i:a))b'i)"; } + template [[nodiscard]] constexpr auto test_tests_15_group_modifiers::regex_28_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_15_group_modifiers::regex_28_matcher::to_string() -> std::string{return R"('((?-i:a))b'i)"; } - - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_29_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_29_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3782,10 +3492,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_29_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_29_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -3793,19 +3504,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_29_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_29_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_15_group_modifiers::regex_29_matcher::to_string() -> std::string{return R"('(?-i:a)b'i)"; } - + template [[nodiscard]] constexpr auto test_tests_15_group_modifiers::regex_29_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_15_group_modifiers::regex_29_matcher::to_string() -> std::string{return R"('(?-i:a)b'i)"; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_30_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_30_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3862,10 +3573,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_30_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_30_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -3873,19 +3585,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_30_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_30_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_15_group_modifiers::regex_30_matcher::to_string() -> std::string{return R"('((?-i:a))b'i)"; } + template [[nodiscard]] constexpr auto test_tests_15_group_modifiers::regex_30_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_15_group_modifiers::regex_30_matcher::to_string() -> std::string{return R"('((?-i:a))b'i)"; } - - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_31_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_31_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3929,10 +3641,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_31_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_31_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -3940,19 +3653,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_31_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_31_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_15_group_modifiers::regex_31_matcher::to_string() -> std::string{return R"('(?-i:a)b'i)"; } - + template [[nodiscard]] constexpr auto test_tests_15_group_modifiers::regex_31_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_15_group_modifiers::regex_31_matcher::to_string() -> std::string{return R"('(?-i:a)b'i)"; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_32_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_32_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4009,10 +3722,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_32_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_32_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -4020,19 +3734,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_32_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_32_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_15_group_modifiers::regex_32_matcher::to_string() -> std::string{return R"('((?-i:a))b'i)"; } + template [[nodiscard]] constexpr auto test_tests_15_group_modifiers::regex_32_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_15_group_modifiers::regex_32_matcher::to_string() -> std::string{return R"('((?-i:a))b'i)"; } - - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_33_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_33_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4090,10 +3804,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_33_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_33_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -4101,19 +3816,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_33_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_33_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_15_group_modifiers::regex_33_matcher::to_string() -> std::string{return R"('((?-i:a.))b'i)"; } - + template [[nodiscard]] constexpr auto test_tests_15_group_modifiers::regex_33_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_15_group_modifiers::regex_33_matcher::to_string() -> std::string{return R"('((?-i:a.))b'i)"; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_34_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_34_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4171,10 +3886,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_34_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_34_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -4182,19 +3898,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_34_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_34_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_15_group_modifiers::regex_34_matcher::to_string() -> std::string{return R"('((?-i:a\N))b'i)"; } - + template [[nodiscard]] constexpr auto test_tests_15_group_modifiers::regex_34_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_15_group_modifiers::regex_34_matcher::to_string() -> std::string{return R"('((?-i:a\N))b'i)"; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_35_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_35_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4252,10 +3968,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_35_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_35_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -4263,19 +3980,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_35_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_35_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_15_group_modifiers::regex_35_matcher::to_string() -> std::string{return R"('((?s-i:a.))b'i)"; } + template [[nodiscard]] constexpr auto test_tests_15_group_modifiers::regex_35_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_15_group_modifiers::regex_35_matcher::to_string() -> std::string{return R"('((?s-i:a.))b'i)"; } - - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_36_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_36_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4333,10 +4050,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_36_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_36_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -4344,19 +4062,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_36_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_36_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_15_group_modifiers::regex_36_matcher::to_string() -> std::string{return R"('((?s-i:a\N))b'i)"; } - + template [[nodiscard]] constexpr auto test_tests_15_group_modifiers::regex_36_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_15_group_modifiers::regex_36_matcher::to_string() -> std::string{return R"('((?s-i:a\N))b'i)"; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_37_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_37_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4414,10 +4132,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_37_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_37_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -4425,19 +4144,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_37_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_37_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_15_group_modifiers::regex_37_matcher::to_string() -> std::string{return R"('((?s-i:a.))b'i)"; } - + template [[nodiscard]] constexpr auto test_tests_15_group_modifiers::regex_37_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_15_group_modifiers::regex_37_matcher::to_string() -> std::string{return R"('((?s-i:a.))b'i)"; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_38_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_38_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4495,10 +4214,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_38_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_38_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -4506,19 +4226,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_38_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_38_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_15_group_modifiers::regex_38_matcher::to_string() -> std::string{return R"('((?s-i:a\N))b'i)"; } + template [[nodiscard]] constexpr auto test_tests_15_group_modifiers::regex_38_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_15_group_modifiers::regex_38_matcher::to_string() -> std::string{return R"('((?s-i:a\N))b'i)"; } - - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_39_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_39_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4535,10 +4255,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_39_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_39_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -4546,19 +4267,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_39_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_39_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_15_group_modifiers::regex_39_matcher::to_string() -> std::string{return R"((?i:.[b].))"; } - + template [[nodiscard]] constexpr auto test_tests_15_group_modifiers::regex_39_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_15_group_modifiers::regex_39_matcher::to_string() -> std::string{return R"((?i:.[b].))"; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_40_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_40_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4575,10 +4296,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_40_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_40_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -4586,19 +4308,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_40_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_40_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_15_group_modifiers::regex_40_matcher::to_string() -> std::string{return R"((?i:\N[b]\N))"; } - + template [[nodiscard]] constexpr auto test_tests_15_group_modifiers::regex_40_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_15_group_modifiers::regex_40_matcher::to_string() -> std::string{return R"((?i:\N[b]\N))"; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_41_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_41_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4626,11 +4348,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_41_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_41_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4644,11 +4367,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_41_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_41_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4676,11 +4400,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_41_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_41_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4694,11 +4419,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_41_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_41_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4712,11 +4438,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_41_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_41_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4731,11 +4458,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_41_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_41_matcher::func_6::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4750,10 +4478,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_41_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_41_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -4761,19 +4490,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_41_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_41_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_15_group_modifiers::regex_41_matcher::to_string() -> std::string{return R"(^(?:a?b?)*$)"; } + template [[nodiscard]] constexpr auto test_tests_15_group_modifiers::regex_41_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_15_group_modifiers::regex_41_matcher::to_string() -> std::string{return R"(^(?:a?b?)*$)"; } - - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_42_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_42_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4858,10 +4587,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_42_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_42_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -4869,19 +4599,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_42_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_42_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_15_group_modifiers::regex_42_matcher::to_string() -> std::string{return R"(((?s)^a(.))((?m)^b$))"; } - + template [[nodiscard]] constexpr auto test_tests_15_group_modifiers::regex_42_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_15_group_modifiers::regex_42_matcher::to_string() -> std::string{return R"(((?s)^a(.))((?m)^b$))"; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_43_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_43_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4924,10 +4654,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_43_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_43_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -4935,19 +4666,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_43_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_43_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_15_group_modifiers::regex_43_matcher::to_string() -> std::string{return R"(((?m)^b$))"; } + template [[nodiscard]] constexpr auto test_tests_15_group_modifiers::regex_43_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_15_group_modifiers::regex_43_matcher::to_string() -> std::string{return R"(((?m)^b$))"; } - - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_44_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_44_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4976,10 +4707,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_44_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_44_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -4987,19 +4719,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_44_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_44_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_15_group_modifiers::regex_44_matcher::to_string() -> std::string{return R"((?m)^b)"; } - + template [[nodiscard]] constexpr auto test_tests_15_group_modifiers::regex_44_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_15_group_modifiers::regex_44_matcher::to_string() -> std::string{return R"((?m)^b)"; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_45_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_45_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5041,10 +4773,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_45_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_45_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -5052,19 +4785,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_45_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_45_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_15_group_modifiers::regex_45_matcher::to_string() -> std::string{return R"((?m)^(b))"; } + template [[nodiscard]] constexpr auto test_tests_15_group_modifiers::regex_45_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_15_group_modifiers::regex_45_matcher::to_string() -> std::string{return R"((?m)^(b))"; } - - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_46_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_46_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5106,10 +4839,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_46_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_46_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -5117,19 +4851,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_46_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_46_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_15_group_modifiers::regex_46_matcher::to_string() -> std::string{return R"(((?m)^b))"; } - + template [[nodiscard]] constexpr auto test_tests_15_group_modifiers::regex_46_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_15_group_modifiers::regex_46_matcher::to_string() -> std::string{return R"(((?m)^b))"; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_47_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_47_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5185,10 +4919,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_47_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_47_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -5196,19 +4931,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_47_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_47_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_15_group_modifiers::regex_47_matcher::to_string() -> std::string{return R"(\n((?m)^b))"; } - + template [[nodiscard]] constexpr auto test_tests_15_group_modifiers::regex_47_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_15_group_modifiers::regex_47_matcher::to_string() -> std::string{return R"(\n((?m)^b))"; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_48_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_48_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5237,10 +4972,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_48_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_48_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -5248,19 +4984,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_48_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_48_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_15_group_modifiers::regex_48_matcher::to_string() -> std::string{return R"(^b)"; } + template [[nodiscard]] constexpr auto test_tests_15_group_modifiers::regex_48_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_15_group_modifiers::regex_48_matcher::to_string() -> std::string{return R"(^b)"; } - - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_49_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_49_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5302,10 +5038,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_49_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_49_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -5313,19 +5050,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_49_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_49_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_15_group_modifiers::regex_49_matcher::to_string() -> std::string{return R"(()^b)"; } - + template [[nodiscard]] constexpr auto test_tests_15_group_modifiers::regex_49_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_15_group_modifiers::regex_49_matcher::to_string() -> std::string{return R"(()^b)"; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_50_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_50_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5367,10 +5104,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_50_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_50_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -5378,19 +5116,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_50_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_50_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_15_group_modifiers::regex_50_matcher::to_string() -> std::string{return R"(((?m)^b))"; } - + template [[nodiscard]] constexpr auto test_tests_15_group_modifiers::regex_50_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_15_group_modifiers::regex_50_matcher::to_string() -> std::string{return R"(((?m)^b))"; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_51_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_51_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5418,10 +5156,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_51_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_51_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -5429,19 +5168,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_51_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_51_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_15_group_modifiers::regex_51_matcher::to_string() -> std::string{return R"('(?:foo)'n)"; } + template [[nodiscard]] constexpr auto test_tests_15_group_modifiers::regex_51_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_15_group_modifiers::regex_51_matcher::to_string() -> std::string{return R"('(?:foo)'n)"; } - - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_52_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_52_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5496,10 +5235,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_52_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_52_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -5507,19 +5247,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_52_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_52_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_15_group_modifiers::regex_52_matcher::to_string() -> std::string{return R"('(?-n)(foo)(?n)(?:bar)'n)"; } - + template [[nodiscard]] constexpr auto test_tests_15_group_modifiers::regex_52_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_15_group_modifiers::regex_52_matcher::to_string() -> std::string{return R"('(?-n)(foo)(?n)(?:bar)'n)"; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_53_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_53_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5574,10 +5314,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_53_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_15_group_modifiers::regex_53_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -5585,15 +5326,16 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_15_group_modifiers::regex_53_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_53_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_15_group_modifiers::regex_53_matcher::to_string() -> std::string{return R"('(?-n:(foo)(?n:(?:bar)))'n)"; } + template [[nodiscard]] constexpr auto test_tests_15_group_modifiers::regex_53_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_15_group_modifiers::regex_53_matcher::to_string() -> std::string{return R"('(?-n:(foo)(?n:(?:bar)))'n)"; } -#line 277 "pure2-regex_15_group_modifiers.cpp2" +#line 278 "pure2-regex_15_group_modifiers.cpp2" auto main() -> int{ CPP2_UFCS(run)(test_tests_15_group_modifiers()); } diff --git a/regression-tests/test-results/pure2-regex_16_perl_syntax_modifier.cpp b/regression-tests/test-results/pure2-regex_16_perl_syntax_modifier.cpp index 70cf7703b..87039e725 100644 --- a/regression-tests/test-results/pure2-regex_16_perl_syntax_modifier.cpp +++ b/regression-tests/test-results/pure2-regex_16_perl_syntax_modifier.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes #include "cpp2regex.h" //=== Cpp2 type declarations ==================================================== @@ -9,7 +9,7 @@ #line 1 "pure2-regex_16_perl_syntax_modifier.cpp2" -#line 165 "pure2-regex_16_perl_syntax_modifier.cpp2" +#line 166 "pure2-regex_16_perl_syntax_modifier.cpp2" class test_tests_16_perl_syntax_modifier; @@ -18,47 +18,41 @@ class test_tests_16_perl_syntax_modifier; #line 1 "pure2-regex_16_perl_syntax_modifier.cpp2" [[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string; -#line 112 "pure2-regex_16_perl_syntax_modifier.cpp2" +#line 113 "pure2-regex_16_perl_syntax_modifier.cpp2" [[nodiscard]] auto sanitize(std::string str) -> std::string; -#line 124 "pure2-regex_16_perl_syntax_modifier.cpp2" +#line 125 "pure2-regex_16_perl_syntax_modifier.cpp2" template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, cpp2::impl::in resultExpected) -> void; -#line 165 "pure2-regex_16_perl_syntax_modifier.cpp2" +#line 166 "pure2-regex_16_perl_syntax_modifier.cpp2" class test_tests_16_perl_syntax_modifier { -#line 199 "pure2-regex_16_perl_syntax_modifier.cpp2" +#line 200 "pure2-regex_16_perl_syntax_modifier.cpp2" public: auto run() const& -> void; - public: class regex_01_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: template class regex_01_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_01_matcher() = default; public: regex_01_matcher(regex_01_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -66,35 +60,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_01 {}; public: class regex_02_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_01 {}; public: template class regex_02_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_02_matcher() = default; public: regex_02_matcher(regex_02_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -102,35 +90,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_02 {}; public: class regex_03_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_02 {}; public: template class regex_03_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_03_matcher() = default; public: regex_03_matcher(regex_03_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -138,35 +120,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_03 {}; public: class regex_04_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_03 {}; public: template class regex_04_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_04_matcher() = default; public: regex_04_matcher(regex_04_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -174,35 +150,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_04 {}; public: class regex_05_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_04 {}; public: template class regex_05_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_05_matcher() = default; public: regex_05_matcher(regex_05_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -210,35 +180,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_05 {}; public: class regex_06_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_05 {}; public: template class regex_06_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_06_matcher() = default; public: regex_06_matcher(regex_06_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -246,25 +210,19 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_06 {}; public: class regex_07_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_06 {}; public: template class regex_07_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_07_matcher() = default; public: regex_07_matcher(regex_07_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -272,35 +230,29 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_07 {}; public: class regex_08_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_07 {}; public: template class regex_08_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_08_matcher() = default; public: regex_08_matcher(regex_08_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -308,35 +260,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_08 {}; public: class regex_09_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_08 {}; public: template class regex_09_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_09_matcher() = default; public: regex_09_matcher(regex_09_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -344,25 +290,19 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_09 {}; public: class regex_10_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_09 {}; public: template class regex_10_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_10_matcher() = default; public: regex_10_matcher(regex_10_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -370,25 +310,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_10 {}; public: class regex_11_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_10 {}; public: template class regex_11_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_11_matcher() = default; public: regex_11_matcher(regex_11_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -396,25 +330,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_11 {}; public: class regex_12_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_11 {}; public: template class regex_12_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_12_matcher() = default; public: regex_12_matcher(regex_12_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -422,25 +350,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_12 {}; public: class regex_13_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_12 {}; public: template class regex_13_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_13_matcher() = default; public: regex_13_matcher(regex_13_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -448,25 +370,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_13 {}; public: class regex_14_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_13 {}; public: template class regex_14_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_14_matcher() = default; public: regex_14_matcher(regex_14_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -474,25 +390,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_14 {}; public: class regex_15_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_14 {}; public: template class regex_15_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_15_matcher() = default; public: regex_15_matcher(regex_15_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -500,25 +410,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_15 {}; public: class regex_16_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_15 {}; public: template class regex_16_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_16_matcher() = default; public: regex_16_matcher(regex_16_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -526,25 +430,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_16 {}; public: class regex_17_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_16 {}; public: template class regex_17_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_17_matcher() = default; public: regex_17_matcher(regex_17_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -552,25 +450,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_17 {}; public: class regex_18_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_17 {}; public: template class regex_18_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_18_matcher() = default; public: regex_18_matcher(regex_18_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -578,25 +470,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_18 {}; public: class regex_19_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_18 {}; public: template class regex_19_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_19_matcher() = default; public: regex_19_matcher(regex_19_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -604,25 +490,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_19 {}; public: class regex_20_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_19 {}; public: template class regex_20_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_20_matcher() = default; public: regex_20_matcher(regex_20_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -630,35 +510,29 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_20 {}; public: class regex_21_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_20 {}; public: template class regex_21_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_21_matcher() = default; public: regex_21_matcher(regex_21_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -666,35 +540,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_21 {}; public: class regex_22_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_21 {}; public: template class regex_22_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_22_matcher() = default; public: regex_22_matcher(regex_22_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -702,35 +570,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_22 {}; public: class regex_23_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_22 {}; public: template class regex_23_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_23_matcher() = default; public: regex_23_matcher(regex_23_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -738,35 +600,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_23 {}; public: class regex_24_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_23 {}; public: template class regex_24_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_24_matcher() = default; public: regex_24_matcher(regex_24_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -774,35 +630,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_24 {}; public: class regex_25_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_24 {}; public: template class regex_25_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_25_matcher() = default; public: regex_25_matcher(regex_25_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -810,35 +660,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_25 {}; public: class regex_26_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_25 {}; public: template class regex_26_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_26_matcher() = default; public: regex_26_matcher(regex_26_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -846,25 +690,19 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_26 {}; public: class regex_27_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_26 {}; public: template class regex_27_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_27_matcher() = default; public: regex_27_matcher(regex_27_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -872,35 +710,29 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_27 {}; public: class regex_28_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_27 {}; public: template class regex_28_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_28_matcher() = default; public: regex_28_matcher(regex_28_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -908,35 +740,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_28 {}; public: class regex_29_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_28 {}; public: template class regex_29_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_29_matcher() = default; public: regex_29_matcher(regex_29_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -944,25 +770,19 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_29 {}; public: class regex_30_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_29 {}; public: template class regex_30_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_30_matcher() = default; public: regex_30_matcher(regex_30_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -970,25 +790,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_30 {}; public: class regex_31_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_30 {}; public: template class regex_31_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_31_matcher() = default; public: regex_31_matcher(regex_31_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -996,25 +810,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_31 {}; public: class regex_32_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_31 {}; public: template class regex_32_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_32_matcher() = default; public: regex_32_matcher(regex_32_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1022,25 +830,19 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_32 {}; public: class regex_33_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_32 {}; public: template class regex_33_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_33_matcher() = default; public: regex_33_matcher(regex_33_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1048,13 +850,13 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_33 {}; + public: cpp2::regex::regular_expression> regex_33 {}; public: test_tests_16_perl_syntax_modifier() = default; public: test_tests_16_perl_syntax_modifier(test_tests_16_perl_syntax_modifier const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(test_tests_16_perl_syntax_modifier const&) -> void = delete; -#line 236 "pure2-regex_16_perl_syntax_modifier.cpp2" +#line 237 "pure2-regex_16_perl_syntax_modifier.cpp2" }; auto main() -> int; @@ -1158,6 +960,7 @@ auto main() -> int; } result += std::to_string(cpp2::move(pos)); } + ++next; } else { std::cerr << "Not implemented"; @@ -1173,7 +976,7 @@ auto main() -> int; return result; } -#line 112 "pure2-regex_16_perl_syntax_modifier.cpp2" +#line 113 "pure2-regex_16_perl_syntax_modifier.cpp2" [[nodiscard]] auto sanitize(std::string str) -> std::string { str = cpp2::string_util::replace_all(str, "\a", "\\a"); @@ -1186,7 +989,7 @@ auto main() -> int; return cpp2::move(str); } -#line 124 "pure2-regex_16_perl_syntax_modifier.cpp2" +#line 125 "pure2-regex_16_perl_syntax_modifier.cpp2" template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, cpp2::impl::in resultExpected) -> void{ @@ -1227,7 +1030,7 @@ template auto test(M const& regex, cpp2::impl::in id, c std::cout << "" + cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(sanitize(str)) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(sanitize(resultExpected)) + "" << std::endl; } -#line 199 "pure2-regex_16_perl_syntax_modifier.cpp2" +#line 200 "pure2-regex_16_perl_syntax_modifier.cpp2" auto test_tests_16_perl_syntax_modifier::run() const& -> void{ std::cout << "Running tests_16_perl_syntax_modifier:" << std::endl; test(regex_01, "01", R"(/\N {1}/x)", "abbbbc", "y", R"($&)", "a"); @@ -1269,8 +1072,7 @@ template auto test(M const& regex, cpp2::impl::in id, c - - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_01_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_01_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1285,11 +1087,12 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_01_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_01_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1303,11 +1106,12 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_01_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_01_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1321,10 +1125,11 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_01_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_01_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1332,19 +1137,19 @@ template auto test(M const& regex, cpp2::impl::in id, c return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_01_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_01_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_01_matcher::to_string() -> std::string{return R"(/\N{1}/x)"; } + template [[nodiscard]] constexpr auto test_tests_16_perl_syntax_modifier::regex_01_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_01_matcher::to_string() -> std::string{return R"(/\N{1}/x)"; } - - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_02_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_02_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1359,11 +1164,12 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_02_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_02_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1377,11 +1183,12 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_02_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_02_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1395,10 +1202,11 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_02_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_02_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1406,19 +1214,19 @@ template auto test(M const& regex, cpp2::impl::in id, c return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_02_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_02_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_02_matcher::to_string() -> std::string{return R"(/\N{1}/x)"; } - + template [[nodiscard]] constexpr auto test_tests_16_perl_syntax_modifier::regex_02_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_02_matcher::to_string() -> std::string{return R"(/\N{1}/x)"; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_03_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_03_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1433,11 +1241,12 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_03_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_03_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1451,11 +1260,12 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_03_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_03_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1469,10 +1279,11 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_03_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_03_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1480,19 +1291,19 @@ template auto test(M const& regex, cpp2::impl::in id, c return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_03_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_03_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_03_matcher::to_string() -> std::string{return R"(/\N{1}/x)"; } - + template [[nodiscard]] constexpr auto test_tests_16_perl_syntax_modifier::regex_03_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_03_matcher::to_string() -> std::string{return R"(/\N{1}/x)"; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_04_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_04_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1507,11 +1318,12 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_04_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_04_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1525,11 +1337,12 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_04_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_04_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1543,10 +1356,11 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_04_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_04_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1554,19 +1368,19 @@ template auto test(M const& regex, cpp2::impl::in id, c return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_04_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_04_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_04_matcher::to_string() -> std::string{return R"(/\N{3,4}/x)"; } + template [[nodiscard]] constexpr auto test_tests_16_perl_syntax_modifier::regex_04_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_04_matcher::to_string() -> std::string{return R"(/\N{3,4}/x)"; } - - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_05_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_05_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1581,11 +1395,12 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_05_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_05_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1599,11 +1414,12 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_05_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_05_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1617,10 +1433,11 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_05_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_05_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1628,19 +1445,19 @@ template auto test(M const& regex, cpp2::impl::in id, c return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_05_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_05_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_05_matcher::to_string() -> std::string{return R"(/\N{3,4}/x)"; } - + template [[nodiscard]] constexpr auto test_tests_16_perl_syntax_modifier::regex_05_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_05_matcher::to_string() -> std::string{return R"(/\N{3,4}/x)"; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_06_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_06_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1655,11 +1472,12 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_06_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_06_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1673,11 +1491,12 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_06_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_06_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1691,10 +1510,11 @@ template auto test(M const& regex, cpp2::impl::in id, c else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_06_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_06_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1702,19 +1522,19 @@ template auto test(M const& regex, cpp2::impl::in id, c return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_06_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_06_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_06_matcher::to_string() -> std::string{return R"(/\N{3,4}/x)"; } + template [[nodiscard]] constexpr auto test_tests_16_perl_syntax_modifier::regex_06_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_06_matcher::to_string() -> std::string{return R"(/\N{3,4}/x)"; } - - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_07_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_07_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1757,10 +1577,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_07_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_07_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1768,19 +1589,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_07_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_07_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_07_matcher::to_string() -> std::string{return R"(/a\Nc/x)"; } - + template [[nodiscard]] constexpr auto test_tests_16_perl_syntax_modifier::regex_07_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_07_matcher::to_string() -> std::string{return R"(/a\Nc/x)"; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_08_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_08_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1795,11 +1616,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_08_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_08_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1827,11 +1649,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_08_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_08_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1859,10 +1682,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_08_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_08_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1870,19 +1694,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_08_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_08_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_08_matcher::to_string() -> std::string{return R"(/a\N*c/x)"; } + template [[nodiscard]] constexpr auto test_tests_16_perl_syntax_modifier::regex_08_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_08_matcher::to_string() -> std::string{return R"(/a\N*c/x)"; } - - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_09_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_09_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1897,11 +1721,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_09_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_09_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1929,11 +1754,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_09_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_09_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1961,10 +1787,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_09_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_09_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1972,19 +1799,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_09_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_09_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_09_matcher::to_string() -> std::string{return R"(/a\N*c/x)"; } - + template [[nodiscard]] constexpr auto test_tests_16_perl_syntax_modifier::regex_09_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_09_matcher::to_string() -> std::string{return R"(/a\N*c/x)"; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_10_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_10_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1999,10 +1826,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_10_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_10_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2010,19 +1838,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_10_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_10_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_10_matcher::to_string() -> std::string{return R"(/[a b]/x)"; } + template [[nodiscard]] constexpr auto test_tests_16_perl_syntax_modifier::regex_10_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_10_matcher::to_string() -> std::string{return R"(/[a b]/x)"; } - - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_11_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_11_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2037,10 +1865,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_11_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_11_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2048,19 +1877,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_11_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_11_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_11_matcher::to_string() -> std::string{return R"(/[a b]/xx)"; } - + template [[nodiscard]] constexpr auto test_tests_16_perl_syntax_modifier::regex_11_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_11_matcher::to_string() -> std::string{return R"(/[a b]/xx)"; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_12_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_12_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2075,10 +1904,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_12_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_12_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2086,19 +1916,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_12_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_12_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_12_matcher::to_string() -> std::string{return R"(/[a\ b]/xx)"; } + template [[nodiscard]] constexpr auto test_tests_16_perl_syntax_modifier::regex_12_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_12_matcher::to_string() -> std::string{return R"(/[a\ b]/xx)"; } - - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_13_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_13_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2113,10 +1943,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_13_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_13_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2124,19 +1955,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_13_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_13_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_13_matcher::to_string() -> std::string{return R"(/[ ^ a b ]/xx)"; } - + template [[nodiscard]] constexpr auto test_tests_16_perl_syntax_modifier::regex_13_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_13_matcher::to_string() -> std::string{return R"(/[ ^ a b ]/xx)"; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_14_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_14_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2151,10 +1982,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_14_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_14_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2162,19 +1994,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_14_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_14_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_14_matcher::to_string() -> std::string{return R"(/[ ^ a b ]/xx)"; } + template [[nodiscard]] constexpr auto test_tests_16_perl_syntax_modifier::regex_14_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_14_matcher::to_string() -> std::string{return R"(/[ ^ a b ]/xx)"; } - - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_15_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_15_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2189,10 +2021,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_15_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_15_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2200,19 +2033,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_15_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_15_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_15_matcher::to_string() -> std::string{return R"(/[ ^ a b ]/xx)"; } - + template [[nodiscard]] constexpr auto test_tests_16_perl_syntax_modifier::regex_15_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_15_matcher::to_string() -> std::string{return R"(/[ ^ a b ]/xx)"; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_16_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_16_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2227,10 +2060,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_16_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_16_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2238,19 +2072,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_16_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_16_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_16_matcher::to_string() -> std::string{return R"(/(?x:[a b])/xx)"; } + template [[nodiscard]] constexpr auto test_tests_16_perl_syntax_modifier::regex_16_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_16_matcher::to_string() -> std::string{return R"(/(?x:[a b])/xx)"; } - - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_17_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_17_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2265,10 +2099,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_17_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_17_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2276,19 +2111,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_17_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_17_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_17_matcher::to_string() -> std::string{return R"(/(?xx:[a b])/x)"; } - + template [[nodiscard]] constexpr auto test_tests_16_perl_syntax_modifier::regex_17_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_17_matcher::to_string() -> std::string{return R"(/(?xx:[a b])/x)"; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_18_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_18_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2303,10 +2138,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_18_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_18_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2314,19 +2150,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_18_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_18_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_18_matcher::to_string() -> std::string{return R"(/(?x)[a b]/xx)"; } + template [[nodiscard]] constexpr auto test_tests_16_perl_syntax_modifier::regex_18_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_18_matcher::to_string() -> std::string{return R"(/(?x)[a b]/xx)"; } - - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_19_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_19_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2341,10 +2177,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_19_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_19_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2352,19 +2189,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_19_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_19_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_19_matcher::to_string() -> std::string{return R"(/(?xx)[a b]/x)"; } - + template [[nodiscard]] constexpr auto test_tests_16_perl_syntax_modifier::regex_19_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_19_matcher::to_string() -> std::string{return R"(/(?xx)[a b]/x)"; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_20_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_20_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2379,10 +2216,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_20_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_20_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2390,19 +2228,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_20_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_20_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_20_matcher::to_string() -> std::string{return R"(/(?-x:[a b])/xx)"; } + template [[nodiscard]] constexpr auto test_tests_16_perl_syntax_modifier::regex_20_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_20_matcher::to_string() -> std::string{return R"(/(?-x:[a b])/xx)"; } - - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_21_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_21_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2417,11 +2255,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_21_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_21_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2435,11 +2274,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_21_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_21_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2453,10 +2293,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_21_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_21_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2464,19 +2305,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_21_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_21_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_21_matcher::to_string() -> std::string{return R"(/\N{1}/x)"; } - + template [[nodiscard]] constexpr auto test_tests_16_perl_syntax_modifier::regex_21_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_21_matcher::to_string() -> std::string{return R"(/\N{1}/x)"; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_22_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_22_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2491,11 +2332,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_22_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_22_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2509,11 +2351,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_22_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_22_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2527,10 +2370,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_22_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_22_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2538,19 +2382,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_22_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_22_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_22_matcher::to_string() -> std::string{return R"(/\N{1}/x)"; } + template [[nodiscard]] constexpr auto test_tests_16_perl_syntax_modifier::regex_22_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_22_matcher::to_string() -> std::string{return R"(/\N{1}/x)"; } - - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_23_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_23_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2565,11 +2409,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_23_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_23_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2583,11 +2428,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_23_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_23_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2601,10 +2447,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_23_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_23_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2612,19 +2459,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_23_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_23_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_23_matcher::to_string() -> std::string{return R"(/\N{1}/x)"; } - + template [[nodiscard]] constexpr auto test_tests_16_perl_syntax_modifier::regex_23_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_23_matcher::to_string() -> std::string{return R"(/\N{1}/x)"; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_24_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_24_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2639,11 +2486,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_24_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_24_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2657,11 +2505,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_24_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_24_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2675,10 +2524,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_24_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_24_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2686,19 +2536,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_24_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_24_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_24_matcher::to_string() -> std::string{return R"(/\N{3,4}/x)"; } + template [[nodiscard]] constexpr auto test_tests_16_perl_syntax_modifier::regex_24_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_24_matcher::to_string() -> std::string{return R"(/\N{3,4}/x)"; } - - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_25_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_25_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2713,11 +2563,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_25_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_25_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2731,11 +2582,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_25_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_25_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2749,10 +2601,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_25_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_25_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2760,19 +2613,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_25_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_25_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_25_matcher::to_string() -> std::string{return R"(/\N{3,4}/x)"; } - + template [[nodiscard]] constexpr auto test_tests_16_perl_syntax_modifier::regex_25_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_25_matcher::to_string() -> std::string{return R"(/\N{3,4}/x)"; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_26_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_26_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2787,11 +2640,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_26_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_26_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2805,11 +2659,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_26_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_26_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2823,10 +2678,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_26_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_26_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2834,19 +2690,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_26_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_26_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_26_matcher::to_string() -> std::string{return R"(/\N{3,4}/x)"; } + template [[nodiscard]] constexpr auto test_tests_16_perl_syntax_modifier::regex_26_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_26_matcher::to_string() -> std::string{return R"(/\N{3,4}/x)"; } - - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_27_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_27_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2889,10 +2745,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_27_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_27_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2900,19 +2757,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_27_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_27_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_27_matcher::to_string() -> std::string{return R"(/a\Nc/x)"; } - + template [[nodiscard]] constexpr auto test_tests_16_perl_syntax_modifier::regex_27_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_27_matcher::to_string() -> std::string{return R"(/a\Nc/x)"; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_28_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_28_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2927,11 +2784,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_28_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_28_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2959,11 +2817,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_28_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_28_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2991,10 +2850,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_28_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_28_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -3002,19 +2862,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_28_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_28_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_28_matcher::to_string() -> std::string{return R"(/a\N*c/x)"; } + template [[nodiscard]] constexpr auto test_tests_16_perl_syntax_modifier::regex_28_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_28_matcher::to_string() -> std::string{return R"(/a\N*c/x)"; } - - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_29_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_29_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3029,11 +2889,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_29_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_29_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3061,11 +2922,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_29_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_29_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3093,10 +2955,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_29_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_29_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -3104,19 +2967,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_29_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_29_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_29_matcher::to_string() -> std::string{return R"(/a\N*c/x)"; } - + template [[nodiscard]] constexpr auto test_tests_16_perl_syntax_modifier::regex_29_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_29_matcher::to_string() -> std::string{return R"(/a\N*c/x)"; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_30_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_30_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3131,10 +2994,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_30_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_30_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -3142,19 +3006,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_30_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_30_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_30_matcher::to_string() -> std::string{return R"(/[#]/)"; } + template [[nodiscard]] constexpr auto test_tests_16_perl_syntax_modifier::regex_30_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_30_matcher::to_string() -> std::string{return R"(/[#]/)"; } - - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_31_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_31_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3183,10 +3047,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_31_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_31_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -3194,19 +3059,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_31_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_31_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_31_matcher::to_string() -> std::string{return R"(/[#]b/)"; } - + template [[nodiscard]] constexpr auto test_tests_16_perl_syntax_modifier::regex_31_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_31_matcher::to_string() -> std::string{return R"(/[#]b/)"; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_32_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_32_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3221,10 +3086,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_32_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_32_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -3232,19 +3098,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_32_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_32_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_32_matcher::to_string() -> std::string{return R"(/[#]/x)"; } + template [[nodiscard]] constexpr auto test_tests_16_perl_syntax_modifier::regex_32_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_32_matcher::to_string() -> std::string{return R"(/[#]/x)"; } - - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_33_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_33_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3273,10 +3139,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_33_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_33_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -3284,15 +3151,16 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_33_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_33_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_33_matcher::to_string() -> std::string{return R"(/[#]b/x)"; } + template [[nodiscard]] constexpr auto test_tests_16_perl_syntax_modifier::regex_33_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_33_matcher::to_string() -> std::string{return R"(/[#]b/x)"; } -#line 237 "pure2-regex_16_perl_syntax_modifier.cpp2" +#line 238 "pure2-regex_16_perl_syntax_modifier.cpp2" auto main() -> int{ CPP2_UFCS(run)(test_tests_16_perl_syntax_modifier()); } diff --git a/regression-tests/test-results/pure2-regex_17_comments.cpp b/regression-tests/test-results/pure2-regex_17_comments.cpp index 94327da04..0827f1ac2 100644 --- a/regression-tests/test-results/pure2-regex_17_comments.cpp +++ b/regression-tests/test-results/pure2-regex_17_comments.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes #include "cpp2regex.h" //=== Cpp2 type declarations ==================================================== @@ -9,7 +9,7 @@ #line 1 "pure2-regex_17_comments.cpp2" -#line 165 "pure2-regex_17_comments.cpp2" +#line 166 "pure2-regex_17_comments.cpp2" class test_tests_17_comments; @@ -18,47 +18,41 @@ class test_tests_17_comments; #line 1 "pure2-regex_17_comments.cpp2" [[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string; -#line 112 "pure2-regex_17_comments.cpp2" +#line 113 "pure2-regex_17_comments.cpp2" [[nodiscard]] auto sanitize(std::string str) -> std::string; -#line 124 "pure2-regex_17_comments.cpp2" +#line 125 "pure2-regex_17_comments.cpp2" template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, cpp2::impl::in resultExpected) -> void; -#line 165 "pure2-regex_17_comments.cpp2" +#line 166 "pure2-regex_17_comments.cpp2" class test_tests_17_comments { -#line 169 "pure2-regex_17_comments.cpp2" +#line 170 "pure2-regex_17_comments.cpp2" public: auto run() const& -> void; - public: class regex_01_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: template class regex_01_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_01_matcher() = default; public: regex_01_matcher(regex_01_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -66,35 +60,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_01 {}; public: class regex_02_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_01 {}; public: template class regex_02_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_02_matcher() = default; public: regex_02_matcher(regex_02_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -102,25 +90,19 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_02 {}; public: class regex_03_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_02 {}; public: template class regex_03_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_03_matcher() = default; public: regex_03_matcher(regex_03_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -128,13 +110,13 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_03 {}; + public: cpp2::regex::regular_expression> regex_03 {}; public: test_tests_17_comments() = default; public: test_tests_17_comments(test_tests_17_comments const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(test_tests_17_comments const&) -> void = delete; -#line 176 "pure2-regex_17_comments.cpp2" +#line 177 "pure2-regex_17_comments.cpp2" }; auto main() -> int; @@ -238,6 +220,7 @@ auto main() -> int; } result += std::to_string(cpp2::move(pos)); } + ++next; } else { std::cerr << "Not implemented"; @@ -253,7 +236,7 @@ auto main() -> int; return result; } -#line 112 "pure2-regex_17_comments.cpp2" +#line 113 "pure2-regex_17_comments.cpp2" [[nodiscard]] auto sanitize(std::string str) -> std::string { str = cpp2::string_util::replace_all(str, "\a", "\\a"); @@ -266,7 +249,7 @@ auto main() -> int; return cpp2::move(str); } -#line 124 "pure2-regex_17_comments.cpp2" +#line 125 "pure2-regex_17_comments.cpp2" template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, cpp2::impl::in resultExpected) -> void{ @@ -307,7 +290,7 @@ template auto test(M const& regex, cpp2::impl::in id, c std::cout << "" + cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(sanitize(str)) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(sanitize(resultExpected)) + "" << std::endl; } -#line 169 "pure2-regex_17_comments.cpp2" +#line 170 "pure2-regex_17_comments.cpp2" auto test_tests_17_comments::run() const& -> void{ std::cout << "Running tests_17_comments:" << std::endl; test(regex_01, "01", R"(^a(?#xxx){3}c)", "aaac", "y", R"($&)", "aaac"); @@ -319,8 +302,7 @@ template auto test(M const& regex, cpp2::impl::in id, c - - template [[nodiscard]] auto test_tests_17_comments::regex_01_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_17_comments::regex_01_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -348,11 +330,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_17_comments::regex_01_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_17_comments::regex_01_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -367,11 +350,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_17_comments::regex_01_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_17_comments::regex_01_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -399,10 +383,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_17_comments::regex_01_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_17_comments::regex_01_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -410,19 +395,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_17_comments::regex_01_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_17_comments::regex_01_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_17_comments::regex_01_matcher::to_string() -> std::string{return R"(^a(?#xxx){3}c)"; } + template [[nodiscard]] constexpr auto test_tests_17_comments::regex_01_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_17_comments::regex_01_matcher::to_string() -> std::string{return R"(^a(?#xxx){3}c)"; } - - template [[nodiscard]] auto test_tests_17_comments::regex_02_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_17_comments::regex_02_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -450,11 +435,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_17_comments::regex_02_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_17_comments::regex_02_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -469,11 +455,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_17_comments::regex_02_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_17_comments::regex_02_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -501,10 +488,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_17_comments::regex_02_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_17_comments::regex_02_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -512,19 +500,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_17_comments::regex_02_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_17_comments::regex_02_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_17_comments::regex_02_matcher::to_string() -> std::string{return R"('^a(?#xxx)(?#yyy){3}c'x)"; } - + template [[nodiscard]] constexpr auto test_tests_17_comments::regex_02_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_17_comments::regex_02_matcher::to_string() -> std::string{return R"('^a(?#xxx)(?#yyy){3}c'x)"; } - template [[nodiscard]] auto test_tests_17_comments::regex_03_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_17_comments::regex_03_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -552,10 +540,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_17_comments::regex_03_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_17_comments::regex_03_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -563,15 +552,16 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_17_comments::regex_03_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_17_comments::regex_03_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_17_comments::regex_03_matcher::to_string() -> std::string{return R"('foo'x)"; } + template [[nodiscard]] constexpr auto test_tests_17_comments::regex_03_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_17_comments::regex_03_matcher::to_string() -> std::string{return R"('foo'x)"; } -#line 177 "pure2-regex_17_comments.cpp2" +#line 178 "pure2-regex_17_comments.cpp2" auto main() -> int{ CPP2_UFCS(run)(test_tests_17_comments()); } diff --git a/regression-tests/test-results/pure2-regex_18_branch_reset.cpp b/regression-tests/test-results/pure2-regex_18_branch_reset.cpp index d3c7033ce..5b31337c1 100644 --- a/regression-tests/test-results/pure2-regex_18_branch_reset.cpp +++ b/regression-tests/test-results/pure2-regex_18_branch_reset.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes #include "cpp2regex.h" //=== Cpp2 type declarations ==================================================== @@ -9,7 +9,7 @@ #line 1 "pure2-regex_18_branch_reset.cpp2" -#line 165 "pure2-regex_18_branch_reset.cpp2" +#line 166 "pure2-regex_18_branch_reset.cpp2" class test_tests_18_branch_reset; @@ -18,37 +18,31 @@ class test_tests_18_branch_reset; #line 1 "pure2-regex_18_branch_reset.cpp2" [[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string; -#line 112 "pure2-regex_18_branch_reset.cpp2" +#line 113 "pure2-regex_18_branch_reset.cpp2" [[nodiscard]] auto sanitize(std::string str) -> std::string; -#line 124 "pure2-regex_18_branch_reset.cpp2" +#line 125 "pure2-regex_18_branch_reset.cpp2" template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, cpp2::impl::in resultExpected) -> void; -#line 165 "pure2-regex_18_branch_reset.cpp2" +#line 166 "pure2-regex_18_branch_reset.cpp2" class test_tests_18_branch_reset { -#line 181 "pure2-regex_18_branch_reset.cpp2" +#line 182 "pure2-regex_18_branch_reset.cpp2" public: auto run() const& -> void; - public: class regex_01_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: template class regex_01_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_01_matcher() = default; public: regex_01_matcher(regex_01_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -56,11 +50,10 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_01 {}; public: class regex_02_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_01 {}; public: template class regex_02_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -70,7 +63,7 @@ public: class func_1 { }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -80,7 +73,7 @@ public: class func_1 { }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -90,26 +83,21 @@ public: class func_1 { }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_02_matcher() = default; public: regex_02_matcher(regex_02_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -117,11 +105,10 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_02 {}; public: class regex_03_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_02 {}; public: template class regex_03_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -131,7 +118,7 @@ public: class func_1 { }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -141,7 +128,7 @@ public: class func_1 { }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -151,26 +138,21 @@ public: class func_1 { }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_03_matcher() = default; public: regex_03_matcher(regex_03_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -178,11 +160,10 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_03 {}; public: class regex_04_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_03 {}; public: template class regex_04_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -192,7 +173,7 @@ public: class func_1 { }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -202,7 +183,7 @@ public: class func_1 { }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -212,26 +193,21 @@ public: class func_1 { }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_04_matcher() = default; public: regex_04_matcher(regex_04_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -239,11 +215,10 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_04 {}; public: class regex_05_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_04 {}; public: template class regex_05_matcher { + public: template using context = cpp2::regex::match_context; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -253,7 +228,7 @@ public: class func_2 { }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -263,12 +238,12 @@ public: class func_2 { }; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -278,7 +253,7 @@ public: class func_2 { }; public: class func_6 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -288,7 +263,7 @@ public: class func_2 { }; public: class func_7 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -298,12 +273,12 @@ public: class func_2 { }; public: class func_5 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_8 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -313,26 +288,21 @@ public: class func_2 { }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_9 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_05_matcher() = default; public: regex_05_matcher(regex_05_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -340,11 +310,10 @@ public: class func_2 { }; - public: cpp2::regex::regular_expression regex_05 {}; public: class regex_06_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_05 {}; public: template class regex_06_matcher { + public: template using context = cpp2::regex::match_context; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -354,7 +323,7 @@ public: class func_2 { }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -364,12 +333,12 @@ public: class func_2 { }; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -379,7 +348,7 @@ public: class func_2 { }; public: class func_6 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -389,7 +358,7 @@ public: class func_2 { }; public: class func_7 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -399,12 +368,12 @@ public: class func_2 { }; public: class func_5 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_8 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -414,26 +383,21 @@ public: class func_2 { }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_9 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_06_matcher() = default; public: regex_06_matcher(regex_06_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -441,11 +405,10 @@ public: class func_2 { }; - public: cpp2::regex::regular_expression regex_06 {}; public: class regex_07_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_06 {}; public: template class regex_07_matcher { + public: template using context = cpp2::regex::match_context; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -455,7 +418,7 @@ public: class func_2 { }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -465,12 +428,12 @@ public: class func_2 { }; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -480,7 +443,7 @@ public: class func_2 { }; public: class func_6 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -490,7 +453,7 @@ public: class func_2 { }; public: class func_7 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -500,12 +463,12 @@ public: class func_2 { }; public: class func_5 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_8 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -515,26 +478,21 @@ public: class func_2 { }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_9 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_07_matcher() = default; public: regex_07_matcher(regex_07_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -542,11 +500,10 @@ public: class func_2 { }; - public: cpp2::regex::regular_expression regex_07 {}; public: class regex_08_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_07 {}; public: template class regex_08_matcher { + public: template using context = cpp2::regex::match_context; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -556,7 +513,7 @@ public: class func_2 { }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -566,12 +523,12 @@ public: class func_2 { }; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -581,7 +538,7 @@ public: class func_2 { }; public: class func_6 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -591,7 +548,7 @@ public: class func_2 { }; public: class func_7 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -601,12 +558,12 @@ public: class func_2 { }; public: class func_5 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_8 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -616,26 +573,21 @@ public: class func_2 { }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_9 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_08_matcher() = default; public: regex_08_matcher(regex_08_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -643,11 +595,10 @@ public: class func_2 { }; - public: cpp2::regex::regular_expression regex_08 {}; public: class regex_09_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_08 {}; public: template class regex_09_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -657,7 +608,7 @@ public: class func_1 { }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -667,26 +618,21 @@ public: class func_1 { }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_09_matcher() = default; public: regex_09_matcher(regex_09_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -694,11 +640,10 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_09 {}; public: class regex_10_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_09 {}; public: template class regex_10_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -708,7 +653,7 @@ public: class func_1 { }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -718,26 +663,21 @@ public: class func_1 { }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_10_matcher() = default; public: regex_10_matcher(regex_10_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -745,25 +685,19 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_10 {}; public: class regex_11_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_10 {}; public: template class regex_11_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_11_matcher() = default; public: regex_11_matcher(regex_11_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -771,11 +705,10 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_11 {}; public: class regex_12_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_11 {}; public: template class regex_12_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -785,7 +718,7 @@ public: class func_1 { }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -795,26 +728,21 @@ public: class func_1 { }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_12_matcher() = default; public: regex_12_matcher(regex_12_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -822,11 +750,10 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_12 {}; public: class regex_13_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_12 {}; public: template class regex_13_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -836,7 +763,7 @@ public: class func_1 { }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -846,26 +773,21 @@ public: class func_1 { }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_13_matcher() = default; public: regex_13_matcher(regex_13_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -873,25 +795,19 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_13 {}; public: class regex_14_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_13 {}; public: template class regex_14_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_14_matcher() = default; public: regex_14_matcher(regex_14_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -899,11 +815,10 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_14 {}; public: class regex_15_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_14 {}; public: template class regex_15_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -913,7 +828,7 @@ public: class func_1 { }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -923,26 +838,21 @@ public: class func_1 { }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_15_matcher() = default; public: regex_15_matcher(regex_15_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -950,13 +860,13 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_15 {}; + public: cpp2::regex::regular_expression> regex_15 {}; public: test_tests_18_branch_reset() = default; public: test_tests_18_branch_reset(test_tests_18_branch_reset const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(test_tests_18_branch_reset const&) -> void = delete; -#line 200 "pure2-regex_18_branch_reset.cpp2" +#line 201 "pure2-regex_18_branch_reset.cpp2" }; auto main() -> int; @@ -1060,6 +970,7 @@ auto main() -> int; } result += std::to_string(cpp2::move(pos)); } + ++next; } else { std::cerr << "Not implemented"; @@ -1075,7 +986,7 @@ auto main() -> int; return result; } -#line 112 "pure2-regex_18_branch_reset.cpp2" +#line 113 "pure2-regex_18_branch_reset.cpp2" [[nodiscard]] auto sanitize(std::string str) -> std::string { str = cpp2::string_util::replace_all(str, "\a", "\\a"); @@ -1088,7 +999,7 @@ auto main() -> int; return cpp2::move(str); } -#line 124 "pure2-regex_18_branch_reset.cpp2" +#line 125 "pure2-regex_18_branch_reset.cpp2" template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, cpp2::impl::in resultExpected) -> void{ @@ -1129,7 +1040,7 @@ template auto test(M const& regex, cpp2::impl::in id, c std::cout << "" + cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(sanitize(str)) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(sanitize(resultExpected)) + "" << std::endl; } -#line 181 "pure2-regex_18_branch_reset.cpp2" +#line 182 "pure2-regex_18_branch_reset.cpp2" auto test_tests_18_branch_reset::run() const& -> void{ std::cout << "Running tests_18_branch_reset:" << std::endl; test(regex_01, "01", R"((?|(a)))", "a", "y", R"($1-$+)", "a-a"); @@ -1153,8 +1064,7 @@ template auto test(M const& regex, cpp2::impl::in id, c - - template [[nodiscard]] auto test_tests_18_branch_reset::regex_01_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_01_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1195,10 +1105,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_01_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_01_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1206,19 +1117,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_01_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_18_branch_reset::regex_01_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_18_branch_reset::regex_01_matcher::to_string() -> std::string{return R"((?|(a)))"; } + template [[nodiscard]] constexpr auto test_tests_18_branch_reset::regex_01_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_18_branch_reset::regex_01_matcher::to_string() -> std::string{return R"((?|(a)))"; } - - template [[nodiscard]] auto test_tests_18_branch_reset::regex_02_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_02_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1274,16 +1185,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_18_branch_reset::regex_02_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_18_branch_reset::regex_02_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_02_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_02_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1367,17 +1279,18 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_18_branch_reset::regex_02_matcher::wrap::reset_1::operator()(auto& ctx) const& -> void{ + template auto test_tests_18_branch_reset::regex_02_matcher::reset_1::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); ctx.set_group_invalid(2); } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_02_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_02_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1447,17 +1360,18 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_18_branch_reset::regex_02_matcher::wrap::reset_2::operator()(auto& ctx) const& -> void{ + template auto test_tests_18_branch_reset::regex_02_matcher::reset_2::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); ctx.set_group_invalid(2); } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_02_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_02_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1471,11 +1385,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_02_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_02_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1503,10 +1418,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_02_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_02_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1514,19 +1430,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_02_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_18_branch_reset::regex_02_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_18_branch_reset::regex_02_matcher::to_string() -> std::string{return R"((?|a(.)b|d(.(o).)d|i(.)(.)j)(.))"; } - + template [[nodiscard]] constexpr auto test_tests_18_branch_reset::regex_02_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_18_branch_reset::regex_02_matcher::to_string() -> std::string{return R"((?|a(.)b|d(.(o).)d|i(.)(.)j)(.))"; } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_03_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_03_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1582,16 +1498,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_18_branch_reset::regex_03_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_18_branch_reset::regex_03_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_03_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_03_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1675,17 +1592,18 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_18_branch_reset::regex_03_matcher::wrap::reset_1::operator()(auto& ctx) const& -> void{ + template auto test_tests_18_branch_reset::regex_03_matcher::reset_1::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); ctx.set_group_invalid(2); } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_03_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_03_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1755,17 +1673,18 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_18_branch_reset::regex_03_matcher::wrap::reset_2::operator()(auto& ctx) const& -> void{ + template auto test_tests_18_branch_reset::regex_03_matcher::reset_2::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); ctx.set_group_invalid(2); } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_03_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_03_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1779,11 +1698,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_03_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_03_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1811,10 +1731,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_03_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_03_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -1822,19 +1743,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_03_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_18_branch_reset::regex_03_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_18_branch_reset::regex_03_matcher::to_string() -> std::string{return R"((?|a(.)b|d(.(o).)d|i(.)(.)j)(.))"; } + template [[nodiscard]] constexpr auto test_tests_18_branch_reset::regex_03_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_18_branch_reset::regex_03_matcher::to_string() -> std::string{return R"((?|a(.)b|d(.(o).)d|i(.)(.)j)(.))"; } - - template [[nodiscard]] auto test_tests_18_branch_reset::regex_04_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_04_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1890,16 +1811,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_18_branch_reset::regex_04_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_18_branch_reset::regex_04_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_04_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_04_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -1983,17 +1905,18 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_18_branch_reset::regex_04_matcher::wrap::reset_1::operator()(auto& ctx) const& -> void{ + template auto test_tests_18_branch_reset::regex_04_matcher::reset_1::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); ctx.set_group_invalid(2); } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_04_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_04_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2063,17 +1986,18 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_18_branch_reset::regex_04_matcher::wrap::reset_2::operator()(auto& ctx) const& -> void{ + template auto test_tests_18_branch_reset::regex_04_matcher::reset_2::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); ctx.set_group_invalid(2); } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_04_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_04_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2087,11 +2011,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_04_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_04_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2119,10 +2044,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_04_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_04_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2130,19 +2056,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_04_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_18_branch_reset::regex_04_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_18_branch_reset::regex_04_matcher::to_string() -> std::string{return R"((?|a(.)b|d(.(o).)d|i(.)(.)j)(.))"; } - + template [[nodiscard]] constexpr auto test_tests_18_branch_reset::regex_04_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_18_branch_reset::regex_04_matcher::to_string() -> std::string{return R"((?|a(.)b|d(.(o).)d|i(.)(.)j)(.))"; } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_05_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_05_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2183,16 +2109,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_18_branch_reset::regex_05_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_18_branch_reset::regex_05_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_05_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_05_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2233,16 +2160,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_18_branch_reset::regex_05_matcher::wrap::reset_1::operator()(auto& ctx) const& -> void{ + template auto test_tests_18_branch_reset::regex_05_matcher::reset_1::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_05_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_05_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2256,11 +2184,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_05_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_05_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2274,16 +2203,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_18_branch_reset::regex_05_matcher::wrap::reset_2::operator()(auto& ctx) const& -> void{ + template auto test_tests_18_branch_reset::regex_05_matcher::reset_2::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_05_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_05_matcher::func_6::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2324,16 +2254,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_18_branch_reset::regex_05_matcher::wrap::reset_3::operator()(auto& ctx) const& -> void{ + template auto test_tests_18_branch_reset::regex_05_matcher::reset_3::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_05_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_05_matcher::func_7::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2374,16 +2305,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_18_branch_reset::regex_05_matcher::wrap::reset_4::operator()(auto& ctx) const& -> void{ + template auto test_tests_18_branch_reset::regex_05_matcher::reset_4::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_05_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_05_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2397,11 +2329,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_05_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_05_matcher::func_8::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2415,16 +2348,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_18_branch_reset::regex_05_matcher::wrap::reset_5::operator()(auto& ctx) const& -> void{ + template auto test_tests_18_branch_reset::regex_05_matcher::reset_5::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_05_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_05_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2438,11 +2372,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_05_matcher::wrap::func_9::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_05_matcher::func_9::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2456,10 +2391,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_05_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_05_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2467,19 +2403,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_05_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_18_branch_reset::regex_05_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_18_branch_reset::regex_05_matcher::to_string() -> std::string{return R"((?|(?|(a)|(b))|(?|(c)|(d))))"; } + template [[nodiscard]] constexpr auto test_tests_18_branch_reset::regex_05_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_18_branch_reset::regex_05_matcher::to_string() -> std::string{return R"((?|(?|(a)|(b))|(?|(c)|(d))))"; } - - template [[nodiscard]] auto test_tests_18_branch_reset::regex_06_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_06_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2520,16 +2456,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_18_branch_reset::regex_06_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_18_branch_reset::regex_06_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_06_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_06_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2570,16 +2507,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_18_branch_reset::regex_06_matcher::wrap::reset_1::operator()(auto& ctx) const& -> void{ + template auto test_tests_18_branch_reset::regex_06_matcher::reset_1::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_06_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_06_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2593,11 +2531,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_06_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_06_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2611,16 +2550,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_18_branch_reset::regex_06_matcher::wrap::reset_2::operator()(auto& ctx) const& -> void{ + template auto test_tests_18_branch_reset::regex_06_matcher::reset_2::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_06_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_06_matcher::func_6::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2661,16 +2601,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_18_branch_reset::regex_06_matcher::wrap::reset_3::operator()(auto& ctx) const& -> void{ + template auto test_tests_18_branch_reset::regex_06_matcher::reset_3::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_06_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_06_matcher::func_7::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2711,16 +2652,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_18_branch_reset::regex_06_matcher::wrap::reset_4::operator()(auto& ctx) const& -> void{ + template auto test_tests_18_branch_reset::regex_06_matcher::reset_4::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_06_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_06_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2734,11 +2676,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_06_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_06_matcher::func_8::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2752,16 +2695,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_18_branch_reset::regex_06_matcher::wrap::reset_5::operator()(auto& ctx) const& -> void{ + template auto test_tests_18_branch_reset::regex_06_matcher::reset_5::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_06_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_06_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2775,11 +2719,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_06_matcher::wrap::func_9::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_06_matcher::func_9::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2793,10 +2738,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_06_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_06_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2804,19 +2750,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_06_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_18_branch_reset::regex_06_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_18_branch_reset::regex_06_matcher::to_string() -> std::string{return R"((?|(?|(a)|(b))|(?|(c)|(d))))"; } - + template [[nodiscard]] constexpr auto test_tests_18_branch_reset::regex_06_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_18_branch_reset::regex_06_matcher::to_string() -> std::string{return R"((?|(?|(a)|(b))|(?|(c)|(d))))"; } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_07_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_07_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2857,16 +2803,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_18_branch_reset::regex_07_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_18_branch_reset::regex_07_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_07_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_07_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2907,16 +2854,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_18_branch_reset::regex_07_matcher::wrap::reset_1::operator()(auto& ctx) const& -> void{ + template auto test_tests_18_branch_reset::regex_07_matcher::reset_1::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_07_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_07_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2930,11 +2878,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_07_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_07_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2948,16 +2897,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_18_branch_reset::regex_07_matcher::wrap::reset_2::operator()(auto& ctx) const& -> void{ + template auto test_tests_18_branch_reset::regex_07_matcher::reset_2::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_07_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_07_matcher::func_6::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2998,16 +2948,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_18_branch_reset::regex_07_matcher::wrap::reset_3::operator()(auto& ctx) const& -> void{ + template auto test_tests_18_branch_reset::regex_07_matcher::reset_3::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_07_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_07_matcher::func_7::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3048,16 +2999,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_18_branch_reset::regex_07_matcher::wrap::reset_4::operator()(auto& ctx) const& -> void{ + template auto test_tests_18_branch_reset::regex_07_matcher::reset_4::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_07_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_07_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3071,11 +3023,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_07_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_07_matcher::func_8::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3089,16 +3042,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_18_branch_reset::regex_07_matcher::wrap::reset_5::operator()(auto& ctx) const& -> void{ + template auto test_tests_18_branch_reset::regex_07_matcher::reset_5::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_07_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_07_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3112,11 +3066,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_07_matcher::wrap::func_9::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_07_matcher::func_9::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3130,10 +3085,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_07_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_07_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -3141,19 +3097,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_07_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_18_branch_reset::regex_07_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_18_branch_reset::regex_07_matcher::to_string() -> std::string{return R"((?|(?|(a)|(b))|(?|(c)|(d))))"; } + template [[nodiscard]] constexpr auto test_tests_18_branch_reset::regex_07_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_18_branch_reset::regex_07_matcher::to_string() -> std::string{return R"((?|(?|(a)|(b))|(?|(c)|(d))))"; } - - template [[nodiscard]] auto test_tests_18_branch_reset::regex_08_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_08_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3194,16 +3150,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_18_branch_reset::regex_08_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_18_branch_reset::regex_08_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_08_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_08_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3244,16 +3201,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_18_branch_reset::regex_08_matcher::wrap::reset_1::operator()(auto& ctx) const& -> void{ + template auto test_tests_18_branch_reset::regex_08_matcher::reset_1::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_08_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_08_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3267,11 +3225,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_08_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_08_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3285,16 +3244,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_18_branch_reset::regex_08_matcher::wrap::reset_2::operator()(auto& ctx) const& -> void{ + template auto test_tests_18_branch_reset::regex_08_matcher::reset_2::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_08_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_08_matcher::func_6::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3335,16 +3295,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_18_branch_reset::regex_08_matcher::wrap::reset_3::operator()(auto& ctx) const& -> void{ + template auto test_tests_18_branch_reset::regex_08_matcher::reset_3::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_08_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_08_matcher::func_7::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3385,16 +3346,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_18_branch_reset::regex_08_matcher::wrap::reset_4::operator()(auto& ctx) const& -> void{ + template auto test_tests_18_branch_reset::regex_08_matcher::reset_4::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_08_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_08_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3408,11 +3370,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_08_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_08_matcher::func_8::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3426,16 +3389,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_18_branch_reset::regex_08_matcher::wrap::reset_5::operator()(auto& ctx) const& -> void{ + template auto test_tests_18_branch_reset::regex_08_matcher::reset_5::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_08_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_08_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3449,11 +3413,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_08_matcher::wrap::func_9::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_08_matcher::func_9::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3467,10 +3432,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_08_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_08_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -3478,19 +3444,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_08_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_18_branch_reset::regex_08_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_18_branch_reset::regex_08_matcher::to_string() -> std::string{return R"((?|(?|(a)|(b))|(?|(c)|(d))))"; } - + template [[nodiscard]] constexpr auto test_tests_18_branch_reset::regex_08_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_18_branch_reset::regex_08_matcher::to_string() -> std::string{return R"((?|(?|(a)|(b))|(?|(c)|(d))))"; } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_09_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_09_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3546,17 +3512,18 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_18_branch_reset::regex_09_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_18_branch_reset::regex_09_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(2); ctx.set_group_invalid(3); } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_09_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_09_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3598,16 +3565,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_18_branch_reset::regex_09_matcher::wrap::reset_1::operator()(auto& ctx) const& -> void{ + template auto test_tests_18_branch_reset::regex_09_matcher::reset_1::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(2); } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_09_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_09_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3635,11 +3603,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_09_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_09_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3667,10 +3636,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_09_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_09_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -3678,19 +3648,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_09_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_18_branch_reset::regex_09_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_18_branch_reset::regex_09_matcher::to_string() -> std::string{return R"((.)(?|(.)(.)x|(.)d)(.))"; } + template [[nodiscard]] constexpr auto test_tests_18_branch_reset::regex_09_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_18_branch_reset::regex_09_matcher::to_string() -> std::string{return R"((.)(?|(.)(.)x|(.)d)(.))"; } - - template [[nodiscard]] auto test_tests_18_branch_reset::regex_10_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_10_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3746,17 +3716,18 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_18_branch_reset::regex_10_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_18_branch_reset::regex_10_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(2); ctx.set_group_invalid(3); } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_10_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_10_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3798,16 +3769,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_18_branch_reset::regex_10_matcher::wrap::reset_1::operator()(auto& ctx) const& -> void{ + template auto test_tests_18_branch_reset::regex_10_matcher::reset_1::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(2); } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_10_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_10_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3835,11 +3807,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_10_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_10_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3867,10 +3840,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_10_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_10_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -3878,19 +3852,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_10_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_18_branch_reset::regex_10_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_18_branch_reset::regex_10_matcher::to_string() -> std::string{return R"((\N)(?|(\N)(\N)x|(\N)d)(\N))"; } - + template [[nodiscard]] constexpr auto test_tests_18_branch_reset::regex_10_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_18_branch_reset::regex_10_matcher::to_string() -> std::string{return R"((\N)(?|(\N)(\N)x|(\N)d)(\N))"; } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_11_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_11_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3931,10 +3905,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_11_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_11_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -3942,18 +3917,18 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_11_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_18_branch_reset::regex_11_matcher::get_named_group_index(auto const& name) -> int{ if (name == "foo") {return 1; }else {return -1; } } - [[nodiscard]] auto test_tests_18_branch_reset::regex_11_matcher::to_string() -> std::string{return R"((?|(?x)))"; } + template [[nodiscard]] constexpr auto test_tests_18_branch_reset::regex_11_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_18_branch_reset::regex_11_matcher::to_string() -> std::string{return R"((?|(?x)))"; } - - template [[nodiscard]] auto test_tests_18_branch_reset::regex_12_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_12_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3994,16 +3969,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_18_branch_reset::regex_12_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_18_branch_reset::regex_12_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_12_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_12_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4044,16 +4020,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_18_branch_reset::regex_12_matcher::wrap::reset_1::operator()(auto& ctx) const& -> void{ + template auto test_tests_18_branch_reset::regex_12_matcher::reset_1::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_12_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_12_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4067,11 +4044,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_12_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_12_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4085,10 +4063,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_12_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_18_branch_reset::regex_12_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -4096,20 +4075,20 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_18_branch_reset::regex_12_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_18_branch_reset::regex_12_matcher::get_named_group_index(auto const& name) -> int{ if (name == "bar") {return 1; }else {if (name == "foo") {return 1; }else {return -1; } #line 1 "pure2-regex_18_branch_reset.cpp2" } } -[[nodiscard]] auto test_tests_18_branch_reset::regex_12_matcher::to_string() -> std::string{return R"((?|(?x)|(?y)))"; } - +template [[nodiscard]] constexpr auto test_tests_18_branch_reset::regex_12_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_18_branch_reset::regex_12_matcher::to_string() -> std::string{return R"((?|(?x)|(?y)))"; } -template [[nodiscard]] auto test_tests_18_branch_reset::regex_13_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ +template template [[nodiscard]] auto test_tests_18_branch_reset::regex_13_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4150,16 +4129,17 @@ r = other(r.pos, ctx); else { r.pos = ctx.end; } +static_cast(CPP2_FORWARD(ctx)); return r; } -template auto test_tests_18_branch_reset::regex_13_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ +template auto test_tests_18_branch_reset::regex_13_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } -template [[nodiscard]] auto test_tests_18_branch_reset::regex_13_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ +template template [[nodiscard]] auto test_tests_18_branch_reset::regex_13_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4200,16 +4180,17 @@ r = other(r.pos, ctx); else { r.pos = ctx.end; } +static_cast(CPP2_FORWARD(ctx)); return r; } -template auto test_tests_18_branch_reset::regex_13_matcher::wrap::reset_1::operator()(auto& ctx) const& -> void{ +template auto test_tests_18_branch_reset::regex_13_matcher::reset_1::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } -template [[nodiscard]] auto test_tests_18_branch_reset::regex_13_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ +template template [[nodiscard]] auto test_tests_18_branch_reset::regex_13_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4223,11 +4204,12 @@ r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_ else { r.pos = ctx.end; } +static_cast(CPP2_FORWARD(ctx)); return r; } -template [[nodiscard]] auto test_tests_18_branch_reset::regex_13_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ +template template [[nodiscard]] auto test_tests_18_branch_reset::regex_13_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4241,10 +4223,11 @@ r = other(r.pos, ctx); else { r.pos = ctx.end; } +static_cast(CPP2_FORWARD(ctx)); return r; } -template [[nodiscard]] auto test_tests_18_branch_reset::regex_13_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ +template template [[nodiscard]] auto test_tests_18_branch_reset::regex_13_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -4252,18 +4235,18 @@ if (r.matched) {ctx.set_group_end(0, r.pos);} return r; } -template [[nodiscard]] auto test_tests_18_branch_reset::regex_13_matcher::wrap::get_named_group_index(auto const& name) -> int{ +template [[nodiscard]] auto test_tests_18_branch_reset::regex_13_matcher::get_named_group_index(auto const& name) -> int{ if (name == "bar") {return 1; }else {if (name == "foo") {return 1; }else {return -1; }} } -[[nodiscard]] auto test_tests_18_branch_reset::regex_13_matcher::to_string() -> std::string{return R"((?|(?y)|(?x)))"; } +template [[nodiscard]] constexpr auto test_tests_18_branch_reset::regex_13_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_18_branch_reset::regex_13_matcher::to_string() -> std::string{return R"((?|(?y)|(?x)))"; } - -template [[nodiscard]] auto test_tests_18_branch_reset::regex_14_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ +template template [[nodiscard]] auto test_tests_18_branch_reset::regex_14_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4317,10 +4300,11 @@ r = other(r.pos, ctx); else { r.pos = ctx.end; } +static_cast(CPP2_FORWARD(ctx)); return r; } -template [[nodiscard]] auto test_tests_18_branch_reset::regex_14_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ +template template [[nodiscard]] auto test_tests_18_branch_reset::regex_14_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -4328,18 +4312,18 @@ if (r.matched) {ctx.set_group_end(0, r.pos);} return r; } -template [[nodiscard]] auto test_tests_18_branch_reset::regex_14_matcher::wrap::get_named_group_index(auto const& name) -> int{ +template [[nodiscard]] auto test_tests_18_branch_reset::regex_14_matcher::get_named_group_index(auto const& name) -> int{ if (name == "bar") {return 1; }else {if (name == "foo") {return 2; }else {return -1; }} } -[[nodiscard]] auto test_tests_18_branch_reset::regex_14_matcher::to_string() -> std::string{return R"((?)(?|(?x)))"; } - +template [[nodiscard]] constexpr auto test_tests_18_branch_reset::regex_14_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_18_branch_reset::regex_14_matcher::to_string() -> std::string{return R"((?)(?|(?x)))"; } -template [[nodiscard]] auto test_tests_18_branch_reset::regex_15_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ +template template [[nodiscard]] auto test_tests_18_branch_reset::regex_15_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4380,16 +4364,17 @@ r = other(r.pos, ctx); else { r.pos = ctx.end; } +static_cast(CPP2_FORWARD(ctx)); return r; } -template auto test_tests_18_branch_reset::regex_15_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ +template auto test_tests_18_branch_reset::regex_15_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } -template [[nodiscard]] auto test_tests_18_branch_reset::regex_15_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ +template template [[nodiscard]] auto test_tests_18_branch_reset::regex_15_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6770,11 +6755,12 @@ r = other(r.pos, ctx); else { r.pos = ctx.end; } +static_cast(CPP2_FORWARD(ctx)); return r; } -template auto test_tests_18_branch_reset::regex_15_matcher::wrap::reset_1::operator()(auto& ctx) const& -> void{ +template auto test_tests_18_branch_reset::regex_15_matcher::reset_1::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); ctx.set_group_invalid(2); ctx.set_group_invalid(3); @@ -6959,7 +6945,7 @@ ctx.set_group_invalid(181); } -template [[nodiscard]] auto test_tests_18_branch_reset::regex_15_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ +template template [[nodiscard]] auto test_tests_18_branch_reset::regex_15_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6973,11 +6959,12 @@ r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_ else { r.pos = ctx.end; } +static_cast(CPP2_FORWARD(ctx)); return r; } -template [[nodiscard]] auto test_tests_18_branch_reset::regex_15_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ +template template [[nodiscard]] auto test_tests_18_branch_reset::regex_15_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6991,10 +6978,11 @@ r = other(r.pos, ctx); else { r.pos = ctx.end; } +static_cast(CPP2_FORWARD(ctx)); return r; } -template [[nodiscard]] auto test_tests_18_branch_reset::regex_15_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ +template template [[nodiscard]] auto test_tests_18_branch_reset::regex_15_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -7002,15 +6990,16 @@ if (r.matched) {ctx.set_group_end(0, r.pos);} return r; } -template [[nodiscard]] auto test_tests_18_branch_reset::regex_15_matcher::wrap::get_named_group_index(auto const& name) -> int{ +template [[nodiscard]] auto test_tests_18_branch_reset::regex_15_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } -[[nodiscard]] auto test_tests_18_branch_reset::regex_15_matcher::to_string() -> std::string{return R"((?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(a)))"; } +template [[nodiscard]] constexpr auto test_tests_18_branch_reset::regex_15_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_18_branch_reset::regex_15_matcher::to_string() -> std::string{return R"((?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(a)))"; } -#line 201 "pure2-regex_18_branch_reset.cpp2" +#line 202 "pure2-regex_18_branch_reset.cpp2" auto main() -> int{ CPP2_UFCS(run)(test_tests_18_branch_reset()); } diff --git a/regression-tests/test-results/pure2-regex_19_lookahead.cpp b/regression-tests/test-results/pure2-regex_19_lookahead.cpp index 8d007c966..55ddbf187 100644 --- a/regression-tests/test-results/pure2-regex_19_lookahead.cpp +++ b/regression-tests/test-results/pure2-regex_19_lookahead.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes #include "cpp2regex.h" //=== Cpp2 type declarations ==================================================== @@ -9,7 +9,7 @@ #line 1 "pure2-regex_19_lookahead.cpp2" -#line 165 "pure2-regex_19_lookahead.cpp2" +#line 166 "pure2-regex_19_lookahead.cpp2" class test_tests_19_lookahead; @@ -18,42 +18,36 @@ class test_tests_19_lookahead; #line 1 "pure2-regex_19_lookahead.cpp2" [[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string; -#line 112 "pure2-regex_19_lookahead.cpp2" +#line 113 "pure2-regex_19_lookahead.cpp2" [[nodiscard]] auto sanitize(std::string str) -> std::string; -#line 124 "pure2-regex_19_lookahead.cpp2" +#line 125 "pure2-regex_19_lookahead.cpp2" template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, cpp2::impl::in resultExpected) -> void; -#line 165 "pure2-regex_19_lookahead.cpp2" +#line 166 "pure2-regex_19_lookahead.cpp2" class test_tests_19_lookahead { -#line 211 "pure2-regex_19_lookahead.cpp2" +#line 222 "pure2-regex_19_lookahead.cpp2" public: auto run() const& -> void; - public: class regex_01_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: template class regex_01_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_01_matcher() = default; public: regex_01_matcher(regex_01_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -61,30 +55,24 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_01 {}; public: class regex_02_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_01 {}; public: template class regex_02_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_02_matcher() = default; public: regex_02_matcher(regex_02_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -92,30 +80,24 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_02 {}; public: class regex_03_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_02 {}; public: template class regex_03_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_03_matcher() = default; public: regex_03_matcher(regex_03_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -123,45 +105,39 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_03 {}; public: class regex_04_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_03 {}; public: template class regex_04_matcher { + public: template using context = cpp2::regex::match_context; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_04_matcher() = default; public: regex_04_matcher(regex_04_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -169,21 +145,20 @@ public: class func_2 { }; - public: cpp2::regex::regular_expression regex_04 {}; public: class regex_05_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_04 {}; public: template class regex_05_matcher { + public: template using context = cpp2::regex::match_context; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -193,12 +168,12 @@ public: class func_2 { }; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_5 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -208,26 +183,21 @@ public: class func_2 { }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_6 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_05_matcher() = default; public: regex_05_matcher(regex_05_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -235,40 +205,34 @@ public: class func_2 { }; - public: cpp2::regex::regular_expression regex_05 {}; public: class regex_06_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_05 {}; public: template class regex_06_matcher { + public: template using context = cpp2::regex::match_context; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_06_matcher() = default; public: regex_06_matcher(regex_06_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -276,40 +240,34 @@ public: class func_2 { }; - public: cpp2::regex::regular_expression regex_06 {}; public: class regex_07_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_06 {}; public: template class regex_07_matcher { + public: template using context = cpp2::regex::match_context; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_07_matcher() = default; public: regex_07_matcher(regex_07_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -317,40 +275,34 @@ public: class func_2 { }; - public: cpp2::regex::regular_expression regex_07 {}; public: class regex_08_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_07 {}; public: template class regex_08_matcher { + public: template using context = cpp2::regex::match_context; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_08_matcher() = default; public: regex_08_matcher(regex_08_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -358,40 +310,34 @@ public: class func_2 { }; - public: cpp2::regex::regular_expression regex_08 {}; public: class regex_09_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_08 {}; public: template class regex_09_matcher { + public: template using context = cpp2::regex::match_context; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_09_matcher() = default; public: regex_09_matcher(regex_09_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -399,40 +345,34 @@ public: class func_2 { }; - public: cpp2::regex::regular_expression regex_09 {}; public: class regex_10_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_09 {}; public: template class regex_10_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_10_matcher() = default; public: regex_10_matcher(regex_10_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -440,40 +380,34 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_10 {}; public: class regex_11_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_10 {}; public: template class regex_11_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_11_matcher() = default; public: regex_11_matcher(regex_11_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -481,55 +415,49 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_11 {}; public: class regex_12_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_11 {}; public: template class regex_12_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_5 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_6 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_12_matcher() = default; public: regex_12_matcher(regex_12_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -537,55 +465,49 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_12 {}; public: class regex_13_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_12 {}; public: template class regex_13_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_5 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_6 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_13_matcher() = default; public: regex_13_matcher(regex_13_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -593,55 +515,49 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_13 {}; public: class regex_14_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_13 {}; public: template class regex_14_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_5 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_6 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_14_matcher() = default; public: regex_14_matcher(regex_14_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -649,55 +565,49 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_14 {}; public: class regex_15_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_14 {}; public: template class regex_15_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_5 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_6 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_15_matcher() = default; public: regex_15_matcher(regex_15_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -705,40 +615,34 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_15 {}; public: class regex_16_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_15 {}; public: template class regex_16_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_16_matcher() = default; public: regex_16_matcher(regex_16_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -746,40 +650,34 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_16 {}; public: class regex_17_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_16 {}; public: template class regex_17_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_17_matcher() = default; public: regex_17_matcher(regex_17_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -787,40 +685,34 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_17 {}; public: class regex_18_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_17 {}; public: template class regex_18_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_18_matcher() = default; public: regex_18_matcher(regex_18_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -828,40 +720,34 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_18 {}; public: class regex_19_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_18 {}; public: template class regex_19_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_19_matcher() = default; public: regex_19_matcher(regex_19_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -869,55 +755,49 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_19 {}; public: class regex_20_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_19 {}; public: template class regex_20_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_5 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_6 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_20_matcher() = default; public: regex_20_matcher(regex_20_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -925,55 +805,49 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_20 {}; public: class regex_21_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_20 {}; public: template class regex_21_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_5 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_6 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_21_matcher() = default; public: regex_21_matcher(regex_21_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -981,55 +855,49 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_21 {}; public: class regex_22_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_21 {}; public: template class regex_22_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_5 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_6 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_22_matcher() = default; public: regex_22_matcher(regex_22_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1037,55 +905,49 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_22 {}; public: class regex_23_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_22 {}; public: template class regex_23_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_5 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_6 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_23_matcher() = default; public: regex_23_matcher(regex_23_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1093,40 +955,34 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_23 {}; public: class regex_24_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_23 {}; public: template class regex_24_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_24_matcher() = default; public: regex_24_matcher(regex_24_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1134,40 +990,34 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_24 {}; public: class regex_25_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_24 {}; public: template class regex_25_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_25_matcher() = default; public: regex_25_matcher(regex_25_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1175,36 +1025,35 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_25 {}; public: class regex_26_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_25 {}; public: template class regex_26_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_5 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_6 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_7 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -1214,36 +1063,31 @@ public: class func_1 { }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_8 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_9 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_26_matcher() = default; public: regex_26_matcher(regex_26_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1251,35 +1095,29 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_26 {}; public: class regex_27_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_26 {}; public: template class regex_27_matcher { + public: template using context = cpp2::regex::match_context; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_27_matcher() = default; public: regex_27_matcher(regex_27_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1287,35 +1125,29 @@ public: class func_2 { }; - public: cpp2::regex::regular_expression regex_27 {}; public: class regex_28_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_27 {}; public: template class regex_28_matcher { + public: template using context = cpp2::regex::match_context; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_28_matcher() = default; public: regex_28_matcher(regex_28_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1323,26 +1155,265 @@ public: class func_2 { }; - public: cpp2::regex::regular_expression regex_28 {}; public: class regex_37_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_28 {}; public: template class regex_29_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_29_matcher() = default; + public: regex_29_matcher(regex_29_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_29_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_29 {}; public: template class regex_30_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_30_matcher() = default; + public: regex_30_matcher(regex_30_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_30_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_30 {}; public: template class regex_31_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_31_matcher() = default; + public: regex_31_matcher(regex_31_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_31_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_31 {}; public: template class regex_32_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_2 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_32_matcher() = default; + public: regex_32_matcher(regex_32_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_32_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_32 {}; public: template class regex_33_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_33_matcher() = default; + public: regex_33_matcher(regex_33_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_33_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_33 {}; public: template class regex_34_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_34_matcher() = default; + public: regex_34_matcher(regex_34_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_34_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_34 {}; public: template class regex_35_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_2 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_35_matcher() = default; + public: regex_35_matcher(regex_35_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_35_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_35 {}; public: template class regex_36_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_2 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_36_matcher() = default; + public: regex_36_matcher(regex_36_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_36_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_36 {}; public: template class regex_37_matcher { + public: template using context = cpp2::regex::match_context; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -1352,17 +1423,17 @@ public: class func_2 { }; public: class func_6 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_5 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_7 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -1372,26 +1443,21 @@ public: class func_2 { }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_8 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_37_matcher() = default; public: regex_37_matcher(regex_37_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1399,40 +1465,34 @@ public: class func_2 { }; - public: cpp2::regex::regular_expression regex_37 {}; public: class regex_38_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_37 {}; public: template class regex_38_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_38_matcher() = default; public: regex_38_matcher(regex_38_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1440,30 +1500,24 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_38 {}; public: class regex_39_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_38 {}; public: template class regex_39_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_39_matcher() = default; public: regex_39_matcher(regex_39_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1471,40 +1525,34 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_39 {}; public: class regex_40_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_39 {}; public: template class regex_40_matcher { + public: template using context = cpp2::regex::match_context; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_40_matcher() = default; public: regex_40_matcher(regex_40_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1512,36 +1560,35 @@ public: class func_2 { }; - public: cpp2::regex::regular_expression regex_40 {}; public: class regex_41_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_40 {}; public: template class regex_41_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_5 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_6 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_7 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -1551,41 +1598,36 @@ public: class func_1 { }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_8 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_9 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_10 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_41_matcher() = default; public: regex_41_matcher(regex_41_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1593,36 +1635,35 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_41 {}; public: class regex_42_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_41 {}; public: template class regex_42_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_5 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_6 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_7 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -1632,31 +1673,26 @@ public: class func_1 { }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_8 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_42_matcher() = default; public: regex_42_matcher(regex_42_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1664,41 +1700,40 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_42 {}; public: class regex_43_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_42 {}; public: template class regex_43_matcher { + public: template using context = cpp2::regex::match_context; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_6 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_5 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_7 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -1708,26 +1743,21 @@ public: class func_3 { }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_8 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_43_matcher() = default; public: regex_43_matcher(regex_43_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1735,56 +1765,55 @@ public: class func_3 { }; - public: cpp2::regex::regular_expression regex_43 {}; public: class regex_44_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_43 {}; public: template class regex_44_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_6 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_5 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_7 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_9 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_8 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_10 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_11 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -1794,31 +1823,26 @@ public: class func_1 { }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_12 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_44_matcher() = default; public: regex_44_matcher(regex_44_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1826,45 +1850,39 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_44 {}; public: class regex_45_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_44 {}; public: template class regex_45_matcher { + public: template using context = cpp2::regex::match_context; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_45_matcher() = default; public: regex_45_matcher(regex_45_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1872,31 +1890,30 @@ public: class func_4 { }; - public: cpp2::regex::regular_expression regex_45 {}; public: class regex_46_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_45 {}; public: template class regex_46_matcher { + public: template using context = cpp2::regex::match_context; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_6 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_5 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_7 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -1906,22 +1923,22 @@ public: class func_2 { }; public: class func_4 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_11 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_10 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_12 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; @@ -1931,51 +1948,46 @@ public: class func_2 { }; public: class func_9 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_13 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_8 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_14 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_15 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_46_matcher() = default; public: regex_46_matcher(regex_46_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -1983,30 +1995,24 @@ public: class func_2 { }; - public: cpp2::regex::regular_expression regex_46 {}; public: class regex_47_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_46 {}; public: template class regex_47_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_47_matcher() = default; public: regex_47_matcher(regex_47_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2014,30 +2020,24 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_47 {}; public: class regex_48_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_47 {}; public: template class regex_48_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_48_matcher() = default; public: regex_48_matcher(regex_48_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2045,30 +2045,24 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_48 {}; public: class regex_49_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_48 {}; public: template class regex_49_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_49_matcher() = default; public: regex_49_matcher(regex_49_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2076,30 +2070,24 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_49 {}; public: class regex_50_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_49 {}; public: template class regex_50_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_50_matcher() = default; public: regex_50_matcher(regex_50_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2107,30 +2095,24 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_50 {}; public: class regex_51_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_50 {}; public: template class regex_51_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_51_matcher() = default; public: regex_51_matcher(regex_51_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2138,30 +2120,24 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_51 {}; public: class regex_52_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_51 {}; public: template class regex_52_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_52_matcher() = default; public: regex_52_matcher(regex_52_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2169,40 +2145,34 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_52 {}; public: class regex_53_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_52 {}; public: template class regex_53_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_3 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_2 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; - - }; - - public: [[nodiscard]] static auto to_string() -> std::string; + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_53_matcher() = default; public: regex_53_matcher(regex_53_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -2210,13 +2180,53 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_53 {}; + public: cpp2::regex::regular_expression> regex_53 {}; public: template class regex_54_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_54_matcher() = default; + public: regex_54_matcher(regex_54_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_54_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_54 {}; public: template class regex_55_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_55_matcher() = default; + public: regex_55_matcher(regex_55_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_55_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_55 {}; public: test_tests_19_lookahead() = default; public: test_tests_19_lookahead(test_tests_19_lookahead const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(test_tests_19_lookahead const&) -> void = delete; -#line 260 "pure2-regex_19_lookahead.cpp2" +#line 281 "pure2-regex_19_lookahead.cpp2" }; auto main() -> int; @@ -2320,6 +2330,7 @@ auto main() -> int; } result += std::to_string(cpp2::move(pos)); } + ++next; } else { std::cerr << "Not implemented"; @@ -2335,7 +2346,7 @@ auto main() -> int; return result; } -#line 112 "pure2-regex_19_lookahead.cpp2" +#line 113 "pure2-regex_19_lookahead.cpp2" [[nodiscard]] auto sanitize(std::string str) -> std::string { str = cpp2::string_util::replace_all(str, "\a", "\\a"); @@ -2348,7 +2359,7 @@ auto main() -> int; return cpp2::move(str); } -#line 124 "pure2-regex_19_lookahead.cpp2" +#line 125 "pure2-regex_19_lookahead.cpp2" template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, cpp2::impl::in resultExpected) -> void{ @@ -2389,7 +2400,7 @@ template auto test(M const& regex, cpp2::impl::in id, c std::cout << "" + cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(sanitize(str)) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(sanitize(resultExpected)) + "" << std::endl; } -#line 211 "pure2-regex_19_lookahead.cpp2" +#line 222 "pure2-regex_19_lookahead.cpp2" auto test_tests_19_lookahead::run() const& -> void{ std::cout << "Running tests_19_lookahead:" << std::endl; test(regex_01, "01", R"(a(?!b).)", "abad", "y", R"($&)", "ad"); @@ -2420,6 +2431,14 @@ template auto test(M const& regex, cpp2::impl::in id, c test(regex_26, "26", R"(^(a*?)(?!(aa|aaaa)*$)(?=a\z))", "aaaaaaaa", "y", R"($1)", "aaaaaaa"); test(regex_27, "27", R"(a(?!b(?!c))(..))", "abababc", "y", R"($1)", "bc"); test(regex_28, "28", R"(a(?!b(?=a))(..))", "abababc", "y", R"($1)", "bc"); + test(regex_29, "29", R"((?=foo))", "foo", "y", R"(@+)", "0"); + test(regex_30, "30", R"((?=foo))", "XfooY", "y", R"(@+)", "1"); + test(regex_31, "31", R"(.*(?=foo))", "XfooY", "y", R"(@+)", "1"); + test(regex_32, "32", R"((?=.*P)P)", "aP", "y", R"(@+)", "2"); + test(regex_33, "33", R"(X(?=foo)f)", "..XfooY..", "y", R"(@+)", "4"); + test(regex_34, "34", R"(X(?=foo))", "..XfooY..", "y", R"(@+)", "3"); + test(regex_35, "35", R"((?=XY*foo))", "Xfoo", "y", R"(@+)", "0"); + test(regex_36, "36", R"(^(?=XY*foo))", "Xfoo", "y", R"(@+)", "0"); test(regex_37, "37", R"(X(\w+)(?=\s)|X(\w+))", "Xab", "y", R"([$1-$2])", "[-ab]"); test(regex_38, "38", R"(^a*(?=b)b)", "ab", "y", R"($&)", "ab"); test(regex_39, "39", R"('(?!\A)x'm)", "a\nxb\n", "y", R"(-)", "-"); @@ -2437,14 +2456,15 @@ template auto test(M const& regex, cpp2::impl::in id, c test(regex_51, "51", R"(((?s)b.)c(?!\N))", "a\nb\nc\n", "y", R"($1:$&)", "b\n:b\nc"); test(regex_52, "52", R"('(b.)c(?!\N)'s)", "a\nb\nc\n", "y", R"($1:$&)", "b\n:b\nc"); test(regex_53, "53", R"(a*(?!))", "aaaab", "n", R"(-)", "-"); + test(regex_54, "54", R"((?)foo)", "bar>ABCfoo", "y", R"($&)", "foo"); + test(regex_55, "55", R"((?ABC)foo)", "bar>ABCfoo", "y", R"($&)", "ABCfoo"); std::cout << std::endl; } - - template [[nodiscard]] auto test_tests_19_lookahead::regex_01_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_01_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2472,11 +2492,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_01_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_01_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2506,10 +2527,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_01_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_01_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2517,19 +2539,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_01_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_19_lookahead::regex_01_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_19_lookahead::regex_01_matcher::to_string() -> std::string{return R"(a(?!b).)"; } - + template [[nodiscard]] constexpr auto test_tests_19_lookahead::regex_01_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_19_lookahead::regex_01_matcher::to_string() -> std::string{return R"(a(?!b).)"; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_02_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_02_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2543,11 +2565,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_02_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_02_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2576,10 +2599,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_02_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_02_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2587,19 +2611,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_02_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_19_lookahead::regex_02_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_19_lookahead::regex_02_matcher::to_string() -> std::string{return R"((?=)a)"; } + template [[nodiscard]] constexpr auto test_tests_19_lookahead::regex_02_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_19_lookahead::regex_02_matcher::to_string() -> std::string{return R"((?=)a)"; } - - template [[nodiscard]] auto test_tests_19_lookahead::regex_03_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_03_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2627,11 +2651,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_03_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_03_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2661,10 +2686,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_03_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_03_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2672,19 +2698,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_03_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_19_lookahead::regex_03_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_19_lookahead::regex_03_matcher::to_string() -> std::string{return R"(a(?=d).)"; } - + template [[nodiscard]] constexpr auto test_tests_19_lookahead::regex_03_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_19_lookahead::regex_03_matcher::to_string() -> std::string{return R"(a(?=d).)"; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_04_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_04_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2712,11 +2738,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_04_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_04_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2744,11 +2771,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_04_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_04_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2762,11 +2790,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_04_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_04_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2780,11 +2809,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_04_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_04_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2814,10 +2844,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_04_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_04_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -2825,19 +2856,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_04_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_19_lookahead::regex_04_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_19_lookahead::regex_04_matcher::to_string() -> std::string{return R"(a(?=c|d).)"; } + template [[nodiscard]] constexpr auto test_tests_19_lookahead::regex_04_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_19_lookahead::regex_04_matcher::to_string() -> std::string{return R"(a(?=c|d).)"; } - - template [[nodiscard]] auto test_tests_19_lookahead::regex_05_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_05_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2865,11 +2896,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_05_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_05_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2897,11 +2929,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_05_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_05_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2930,16 +2963,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_19_lookahead::regex_05_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_19_lookahead::regex_05_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_19_lookahead::regex_05_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_05_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2953,11 +2987,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_05_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_05_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2971,16 +3006,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_19_lookahead::regex_05_matcher::wrap::reset_1::operator()(auto& ctx) const& -> void{ + template auto test_tests_19_lookahead::regex_05_matcher::reset_1::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_19_lookahead::regex_05_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_05_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -2995,15 +3031,16 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_05_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_05_matcher::func_6::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { - if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} } while ( false @@ -3014,10 +3051,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_05_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_05_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -3025,19 +3063,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_05_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_19_lookahead::regex_05_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_19_lookahead::regex_05_matcher::to_string() -> std::string{return R"(^(?:b|a(?=(.)))*\1)"; } - + template [[nodiscard]] constexpr auto test_tests_19_lookahead::regex_05_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_19_lookahead::regex_05_matcher::to_string() -> std::string{return R"(^(?:b|a(?=(.)))*\1)"; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_06_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_06_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3065,11 +3103,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_06_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_06_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3084,11 +3123,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_06_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_06_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3114,17 +3154,18 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_06_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_06_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} ctx.set_group_start(2, r.pos); - if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} std::array str_tmp_2 {"ab"}; if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { @@ -3161,10 +3202,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_06_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_06_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -3172,19 +3214,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_06_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_19_lookahead::regex_06_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_19_lookahead::regex_06_matcher::to_string() -> std::string{return R"((?=(a+?))(\1ab))"; } + template [[nodiscard]] constexpr auto test_tests_19_lookahead::regex_06_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_19_lookahead::regex_06_matcher::to_string() -> std::string{return R"((?=(a+?))(\1ab))"; } - - template [[nodiscard]] auto test_tests_19_lookahead::regex_07_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_07_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3212,11 +3254,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_07_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_07_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3231,11 +3274,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_07_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_07_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3261,17 +3305,18 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_07_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_07_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;} if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} - if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} std::array str_tmp_2 {"ab"}; if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { @@ -3296,10 +3341,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_07_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_07_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -3307,19 +3353,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_07_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_19_lookahead::regex_07_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_19_lookahead::regex_07_matcher::to_string() -> std::string{return R"(^(?=(a+?))\1ab)"; } - + template [[nodiscard]] constexpr auto test_tests_19_lookahead::regex_07_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_19_lookahead::regex_07_matcher::to_string() -> std::string{return R"(^(?=(a+?))\1ab)"; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_08_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_08_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3347,11 +3393,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_08_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_08_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3366,11 +3413,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_08_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_08_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3396,17 +3444,18 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_08_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_08_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} ctx.set_group_start(2, r.pos); - if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} std::array str_tmp_2 {"ab"}; if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { @@ -3443,10 +3492,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_08_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_08_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -3454,19 +3504,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_08_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_19_lookahead::regex_08_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_19_lookahead::regex_08_matcher::to_string() -> std::string{return R"((?=(a+?))(\1ab))"; } + template [[nodiscard]] constexpr auto test_tests_19_lookahead::regex_08_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_19_lookahead::regex_08_matcher::to_string() -> std::string{return R"((?=(a+?))(\1ab))"; } - - template [[nodiscard]] auto test_tests_19_lookahead::regex_09_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_09_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3494,11 +3544,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_09_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_09_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3513,11 +3564,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_09_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_09_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3543,17 +3595,18 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_09_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_09_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;} if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} - if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} std::array str_tmp_2 {"ab"}; if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { @@ -3578,10 +3631,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_09_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_09_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -3589,19 +3643,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_09_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_19_lookahead::regex_09_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_19_lookahead::regex_09_matcher::to_string() -> std::string{return R"(^(?=(a+?))\1ab)"; } - + template [[nodiscard]] constexpr auto test_tests_19_lookahead::regex_09_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_19_lookahead::regex_09_matcher::to_string() -> std::string{return R"(^(?=(a+?))\1ab)"; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_10_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_10_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3616,11 +3670,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_10_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_10_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3635,11 +3690,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_10_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_10_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3667,11 +3723,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_10_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_10_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3698,10 +3755,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_10_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_10_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -3709,19 +3767,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_10_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_19_lookahead::regex_10_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_19_lookahead::regex_10_matcher::to_string() -> std::string{return R"((.*)(?=c))"; } + template [[nodiscard]] constexpr auto test_tests_19_lookahead::regex_10_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_19_lookahead::regex_10_matcher::to_string() -> std::string{return R"((.*)(?=c))"; } - - template [[nodiscard]] auto test_tests_19_lookahead::regex_11_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_11_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3736,11 +3794,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_11_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_11_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3755,11 +3814,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_11_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_11_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3787,11 +3847,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_11_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_11_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3832,10 +3893,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_11_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_11_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -3843,19 +3905,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_11_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_19_lookahead::regex_11_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_19_lookahead::regex_11_matcher::to_string() -> std::string{return R"((.*)(?=c)c)"; } - + template [[nodiscard]] constexpr auto test_tests_19_lookahead::regex_11_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_19_lookahead::regex_11_matcher::to_string() -> std::string{return R"((.*)(?=c)c)"; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_12_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_12_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3870,11 +3932,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_12_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_12_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3889,11 +3952,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_12_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_12_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3921,11 +3985,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_12_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_12_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3953,11 +4018,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_12_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_12_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3971,11 +4037,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_12_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_12_matcher::func_6::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -3989,11 +4056,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_12_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_12_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4020,10 +4088,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_12_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_12_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -4031,19 +4100,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_12_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_19_lookahead::regex_12_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_19_lookahead::regex_12_matcher::to_string() -> std::string{return R"((.*)(?=b|c))"; } + template [[nodiscard]] constexpr auto test_tests_19_lookahead::regex_12_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_19_lookahead::regex_12_matcher::to_string() -> std::string{return R"((.*)(?=b|c))"; } - - template [[nodiscard]] auto test_tests_19_lookahead::regex_13_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_13_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4058,11 +4127,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_13_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_13_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4077,11 +4147,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_13_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_13_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4109,11 +4180,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_13_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_13_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4141,11 +4213,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_13_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_13_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4159,11 +4232,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_13_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_13_matcher::func_6::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4177,11 +4251,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_13_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_13_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4222,10 +4297,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_13_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_13_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -4233,19 +4309,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_13_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_19_lookahead::regex_13_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_19_lookahead::regex_13_matcher::to_string() -> std::string{return R"((.*)(?=b|c)c)"; } - + template [[nodiscard]] constexpr auto test_tests_19_lookahead::regex_13_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_19_lookahead::regex_13_matcher::to_string() -> std::string{return R"((.*)(?=b|c)c)"; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_14_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_14_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4260,11 +4336,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_14_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_14_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4279,11 +4356,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_14_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_14_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4311,11 +4389,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_14_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_14_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4343,11 +4422,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_14_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_14_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4361,11 +4441,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_14_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_14_matcher::func_6::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4379,11 +4460,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_14_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_14_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4410,10 +4492,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_14_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_14_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -4421,19 +4504,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_14_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_19_lookahead::regex_14_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_19_lookahead::regex_14_matcher::to_string() -> std::string{return R"((.*)(?=c|b))"; } + template [[nodiscard]] constexpr auto test_tests_19_lookahead::regex_14_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_19_lookahead::regex_14_matcher::to_string() -> std::string{return R"((.*)(?=c|b))"; } - - template [[nodiscard]] auto test_tests_19_lookahead::regex_15_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_15_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4448,11 +4531,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_15_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_15_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4467,11 +4551,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_15_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_15_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4499,11 +4584,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_15_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_15_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4531,11 +4617,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_15_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_15_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4549,11 +4636,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_15_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_15_matcher::func_6::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4567,11 +4655,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_15_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_15_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4612,10 +4701,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_15_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_15_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -4623,19 +4713,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_15_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_19_lookahead::regex_15_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_19_lookahead::regex_15_matcher::to_string() -> std::string{return R"((.*)(?=c|b)c)"; } - + template [[nodiscard]] constexpr auto test_tests_19_lookahead::regex_15_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_19_lookahead::regex_15_matcher::to_string() -> std::string{return R"((.*)(?=c|b)c)"; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_16_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_16_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4650,11 +4740,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_16_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_16_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4669,11 +4760,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_16_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_16_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4688,11 +4780,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_16_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_16_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4719,10 +4812,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_16_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_16_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -4730,19 +4824,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_16_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_19_lookahead::regex_16_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_19_lookahead::regex_16_matcher::to_string() -> std::string{return R"((.*)(?=[bc]))"; } + template [[nodiscard]] constexpr auto test_tests_19_lookahead::regex_16_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_19_lookahead::regex_16_matcher::to_string() -> std::string{return R"((.*)(?=[bc]))"; } - - template [[nodiscard]] auto test_tests_19_lookahead::regex_17_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_17_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4757,11 +4851,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_17_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_17_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4776,11 +4871,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_17_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_17_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4795,11 +4891,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_17_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_17_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4840,10 +4937,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_17_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_17_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -4851,19 +4949,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_17_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_19_lookahead::regex_17_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_19_lookahead::regex_17_matcher::to_string() -> std::string{return R"((.*)(?=[bc])c)"; } - + template [[nodiscard]] constexpr auto test_tests_19_lookahead::regex_17_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_19_lookahead::regex_17_matcher::to_string() -> std::string{return R"((.*)(?=[bc])c)"; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_18_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_18_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4878,11 +4976,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_18_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_18_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4897,11 +4996,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_18_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_18_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4929,11 +5029,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_18_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_18_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4960,10 +5061,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_18_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_18_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -4971,19 +5073,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_18_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_19_lookahead::regex_18_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_19_lookahead::regex_18_matcher::to_string() -> std::string{return R"((.*?)(?=c))"; } + template [[nodiscard]] constexpr auto test_tests_19_lookahead::regex_18_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_19_lookahead::regex_18_matcher::to_string() -> std::string{return R"((.*?)(?=c))"; } - - template [[nodiscard]] auto test_tests_19_lookahead::regex_19_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_19_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -4998,11 +5100,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_19_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_19_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5017,11 +5120,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_19_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_19_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5049,11 +5153,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_19_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_19_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5094,10 +5199,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_19_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_19_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -5105,19 +5211,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_19_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_19_lookahead::regex_19_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_19_lookahead::regex_19_matcher::to_string() -> std::string{return R"((.*?)(?=c)c)"; } - + template [[nodiscard]] constexpr auto test_tests_19_lookahead::regex_19_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_19_lookahead::regex_19_matcher::to_string() -> std::string{return R"((.*?)(?=c)c)"; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_20_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_20_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5132,11 +5238,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_20_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_20_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5151,11 +5258,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_20_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_20_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5183,11 +5291,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_20_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_20_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5215,11 +5324,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_20_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_20_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5233,11 +5343,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_20_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_20_matcher::func_6::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5251,11 +5362,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_20_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_20_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5282,10 +5394,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_20_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_20_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -5293,19 +5406,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_20_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_19_lookahead::regex_20_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_19_lookahead::regex_20_matcher::to_string() -> std::string{return R"((.*?)(?=b|c))"; } + template [[nodiscard]] constexpr auto test_tests_19_lookahead::regex_20_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_19_lookahead::regex_20_matcher::to_string() -> std::string{return R"((.*?)(?=b|c))"; } - - template [[nodiscard]] auto test_tests_19_lookahead::regex_21_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_21_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5320,11 +5433,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_21_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_21_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5339,11 +5453,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_21_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_21_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5371,11 +5486,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_21_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_21_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5403,11 +5519,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_21_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_21_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5421,11 +5538,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_21_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_21_matcher::func_6::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5439,11 +5557,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_21_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_21_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5484,10 +5603,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_21_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_21_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -5495,19 +5615,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_21_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_19_lookahead::regex_21_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_19_lookahead::regex_21_matcher::to_string() -> std::string{return R"((.*?)(?=b|c)c)"; } - + template [[nodiscard]] constexpr auto test_tests_19_lookahead::regex_21_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_19_lookahead::regex_21_matcher::to_string() -> std::string{return R"((.*?)(?=b|c)c)"; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_22_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_22_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5522,11 +5642,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_22_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_22_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5541,11 +5662,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_22_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_22_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5573,11 +5695,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_22_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_22_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5605,11 +5728,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_22_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_22_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5623,11 +5747,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_22_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_22_matcher::func_6::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5641,11 +5766,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_22_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_22_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5672,10 +5798,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_22_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_22_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -5683,19 +5810,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_22_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_19_lookahead::regex_22_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_19_lookahead::regex_22_matcher::to_string() -> std::string{return R"((.*?)(?=c|b))"; } + template [[nodiscard]] constexpr auto test_tests_19_lookahead::regex_22_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_19_lookahead::regex_22_matcher::to_string() -> std::string{return R"((.*?)(?=c|b))"; } - - template [[nodiscard]] auto test_tests_19_lookahead::regex_23_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_23_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5710,11 +5837,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_23_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_23_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5729,11 +5857,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_23_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_23_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5761,11 +5890,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_23_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_23_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5793,11 +5923,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_23_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_23_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5811,11 +5942,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_23_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_23_matcher::func_6::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5829,11 +5961,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_23_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_23_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5874,10 +6007,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_23_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_23_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -5885,19 +6019,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_23_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_19_lookahead::regex_23_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_19_lookahead::regex_23_matcher::to_string() -> std::string{return R"((.*?)(?=c|b)c)"; } - + template [[nodiscard]] constexpr auto test_tests_19_lookahead::regex_23_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_19_lookahead::regex_23_matcher::to_string() -> std::string{return R"((.*?)(?=c|b)c)"; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_24_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_24_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5912,11 +6046,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_24_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_24_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5931,11 +6066,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_24_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_24_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5950,11 +6086,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_24_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_24_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -5981,10 +6118,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_24_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_24_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -5992,19 +6130,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_24_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_19_lookahead::regex_24_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_19_lookahead::regex_24_matcher::to_string() -> std::string{return R"((.*?)(?=[bc]))"; } + template [[nodiscard]] constexpr auto test_tests_19_lookahead::regex_24_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_19_lookahead::regex_24_matcher::to_string() -> std::string{return R"((.*?)(?=[bc]))"; } - - template [[nodiscard]] auto test_tests_19_lookahead::regex_25_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_25_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6019,11 +6157,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_25_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_25_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6038,11 +6177,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_25_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_25_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6057,11 +6197,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_25_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_25_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6102,10 +6243,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_25_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_25_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -6113,19 +6255,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_25_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_19_lookahead::regex_25_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_19_lookahead::regex_25_matcher::to_string() -> std::string{return R"((.*?)(?=[bc])c)"; } - + template [[nodiscard]] constexpr auto test_tests_19_lookahead::regex_25_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_19_lookahead::regex_25_matcher::to_string() -> std::string{return R"((.*?)(?=[bc])c)"; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_26_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_26_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6153,11 +6295,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_26_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_26_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6173,11 +6316,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_26_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_26_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6205,11 +6349,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_26_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_26_matcher::func_6::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6237,11 +6382,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_26_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_26_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6256,11 +6402,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_26_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_26_matcher::func_7::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6286,16 +6433,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_19_lookahead::regex_26_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_19_lookahead::regex_26_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(2); } - template [[nodiscard]] auto test_tests_19_lookahead::regex_26_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_26_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6309,11 +6457,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_26_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_26_matcher::func_8::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6328,29 +6477,865 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_19_lookahead::regex_26_matcher::func_9::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_5 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_5, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_19_lookahead::regex_26_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;} + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_9()))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_19_lookahead::regex_26_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_26_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_19_lookahead::regex_26_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_19_lookahead::regex_26_matcher::to_string() -> std::string{return R"(^(a*?)(?!(aa|aaaa)*$)(?=a\z))"; } + + + + + + template template [[nodiscard]] auto test_tests_19_lookahead::regex_27_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_19_lookahead::regex_27_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_2()))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_26_matcher::wrap::func_9::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_27_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} + ctx.set_group_start(1, r.pos); + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(1, r.pos); + + auto tmp_3_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; + static_cast(cpp2::move(tmp_3)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_19_lookahead::regex_27_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_27_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_19_lookahead::regex_27_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_19_lookahead::regex_27_matcher::to_string() -> std::string{return R"(a(?!b(?!c))(..))"; } + + + + + + template template [[nodiscard]] auto test_tests_19_lookahead::regex_28_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_19_lookahead::regex_28_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_2()))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_19_lookahead::regex_28_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} + ctx.set_group_start(1, r.pos); + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(1, r.pos); + + auto tmp_3_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; + static_cast(cpp2::move(tmp_3)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_19_lookahead::regex_28_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_28_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_19_lookahead::regex_28_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_19_lookahead::regex_28_matcher::to_string() -> std::string{return R"(a(?!b(?=a))(..))"; } + + + + + + template template [[nodiscard]] auto test_tests_19_lookahead::regex_29_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_19_lookahead::regex_29_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_19_lookahead::regex_29_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_29_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_19_lookahead::regex_29_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_19_lookahead::regex_29_matcher::to_string() -> std::string{return R"((?=foo))"; } + + + + + + template template [[nodiscard]] auto test_tests_19_lookahead::regex_30_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_19_lookahead::regex_30_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_19_lookahead::regex_30_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_30_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_19_lookahead::regex_30_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_19_lookahead::regex_30_matcher::to_string() -> std::string{return R"((?=foo))"; } + + + + + + template template [[nodiscard]] auto test_tests_19_lookahead::regex_31_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_19_lookahead::regex_31_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_19_lookahead::regex_31_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_19_lookahead::regex_31_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_19_lookahead::regex_31_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_31_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_19_lookahead::regex_31_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_19_lookahead::regex_31_matcher::to_string() -> std::string{return R"(.*(?=foo))"; } + + + + + + template template [[nodiscard]] auto test_tests_19_lookahead::regex_32_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_19_lookahead::regex_32_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_2(), cpp2::regex::no_reset(), other, func_3()); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_19_lookahead::regex_32_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"P"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_19_lookahead::regex_32_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} + + std::array str_tmp_1 {"P"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_19_lookahead::regex_32_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_32_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_19_lookahead::regex_32_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_19_lookahead::regex_32_matcher::to_string() -> std::string{return R"((?=.*P)P)"; } + + + + + + template template [[nodiscard]] auto test_tests_19_lookahead::regex_33_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_19_lookahead::regex_33_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"X"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} + + std::array str_tmp_2 {"f"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_19_lookahead::regex_33_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_33_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_19_lookahead::regex_33_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_19_lookahead::regex_33_matcher::to_string() -> std::string{return R"(X(?=foo)f)"; } + + + + + + template template [[nodiscard]] auto test_tests_19_lookahead::regex_34_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { - std::array str_tmp_5 {"a"}; - if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + std::array str_tmp_1 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { r.matched = false; break; } { int i{0}; - for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { - if (CPP2_ASSERT_IN_BOUNDS(str_tmp_5, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} } } - if (r.matched) {r.pos += 1;} + if (r.matched) {r.pos += 3;} else {break;} - if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} } while ( false @@ -6361,28 +7346,30 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_26_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_34_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { - ctx.set_group_end(1, r.pos); - auto tmp_1_func { -[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ - if (!((*cpp2::impl::assert_not_null(_1)).matched)) { - (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + std::array str_tmp_0 {"X"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} } - }; - - auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; - static_cast(cpp2::move(tmp_1)); - if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;} - if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_9()))) {r.matched = false;break;} +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} } while ( false @@ -6393,10 +7380,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_26_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_34_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -6404,24 +7392,24 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_26_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_19_lookahead::regex_34_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_19_lookahead::regex_26_matcher::to_string() -> std::string{return R"(^(a*?)(?!(aa|aaaa)*$)(?=a\z))"; } + template [[nodiscard]] constexpr auto test_tests_19_lookahead::regex_34_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_19_lookahead::regex_34_matcher::to_string() -> std::string{return R"(X(?=foo))"; } - - template [[nodiscard]] auto test_tests_19_lookahead::regex_27_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_35_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { - std::array str_tmp_2 {"c"}; + std::array str_tmp_1 {"Y"}; if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { r.matched = false; break; @@ -6429,7 +7417,7 @@ int i{0}; { int i{0}; for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { - if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} } } if (r.matched) {r.pos += 1;} @@ -6444,16 +7432,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_27_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_35_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { - std::array str_tmp_1 {"b"}; + std::array str_tmp_0 {"X"}; if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { r.matched = false; break; @@ -6461,60 +7450,64 @@ int i{0}; { int i{0}; for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { - if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} } } if (r.matched) {r.pos += 1;} else {break;} - if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_2()))) {r.matched = false;break;} } while ( false ); if (r.matched) { - r = other(r.pos, ctx); + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_2(), cpp2::regex::no_reset(), other, func_3()); } else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_27_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_35_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { - std::array str_tmp_0 {"a"}; - if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + std::array str_tmp_2 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { r.matched = false; break; } { int i{0}; - for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { - if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} } } - if (r.matched) {r.pos += 1;} + if (r.matched) {r.pos += 3;} else {break;} - if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} - ctx.set_group_start(1, r.pos); - if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} - if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} - ctx.set_group_end(1, r.pos); - - auto tmp_3_func { -[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ - if (!((*cpp2::impl::assert_not_null(_1)).matched)) { - (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; } - }; - auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; - static_cast(cpp2::move(tmp_3)); + + template template [[nodiscard]] auto test_tests_19_lookahead::regex_35_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} } while ( false @@ -6525,10 +7518,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_27_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_35_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -6536,24 +7530,24 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_27_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_19_lookahead::regex_35_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_19_lookahead::regex_27_matcher::to_string() -> std::string{return R"(a(?!b(?!c))(..))"; } - + template [[nodiscard]] constexpr auto test_tests_19_lookahead::regex_35_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_19_lookahead::regex_35_matcher::to_string() -> std::string{return R"((?=XY*foo))"; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_28_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_36_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { - std::array str_tmp_2 {"a"}; + std::array str_tmp_1 {"Y"}; if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { r.matched = false; break; @@ -6561,7 +7555,7 @@ int i{0}; { int i{0}; for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { - if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} } } if (r.matched) {r.pos += 1;} @@ -6576,16 +7570,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_28_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_36_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { - std::array str_tmp_1 {"b"}; + std::array str_tmp_0 {"X"}; if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { r.matched = false; break; @@ -6593,60 +7588,65 @@ int i{0}; { int i{0}; for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { - if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} } } if (r.matched) {r.pos += 1;} else {break;} - if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_2()))) {r.matched = false;break;} } while ( false ); if (r.matched) { - r = other(r.pos, ctx); + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_2(), cpp2::regex::no_reset(), other, func_3()); } else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_28_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_36_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { - std::array str_tmp_0 {"a"}; - if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + std::array str_tmp_2 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { r.matched = false; break; } { int i{0}; - for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { - if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} } } - if (r.matched) {r.pos += 1;} + if (r.matched) {r.pos += 3;} else {break;} - if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} - ctx.set_group_start(1, r.pos); - if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} - if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} - ctx.set_group_end(1, r.pos); - - auto tmp_3_func { -[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ - if (!((*cpp2::impl::assert_not_null(_1)).matched)) { - (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; } - }; - auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; - static_cast(cpp2::move(tmp_3)); + + template template [[nodiscard]] auto test_tests_19_lookahead::regex_36_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;} + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} } while ( false @@ -6657,10 +7657,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_28_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_36_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -6668,19 +7669,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_28_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_19_lookahead::regex_36_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_19_lookahead::regex_28_matcher::to_string() -> std::string{return R"(a(?!b(?=a))(..))"; } - + template [[nodiscard]] constexpr auto test_tests_19_lookahead::regex_36_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_19_lookahead::regex_36_matcher::to_string() -> std::string{return R"(^(?=XY*foo))"; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_37_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_37_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6695,11 +7696,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_37_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_37_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6728,11 +7730,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_37_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_37_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6747,11 +7750,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_37_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_37_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6778,16 +7782,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_19_lookahead::regex_37_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_19_lookahead::regex_37_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_19_lookahead::regex_37_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_37_matcher::func_6::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6802,11 +7807,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_37_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_37_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6835,11 +7841,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_37_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_37_matcher::func_7::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6865,16 +7872,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_19_lookahead::regex_37_matcher::wrap::reset_1::operator()(auto& ctx) const& -> void{ + template auto test_tests_19_lookahead::regex_37_matcher::reset_1::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(2); } - template [[nodiscard]] auto test_tests_19_lookahead::regex_37_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_37_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6888,11 +7896,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_37_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_37_matcher::func_8::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6906,10 +7915,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_37_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_37_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -6917,19 +7927,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_37_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_19_lookahead::regex_37_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_19_lookahead::regex_37_matcher::to_string() -> std::string{return R"(X(\w+)(?=\s)|X(\w+))"; } + template [[nodiscard]] constexpr auto test_tests_19_lookahead::regex_37_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_19_lookahead::regex_37_matcher::to_string() -> std::string{return R"(X(\w+)(?=\s)|X(\w+))"; } - - template [[nodiscard]] auto test_tests_19_lookahead::regex_38_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_38_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6957,11 +7967,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_38_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_38_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -6976,11 +7987,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_38_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_38_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7008,11 +8020,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_38_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_38_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7041,10 +8054,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_38_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_38_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -7052,19 +8066,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_38_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_19_lookahead::regex_38_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_19_lookahead::regex_38_matcher::to_string() -> std::string{return R"(^a*(?=b)b)"; } - + template [[nodiscard]] constexpr auto test_tests_19_lookahead::regex_38_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_19_lookahead::regex_38_matcher::to_string() -> std::string{return R"(^a*(?=b)b)"; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_39_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_39_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7079,11 +8093,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_39_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_39_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7112,10 +8127,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_39_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_39_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -7123,19 +8139,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_39_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_19_lookahead::regex_39_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_19_lookahead::regex_39_matcher::to_string() -> std::string{return R"('(?!\A)x'm)"; } + template [[nodiscard]] constexpr auto test_tests_19_lookahead::regex_39_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_19_lookahead::regex_39_matcher::to_string() -> std::string{return R"('(?!\A)x'm)"; } - - template [[nodiscard]] auto test_tests_19_lookahead::regex_40_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_40_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7150,11 +8166,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_40_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_40_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7168,15 +8185,16 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_40_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_40_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { - if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} } while ( false @@ -7187,11 +8205,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_40_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_40_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7236,10 +8255,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_40_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_40_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -7247,19 +8267,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_40_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_19_lookahead::regex_40_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_19_lookahead::regex_40_matcher::to_string() -> std::string{return R"('^(o)(?!.*\1)'i)"; } - + template [[nodiscard]] constexpr auto test_tests_19_lookahead::regex_40_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_19_lookahead::regex_40_matcher::to_string() -> std::string{return R"('^(o)(?!.*\1)'i)"; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_41_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_41_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7274,11 +8294,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_41_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_41_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7292,11 +8313,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_41_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_41_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7324,11 +8346,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_41_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_41_matcher::func_6::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7356,11 +8379,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_41_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_41_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7375,11 +8399,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_41_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_41_matcher::func_7::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7405,16 +8430,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_19_lookahead::regex_41_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_19_lookahead::regex_41_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_19_lookahead::regex_41_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_41_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7428,11 +8454,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_41_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_41_matcher::func_8::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7460,11 +8487,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_41_matcher::wrap::func_9::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_41_matcher::func_9::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7479,11 +8507,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_41_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_41_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7512,11 +8541,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_41_matcher::wrap::func_10::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_41_matcher::func_10::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7544,10 +8574,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_41_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_41_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -7555,19 +8586,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_41_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_19_lookahead::regex_41_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_19_lookahead::regex_41_matcher::to_string() -> std::string{return R"(.*a(?!(b|cd)*e).*f)"; } + template [[nodiscard]] constexpr auto test_tests_19_lookahead::regex_41_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_19_lookahead::regex_41_matcher::to_string() -> std::string{return R"(.*a(?!(b|cd)*e).*f)"; } - - template [[nodiscard]] auto test_tests_19_lookahead::regex_42_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_42_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7595,11 +8626,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_42_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_42_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7615,11 +8647,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_42_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_42_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7647,11 +8680,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_42_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_42_matcher::func_6::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7679,11 +8713,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_42_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_42_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7698,11 +8733,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_42_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_42_matcher::func_7::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7728,16 +8764,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_19_lookahead::regex_42_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_19_lookahead::regex_42_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(2); } - template [[nodiscard]] auto test_tests_19_lookahead::regex_42_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_42_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7751,11 +8788,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_42_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_42_matcher::func_8::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7770,11 +8808,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_42_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_42_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7801,10 +8840,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_42_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_42_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -7812,19 +8852,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_42_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_19_lookahead::regex_42_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_19_lookahead::regex_42_matcher::to_string() -> std::string{return R"(^(a*?)(?!(aa|aaaa)*$))"; } - + template [[nodiscard]] constexpr auto test_tests_19_lookahead::regex_42_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_19_lookahead::regex_42_matcher::to_string() -> std::string{return R"(^(a*?)(?!(aa|aaaa)*$))"; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_43_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_43_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7838,11 +8878,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_43_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_43_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7857,11 +8898,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_43_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_43_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7875,11 +8917,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_43_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_43_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7893,11 +8936,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_43_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_43_matcher::func_6::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7912,11 +8956,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_43_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_43_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7931,11 +8976,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_43_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_43_matcher::func_7::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7961,16 +9007,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_19_lookahead::regex_43_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_19_lookahead::regex_43_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_19_lookahead::regex_43_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_43_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -7984,11 +9031,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_43_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_43_matcher::func_8::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8002,10 +9050,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_43_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_43_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -8013,19 +9062,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_43_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_19_lookahead::regex_43_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_19_lookahead::regex_43_matcher::to_string() -> std::string{return R"((?!)+?|(.{2,4}))"; } + template [[nodiscard]] constexpr auto test_tests_19_lookahead::regex_43_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_19_lookahead::regex_43_matcher::to_string() -> std::string{return R"((?!)+?|(.{2,4}))"; } - - template [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8053,11 +9102,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8073,11 +9123,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::func_6::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8105,11 +9156,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8123,11 +9175,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::func_7::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8141,11 +9194,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::wrap::func_9::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::func_9::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8173,11 +9227,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::func_8::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8191,11 +9246,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::wrap::func_10::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::func_10::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8209,11 +9265,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8228,11 +9285,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::wrap::func_11::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::func_11::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8258,16 +9316,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_19_lookahead::regex_44_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_19_lookahead::regex_44_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(2); } - template [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8281,11 +9340,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::wrap::func_12::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::func_12::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8300,11 +9360,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8331,10 +9392,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -8342,19 +9404,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::to_string() -> std::string{return R"(^(a*?)(?!(a{6}|a{5})*$))"; } - + template [[nodiscard]] constexpr auto test_tests_19_lookahead::regex_44_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::to_string() -> std::string{return R"(^(a*?)(?!(a{6}|a{5})*$))"; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_45_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_45_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8382,11 +9444,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_45_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_45_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8415,11 +9478,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_45_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_45_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8448,11 +9512,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_45_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_45_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8481,11 +9546,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_45_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_45_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8531,10 +9597,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_45_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_45_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -8542,19 +9609,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_45_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_19_lookahead::regex_45_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_19_lookahead::regex_45_matcher::to_string() -> std::string{return R"(a(?!b(?!c(?!d(?!e))))...(.))"; } + template [[nodiscard]] constexpr auto test_tests_19_lookahead::regex_45_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_19_lookahead::regex_45_matcher::to_string() -> std::string{return R"(a(?!b(?!c(?!d(?!e))))...(.))"; } - - template [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8582,11 +9649,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8600,11 +9668,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::func_6::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8632,11 +9701,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8651,11 +9721,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::func_7::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8681,16 +9752,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_19_lookahead::regex_46_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + template auto test_tests_19_lookahead::regex_46_matcher::reset_0::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(1); } - template [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8704,11 +9776,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::wrap::func_11::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::func_11::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8736,11 +9809,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::wrap::func_10::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::func_10::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8755,11 +9829,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::wrap::func_12::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::func_12::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8785,16 +9860,17 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template auto test_tests_19_lookahead::regex_46_matcher::wrap::reset_1::operator()(auto& ctx) const& -> void{ + template auto test_tests_19_lookahead::regex_46_matcher::reset_1::operator()(auto& ctx) const& -> void{ ctx.set_group_invalid(2); } - template [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::wrap::func_9::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::func_9::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8808,11 +9884,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::wrap::func_13::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::func_13::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8840,11 +9917,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::func_8::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8859,11 +9937,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8878,11 +9957,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::wrap::func_14::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::func_14::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8897,11 +9977,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8930,11 +10011,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::wrap::func_15::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::func_15::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -8962,10 +10044,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -8973,19 +10056,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::to_string() -> std::string{return R"(X(?!b+(?!(c+)*(?!(c+)*d))).*X)"; } - + template [[nodiscard]] constexpr auto test_tests_19_lookahead::regex_46_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::to_string() -> std::string{return R"(X(?!b+(?!(c+)*(?!(c+)*d))).*X)"; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_47_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_47_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9000,11 +10083,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_47_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_47_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9047,10 +10131,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_47_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_47_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -9058,19 +10143,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_47_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_19_lookahead::regex_47_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_19_lookahead::regex_47_matcher::to_string() -> std::string{return R"(((?s).)c(?!.))"; } + template [[nodiscard]] constexpr auto test_tests_19_lookahead::regex_47_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_19_lookahead::regex_47_matcher::to_string() -> std::string{return R"(((?s).)c(?!.))"; } - - template [[nodiscard]] auto test_tests_19_lookahead::regex_48_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_48_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9085,11 +10170,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_48_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_48_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9132,10 +10218,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_48_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_48_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -9143,19 +10230,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_48_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_19_lookahead::regex_48_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_19_lookahead::regex_48_matcher::to_string() -> std::string{return R"(((?s).)c(?!.))"; } - + template [[nodiscard]] constexpr auto test_tests_19_lookahead::regex_48_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_19_lookahead::regex_48_matcher::to_string() -> std::string{return R"(((?s).)c(?!.))"; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_49_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_49_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9170,11 +10257,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_49_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_49_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9231,10 +10319,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_49_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_49_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -9242,19 +10331,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_49_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_19_lookahead::regex_49_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_19_lookahead::regex_49_matcher::to_string() -> std::string{return R"(((?s)b.)c(?!.))"; } + template [[nodiscard]] constexpr auto test_tests_19_lookahead::regex_49_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_19_lookahead::regex_49_matcher::to_string() -> std::string{return R"(((?s)b.)c(?!.))"; } - - template [[nodiscard]] auto test_tests_19_lookahead::regex_50_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_50_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9269,11 +10358,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_50_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_50_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9330,10 +10420,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_50_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_50_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -9341,19 +10432,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_50_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_19_lookahead::regex_50_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_19_lookahead::regex_50_matcher::to_string() -> std::string{return R"(((?s)b.)c(?!.))"; } - + template [[nodiscard]] constexpr auto test_tests_19_lookahead::regex_50_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_19_lookahead::regex_50_matcher::to_string() -> std::string{return R"(((?s)b.)c(?!.))"; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_51_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_51_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9368,11 +10459,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_51_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_51_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9429,10 +10521,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_51_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_51_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -9440,19 +10533,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_51_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_19_lookahead::regex_51_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_19_lookahead::regex_51_matcher::to_string() -> std::string{return R"(((?s)b.)c(?!\N))"; } + template [[nodiscard]] constexpr auto test_tests_19_lookahead::regex_51_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_19_lookahead::regex_51_matcher::to_string() -> std::string{return R"(((?s)b.)c(?!\N))"; } - - template [[nodiscard]] auto test_tests_19_lookahead::regex_52_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_52_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9467,11 +10560,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_52_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_52_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9528,10 +10622,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_52_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_52_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -9539,19 +10634,19 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_52_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_19_lookahead::regex_52_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_19_lookahead::regex_52_matcher::to_string() -> std::string{return R"('(b.)c(?!\N)'s)"; } - + template [[nodiscard]] constexpr auto test_tests_19_lookahead::regex_52_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_19_lookahead::regex_52_matcher::to_string() -> std::string{return R"('(b.)c(?!\N)'s)"; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_53_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_53_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9579,11 +10674,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_53_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_53_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9597,11 +10693,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_53_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_53_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9615,11 +10712,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_53_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_53_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -9634,10 +10732,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_53_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto test_tests_19_lookahead::regex_53_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -9645,15 +10744,158 @@ int i{0}; return r; } - template [[nodiscard]] auto test_tests_19_lookahead::regex_53_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto test_tests_19_lookahead::regex_53_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - [[nodiscard]] auto test_tests_19_lookahead::regex_53_matcher::to_string() -> std::string{return R"(a*(?!))"; } + template [[nodiscard]] constexpr auto test_tests_19_lookahead::regex_53_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_19_lookahead::regex_53_matcher::to_string() -> std::string{return R"(a*(?!))"; } + + + + + + template template [[nodiscard]] auto test_tests_19_lookahead::regex_54_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + ctx.set_group_end(1, r.pos); + + auto tmp_0_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; + static_cast(cpp2::move(tmp_0)); + + std::array str_tmp_1 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_19_lookahead::regex_54_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_54_matcher::get_named_group_index(auto const& name) -> int{ + if (name == "bar") {return 1; }else {return -1; } + } + + template [[nodiscard]] constexpr auto test_tests_19_lookahead::regex_54_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_19_lookahead::regex_54_matcher::to_string() -> std::string{return R"((?)foo)"; } + + + + + + template template [[nodiscard]] auto test_tests_19_lookahead::regex_55_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"ABC"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + + std::array str_tmp_2 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_19_lookahead::regex_55_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_55_matcher::get_named_group_index(auto const& name) -> int{ + if (name == "bar") {return 1; }else {return -1; } + } + + template [[nodiscard]] constexpr auto test_tests_19_lookahead::regex_55_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_19_lookahead::regex_55_matcher::to_string() -> std::string{return R"((?ABC)foo)"; } -#line 261 "pure2-regex_19_lookahead.cpp2" +#line 282 "pure2-regex_19_lookahead.cpp2" auto main() -> int{ CPP2_UFCS(run)(test_tests_19_lookahead()); } diff --git a/regression-tests/test-results/pure2-regex_20_lookbehind.cpp b/regression-tests/test-results/pure2-regex_20_lookbehind.cpp new file mode 100644 index 000000000..1cdc6485a --- /dev/null +++ b/regression-tests/test-results/pure2-regex_20_lookbehind.cpp @@ -0,0 +1,8990 @@ + +#define CPP2_INCLUDE_STD Yes +#include "cpp2regex.h" + +//=== Cpp2 type declarations ==================================================== + + +#include "cpp2util.h" + +#line 1 "pure2-regex_20_lookbehind.cpp2" + +#line 166 "pure2-regex_20_lookbehind.cpp2" +class test_tests_20_lookbehind; + + +//=== Cpp2 type definitions and function declarations =========================== + +#line 1 "pure2-regex_20_lookbehind.cpp2" +[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string; + +#line 113 "pure2-regex_20_lookbehind.cpp2" +[[nodiscard]] auto sanitize(std::string str) -> std::string; + +#line 125 "pure2-regex_20_lookbehind.cpp2" +template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, + cpp2::impl::in resultExpected) -> void; + +#line 166 "pure2-regex_20_lookbehind.cpp2" +class test_tests_20_lookbehind { + +#line 223 "pure2-regex_20_lookbehind.cpp2" + public: auto run() const& -> void; + public: template class regex_01_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_01_matcher() = default; + public: regex_01_matcher(regex_01_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_01_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_01 {}; public: template class regex_02_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_2 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_02_matcher() = default; + public: regex_02_matcher(regex_02_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_02_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_02 {}; public: template class regex_03_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_03_matcher() = default; + public: regex_03_matcher(regex_03_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_03_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_03 {}; public: template class regex_04_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_2 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_04_matcher() = default; + public: regex_04_matcher(regex_04_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_04_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_04 {}; public: template class regex_05_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_05_matcher() = default; + public: regex_05_matcher(regex_05_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_05_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_05 {}; public: template class regex_06_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_2 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_06_matcher() = default; + public: regex_06_matcher(regex_06_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_06_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_06 {}; public: template class regex_07_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_07_matcher() = default; + public: regex_07_matcher(regex_07_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_07_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_07 {}; public: template class regex_08_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_2 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_08_matcher() = default; + public: regex_08_matcher(regex_08_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_08_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_08 {}; public: template class regex_09_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_09_matcher() = default; + public: regex_09_matcher(regex_09_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_09_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_09 {}; public: template class regex_10_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_2 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_10_matcher() = default; + public: regex_10_matcher(regex_10_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_10_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_10 {}; public: template class regex_11_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_11_matcher() = default; + public: regex_11_matcher(regex_11_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_11_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_11 {}; public: template class regex_12_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_2 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_12_matcher() = default; + public: regex_12_matcher(regex_12_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_12_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_12 {}; public: template class regex_13_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_13_matcher() = default; + public: regex_13_matcher(regex_13_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_13_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_13 {}; public: template class regex_14_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_2 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_14_matcher() = default; + public: regex_14_matcher(regex_14_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_14_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_14 {}; public: template class regex_15_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_15_matcher() = default; + public: regex_15_matcher(regex_15_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_15_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_15 {}; public: template class regex_16_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_2 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_16_matcher() = default; + public: regex_16_matcher(regex_16_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_16_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_16 {}; public: template class regex_17_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_17_matcher() = default; + public: regex_17_matcher(regex_17_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_17_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_17 {}; public: template class regex_18_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_2 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_18_matcher() = default; + public: regex_18_matcher(regex_18_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_18_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_18 {}; public: template class regex_19_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_2 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_19_matcher() = default; + public: regex_19_matcher(regex_19_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_19_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_19 {}; public: template class regex_20_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_2 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_20_matcher() = default; + public: regex_20_matcher(regex_20_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_20_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_20 {}; public: template class regex_21_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_2 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_21_matcher() = default; + public: regex_21_matcher(regex_21_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_21_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_21 {}; public: template class regex_22_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_22_matcher() = default; + public: regex_22_matcher(regex_22_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_22_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_22 {}; public: template class regex_23_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_23_matcher() = default; + public: regex_23_matcher(regex_23_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_23_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_23 {}; public: template class regex_24_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_24_matcher() = default; + public: regex_24_matcher(regex_24_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_24_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_24 {}; public: template class regex_25_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_25_matcher() = default; + public: regex_25_matcher(regex_25_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_25_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_25 {}; public: template class regex_26_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_26_matcher() = default; + public: regex_26_matcher(regex_26_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_26_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_26 {}; public: template class regex_27_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_5 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_6 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_27_matcher() = default; + public: regex_27_matcher(regex_27_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_27_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_27 {}; public: template class regex_28_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_5 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_6 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_28_matcher() = default; + public: regex_28_matcher(regex_28_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_28_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_28 {}; public: template class regex_29_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_5 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_6 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_29_matcher() = default; + public: regex_29_matcher(regex_29_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_29_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_29 {}; public: template class regex_30_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_5 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_6 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_30_matcher() = default; + public: regex_30_matcher(regex_30_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_30_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_30 {}; public: template class regex_31_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_31_matcher() = default; + public: regex_31_matcher(regex_31_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_31_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_31 {}; public: template class regex_32_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_32_matcher() = default; + public: regex_32_matcher(regex_32_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_32_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_32 {}; public: template class regex_33_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_33_matcher() = default; + public: regex_33_matcher(regex_33_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_33_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_33 {}; public: template class regex_34_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_34_matcher() = default; + public: regex_34_matcher(regex_34_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_34_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_34 {}; public: template class regex_35_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_35_matcher() = default; + public: regex_35_matcher(regex_35_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_35_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_35 {}; public: template class regex_36_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_5 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_6 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_36_matcher() = default; + public: regex_36_matcher(regex_36_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_36_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_36 {}; public: template class regex_37_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_5 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_6 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_37_matcher() = default; + public: regex_37_matcher(regex_37_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_37_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_37 {}; public: template class regex_38_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_5 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_6 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_38_matcher() = default; + public: regex_38_matcher(regex_38_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_38_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_38 {}; public: template class regex_39_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_5 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_6 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_39_matcher() = default; + public: regex_39_matcher(regex_39_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_39_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_39 {}; public: template class regex_40_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_40_matcher() = default; + public: regex_40_matcher(regex_40_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_40_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_40 {}; public: template class regex_41_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_41_matcher() = default; + public: regex_41_matcher(regex_41_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_41_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_41 {}; public: template class regex_42_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_42_matcher() = default; + public: regex_42_matcher(regex_42_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_42_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_42 {}; public: template class regex_43_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_43_matcher() = default; + public: regex_43_matcher(regex_43_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_43_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_43 {}; public: template class regex_44_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_44_matcher() = default; + public: regex_44_matcher(regex_44_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_44_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_44 {}; public: template class regex_45_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_45_matcher() = default; + public: regex_45_matcher(regex_45_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_45_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_45 {}; public: template class regex_46_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_46_matcher() = default; + public: regex_46_matcher(regex_46_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_46_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_46 {}; public: template class regex_47_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_47_matcher() = default; + public: regex_47_matcher(regex_47_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_47_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_47 {}; public: template class regex_48_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_48_matcher() = default; + public: regex_48_matcher(regex_48_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_48_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_48 {}; public: template class regex_49_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_49_matcher() = default; + public: regex_49_matcher(regex_49_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_49_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_49 {}; public: template class regex_50_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_50_matcher() = default; + public: regex_50_matcher(regex_50_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_50_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_50 {}; public: template class regex_51_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_51_matcher() = default; + public: regex_51_matcher(regex_51_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_51_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_51 {}; public: template class regex_52_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_52_matcher() = default; + public: regex_52_matcher(regex_52_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_52_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_52 {}; public: template class regex_53_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_2 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_53_matcher() = default; + public: regex_53_matcher(regex_53_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_53_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_53 {}; public: template class regex_54_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_2 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_54_matcher() = default; + public: regex_54_matcher(regex_54_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_54_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_54 {}; public: template class regex_55_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_3 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_55_matcher() = default; + public: regex_55_matcher(regex_55_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_55_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_55 {}; public: template class regex_56_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_2 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_56_matcher() = default; + public: regex_56_matcher(regex_56_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_56_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_56 {}; + public: test_tests_20_lookbehind() = default; + public: test_tests_20_lookbehind(test_tests_20_lookbehind const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(test_tests_20_lookbehind const&) -> void = delete; + + +#line 283 "pure2-regex_20_lookbehind.cpp2" +}; +auto main() -> int; + +//=== Cpp2 function definitions ================================================= + +#line 1 "pure2-regex_20_lookbehind.cpp2" +[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string{ +#line 2 "pure2-regex_20_lookbehind.cpp2" + std::string result {""}; + + auto get_next {[_0 = (&resultExpr)](auto const& iter) mutable -> auto{ + auto start {std::distance(CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))), iter)}; + auto firstDollar {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "$", start)}; + auto firstAt {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "@", cpp2::move(start))}; + + auto end {std::min(cpp2::move(firstDollar), cpp2::move(firstAt))}; + if (end != std::string::npos) { + return CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))) + cpp2::move(end); + } + else { + return CPP2_UFCS(cend)((*cpp2::impl::assert_not_null(_0))); + } + }}; + auto extract_group_and_advance {[](auto& iter) -> auto{ + auto start {iter}; + + for( ; std::isdigit(*cpp2::impl::assert_not_null(iter)); ++iter ) {} + + return std::stoi(std::string(cpp2::move(start), iter)); + }}; + auto extract_until {[](auto& iter, cpp2::impl::in to) -> auto{ + auto start {iter}; + + for( ; (to != *cpp2::impl::assert_not_null(iter)); ++iter ) {}// TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication) + + return std::string(cpp2::move(start), iter); + }}; + + auto iter {CPP2_UFCS(begin)(resultExpr)}; + + while( iter != CPP2_UFCS(end)(resultExpr) ) { + auto next {get_next(iter)}; + + if (next != iter) { + result += std::string(iter, next); + } + if (next != CPP2_UFCS(end)(resultExpr)) { + if (*cpp2::impl::assert_not_null(next) == '$') { + ++next; + + if (*cpp2::impl::assert_not_null(next) == '&') { + ++next; + result += CPP2_UFCS(group)(r, 0); + } + else {if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') { + auto is_start {*cpp2::impl::assert_not_null(next) == '-'}; + ++next; + if (*cpp2::impl::assert_not_null(next) == '{') { + ++next; // Skip { + auto group {extract_until(next, '}')}; + ++next; // Skip } + result += CPP2_UFCS(group)(r, cpp2::move(group)); + } + else {if (*cpp2::impl::assert_not_null(next) == '[') { + ++next; // Skip [ + auto group {extract_group_and_advance(next)}; + ++next; // Skip ] + + if (cpp2::move(is_start)) { + result += std::to_string(CPP2_UFCS(group_start)(r, cpp2::move(group))); + } + else { + result += std::to_string(CPP2_UFCS(group_end)(r, cpp2::move(group))); + } + } + else { + // Return max group + result += CPP2_UFCS(group)(r, CPP2_UFCS(group_number)(r) - 1); + }} + } + else {if (std::isdigit(*cpp2::impl::assert_not_null(next))) { + auto group {extract_group_and_advance(next)}; + result += CPP2_UFCS(group)(r, cpp2::move(group)); + } + else { + std::cerr << "Not implemented"; + }}} + } + else {if (*cpp2::impl::assert_not_null(next) == '@') { + ++next; + + if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') { + auto i {0}; + for( ; cpp2::impl::cmp_less(i,cpp2::unchecked_narrow(CPP2_UFCS(group_number)(r))); ++i ) { + auto pos {0}; + if (*cpp2::impl::assert_not_null(next) == '-') { + pos = CPP2_UFCS(group_start)(r, i); + } + else { + pos = CPP2_UFCS(group_end)(r, i); + } + result += std::to_string(cpp2::move(pos)); + } + ++next; + } + else { + std::cerr << "Not implemented"; + } + } + else { + std::cerr << "Not implemented."; + }} + } + iter = cpp2::move(next); + } + + return result; +} + +#line 113 "pure2-regex_20_lookbehind.cpp2" +[[nodiscard]] auto sanitize(std::string str) -> std::string +{ + str = cpp2::string_util::replace_all(str, "\a", "\\a"); + str = cpp2::string_util::replace_all(str, "\f", "\\f"); + str = cpp2::string_util::replace_all(str, "\x1b", "\\e"); + str = cpp2::string_util::replace_all(str, "\n", "\\n"); + str = cpp2::string_util::replace_all(str, "\r", "\\r"); + str = cpp2::string_util::replace_all(str, "\t", "\\t"); + + return cpp2::move(str); +} + +#line 125 "pure2-regex_20_lookbehind.cpp2" +template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, + cpp2::impl::in resultExpected) -> void{ + + std::string warning {""}; + if (CPP2_UFCS(to_string)(regex) != regex_str) { + warning = "Warning: Parsed regex does not match."; + } + + std::string status {"OK"}; + + auto r {CPP2_UFCS(search)(regex, str)}; + + if ("y" == kind || "yM" == kind || "yS" == kind || "yB" == kind) { + if (!(r.matched)) { + status = "Failure: Regex should apply."; + } + else { + // Have a match check the result + + auto result {create_result(resultExpr, cpp2::move(r))}; + + if (result != resultExpected) { + status = "Failure: Result is wrong. (is: " + cpp2::to_string(sanitize(cpp2::move(result))) + ")"; + } + } + } + else {if ("n" == kind) { + if (r.matched) { + status = "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'"; + } + }else { + status = "Unknown kind '" + cpp2::to_string(kind) + "'"; + }} + + if (!(CPP2_UFCS(empty)(warning))) { + warning += " "; + } + std::cout << "" + cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(sanitize(str)) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(sanitize(resultExpected)) + "" << std::endl; +} + +#line 223 "pure2-regex_20_lookbehind.cpp2" + auto test_tests_20_lookbehind::run() const& -> void{ + std::cout << "Running tests_20_lookbehind:" << std::endl; + test(regex_01, "01", R"((?<=a)b)", "ab", "y", R"($&)", "b"); + test(regex_02, "02", R"((?<=af?)b)", "ab", "y", R"($&)", "b"); + test(regex_03, "03", R"((?<=a)b)", "cb", "n", R"(-)", "-"); + test(regex_04, "04", R"((?<=a(?:fo)?)b)", "cb", "n", R"(-)", "-"); + test(regex_05, "05", R"((?<=a)b)", "b", "n", R"(-)", "-"); + test(regex_06, "06", R"((?<=a(?:foo)?)b)", "b", "n", R"(-)", "-"); + test(regex_07, "07", R"((?)foo)", "bar>foo", "y", R"($&)", "foo"); + test(regex_50, "50", R"((?)foo)", "bar>foo", "n", R"(-)", "-"); + test(regex_51, "51", R"((?<=bar>ABC)foo)", "bar>ABCfoo", "y", R"($&)", "foo"); + test(regex_52, "52", R"((?ABC)foo)", "bar>ABCfoo", "n", R"(-)", "-"); + test(regex_53, "53", R"((?<=abcd(?<=(aaaabcd))))", "..aaaabcd..", "y", R"($1)", "aaaabcd"); + test(regex_54, "54", R"((?=xy(?<=(aaxy))))", "..aaxy..", "y", R"($1)", "aaxy"); + test(regex_55, "55", R"((?=xy(?<=(aaxyz?))))", "..aaxy..", "y", R"($1)", "aaxy"); + test(regex_56, "56", R"((?<=(?=(aaxy))aa))", "..aaxy..", "y", R"($1)", "aaxy"); + std::cout << std::endl; + } + + + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_01_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_01_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::lookbehind_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_01_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_20_lookbehind::regex_01_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_20_lookbehind::regex_01_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_20_lookbehind::regex_01_matcher::to_string() -> std::string{return R"((?<=a)b)"; } + + + + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_02_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"f"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_02_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_2(), cpp2::regex::no_reset(), other, func_3()); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_02_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_02_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::lookbehind_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} + + std::array str_tmp_2 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_02_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_20_lookbehind::regex_02_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_20_lookbehind::regex_02_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_20_lookbehind::regex_02_matcher::to_string() -> std::string{return R"((?<=af?)b)"; } + + + + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_03_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_03_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::lookbehind_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_03_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_20_lookbehind::regex_03_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_20_lookbehind::regex_03_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_20_lookbehind::regex_03_matcher::to_string() -> std::string{return R"((?<=a)b)"; } + + + + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_04_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"of"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_04_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_2(), cpp2::regex::no_reset(), other, func_3()); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_04_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_04_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::lookbehind_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} + + std::array str_tmp_2 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_04_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_20_lookbehind::regex_04_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_20_lookbehind::regex_04_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_20_lookbehind::regex_04_matcher::to_string() -> std::string{return R"((?<=a(?:fo)?)b)"; } + + + + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_05_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_05_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::lookbehind_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_05_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_20_lookbehind::regex_05_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_20_lookbehind::regex_05_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_20_lookbehind::regex_05_matcher::to_string() -> std::string{return R"((?<=a)b)"; } + + + + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_06_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"oof"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_06_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_2(), cpp2::regex::no_reset(), other, func_3()); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_06_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_06_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::lookbehind_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} + + std::array str_tmp_2 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_06_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_20_lookbehind::regex_06_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_20_lookbehind::regex_06_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_20_lookbehind::regex_06_matcher::to_string() -> std::string{return R"((?<=a(?:foo)?)b)"; } + + + + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_07_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_07_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::lookbehind_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_07_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_20_lookbehind::regex_07_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_20_lookbehind::regex_07_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_20_lookbehind::regex_07_matcher::to_string() -> std::string{return R"((? template [[nodiscard]] auto test_tests_20_lookbehind::regex_08_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"boof"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),4)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,4); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 4;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_08_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_2(), cpp2::regex::no_reset(), other, func_3()); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_08_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_08_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::lookbehind_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} + + std::array str_tmp_2 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_08_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_20_lookbehind::regex_08_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_20_lookbehind::regex_08_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_20_lookbehind::regex_08_matcher::to_string() -> std::string{return R"((? template [[nodiscard]] auto test_tests_20_lookbehind::regex_09_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_09_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::lookbehind_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_09_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_20_lookbehind::regex_09_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_20_lookbehind::regex_09_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_20_lookbehind::regex_09_matcher::to_string() -> std::string{return R"((? template [[nodiscard]] auto test_tests_20_lookbehind::regex_10_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aboof"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),5)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,5); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 5;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_10_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_2(), cpp2::regex::no_reset(), other, func_3()); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_10_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_10_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::lookbehind_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} + + std::array str_tmp_2 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_10_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_20_lookbehind::regex_10_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_20_lookbehind::regex_10_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_20_lookbehind::regex_10_matcher::to_string() -> std::string{return R"((? template [[nodiscard]] auto test_tests_20_lookbehind::regex_11_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_11_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::lookbehind_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_11_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_20_lookbehind::regex_11_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_20_lookbehind::regex_11_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_20_lookbehind::regex_11_matcher::to_string() -> std::string{return R"((? template [[nodiscard]] auto test_tests_20_lookbehind::regex_12_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"raboof"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),6)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,6); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 6;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_12_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_2(), cpp2::regex::no_reset(), other, func_3()); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_12_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_12_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::lookbehind_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} + + std::array str_tmp_2 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_12_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_20_lookbehind::regex_12_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_20_lookbehind::regex_12_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_20_lookbehind::regex_12_matcher::to_string() -> std::string{return R"((? template [[nodiscard]] auto test_tests_20_lookbehind::regex_13_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_13_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::lookbehind_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_13_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_20_lookbehind::regex_13_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_20_lookbehind::regex_13_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_20_lookbehind::regex_13_matcher::to_string() -> std::string{return R"((? template [[nodiscard]] auto test_tests_20_lookbehind::regex_14_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"braboof"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),7)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,7); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 7;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_14_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_2(), cpp2::regex::no_reset(), other, func_3()); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_14_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_14_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::lookbehind_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} + + std::array str_tmp_2 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_14_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_20_lookbehind::regex_14_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_20_lookbehind::regex_14_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_20_lookbehind::regex_14_matcher::to_string() -> std::string{return R"((? template [[nodiscard]] auto test_tests_20_lookbehind::regex_15_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_15_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::lookbehind_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} + + std::array str_tmp_0 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_15_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_20_lookbehind::regex_15_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_20_lookbehind::regex_15_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_20_lookbehind::regex_15_matcher::to_string() -> std::string{return R"((? template [[nodiscard]] auto test_tests_20_lookbehind::regex_16_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"e"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_16_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_2(), cpp2::regex::no_reset(), other, func_3()); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_16_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_16_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::lookbehind_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_16_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_20_lookbehind::regex_16_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_20_lookbehind::regex_16_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_20_lookbehind::regex_16_matcher::to_string() -> std::string{return R"((? template [[nodiscard]] auto test_tests_20_lookbehind::regex_17_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_17_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::lookbehind_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_17_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_20_lookbehind::regex_17_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_20_lookbehind::regex_17_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_20_lookbehind::regex_17_matcher::to_string() -> std::string{return R"((? template [[nodiscard]] auto test_tests_20_lookbehind::regex_18_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_18_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_2(), cpp2::regex::no_reset(), other, func_3()); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_18_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_18_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::lookbehind_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_18_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_20_lookbehind::regex_18_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_20_lookbehind::regex_18_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_20_lookbehind::regex_18_matcher::to_string() -> std::string{return R"((? template [[nodiscard]] auto test_tests_20_lookbehind::regex_19_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_19_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_2(), cpp2::regex::no_reset(), other, func_3()); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_19_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_19_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::lookbehind_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_19_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_20_lookbehind::regex_19_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_20_lookbehind::regex_19_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_20_lookbehind::regex_19_matcher::to_string() -> std::string{return R"((? template [[nodiscard]] auto test_tests_20_lookbehind::regex_20_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_20_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"d"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_20_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_4(), func_2(), cpp2::regex::no_reset(), func_3(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_20_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + auto tmp_2_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; + static_cast(cpp2::move(tmp_2)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_20_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::lookbehind_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} + + std::array str_tmp_3 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_20_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_20_lookbehind::regex_20_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_20_lookbehind::regex_20_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_20_lookbehind::regex_20_matcher::to_string() -> std::string{return R"((? template [[nodiscard]] auto test_tests_20_lookbehind::regex_21_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_21_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"d"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_21_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_4(), func_2(), cpp2::regex::no_reset(), func_3(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_21_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + auto tmp_2_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; + static_cast(cpp2::move(tmp_2)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_21_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::lookbehind_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_21_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_20_lookbehind::regex_21_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_20_lookbehind::regex_21_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_20_lookbehind::regex_21_matcher::to_string() -> std::string{return R"((? template [[nodiscard]] auto test_tests_20_lookbehind::regex_22_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"dc"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_22_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::lookbehind_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_22_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_20_lookbehind::regex_22_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_20_lookbehind::regex_22_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_20_lookbehind::regex_22_matcher::to_string() -> std::string{return R"((? template [[nodiscard]] auto test_tests_20_lookbehind::regex_23_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_start(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_23_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + if (!(cpp2::regex::lookbehind_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_23_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_20_lookbehind::regex_23_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_20_lookbehind::regex_23_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_20_lookbehind::regex_23_matcher::to_string() -> std::string{return R"($(?<=^(a)))"; } + + + + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_24_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_24_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_24_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_0_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; + static_cast(cpp2::move(tmp_0)); + + std::array str_tmp_1 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_24_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_20_lookbehind::regex_24_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_20_lookbehind::regex_24_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_20_lookbehind::regex_24_matcher::to_string() -> std::string{return R"((.*)c)"; } + + + + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_25_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_25_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_25_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_25_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_0_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; + static_cast(cpp2::move(tmp_0)); + if (!(cpp2::regex::lookbehind_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_25_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_20_lookbehind::regex_25_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_20_lookbehind::regex_25_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_20_lookbehind::regex_25_matcher::to_string() -> std::string{return R"((.*)(?<=b))"; } + + + + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_26_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_26_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_26_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_26_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_0_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; + static_cast(cpp2::move(tmp_0)); + if (!(cpp2::regex::lookbehind_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;} + + std::array str_tmp_2 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_26_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_20_lookbehind::regex_26_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_20_lookbehind::regex_26_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_20_lookbehind::regex_26_matcher::to_string() -> std::string{return R"((.*)(?<=b)c)"; } + + + + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_27_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_27_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_27_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_27_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_27_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_6(), func_4(), cpp2::regex::no_reset(), func_5(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_27_matcher::func_6::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_27_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_0_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; + static_cast(cpp2::move(tmp_0)); + if (!(cpp2::regex::lookbehind_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_27_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_20_lookbehind::regex_27_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_20_lookbehind::regex_27_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_20_lookbehind::regex_27_matcher::to_string() -> std::string{return R"((.*)(?<=b|c))"; } + + + + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_28_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_28_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_28_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_28_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_28_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_6(), func_4(), cpp2::regex::no_reset(), func_5(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_28_matcher::func_6::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_28_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_0_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; + static_cast(cpp2::move(tmp_0)); + if (!(cpp2::regex::lookbehind_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;} + + std::array str_tmp_3 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_28_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_20_lookbehind::regex_28_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_20_lookbehind::regex_28_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_20_lookbehind::regex_28_matcher::to_string() -> std::string{return R"((.*)(?<=b|c)c)"; } + + + + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_29_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_29_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_29_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_29_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_29_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_6(), func_4(), cpp2::regex::no_reset(), func_5(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_29_matcher::func_6::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_29_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_0_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; + static_cast(cpp2::move(tmp_0)); + if (!(cpp2::regex::lookbehind_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_29_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_20_lookbehind::regex_29_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_20_lookbehind::regex_29_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_20_lookbehind::regex_29_matcher::to_string() -> std::string{return R"((.*)(?<=c|b))"; } + + + + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_30_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_30_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_30_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_30_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_30_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_6(), func_4(), cpp2::regex::no_reset(), func_5(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_30_matcher::func_6::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_30_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_0_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; + static_cast(cpp2::move(tmp_0)); + if (!(cpp2::regex::lookbehind_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;} + + std::array str_tmp_3 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_30_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_20_lookbehind::regex_30_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_20_lookbehind::regex_30_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_20_lookbehind::regex_30_matcher::to_string() -> std::string{return R"((.*)(?<=c|b)c)"; } + + + + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_31_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_31_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_31_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_31_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_0_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; + static_cast(cpp2::move(tmp_0)); + if (!(cpp2::regex::lookbehind_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_31_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_20_lookbehind::regex_31_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_20_lookbehind::regex_31_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_20_lookbehind::regex_31_matcher::to_string() -> std::string{return R"((.*)(?<=[bc]))"; } + + + + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_32_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_32_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_32_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_32_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_0_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; + static_cast(cpp2::move(tmp_0)); + if (!(cpp2::regex::lookbehind_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;} + + std::array str_tmp_1 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_32_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_20_lookbehind::regex_32_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_20_lookbehind::regex_32_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_20_lookbehind::regex_32_matcher::to_string() -> std::string{return R"((.*)(?<=[bc])c)"; } + + + + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_33_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_33_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_33_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_0_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; + static_cast(cpp2::move(tmp_0)); + + std::array str_tmp_1 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_33_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_20_lookbehind::regex_33_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_20_lookbehind::regex_33_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_20_lookbehind::regex_33_matcher::to_string() -> std::string{return R"((.*?)c)"; } + + + + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_34_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_34_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_34_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_34_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_0_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; + static_cast(cpp2::move(tmp_0)); + if (!(cpp2::regex::lookbehind_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_34_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_20_lookbehind::regex_34_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_20_lookbehind::regex_34_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_20_lookbehind::regex_34_matcher::to_string() -> std::string{return R"((.*?)(?<=b))"; } + + + + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_35_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_35_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_35_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_35_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_0_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; + static_cast(cpp2::move(tmp_0)); + if (!(cpp2::regex::lookbehind_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;} + + std::array str_tmp_2 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_35_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_20_lookbehind::regex_35_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_20_lookbehind::regex_35_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_20_lookbehind::regex_35_matcher::to_string() -> std::string{return R"((.*?)(?<=b)c)"; } + + + + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_36_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_36_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_36_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_36_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_36_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_6(), func_4(), cpp2::regex::no_reset(), func_5(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_36_matcher::func_6::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_36_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_0_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; + static_cast(cpp2::move(tmp_0)); + if (!(cpp2::regex::lookbehind_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_36_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_20_lookbehind::regex_36_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_20_lookbehind::regex_36_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_20_lookbehind::regex_36_matcher::to_string() -> std::string{return R"((.*?)(?<=b|c))"; } + + + + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_37_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_37_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_37_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_37_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_37_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_6(), func_4(), cpp2::regex::no_reset(), func_5(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_37_matcher::func_6::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_37_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_0_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; + static_cast(cpp2::move(tmp_0)); + if (!(cpp2::regex::lookbehind_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;} + + std::array str_tmp_3 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_37_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_20_lookbehind::regex_37_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_20_lookbehind::regex_37_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_20_lookbehind::regex_37_matcher::to_string() -> std::string{return R"((.*?)(?<=b|c)c)"; } + + + + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_38_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_38_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_38_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_38_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_38_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_6(), func_4(), cpp2::regex::no_reset(), func_5(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_38_matcher::func_6::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_38_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_0_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; + static_cast(cpp2::move(tmp_0)); + if (!(cpp2::regex::lookbehind_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_38_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_20_lookbehind::regex_38_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_20_lookbehind::regex_38_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_20_lookbehind::regex_38_matcher::to_string() -> std::string{return R"((.*?)(?<=c|b))"; } + + + + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_39_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_39_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_39_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_39_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_39_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_6(), func_4(), cpp2::regex::no_reset(), func_5(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_39_matcher::func_6::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_39_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_0_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; + static_cast(cpp2::move(tmp_0)); + if (!(cpp2::regex::lookbehind_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;} + + std::array str_tmp_3 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_39_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_20_lookbehind::regex_39_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_20_lookbehind::regex_39_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_20_lookbehind::regex_39_matcher::to_string() -> std::string{return R"((.*?)(?<=c|b)c)"; } + + + + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_40_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_40_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_40_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_40_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_0_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; + static_cast(cpp2::move(tmp_0)); + if (!(cpp2::regex::lookbehind_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_40_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_20_lookbehind::regex_40_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_20_lookbehind::regex_40_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_20_lookbehind::regex_40_matcher::to_string() -> std::string{return R"((.*?)(?<=[bc]))"; } + + + + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_41_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_41_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_41_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_41_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_0_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; + static_cast(cpp2::move(tmp_0)); + if (!(cpp2::regex::lookbehind_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;} + + std::array str_tmp_1 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_41_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_20_lookbehind::regex_41_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_20_lookbehind::regex_41_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_20_lookbehind::regex_41_matcher::to_string() -> std::string{return R"((.*?)(?<=[bc])c)"; } + + + + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_42_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"oof"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_42_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::lookbehind_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_42_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_20_lookbehind::regex_42_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_20_lookbehind::regex_42_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_20_lookbehind::regex_42_matcher::to_string() -> std::string{return R"((?<=foo))"; } + + + + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_43_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"oof"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_43_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::lookbehind_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_43_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_20_lookbehind::regex_43_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_20_lookbehind::regex_43_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_20_lookbehind::regex_43_matcher::to_string() -> std::string{return R"((?<=foo))"; } + + + + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_44_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_44_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_44_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"oof"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_44_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::lookbehind_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_44_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_20_lookbehind::regex_44_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_20_lookbehind::regex_44_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_20_lookbehind::regex_44_matcher::to_string() -> std::string{return R"(.*(?<=foo))"; } + + + + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_45_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_45_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_45_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"oof"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_45_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::lookbehind_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_45_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_20_lookbehind::regex_45_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_20_lookbehind::regex_45_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_20_lookbehind::regex_45_matcher::to_string() -> std::string{return R"(.*(?<=foo))"; } + + + + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_46_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"oof"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_46_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::lookbehind_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} + + std::array str_tmp_1 {"Y"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_46_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_20_lookbehind::regex_46_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_20_lookbehind::regex_46_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_20_lookbehind::regex_46_matcher::to_string() -> std::string{return R"((?<=foo)Y)"; } + + + + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_47_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"oof"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_47_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"o"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::lookbehind_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} + + std::array str_tmp_2 {"Y"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_47_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_20_lookbehind::regex_47_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_20_lookbehind::regex_47_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_20_lookbehind::regex_47_matcher::to_string() -> std::string{return R"(o(?<=foo)Y)"; } + + + + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_48_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_1 {"oof"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_48_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"X"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::lookbehind_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_48_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_20_lookbehind::regex_48_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_20_lookbehind::regex_48_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_20_lookbehind::regex_48_matcher::to_string() -> std::string{return R"(X(?<=foo.)[YZ])"; } + + + + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_49_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {">rab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),4)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,4); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 4;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_49_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::lookbehind_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} + + std::array str_tmp_1 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_49_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_20_lookbehind::regex_49_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_20_lookbehind::regex_49_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_20_lookbehind::regex_49_matcher::to_string() -> std::string{return R"((?<=bar>)foo)"; } + + + + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_50_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {">rab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),4)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,4); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 4;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_50_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::lookbehind_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} + + std::array str_tmp_1 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_50_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_20_lookbehind::regex_50_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_20_lookbehind::regex_50_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_20_lookbehind::regex_50_matcher::to_string() -> std::string{return R"((?)foo)"; } + + + + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_51_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"CBA>rab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),7)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,7); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 7;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_51_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::lookbehind_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} + + std::array str_tmp_1 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_51_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_20_lookbehind::regex_51_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_20_lookbehind::regex_51_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_20_lookbehind::regex_51_matcher::to_string() -> std::string{return R"((?<=bar>ABC)foo)"; } + + + + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_52_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"CBA>rab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),7)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,7); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 7;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_52_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::lookbehind_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} + + std::array str_tmp_1 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_52_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_20_lookbehind::regex_52_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_20_lookbehind::regex_52_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_20_lookbehind::regex_52_matcher::to_string() -> std::string{return R"((?ABC)foo)"; } + + + + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_53_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + std::array str_tmp_0 {"dcbaaaa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),7)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,7); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 7;} + else {break;} + ctx.set_group_start(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_53_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::lookbehind_token_matcher(r.pos, ctx, func_2()))) {r.matched = false;break;} + + std::array str_tmp_2 {"dcba"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),4)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,4); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 4;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_53_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::lookbehind_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_53_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_20_lookbehind::regex_53_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_20_lookbehind::regex_53_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_20_lookbehind::regex_53_matcher::to_string() -> std::string{return R"((?<=abcd(?<=(aaaabcd))))"; } + + + + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_54_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + std::array str_tmp_1 {"yxaa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),4)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,4); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 4;} + else {break;} + ctx.set_group_start(1, r.pos); + + auto tmp_2_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; + static_cast(cpp2::move(tmp_2)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_54_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"xy"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::lookbehind_token_matcher(r.pos, ctx, func_2()))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_54_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_54_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_20_lookbehind::regex_54_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_20_lookbehind::regex_54_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_20_lookbehind::regex_54_matcher::to_string() -> std::string{return R"((?=xy(?<=(aaxy))))"; } + + + + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_55_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"z"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_55_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_3(), cpp2::regex::no_reset(), other, func_4()); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_55_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"yxaa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),4)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,4); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 4;} + else {break;} + ctx.set_group_start(1, r.pos); + + auto tmp_3_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; + static_cast(cpp2::move(tmp_3)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_55_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"xy"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::lookbehind_token_matcher(r.pos, ctx, func_2()))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_55_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_55_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_20_lookbehind::regex_55_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_20_lookbehind::regex_55_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_20_lookbehind::regex_55_matcher::to_string() -> std::string{return R"((?=xy(?<=(aaxyz?))))"; } + + + + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_56_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_1 {"aaxy"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),4)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,4); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 4;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_2_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; + static_cast(cpp2::move(tmp_2)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_56_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_2()))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_56_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::lookbehind_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_20_lookbehind::regex_56_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_20_lookbehind::regex_56_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_20_lookbehind::regex_56_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_20_lookbehind::regex_56_matcher::to_string() -> std::string{return R"((?<=(?=(aaxy))aa))"; } + + +#line 284 "pure2-regex_20_lookbehind.cpp2" +auto main() -> int{ + CPP2_UFCS(run)(test_tests_20_lookbehind()); +} + diff --git a/regression-tests/test-results/pure2-regex_20_lookbehind.cpp2.output b/regression-tests/test-results/pure2-regex_20_lookbehind.cpp2.output new file mode 100644 index 000000000..4bb5f4259 --- /dev/null +++ b/regression-tests/test-results/pure2-regex_20_lookbehind.cpp2.output @@ -0,0 +1,2 @@ +pure2-regex_20_lookbehind.cpp2... ok (all Cpp2, passes safety checks) + diff --git a/regression-tests/test-results/pure2-regex_21_atomic_patterns.cpp b/regression-tests/test-results/pure2-regex_21_atomic_patterns.cpp new file mode 100644 index 000000000..f61330a68 --- /dev/null +++ b/regression-tests/test-results/pure2-regex_21_atomic_patterns.cpp @@ -0,0 +1,1616 @@ + +#define CPP2_INCLUDE_STD Yes +#include "cpp2regex.h" + +//=== Cpp2 type declarations ==================================================== + + +#include "cpp2util.h" + +#line 1 "pure2-regex_21_atomic_patterns.cpp2" + +#line 166 "pure2-regex_21_atomic_patterns.cpp2" +class test_tests_21_atomic_patterns; + + +//=== Cpp2 type definitions and function declarations =========================== + +#line 1 "pure2-regex_21_atomic_patterns.cpp2" +[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string; + +#line 113 "pure2-regex_21_atomic_patterns.cpp2" +[[nodiscard]] auto sanitize(std::string str) -> std::string; + +#line 125 "pure2-regex_21_atomic_patterns.cpp2" +template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, + cpp2::impl::in resultExpected) -> void; + +#line 166 "pure2-regex_21_atomic_patterns.cpp2" +class test_tests_21_atomic_patterns { + +#line 173 "pure2-regex_21_atomic_patterns.cpp2" + public: auto run() const& -> void; + public: template class regex_01_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_2 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_01_matcher() = default; + public: regex_01_matcher(regex_01_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_01_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_01 {}; public: template class regex_02_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_2 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_02_matcher() = default; + public: regex_02_matcher(regex_02_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_02_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_02 {}; public: template class regex_03_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_2 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_03_matcher() = default; + public: regex_03_matcher(regex_03_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_03_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_03 {}; public: template class regex_04_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_4 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_5 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_6 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_8 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_7 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_9 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_10 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_11 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_04_matcher() = default; + public: regex_04_matcher(regex_04_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_04_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_04 {}; public: template class regex_05_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_2 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_05_matcher() = default; + public: regex_05_matcher(regex_05_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_05_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_05 {}; public: template class regex_06_matcher { + public: template using context = cpp2::regex::match_context; +public: class func_3 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_5 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_0 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_6 { + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + public: [[nodiscard]] constexpr static auto is_start_match() -> bool; +public: [[nodiscard]] static auto to_string() -> std::string; + + public: regex_06_matcher() = default; + public: regex_06_matcher(regex_06_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_06_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression> regex_06 {}; + public: test_tests_21_atomic_patterns() = default; + public: test_tests_21_atomic_patterns(test_tests_21_atomic_patterns const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(test_tests_21_atomic_patterns const&) -> void = delete; + + +#line 183 "pure2-regex_21_atomic_patterns.cpp2" +}; +auto main() -> int; + +//=== Cpp2 function definitions ================================================= + +#line 1 "pure2-regex_21_atomic_patterns.cpp2" +[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string{ +#line 2 "pure2-regex_21_atomic_patterns.cpp2" + std::string result {""}; + + auto get_next {[_0 = (&resultExpr)](auto const& iter) mutable -> auto{ + auto start {std::distance(CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))), iter)}; + auto firstDollar {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "$", start)}; + auto firstAt {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "@", cpp2::move(start))}; + + auto end {std::min(cpp2::move(firstDollar), cpp2::move(firstAt))}; + if (end != std::string::npos) { + return CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))) + cpp2::move(end); + } + else { + return CPP2_UFCS(cend)((*cpp2::impl::assert_not_null(_0))); + } + }}; + auto extract_group_and_advance {[](auto& iter) -> auto{ + auto start {iter}; + + for( ; std::isdigit(*cpp2::impl::assert_not_null(iter)); ++iter ) {} + + return std::stoi(std::string(cpp2::move(start), iter)); + }}; + auto extract_until {[](auto& iter, cpp2::impl::in to) -> auto{ + auto start {iter}; + + for( ; (to != *cpp2::impl::assert_not_null(iter)); ++iter ) {}// TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication) + + return std::string(cpp2::move(start), iter); + }}; + + auto iter {CPP2_UFCS(begin)(resultExpr)}; + + while( iter != CPP2_UFCS(end)(resultExpr) ) { + auto next {get_next(iter)}; + + if (next != iter) { + result += std::string(iter, next); + } + if (next != CPP2_UFCS(end)(resultExpr)) { + if (*cpp2::impl::assert_not_null(next) == '$') { + ++next; + + if (*cpp2::impl::assert_not_null(next) == '&') { + ++next; + result += CPP2_UFCS(group)(r, 0); + } + else {if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') { + auto is_start {*cpp2::impl::assert_not_null(next) == '-'}; + ++next; + if (*cpp2::impl::assert_not_null(next) == '{') { + ++next; // Skip { + auto group {extract_until(next, '}')}; + ++next; // Skip } + result += CPP2_UFCS(group)(r, cpp2::move(group)); + } + else {if (*cpp2::impl::assert_not_null(next) == '[') { + ++next; // Skip [ + auto group {extract_group_and_advance(next)}; + ++next; // Skip ] + + if (cpp2::move(is_start)) { + result += std::to_string(CPP2_UFCS(group_start)(r, cpp2::move(group))); + } + else { + result += std::to_string(CPP2_UFCS(group_end)(r, cpp2::move(group))); + } + } + else { + // Return max group + result += CPP2_UFCS(group)(r, CPP2_UFCS(group_number)(r) - 1); + }} + } + else {if (std::isdigit(*cpp2::impl::assert_not_null(next))) { + auto group {extract_group_and_advance(next)}; + result += CPP2_UFCS(group)(r, cpp2::move(group)); + } + else { + std::cerr << "Not implemented"; + }}} + } + else {if (*cpp2::impl::assert_not_null(next) == '@') { + ++next; + + if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') { + auto i {0}; + for( ; cpp2::impl::cmp_less(i,cpp2::unchecked_narrow(CPP2_UFCS(group_number)(r))); ++i ) { + auto pos {0}; + if (*cpp2::impl::assert_not_null(next) == '-') { + pos = CPP2_UFCS(group_start)(r, i); + } + else { + pos = CPP2_UFCS(group_end)(r, i); + } + result += std::to_string(cpp2::move(pos)); + } + ++next; + } + else { + std::cerr << "Not implemented"; + } + } + else { + std::cerr << "Not implemented."; + }} + } + iter = cpp2::move(next); + } + + return result; +} + +#line 113 "pure2-regex_21_atomic_patterns.cpp2" +[[nodiscard]] auto sanitize(std::string str) -> std::string +{ + str = cpp2::string_util::replace_all(str, "\a", "\\a"); + str = cpp2::string_util::replace_all(str, "\f", "\\f"); + str = cpp2::string_util::replace_all(str, "\x1b", "\\e"); + str = cpp2::string_util::replace_all(str, "\n", "\\n"); + str = cpp2::string_util::replace_all(str, "\r", "\\r"); + str = cpp2::string_util::replace_all(str, "\t", "\\t"); + + return cpp2::move(str); +} + +#line 125 "pure2-regex_21_atomic_patterns.cpp2" +template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, + cpp2::impl::in resultExpected) -> void{ + + std::string warning {""}; + if (CPP2_UFCS(to_string)(regex) != regex_str) { + warning = "Warning: Parsed regex does not match."; + } + + std::string status {"OK"}; + + auto r {CPP2_UFCS(search)(regex, str)}; + + if ("y" == kind || "yM" == kind || "yS" == kind || "yB" == kind) { + if (!(r.matched)) { + status = "Failure: Regex should apply."; + } + else { + // Have a match check the result + + auto result {create_result(resultExpr, cpp2::move(r))}; + + if (result != resultExpected) { + status = "Failure: Result is wrong. (is: " + cpp2::to_string(sanitize(cpp2::move(result))) + ")"; + } + } + } + else {if ("n" == kind) { + if (r.matched) { + status = "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'"; + } + }else { + status = "Unknown kind '" + cpp2::to_string(kind) + "'"; + }} + + if (!(CPP2_UFCS(empty)(warning))) { + warning += " "; + } + std::cout << "" + cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(sanitize(str)) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(sanitize(resultExpected)) + "" << std::endl; +} + +#line 173 "pure2-regex_21_atomic_patterns.cpp2" + auto test_tests_21_atomic_patterns::run() const& -> void{ + std::cout << "Running tests_21_atomic_patterns:" << std::endl; + test(regex_01, "01", R"((?>a+)b)", "aaab", "y", R"(-)", "-"); + test(regex_02, "02", R"(((?>a+)b))", "aaab", "y", R"($1)", "aaab"); + test(regex_03, "03", R"((?>(a+))b)", "aaab", "y", R"($1)", "aaa"); + test(regex_04, "04", R"(((?>[^()]+)|\([^()]*\))+)", "((abc(ade)ufh()()x", "y", R"($&)", "abc(ade)ufh()()x"); + test(regex_05, "05", R"(round\(((?>[^()]+))\))", "_I(round(xs * sz),1)", "y", R"($1)", "xs * sz"); + test(regex_06, "06", R"(^((?>(?:aa)?b)?))", "aab", "y", R"($1)", "aab"); + std::cout << std::endl; + } + + + + + template template [[nodiscard]] auto test_tests_21_atomic_patterns::regex_01_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_21_atomic_patterns::regex_01_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_2(), cpp2::regex::no_reset(), other, func_3()); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_21_atomic_patterns::regex_01_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_21_atomic_patterns::regex_01_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::atomic_group_matcher(r.pos, ctx, func_1(), other, func_4()); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_21_atomic_patterns::regex_01_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_21_atomic_patterns::regex_01_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_21_atomic_patterns::regex_01_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_21_atomic_patterns::regex_01_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_21_atomic_patterns::regex_01_matcher::to_string() -> std::string{return R"((?>a+)b)"; } + + + + + + template template [[nodiscard]] auto test_tests_21_atomic_patterns::regex_02_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_21_atomic_patterns::regex_02_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_2(), cpp2::regex::no_reset(), other, func_3()); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_21_atomic_patterns::regex_02_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_21_atomic_patterns::regex_02_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::atomic_group_matcher(r.pos, ctx, func_1(), other, func_4()); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_21_atomic_patterns::regex_02_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_2_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; + static_cast(cpp2::move(tmp_2)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_21_atomic_patterns::regex_02_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_21_atomic_patterns::regex_02_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_21_atomic_patterns::regex_02_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_21_atomic_patterns::regex_02_matcher::to_string() -> std::string{return R"(((?>a+)b))"; } + + + + + + template template [[nodiscard]] auto test_tests_21_atomic_patterns::regex_03_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_21_atomic_patterns::regex_03_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_2(), cpp2::regex::no_reset(), other, func_3()); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_21_atomic_patterns::regex_03_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_21_atomic_patterns::regex_03_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::atomic_group_matcher(r.pos, ctx, func_1(), other, func_4()); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_21_atomic_patterns::regex_03_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_21_atomic_patterns::regex_03_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_21_atomic_patterns::regex_03_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_21_atomic_patterns::regex_03_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_21_atomic_patterns::regex_03_matcher::to_string() -> std::string{return R"((?>(a+))b)"; } + + + + + + template template [[nodiscard]] auto test_tests_21_atomic_patterns::regex_04_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_21_atomic_patterns::regex_04_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_4(), cpp2::regex::no_reset(), other, func_5()); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_21_atomic_patterns::regex_04_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_21_atomic_patterns::regex_04_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::atomic_group_matcher(r.pos, ctx, func_3(), other, func_6()); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_21_atomic_patterns::regex_04_matcher::func_6::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_21_atomic_patterns::regex_04_matcher::func_8::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_21_atomic_patterns::regex_04_matcher::func_7::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"("}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_8(), cpp2::regex::no_reset(), other, func_9()); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_21_atomic_patterns::regex_04_matcher::func_9::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {")"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_21_atomic_patterns::regex_04_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_10(), func_2(), cpp2::regex::no_reset(), func_7(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_21_atomic_patterns::regex_04_matcher::func_10::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_2_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; + static_cast(cpp2::move(tmp_2)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template auto test_tests_21_atomic_patterns::regex_04_matcher::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template template [[nodiscard]] auto test_tests_21_atomic_patterns::regex_04_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_11()); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_21_atomic_patterns::regex_04_matcher::func_11::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_21_atomic_patterns::regex_04_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_21_atomic_patterns::regex_04_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_21_atomic_patterns::regex_04_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_21_atomic_patterns::regex_04_matcher::to_string() -> std::string{return R"(((?>[^()]+)|\([^()]*\))+)"; } + + + + + + template template [[nodiscard]] auto test_tests_21_atomic_patterns::regex_05_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_21_atomic_patterns::regex_05_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_2(), cpp2::regex::no_reset(), other, func_3()); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_21_atomic_patterns::regex_05_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_21_atomic_patterns::regex_05_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"round("}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),6)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,6); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 6;} + else {break;} + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::atomic_group_matcher(r.pos, ctx, func_1(), other, func_4()); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_21_atomic_patterns::regex_05_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + + std::array str_tmp_2 {")"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_21_atomic_patterns::regex_05_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_21_atomic_patterns::regex_05_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_21_atomic_patterns::regex_05_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_21_atomic_patterns::regex_05_matcher::to_string() -> std::string{return R"(round\(((?>[^()]+))\))"; } + + + + + + template template [[nodiscard]] auto test_tests_21_atomic_patterns::regex_06_matcher::func_3::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_21_atomic_patterns::regex_06_matcher::func_2::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_3(), cpp2::regex::no_reset(), other, func_4()); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_21_atomic_patterns::regex_06_matcher::func_4::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_21_atomic_patterns::regex_06_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::atomic_group_matcher(r.pos, ctx, func_2(), other, func_5()); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_21_atomic_patterns::regex_06_matcher::func_5::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_21_atomic_patterns::regex_06_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_6()); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + + template template [[nodiscard]] auto test_tests_21_atomic_patterns::regex_06_matcher::func_6::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_2_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; + static_cast(cpp2::move(tmp_2)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + static_cast(CPP2_FORWARD(ctx)); + return r; + } + + template template [[nodiscard]] auto test_tests_21_atomic_patterns::regex_06_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_21_atomic_patterns::regex_06_matcher::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + template [[nodiscard]] constexpr auto test_tests_21_atomic_patterns::regex_06_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto test_tests_21_atomic_patterns::regex_06_matcher::to_string() -> std::string{return R"(^((?>(?:aa)?b)?))"; } + + +#line 184 "pure2-regex_21_atomic_patterns.cpp2" +auto main() -> int{ + CPP2_UFCS(run)(test_tests_21_atomic_patterns()); +} + diff --git a/regression-tests/test-results/pure2-regex_21_atomic_patterns.cpp2.output b/regression-tests/test-results/pure2-regex_21_atomic_patterns.cpp2.output new file mode 100644 index 000000000..1e1125c3c --- /dev/null +++ b/regression-tests/test-results/pure2-regex_21_atomic_patterns.cpp2.output @@ -0,0 +1,2 @@ +pure2-regex_21_atomic_patterns.cpp2... ok (all Cpp2, passes safety checks) + diff --git a/regression-tests/test-results/pure2-repeated-call.cpp b/regression-tests/test-results/pure2-repeated-call.cpp index ad4fbb72f..663ce6d9e 100644 --- a/regression-tests/test-results/pure2-repeated-call.cpp +++ b/regression-tests/test-results/pure2-repeated-call.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-requires-clauses.cpp b/regression-tests/test-results/pure2-requires-clauses.cpp index a83ef305d..7e6186fad 100644 --- a/regression-tests/test-results/pure2-requires-clauses.cpp +++ b/regression-tests/test-results/pure2-requires-clauses.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-return-tuple-operator.cpp b/regression-tests/test-results/pure2-return-tuple-operator.cpp index ef582774d..4c4aca902 100644 --- a/regression-tests/test-results/pure2-return-tuple-operator.cpp +++ b/regression-tests/test-results/pure2-return-tuple-operator.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-singleton-and-static.cpp b/regression-tests/test-results/pure2-singleton-and-static.cpp new file mode 100644 index 000000000..875499ca3 --- /dev/null +++ b/regression-tests/test-results/pure2-singleton-and-static.cpp @@ -0,0 +1,51 @@ + +#define CPP2_INCLUDE_STD Yes + +//=== Cpp2 type declarations ==================================================== + + +#include "cpp2util.h" + +#line 1 "pure2-singleton-and-static.cpp2" + +#line 2 "pure2-singleton-and-static.cpp2" +class test; + + +//=== Cpp2 type definitions and function declarations =========================== + +#line 1 "pure2-singleton-and-static.cpp2" + +#line 2 "pure2-singleton-and-static.cpp2" +class test { + private: int value {42}; + public: auto print() const& -> void; + private: explicit test(); +public: [[nodiscard]] static auto instance() -> test&; + + public: test(test const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(test const&) -> void = delete; + +#line 5 "pure2-singleton-and-static.cpp2" +}; + +auto main() -> int; + +//=== Cpp2 function definitions ================================================= + +#line 1 "pure2-singleton-and-static.cpp2" + +#line 4 "pure2-singleton-and-static.cpp2" + auto test::print() const& -> void{std::cout << "" + cpp2::to_string(value) + "\n"; } + + test::test(){} +[[nodiscard]] auto test::instance() -> test&{ + + static test _instance {}; return _instance; + } + +#line 7 "pure2-singleton-and-static.cpp2" +auto main() -> int{ + CPP2_UFCS(print)(test::instance()); +} + diff --git a/regression-tests/test-results/pure2-singleton-and-static.cpp2.output b/regression-tests/test-results/pure2-singleton-and-static.cpp2.output new file mode 100644 index 000000000..e9cb9dcf6 --- /dev/null +++ b/regression-tests/test-results/pure2-singleton-and-static.cpp2.output @@ -0,0 +1,2 @@ +pure2-singleton-and-static.cpp2... ok (all Cpp2, passes safety checks) + diff --git a/regression-tests/test-results/pure2-statement-scope-parameters.cpp b/regression-tests/test-results/pure2-statement-scope-parameters.cpp index d6bb0749b..e7ca46ad8 100644 --- a/regression-tests/test-results/pure2-statement-scope-parameters.cpp +++ b/regression-tests/test-results/pure2-statement-scope-parameters.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-stdio-with-raii.cpp b/regression-tests/test-results/pure2-stdio-with-raii.cpp index 6a035224b..1358d79b5 100644 --- a/regression-tests/test-results/pure2-stdio-with-raii.cpp +++ b/regression-tests/test-results/pure2-stdio-with-raii.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-stdio.cpp b/regression-tests/test-results/pure2-stdio.cpp index 2bf913629..b59d6c870 100644 --- a/regression-tests/test-results/pure2-stdio.cpp +++ b/regression-tests/test-results/pure2-stdio.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-synthesize-rightshift-and-rightshifteq.cpp b/regression-tests/test-results/pure2-synthesize-rightshift-and-rightshifteq.cpp index 5ab662004..f0e5b9f7d 100644 --- a/regression-tests/test-results/pure2-synthesize-rightshift-and-rightshifteq.cpp +++ b/regression-tests/test-results/pure2-synthesize-rightshift-and-rightshifteq.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-template-parameter-lists.cpp b/regression-tests/test-results/pure2-template-parameter-lists.cpp index 9756ee1bb..ede1f7cfa 100644 --- a/regression-tests/test-results/pure2-template-parameter-lists.cpp +++ b/regression-tests/test-results/pure2-template-parameter-lists.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-trailing-comma-assert.cpp b/regression-tests/test-results/pure2-trailing-comma-assert.cpp index 170c91887..8e17900e0 100644 --- a/regression-tests/test-results/pure2-trailing-comma-assert.cpp +++ b/regression-tests/test-results/pure2-trailing-comma-assert.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-trailing-commas.cpp b/regression-tests/test-results/pure2-trailing-commas.cpp index 28bd0df95..acaf2189c 100644 --- a/regression-tests/test-results/pure2-trailing-commas.cpp +++ b/regression-tests/test-results/pure2-trailing-commas.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-try-catch.cpp b/regression-tests/test-results/pure2-try-catch.cpp new file mode 100644 index 000000000..93345b899 --- /dev/null +++ b/regression-tests/test-results/pure2-try-catch.cpp @@ -0,0 +1,54 @@ + +#define CPP2_INCLUDE_STD Yes + +//=== Cpp2 type declarations ==================================================== + + +#include "cpp2util.h" + +#line 1 "pure2-try-catch.cpp2" + + +//=== Cpp2 type definitions and function declarations =========================== + +#line 1 "pure2-try-catch.cpp2" +[[nodiscard]] auto throwing_pred([[maybe_unused]] cpp2::impl::in unnamed_param_1) -> bool; + +#line 7 "pure2-try-catch.cpp2" +auto f(cpp2::impl::in x) -> void; + +#line 11 "pure2-try-catch.cpp2" +auto main() -> int; + +//=== Cpp2 function definitions ================================================= + +#line 1 "pure2-try-catch.cpp2" +[[nodiscard]] auto throwing_pred([[maybe_unused]] cpp2::impl::in unnamed_param_1) -> bool +#line 2 "pure2-try-catch.cpp2" +{ + throw(42); + return false; +} + +#line 7 "pure2-try-catch.cpp2" +auto f(cpp2::impl::in x) -> void + +{ + if (cpp2::cpp2_default.is_active() && !(throwing_pred(x)) ) { cpp2::cpp2_default.report_violation(CPP2_CONTRACT_MSG("a throwing predicate failed, oh my")); }} + +#line 11 "pure2-try-catch.cpp2" +auto main() -> int +{ + auto fptr {&f}; + try { + cpp2::move(fptr)(-666); + } catch (cpp2::impl::in i) { + std::cout << "oh look, a thrown int: " << i << std::endl; + } + try { + f(-42); + } catch (...) { + std::cout << "oh look, another exception" << std::endl; + } +} + diff --git a/regression-tests/test-results/pure2-try-catch.cpp2.output b/regression-tests/test-results/pure2-try-catch.cpp2.output new file mode 100644 index 000000000..206a7e237 --- /dev/null +++ b/regression-tests/test-results/pure2-try-catch.cpp2.output @@ -0,0 +1,2 @@ +pure2-try-catch.cpp2... ok (all Cpp2, passes safety checks) + diff --git a/regression-tests/test-results/pure2-type-and-namespace-aliases.cpp b/regression-tests/test-results/pure2-type-and-namespace-aliases.cpp index 0e7860066..04832273d 100644 --- a/regression-tests/test-results/pure2-type-and-namespace-aliases.cpp +++ b/regression-tests/test-results/pure2-type-and-namespace-aliases.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-type-constraints.cpp b/regression-tests/test-results/pure2-type-constraints.cpp index fd9d7983c..41c8ce161 100644 --- a/regression-tests/test-results/pure2-type-constraints.cpp +++ b/regression-tests/test-results/pure2-type-constraints.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-type-safety-1.cpp b/regression-tests/test-results/pure2-type-safety-1.cpp index 10d7e38c9..9dc0491ab 100644 --- a/regression-tests/test-results/pure2-type-safety-1.cpp +++ b/regression-tests/test-results/pure2-type-safety-1.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== @@ -8,6 +8,10 @@ #line 1 "pure2-type-safety-1.cpp2" +#line 39 "pure2-type-safety-1.cpp2" +class B; +class D; + //=== Cpp2 type definitions and function declarations =========================== @@ -16,12 +20,28 @@ #line 2 "pure2-type-safety-1.cpp2" [[nodiscard]] auto main() -> int; -#line 24 "pure2-type-safety-1.cpp2" +#line 32 "pure2-type-safety-1.cpp2" auto test_generic(auto const& x, auto const& msg) -> void; -#line 31 "pure2-type-safety-1.cpp2" +#line 39 "pure2-type-safety-1.cpp2" +class B { + public: B() = default; + public: B(B const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(B const&) -> void = delete; +}; +#line 40 "pure2-type-safety-1.cpp2" +class D: public B { + public: D() = default; + public: D(D const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(D const&) -> void = delete; +}; +#line 41 "pure2-type-safety-1.cpp2" + +auto test_1365(auto const& o) -> void; + +#line 63 "pure2-type-safety-1.cpp2" auto print(cpp2::impl::in msg, cpp2::impl::in b) -> void; -#line 37 "pure2-type-safety-1.cpp2" +#line 69 "pure2-type-safety-1.cpp2" #line 1 "pure2-type-safety-1.cpp2" @@ -50,9 +70,17 @@ auto print(cpp2::impl::in msg, cpp2::impl::in b) -> void; test_generic(cpp2::move(v), "variant"); test_generic(cpp2::move(a), "any"); test_generic(cpp2::move(o), "optional"); + + std::optional oi {5}; + std::cout << "optional is: "; + test_1365(cpp2::move(oi)); + std::optional od {nullptr}; + std::cout << "\noptional<*D> is: "; + test_1365(cpp2::move(od)); + std::cout << "\n"; } -#line 24 "pure2-type-safety-1.cpp2" +#line 32 "pure2-type-safety-1.cpp2" auto test_generic(auto const& x, auto const& msg) -> void{ std::string msgx {msg}; // Full qualification is necessary to avoid ambiguity in C++23 @@ -60,7 +88,29 @@ auto test_generic(auto const& x, auto const& msg) -> void{ ::print(cpp2::move(msgx) + " is int? ", cpp2::impl::is(x)); } -#line 31 "pure2-type-safety-1.cpp2" +#line 42 "pure2-type-safety-1.cpp2" +auto test_1365(auto const& o) -> void{ + if (cpp2::impl::is(o)) { + std::cout << "int "; + } + if (cpp2::impl::is(o)) { + std::cout << "bool "; + } + if (cpp2::impl::is(o)) { + std::cout << "float "; + } + if (cpp2::impl::is(o)) { + std::cout << "*B "; + } + if (cpp2::impl::is(o)) { + std::cout << "*D "; + } + if (cpp2::impl::is(o)) { + std::cout << "std::string "; + } +} + +#line 63 "pure2-type-safety-1.cpp2" auto print(cpp2::impl::in msg, cpp2::impl::in b) -> void{ cpp2::impl::deferred_init bmsg; if (b) { bmsg.construct("true");} diff --git a/regression-tests/test-results/pure2-type-safety-2-with-inspect-expression.cpp b/regression-tests/test-results/pure2-type-safety-2-with-inspect-expression.cpp index 8cf6f953f..ed48e9387 100644 --- a/regression-tests/test-results/pure2-type-safety-2-with-inspect-expression.cpp +++ b/regression-tests/test-results/pure2-type-safety-2-with-inspect-expression.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-types-basics.cpp b/regression-tests/test-results/pure2-types-basics.cpp index 48c87a5aa..96ac49b41 100644 --- a/regression-tests/test-results/pure2-types-basics.cpp +++ b/regression-tests/test-results/pure2-types-basics.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== @@ -31,12 +31,12 @@ class myclass { public: auto operator=(cpp2::impl::in x) -> myclass& ; #line 13 "pure2-types-basics.cpp2" - public: explicit myclass(cpp2::impl::in s); + public: myclass(cpp2::impl::in s); #line 13 "pure2-types-basics.cpp2" public: auto operator=(cpp2::impl::in s) -> myclass& ; #line 20 "pure2-types-basics.cpp2" - public: explicit myclass(cpp2::impl::in x, cpp2::impl::in s); + public: myclass(cpp2::impl::in x, cpp2::impl::in s); #line 27 "pure2-types-basics.cpp2" public: explicit myclass(); diff --git a/regression-tests/test-results/pure2-types-down-upcast.cpp b/regression-tests/test-results/pure2-types-down-upcast.cpp index 34c06cd47..63310d140 100644 --- a/regression-tests/test-results/pure2-types-down-upcast.cpp +++ b/regression-tests/test-results/pure2-types-down-upcast.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-types-inheritance.cpp b/regression-tests/test-results/pure2-types-inheritance.cpp index cca47eb15..7895e2758 100644 --- a/regression-tests/test-results/pure2-types-inheritance.cpp +++ b/regression-tests/test-results/pure2-types-inheritance.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== @@ -30,18 +30,20 @@ class Cyborg; #line 2 "pure2-types-inheritance.cpp2" class Human { public: virtual auto speak() const -> void = 0; - public: virtual ~Human() noexcept; + public: explicit Human(); +protected: Human([[maybe_unused]] Human const& that); - public: Human() = default; - public: Human(Human const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(Human const&) -> void = delete; +protected: auto operator=([[maybe_unused]] Human const& that) -> Human& ; +protected: Human([[maybe_unused]] Human&& that) noexcept; +protected: auto operator=([[maybe_unused]] Human&& that) noexcept -> Human& ; +public: virtual ~Human() noexcept; #line 4 "pure2-types-inheritance.cpp2" }; namespace N { template class Machine { - public: explicit Machine([[maybe_unused]] cpp2::impl::in unnamed_param_2); + public: Machine([[maybe_unused]] cpp2::impl::in unnamed_param_2); public: virtual auto work() const -> void = 0; public: virtual ~Machine() noexcept; @@ -58,7 +60,7 @@ struct Cyborg_address_as_base { std::string address; }; class Cyborg: public Cyborg_name_as_base, public Human, public Cyborg_address_as_base, public N::Machine<99> { #line 19 "pure2-types-inheritance.cpp2" - public: explicit Cyborg(cpp2::impl::in n); + public: Cyborg(cpp2::impl::in n); #line 25 "pure2-types-inheritance.cpp2" public: auto speak() const -> void override; @@ -91,6 +93,13 @@ auto main() -> int; #line 1 "pure2-types-inheritance.cpp2" +Human::Human(){} +Human::Human([[maybe_unused]] Human const& that){} +auto Human::operator=([[maybe_unused]] Human const& that) -> Human& { + return *this;} +Human::Human([[maybe_unused]] Human&& that) noexcept{} +auto Human::operator=([[maybe_unused]] Human&& that) noexcept -> Human& { + return *this;} Human::~Human() noexcept{} #line 6 "pure2-types-inheritance.cpp2" namespace N { diff --git a/regression-tests/test-results/pure2-types-order-independence-and-nesting.cpp b/regression-tests/test-results/pure2-types-order-independence-and-nesting.cpp index 00efe82bf..d56d88d2e 100644 --- a/regression-tests/test-results/pure2-types-order-independence-and-nesting.cpp +++ b/regression-tests/test-results/pure2-types-order-independence-and-nesting.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== @@ -45,7 +45,7 @@ class X { private: Y* py; // Note: A constructor with an 'out' parameter - public: explicit X(cpp2::impl::out y); + public: X(cpp2::impl::out y); #line 10 "pure2-types-order-independence-and-nesting.cpp2" public: auto operator=(cpp2::impl::out y) -> X& ; @@ -64,9 +64,9 @@ class X { class Y { private: X* px; - public: explicit Y(X* x); + public: Y(cpp2::impl::in x); #line 49 "pure2-types-order-independence-and-nesting.cpp2" - public: auto operator=(X* x) -> Y& ; + public: auto operator=(cpp2::impl::in x) -> Y& ; public: auto why(cpp2::impl::in count) const& -> void; public: Y(Y const&) = delete; /* No 'that' constructor, suppress copy */ @@ -157,10 +157,10 @@ namespace N { } #line 49 "pure2-types-order-independence-and-nesting.cpp2" - Y::Y(X* x) + Y::Y(cpp2::impl::in x) : px{ x }{} #line 49 "pure2-types-order-independence-and-nesting.cpp2" - auto Y::operator=(X* x) -> Y& { + auto Y::operator=(cpp2::impl::in x) -> Y& { px = x; return *this; } diff --git a/regression-tests/test-results/pure2-types-ordering-via-meta-functions.cpp b/regression-tests/test-results/pure2-types-ordering-via-meta-functions.cpp index befac11e9..07e8bcefe 100644 --- a/regression-tests/test-results/pure2-types-ordering-via-meta-functions.cpp +++ b/regression-tests/test-results/pure2-types-ordering-via-meta-functions.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== @@ -31,7 +31,7 @@ class mystruct; #line 2 "pure2-types-ordering-via-meta-functions.cpp2" class my_integer { private: int v; - public: explicit my_integer(cpp2::impl::in val); + public: my_integer(cpp2::impl::in val); #line 4 "pure2-types-ordering-via-meta-functions.cpp2" public: auto operator=(cpp2::impl::in val) -> my_integer& ; public: [[nodiscard]] auto operator<=>(my_integer const& that) const& -> std::strong_ordering = default; @@ -44,7 +44,7 @@ class my_integer { class case_insensitive_string { private: std::string v; // case insensitive - public: explicit case_insensitive_string(cpp2::impl::in val); + public: case_insensitive_string(cpp2::impl::in val); #line 9 "pure2-types-ordering-via-meta-functions.cpp2" public: auto operator=(cpp2::impl::in val) -> case_insensitive_string& ; public: [[nodiscard]] auto operator<=>(case_insensitive_string const& that) const& -> std::weak_ordering = default; @@ -57,7 +57,7 @@ class case_insensitive_string { class person_in_family_tree { private: int dummy_data; - public: explicit person_in_family_tree(cpp2::impl::in parents); + public: person_in_family_tree(cpp2::impl::in parents); #line 14 "pure2-types-ordering-via-meta-functions.cpp2" public: auto operator=(cpp2::impl::in parents) -> person_in_family_tree& ; public: [[nodiscard]] auto operator<=>(person_in_family_tree const& that) const& -> std::partial_ordering = default; diff --git a/regression-tests/test-results/pure2-types-smf-and-that-1-provide-everything.cpp b/regression-tests/test-results/pure2-types-smf-and-that-1-provide-everything.cpp index dc292e92e..74f077bc7 100644 --- a/regression-tests/test-results/pure2-types-smf-and-that-1-provide-everything.cpp +++ b/regression-tests/test-results/pure2-types-smf-and-that-1-provide-everything.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== @@ -31,7 +31,7 @@ class myclass { public: auto operator=(myclass&& that) noexcept -> myclass& ; #line 22 "pure2-types-smf-and-that-1-provide-everything.cpp2" - public: explicit myclass(cpp2::impl::in x); + public: myclass(cpp2::impl::in x); #line 22 "pure2-types-smf-and-that-1-provide-everything.cpp2" public: auto operator=(cpp2::impl::in x) -> myclass& ; diff --git a/regression-tests/test-results/pure2-types-smf-and-that-2-provide-mvconstruct-and-cpassign.cpp b/regression-tests/test-results/pure2-types-smf-and-that-2-provide-mvconstruct-and-cpassign.cpp index c1ba2f5e2..b4c78f1b8 100644 --- a/regression-tests/test-results/pure2-types-smf-and-that-2-provide-mvconstruct-and-cpassign.cpp +++ b/regression-tests/test-results/pure2-types-smf-and-that-2-provide-mvconstruct-and-cpassign.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== @@ -34,7 +34,7 @@ class myclass { // std::cout << "assign - move "; // } - public: explicit myclass(cpp2::impl::in x); + public: myclass(cpp2::impl::in x); #line 22 "pure2-types-smf-and-that-2-provide-mvconstruct-and-cpassign.cpp2" public: auto operator=(cpp2::impl::in x) -> myclass& ; diff --git a/regression-tests/test-results/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp b/regression-tests/test-results/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp index 5861b559c..8d6983a55 100644 --- a/regression-tests/test-results/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp +++ b/regression-tests/test-results/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== @@ -20,8 +20,6 @@ class myclass; class myclass { public: myclass(myclass const& that); -#line 4 "pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp2" - public: auto operator=(myclass const& that) -> myclass& ; #line 8 "pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp2" public: myclass(myclass&& that) noexcept; @@ -35,7 +33,7 @@ class myclass { public: auto operator=(myclass&& that) noexcept -> myclass& ; #line 22 "pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp2" - public: explicit myclass(cpp2::impl::in x); + public: myclass(cpp2::impl::in x); #line 22 "pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp2" public: auto operator=(cpp2::impl::in x) -> myclass& ; @@ -65,15 +63,6 @@ auto main() -> int; #line 5 "pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp2" std::cout << "ctor - copy (GENERAL)"; } -#line 4 "pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp2" - auto myclass::operator=(myclass const& that) -> myclass& { - name = that.name; - addr = that.addr; -#line 5 "pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp2" - std::cout << "ctor - copy (GENERAL)"; - return *this; -#line 6 "pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp2" - } #line 8 "pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp2" myclass::myclass(myclass&& that) noexcept @@ -140,9 +129,9 @@ auto main() -> int{ CPP2_UFCS(print)(z, " mv-construct ", " <- "); CPP2_UFCS(print)(cpp2::move(x), "", "\n"); - z = y; - CPP2_UFCS(print)(z, " cp-assign ", " <- "); - CPP2_UFCS(print)(y, "", "\n"); + // z = y; + // z.print(" cp-assign ", " <- "); + // y.print("", "\n"); z = { std::move(y) }; CPP2_UFCS(print)(cpp2::move(z), " mv-assign ", " <- "); diff --git a/regression-tests/test-results/pure2-types-smf-and-that-4-provide-cpassign-and-mvassign.cpp b/regression-tests/test-results/pure2-types-smf-and-that-4-provide-cpassign-and-mvassign.cpp index eeb1bd2f6..52ad19df0 100644 --- a/regression-tests/test-results/pure2-types-smf-and-that-4-provide-cpassign-and-mvassign.cpp +++ b/regression-tests/test-results/pure2-types-smf-and-that-4-provide-cpassign-and-mvassign.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== @@ -35,7 +35,7 @@ class myclass { public: auto operator=(myclass&& that) noexcept -> myclass& ; #line 22 "pure2-types-smf-and-that-4-provide-cpassign-and-mvassign.cpp2" - public: explicit myclass(cpp2::impl::in x); + public: myclass(cpp2::impl::in x); #line 22 "pure2-types-smf-and-that-4-provide-cpassign-and-mvassign.cpp2" public: auto operator=(cpp2::impl::in x) -> myclass& ; diff --git a/regression-tests/test-results/pure2-types-smf-and-that-5-provide-nothing-but-general-case.cpp b/regression-tests/test-results/pure2-types-smf-and-that-5-provide-nothing-but-general-case.cpp index d6b3133fe..e784de106 100644 --- a/regression-tests/test-results/pure2-types-smf-and-that-5-provide-nothing-but-general-case.cpp +++ b/regression-tests/test-results/pure2-types-smf-and-that-5-provide-nothing-but-general-case.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== @@ -42,7 +42,7 @@ class myclass { // std::cout << "assign - move "; // } - public: explicit myclass(cpp2::impl::in x); + public: myclass(cpp2::impl::in x); #line 22 "pure2-types-smf-and-that-5-provide-nothing-but-general-case.cpp2" public: auto operator=(cpp2::impl::in x) -> myclass& ; diff --git a/regression-tests/test-results/pure2-types-that-parameters.cpp b/regression-tests/test-results/pure2-types-that-parameters.cpp index 23a85c3e8..c90007d41 100644 --- a/regression-tests/test-results/pure2-types-that-parameters.cpp +++ b/regression-tests/test-results/pure2-types-that-parameters.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== @@ -22,13 +22,9 @@ class myclass { public: explicit myclass(); public: myclass(myclass const& that); -#line 6 "pure2-types-that-parameters.cpp2" - public: auto operator=(myclass const& that) -> myclass& ; #line 11 "pure2-types-that-parameters.cpp2" public: myclass(myclass&& that) noexcept; -#line 11 "pure2-types-that-parameters.cpp2" - public: auto operator=(myclass&& that) noexcept -> myclass& ; #line 16 "pure2-types-that-parameters.cpp2" public: auto print() const& -> void; @@ -53,14 +49,6 @@ auto main() -> int; : name{ that.name } , addr{ that.addr }{ -#line 9 "pure2-types-that-parameters.cpp2" - } -#line 6 "pure2-types-that-parameters.cpp2" - auto myclass::operator=(myclass const& that) -> myclass& { - name = that.name; - addr = that.addr; - return *this; - #line 9 "pure2-types-that-parameters.cpp2" } @@ -69,14 +57,6 @@ auto main() -> int; : name{ cpp2::move(that).name } , addr{ cpp2::move(that).addr }{ -#line 14 "pure2-types-that-parameters.cpp2" - } -#line 11 "pure2-types-that-parameters.cpp2" - auto myclass::operator=(myclass&& that) noexcept -> myclass& { - name = cpp2::move(that).name; - addr = cpp2::move(that).addr; - return *this; - #line 14 "pure2-types-that-parameters.cpp2" } diff --git a/regression-tests/test-results/pure2-types-value-types-via-meta-functions.cpp b/regression-tests/test-results/pure2-types-value-types-via-meta-functions.cpp index 24fc82263..d1585f290 100644 --- a/regression-tests/test-results/pure2-types-value-types-via-meta-functions.cpp +++ b/regression-tests/test-results/pure2-types-value-types-via-meta-functions.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== @@ -27,7 +27,7 @@ class p_widget; #line 2 "pure2-types-value-types-via-meta-functions.cpp2" class widget { private: int val {0}; - public: explicit widget(cpp2::impl::in i); + public: widget(cpp2::impl::in i); #line 4 "pure2-types-value-types-via-meta-functions.cpp2" public: auto operator=(cpp2::impl::in i) -> widget& ; public: [[nodiscard]] auto operator<=>(widget const& that) const& -> std::strong_ordering = default; @@ -43,7 +43,7 @@ public: explicit widget(); class w_widget { private: int val {0}; - public: explicit w_widget(cpp2::impl::in i); + public: w_widget(cpp2::impl::in i); #line 9 "pure2-types-value-types-via-meta-functions.cpp2" public: auto operator=(cpp2::impl::in i) -> w_widget& ; public: [[nodiscard]] auto operator<=>(w_widget const& that) const& -> std::weak_ordering = default; @@ -59,7 +59,7 @@ public: explicit w_widget(); class p_widget { private: int val {0}; - public: explicit p_widget(cpp2::impl::in i); + public: p_widget(cpp2::impl::in i); #line 14 "pure2-types-value-types-via-meta-functions.cpp2" public: auto operator=(cpp2::impl::in i) -> p_widget& ; public: [[nodiscard]] auto operator<=>(p_widget const& that) const& -> std::partial_ordering = default; diff --git a/regression-tests/test-results/pure2-ufcs-member-access-and-chaining.cpp b/regression-tests/test-results/pure2-ufcs-member-access-and-chaining.cpp index 6e1e02d24..effd2b779 100644 --- a/regression-tests/test-results/pure2-ufcs-member-access-and-chaining.cpp +++ b/regression-tests/test-results/pure2-ufcs-member-access-and-chaining.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-union.cpp b/regression-tests/test-results/pure2-union.cpp index 868997b28..f0733d2cb 100644 --- a/regression-tests/test-results/pure2-union.cpp +++ b/regression-tests/test-results/pure2-union.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-unsafe.cpp b/regression-tests/test-results/pure2-unsafe.cpp index 30c5a0a42..186516c4a 100644 --- a/regression-tests/test-results/pure2-unsafe.cpp +++ b/regression-tests/test-results/pure2-unsafe.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-variadics.cpp b/regression-tests/test-results/pure2-variadics.cpp index 7bfe69f2f..5da98bf6f 100644 --- a/regression-tests/test-results/pure2-variadics.cpp +++ b/regression-tests/test-results/pure2-variadics.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/pure2-various-string-literals.cpp b/regression-tests/test-results/pure2-various-string-literals.cpp index 2b4cc4762..c78dab3ee 100644 --- a/regression-tests/test-results/pure2-various-string-literals.cpp +++ b/regression-tests/test-results/pure2-various-string-literals.cpp @@ -1,5 +1,5 @@ -#define CPP2_IMPORT_STD Yes +#define CPP2_INCLUDE_STD Yes //=== Cpp2 type declarations ==================================================== diff --git a/regression-tests/test-results/run-tests.bat b/regression-tests/test-results/run-tests.bat index 9aa185ea7..cad32f839 100644 --- a/regression-tests/test-results/run-tests.bat +++ b/regression-tests/test-results/run-tests.bat @@ -14,7 +14,7 @@ for %%f in (mixed-*.cpp2) do ( ) for %%f in (pure2-*.cpp2) do ( echo Starting cppfront.exe %%f -p - cppfront.exe -p %%f > %%f.output 2>&1 + cppfront.exe -p -in %%f > %%f.output 2>&1 del %%f set /a count+=1 ) diff --git a/regression-tests/test-results/version b/regression-tests/test-results/version index 3e9d5db23..af7299f51 100644 --- a/regression-tests/test-results/version +++ b/regression-tests/test-results/version @@ -1,11 +1,4 @@ -cppfront compiler v0.8.0 Build 9A10:0946 -Copyright(c) Herb Sutter All rights reserved - -SPDX-License-Identifier: CC-BY-NC-ND-4.0 - No commercial use - No forks/derivatives - Note: This license emphasizes that this is a personal - experiment; it will be upgraded if that changes - -Absolutely no warranty - try at your own risk +cppfront compiler v0.8.2 Build B110:2055 +SPDX-License-Identifier Apache-2.0 WITH LLVM-exception +Copyright (c) 2022-2026 Herb Sutter diff --git a/source/build.info b/source/build.info index 4aced9668..ad737314d 100644 --- a/source/build.info +++ b/source/build.info @@ -1 +1 @@ -"9A10:0946" \ No newline at end of file +"B110:2055" \ No newline at end of file diff --git a/source/common.h b/source/common.h index 5839b4cd8..2c822d49e 100644 --- a/source/common.h +++ b/source/common.h @@ -1,14 +1,9 @@ -// Copyright (c) Herb Sutter -// SPDX-License-Identifier: CC-BY-NC-ND-4.0 - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. +// Copyright 2022-2026 Herb Sutter +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +// Part of the Cppfront Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://github.com/hsutter/cppfront/blob/main/LICENSE for license information. // We want cppfront to build cleanly at very high warning levels, with warnings @@ -65,7 +60,7 @@ struct source_line { std::string text; - enum class category : u8 { empty, preprocessor, comment, import, cpp1, cpp2, rawstring }; + enum class category : u8 { empty, preprocessor, comment, import, cpp1, cpp2, rawstring, preprocessor_was_emitted }; category cat; bool all_tokens_are_densely_spaced = true; // to be overridden in lexing if they're not @@ -585,12 +580,9 @@ auto print_with_thousands(T val) } -// In keep trying to write string+string_view, and it ought to Just Work without -// the current workarounds. Not having that is a minor impediment to using safe -// and efficient string_views, which we should be encouraging. So for my own use -// and to remove that minor impediment to writing safe and efficient code, I'm -// just going to add this until we get P2591 in C++26(?) -- See: wg21.link/p2591 -// +// Provide string+string_view if P2591 is not available. +// +#if __cpp_lib_string_view < 202403L template [[nodiscard]] constexpr auto operator+( std::basic_string lhs, @@ -610,6 +602,7 @@ template { return rhs.insert(0, lhs); } +#endif //----------------------------------------------------------------------- @@ -804,7 +797,9 @@ class cmdline_processor [](auto& a, auto& b){ return a.group < b.group || (a.group == b.group && a.name < b.name); } ); - print("\nUsage: cppfront [options] file ...\n\nOptions:\n"); + print("\nUsage: cppfront [options] file ...\n"); + print("\n file source file(s) (can be 'stdin')\n"); + print("\nOptions: \n"); int last_group = -1; for (auto& flag : flags) { // Skip hidden flags @@ -888,7 +883,7 @@ class cmdline_processor // This is used only by the owner of the 'main' branch // to generate stable build version strings - auto gen_version() + auto gen_build() -> void { help_requested = true; @@ -896,7 +891,9 @@ class cmdline_processor constexpr std::string_view b = __TIME__; std::unordered_map m = { {"Jan",'1'}, {"Feb",'2'}, {"Mar",'3'}, {"Apr",'4'}, {"May",'5'}, {"Jun",'6'}, {"Jul",'7'}, {"Aug",'8'}, {"Sep",'9'}, {"Oct",'A'}, {"Nov",'B'}, {"Dec",'C'} }; - auto stamp = std::to_string(atoi(&a[9])-15); + auto y = atoi(&a[9])-15; + auto stamp = std::string(); + stamp += y<10 ? char('0'+y) : char('A'+y-10); stamp += m[a.substr(0, 3)]; stamp += a.substr(4,2); stamp += ":"; @@ -912,16 +909,11 @@ class cmdline_processor help_requested = true; print("\ncppfront compiler " #include "version.info" - " Build " + " Build " #include "build.info" ); - print("\nCopyright(c) Herb Sutter All rights reserved\n"); - print("\nSPDX-License-Identifier: CC-BY-NC-ND-4.0"); - print("\n No commercial use"); - print("\n No forks/derivatives"); - print("\n Note: This license emphasizes that this is a personal"); - print("\n experiment; it will be upgraded if that changes\n"); - print("\nAbsolutely no warranty - try at your own risk\n"); + print("\nSPDX-License-Identifier Apache-2.0 WITH LLVM-exception"); + print("\nCopyright (c) 2022-2026 Herb Sutter\n"); } } cmdline; @@ -955,11 +947,11 @@ static cmdline_processor::register_flag cmd_version( []{ cmdline.print_version(); } ); -static cmdline_processor::register_flag cmd_gen_version( +static cmdline_processor::register_flag cmd_gen_build( 0, - "_gen_version", - "Generate version information", - []{ cmdline.gen_version(); } + "_gen_build", + "Generate build information", + []{ cmdline.gen_build(); } ); static auto flag_verbose = false; diff --git a/source/cppfront.cpp b/source/cppfront.cpp index a40825289..496a223b6 100644 --- a/source/cppfront.cpp +++ b/source/cppfront.cpp @@ -1,14 +1,9 @@ -// Copyright (c) Herb Sutter -// SPDX-License-Identifier: CC-BY-NC-ND-4.0 - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. +// Copyright 2022-2026 Herb Sutter +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +// Part of the Cppfront Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://github.com/hsutter/cppfront/blob/main/LICENSE for license information. //=========================================================================== @@ -84,7 +79,12 @@ auto main( auto& out = flag_cpp1_filename != "stdout" ? std::cout : std::cerr; - if (!flag_quiet) { + if ( + !flag_quiet + && arg.text != "stdin" + && flag_cpp1_filename != "stdout" + ) + { out << arg.text << "..."; } @@ -97,7 +97,10 @@ auto main( // If there were no errors, say so and generate Cpp1 if (c.had_no_errors()) { - if (!flag_quiet) + if ( + !flag_quiet + && flag_cpp1_filename != "stdout" + ) { if (!c.has_cpp1()) { out << " ok (all Cpp2, passes safety checks)\n"; diff --git a/source/io.h b/source/io.h index a2fc7aaf5..886663108 100644 --- a/source/io.h +++ b/source/io.h @@ -1,14 +1,9 @@ -// Copyright (c) Herb Sutter -// SPDX-License-Identifier: CC-BY-NC-ND-4.0 - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. +// Copyright 2022-2026 Herb Sutter +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +// Part of the Cppfront Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://github.com/hsutter/cppfront/blob/main/LICENSE for license information. //=========================================================================== @@ -367,9 +362,12 @@ class braces_tracker else { --else_net_braces; } } - auto found_preprocessor_else() -> void { - assert (!found_else); + auto found_preprocessor_else_was_there_another() -> bool { + if (found_else) { + return true; + } found_else = true; + return false; } // If the "if" and "else" branches opened/closed the same net number @@ -474,7 +472,14 @@ class braces_tracker ); } - preprocessor.back().found_preprocessor_else(); + if (preprocessor.back().found_preprocessor_else_was_there_another()) { + // If this is the second or subsequent #else, it doesn't match + // the prior #if, so report an error + errors.emplace_back( + lineno, + "#else already encountered for this #if" + ); + }; } // Exiting an #endif @@ -887,11 +892,17 @@ class source ) -> bool { - std::ifstream in{ filename }; - if (!in.is_open()) { - return false; + // If filename is stdin, we read from stdin, otherwise we try to read the file + // + auto is_stdin = filename == "stdin"; + std::ifstream fss; + if (!is_stdin) + { + fss.open(filename); + if( !fss.is_open()) { return false; } } - + std::istream& in = is_stdin ? std::cin : fss; + auto in_comment = false; auto in_string_literal = false; auto in_raw_string_literal = false; diff --git a/source/lex.h b/source/lex.h index ef4d23a5b..98c0c708b 100644 --- a/source/lex.h +++ b/source/lex.h @@ -1,14 +1,9 @@ -// Copyright (c) Herb Sutter -// SPDX-License-Identifier: CC-BY-NC-ND-4.0 - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. +// Copyright 2022-2026 Herb Sutter +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +// Part of the Cppfront Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://github.com/hsutter/cppfront/blob/main/LICENSE for license information. //=========================================================================== @@ -718,13 +713,19 @@ auto lex_line( tokens.pop_back(); ++num_merged_tokens; } - - tokens.push_back({ - &generated_text.back()[0], - std::ssize(generated_text.back()), - pos, - lexeme::Keyword - }); + + // It's an error to have more than one of these, but we require that + // the number of tokens has not gone down. So just push back as many + // tokens as we merged. This will ensure that the token count remains + // the same. + for (auto i = 0; i < num_merged_tokens; i++) { + tokens.push_back({ + &generated_text.back()[0], + std::ssize(generated_text.back()), + pos, + lexeme::Keyword + }); + } if (num_merged_tokens > 1) { @@ -755,8 +756,6 @@ auto lex_line( " short, ushort, int, uint, long, ulong, longlong, ulonglong, longdouble, _schar, _uchar\n" " - see also cpp2util.h > \"Convenience names for integer types\"" ); - - return; } tokens.push_back(last_token); diff --git a/source/parse.h b/source/parse.h index a8ad4bd9e..4e341aebf 100644 --- a/source/parse.h +++ b/source/parse.h @@ -1,14 +1,9 @@ -// Copyright (c) Herb Sutter -// SPDX-License-Identifier: CC-BY-NC-ND-4.0 - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. +// Copyright 2022-2026 Herb Sutter +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +// Part of the Cppfront Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://github.com/hsutter/cppfront/blob/main/LICENSE for license information. //=========================================================================== @@ -130,10 +125,9 @@ struct template_argument; struct primary_expression_node { - enum active : u8 { empty=0, identifier, expression_list, id_expression, declaration, inspect, literal }; + enum active : u8 { empty=0, expression_list, id_expression, declaration, inspect, literal }; std::variant< std::monostate, - token const*, std::unique_ptr, std::unique_ptr, std::unique_ptr, @@ -155,6 +149,9 @@ struct primary_expression_node auto is_identifier() const -> bool; + auto get_identifier() const + -> token const*; + auto is_id_expression() const -> bool; @@ -164,9 +161,18 @@ struct primary_expression_node auto is_expression_list() const -> bool; + auto get_expression_list() + -> expression_list_node*; + auto get_expression_list() const -> expression_list_node const*; + auto is_declaration() const + -> bool; + + auto get_declaration() + -> declaration_node*; + auto is_literal() const -> bool; @@ -277,6 +283,9 @@ struct prefix_expression_node auto is_identifier() const -> bool; + auto get_identifier() const + -> token const*; + auto is_id_expression() const -> bool; @@ -286,6 +295,9 @@ struct prefix_expression_node auto is_expression_list() const -> bool; + auto get_expression_list() + -> expression_list_node*; + auto get_expression_list() const -> expression_list_node const*; @@ -385,6 +397,16 @@ struct binary_expression_node return terms.empty() && expr->is_identifier(); } + auto get_identifier() const + -> token const* + { + if (!terms.empty()) { + return nullptr; + } + // Else + return expr->get_identifier(); + } + auto is_id_expression() const -> bool { @@ -403,6 +425,15 @@ struct binary_expression_node return terms.empty() && expr->is_expression_list(); } + auto get_expression_list() + -> expression_list_node* + { + if (is_expression_list()) { + return expr->get_expression_list(); + } + return {}; + } + auto get_expression_list() const -> expression_list_node const* { @@ -579,6 +610,21 @@ struct expression_node return expr->is_fold_expression(); } + auto is_assignment_expression() const + -> bool + { + // For now this is always true; in the future I plan to add + // a sibling grammar production for try-expressions + return true; + } + + auto get_assignment_expression() const + -> assignment_expression_node* + { + assert(expr); + return expr.get(); + } + auto is_standalone_expression() const -> bool; @@ -594,6 +640,12 @@ struct expression_node return expr->is_identifier(); } + auto get_identifier() const + -> token const* + { + return expr->get_identifier(); + } + auto is_id_expression() const -> bool { @@ -612,6 +664,15 @@ struct expression_node return expr->is_expression_list(); } + auto get_expression_list() + -> expression_list_node * + { + if (is_expression_list()) { + return expr->get_expression_list(); + } + return {}; + } + auto get_expression_list() const -> expression_list_node const* { @@ -760,6 +821,12 @@ struct expression_list_node return ret; } + auto get_expressions() const + -> std::vector const& + { + return expressions; + } + auto to_string() const -> std::string { @@ -802,12 +869,6 @@ struct expression_list_node } }; -auto primary_expression_node::is_identifier() const - -> bool -{ - return expr.index() == identifier; -} - auto primary_expression_node::is_id_expression() const -> bool { @@ -820,6 +881,15 @@ auto primary_expression_node::is_expression_list() const return expr.index() == expression_list; } +auto primary_expression_node::get_expression_list() + -> expression_list_node * +{ + if (is_expression_list()) { + return std::get(expr).get(); + } + return {}; +} + auto primary_expression_node::get_expression_list() const -> expression_list_node const* { @@ -829,6 +899,21 @@ auto primary_expression_node::get_expression_list() const return {}; } +auto primary_expression_node::is_declaration() const + -> bool +{ + return expr.index() == declaration; +} + +auto primary_expression_node::get_declaration() + -> declaration_node * +{ + if (is_declaration()) { + return std::get(expr).get(); + } + return {}; +} + auto primary_expression_node::is_literal() const -> bool { @@ -980,6 +1065,16 @@ struct postfix_expression_node return ops.empty() && expr->is_identifier(); } + auto get_identifier() const + -> token const* + { + if (!ops.empty()) { + return nullptr; + } + // Else + return expr->get_identifier(); + } + auto is_id_expression() const -> bool { @@ -1009,6 +1104,15 @@ struct postfix_expression_node return ops.empty() && expr->is_expression_list(); } + auto get_expression_list() + -> expression_list_node * + { + if (is_expression_list()) { + return expr->get_expression_list(); + } + return {}; + } + auto get_expression_list() const -> expression_list_node const* { @@ -1074,6 +1178,16 @@ auto prefix_expression_node::is_identifier() const return ops.empty() && expr->is_identifier(); } +auto prefix_expression_node::get_identifier() const + -> token const* +{ + if (!ops.empty()) { + return nullptr; + } + // Else + return expr->get_identifier(); +} + auto prefix_expression_node::is_id_expression() const -> bool { @@ -1092,6 +1206,15 @@ auto prefix_expression_node::is_expression_list() const return ops.empty() && expr->is_expression_list(); } +auto prefix_expression_node::get_expression_list() + -> expression_list_node * +{ + if (is_expression_list()) { + return expr->get_expression_list(); + } + return {}; +} + auto prefix_expression_node::get_expression_list() const -> expression_list_node const* { @@ -1211,6 +1334,38 @@ struct template_argument std::unique_ptr > arg; + auto is_expression() const + -> bool + { + return arg.index() == expression; + } + + auto is_type_id() const + -> bool + { + return arg.index() == type_id; + } + + auto get_expression() const + -> expression_node* + { + if (is_expression()) { + return std::get(arg).get(); + } + // Else + return nullptr; + } + + auto get_type_id() const + -> type_id_node* + { + if (is_type_id()) { + return std::get(arg).get(); + } + // Else + return nullptr; + } + // The type needs to be movable // The copy ctor+operator are implicitly deleted due to the std::unique_ptr member // Because a forward-declared type is used in a std::unique_ptr as a member an out-of-line dtor is necessary @@ -1225,6 +1380,9 @@ struct template_argument auto to_string() const -> std::string; + + auto position() const + -> source_position; }; // Used by functions that must return a reference to an empty arg list @@ -1257,6 +1415,22 @@ struct unqualified_id_node return {}; } + auto is_identifier() const + -> bool + { + return template_args.empty(); + } + + auto get_identifier() const + -> token const* + { + if (is_identifier()) { + return identifier; + } + // Else + return nullptr; + } + auto to_string() const -> std::string; @@ -1405,12 +1579,86 @@ struct type_id_node // type(s) used in a std::unique_ptr as a member ~type_id_node(); + auto is_postfix_expression() const + -> bool + { + return id.index() == postfix; + } + + auto get_postfix_expression() const + -> postfix_expression_node* + { + if (is_postfix_expression()) { + return std::get(id).get(); + } + // Else + return nullptr; + } + + auto is_qualified_id() const + -> bool + { + return id.index() == qualified; + } + + auto get_qualified_id() const + -> qualified_id_node* + { + if (is_qualified_id()) { + return std::get(id).get(); + } + // Else + return nullptr; + } + + auto is_unqualified_id() const + -> bool + { + return id.index() == unqualified; + } + + auto get_unqualified_id() const + -> unqualified_id_node* + { + if (is_unqualified_id()) { + return std::get(id).get(); + } + // Else + return nullptr; + } + auto is_function_typeid() const -> bool { return id.index() == function; } + auto get_function_typeid() const + -> function_type_node* + { + if (is_function_typeid()) { + return std::get(id).get(); + } + // Else + return nullptr; + } + + auto is_keyword() const + -> bool + { + return id.index() == keyword; + } + + auto get_keyword() const + -> token const* + { + if (is_keyword()) { + return std::get(id); + } + // Else + return nullptr; + } + auto is_wildcard() const -> bool { @@ -1545,6 +1793,21 @@ auto template_argument::to_string() const } +auto template_argument::position() const + -> source_position +{ + if (is_expression()) { + return get_expression()->position(); + } + else if (is_type_id()) { + return get_type_id()->position(); + } + else { + return source_position{}; + } +} + + struct is_as_expression_node { std::unique_ptr expr; @@ -1578,6 +1841,16 @@ struct is_as_expression_node return ops.empty() && expr->is_identifier(); } + auto get_identifier() const + -> token const* + { + if (!ops.empty()) { + return nullptr; + } + // Else + return expr->get_identifier(); + } + auto is_id_expression() const -> bool { @@ -1596,6 +1869,15 @@ struct is_as_expression_node return ops.empty() && expr->is_expression_list(); } + auto get_expression_list() + -> expression_list_node * + { + if (is_expression_list()) { + return expr->get_expression_list(); + } + return {}; + } + auto get_expression_list() const -> expression_list_node const* { @@ -1724,6 +2006,26 @@ struct id_expression_node return std::get(id)->template_arguments(); } + auto is_identifier() const + -> bool + { + if (auto puid = std::get_if(&id)) { + return (*puid)->is_identifier(); + } + // Else + return false; + } + + auto get_identifier() const + -> token const* + { + if (auto puid = std::get_if(&id)) { + return (*puid)->get_identifier(); + } + // Else + return nullptr; + } + auto is_fold_expression() const -> bool { @@ -1745,12 +2047,32 @@ struct id_expression_node return id.index() == qualified; } + auto get_qualified_id() const + -> qualified_id_node* + { + if (auto pqid = std::get_if(&id)) { + return (*pqid).get(); + } + // Else + return nullptr; + } + auto is_unqualified() const -> bool { return id.index() == unqualified; } + auto get_unqualified_id() const + -> unqualified_id_node* + { + if (auto puid = std::get_if(&id)) { + return (*puid).get(); + } + // Else + return nullptr; + } + auto get_token() const -> token const* { @@ -1791,6 +2113,28 @@ struct id_expression_node }; +auto primary_expression_node::is_identifier() const +-> bool +{ + if (auto pid = std::get_if(&expr)) { + return (*pid)->is_identifier(); + } + // Else + return false; +} + + +auto primary_expression_node::get_identifier() const +-> token const* +{ + if (auto pid = std::get_if(&expr)) { + return (*pid)->get_identifier(); + } + // Else + return nullptr; +} + + postfix_expression_node::~postfix_expression_node() { if (cap_grp) { @@ -1818,8 +2162,6 @@ auto primary_expression_node::is_fold_expression() const // This is a fold-expression if any subexpression has // has an identifier named "..." switch (expr.index()) { - break;case identifier: - return *std::get(expr) == "..."; break;case expression_list: return expression_list_is_fold_expression; break;case id_expression: @@ -1854,7 +2196,9 @@ auto postfix_expression_node::to_string() const for (auto const& x : ops) { assert (x.op); - ret += x.op->as_string_view(); + if(x.op->as_string_view() != "(") { // Brackets are handled by the expression list. + ret += x.op->as_string_view(); + } if (x.id_expr) { ret += x.id_expr->to_string(); } @@ -1891,6 +2235,7 @@ auto postfix_expression_node::visit(auto& v, int depth) struct statement_node; +struct parameter_declaration_node; struct compound_statement_node { @@ -1898,16 +2243,37 @@ struct compound_statement_node source_position close_brace; std::vector> statements; + struct handler { + std::unique_ptr param; + std::unique_ptr statement; + }; + std::vector handlers; + colno_t body_indent = 0; compound_statement_node(source_position o = source_position{}); + auto get_statements() + -> std::vector + { + auto ret = std::vector{}; + for (auto const& stmt : statements) { + ret.push_back( stmt.get() ); + } + return ret; + } + auto position() const -> source_position { return open_brace; } + auto add_statement( + std::unique_ptr&& statement, + int before_pos + ) -> bool; + auto visit(auto& v, int depth) -> void; }; @@ -1920,7 +2286,47 @@ struct selection_statement_node std::unique_ptr expression; std::unique_ptr true_branch; std::unique_ptr false_branch; - bool has_source_false_branch = false; + bool has_source_false_branch = +false; + + auto get_identifier() const + -> token const* + { + assert(identifier); + return identifier; + } + + auto get_expression() const + -> logical_or_expression_node* + { + assert(expression); + return expression.get(); + } + + auto has_false_branch_in_source_code() const + -> bool + { + return has_source_false_branch; + } + + auto has_false_branch() const + -> bool + { + return false_branch.get() != nullptr; + } + + auto get_true_branch() const + -> compound_statement_node* + { + return true_branch.get(); + } + + auto get_false_branch() const + -> compound_statement_node* + { + assert(has_false_branch()); + return false_branch.get(); + } auto position() const -> source_position @@ -1964,6 +2370,72 @@ struct iteration_statement_node // type(s) used in a std::unique_ptr as a member ~iteration_statement_node(); + auto get_label() const + -> token const* + { + return label; + } + + auto has_next() const + -> bool + { + return next_expression.get() != nullptr; + } + + auto get_next_expression() const + -> assignment_expression_node* + { + return next_expression.get(); + } + + auto is_do() const + -> bool + { + return *identifier == "do"; + } + + auto is_while() const + -> bool + { + return *identifier == "while"; + } + + auto get_do_while_condition() const + -> logical_or_expression_node* + { + return condition.get(); + } + + auto get_do_while_body() const + -> compound_statement_node* + { + return statements.get(); + } + + auto is_for() const + -> bool + { + return *identifier == "for"; + } + + auto get_for_range() const + -> expression_node* + { + return range.get(); + } + + auto get_for_parameter() const + -> parameter_declaration_node* + { + return parameter.get(); + } + + auto get_for_body() const + -> statement_node* + { + return body.get(); + } + auto position() const -> source_position { @@ -1984,6 +2456,18 @@ struct return_statement_node token const* identifier = {}; std::unique_ptr expression; + auto has_expression() const + -> bool + { + return expression.get() != nullptr; + } + + auto get_expression() const + -> expression_node* + { + return expression.get(); + } + auto position() const -> source_position { @@ -2158,8 +2642,7 @@ struct using_statement_node auto for_namespace() const -> bool { - assert(id); - return id->to_string().ends_with("::_"); + return (id && id->to_string().ends_with("::_")); } auto position() const @@ -2224,6 +2707,8 @@ struct statement_node auto is_inspect () const -> bool { return statement.index() == inspect; } auto is_jump () const -> bool { return statement.index() == jump; } + auto get_parameters() + -> std::vector; template auto get_if() -> Node* @@ -2300,6 +2785,20 @@ auto alternative_node::visit(auto& v, int depth) v.end(*this, depth); } +auto compound_statement_node::add_statement( + std::unique_ptr&& statement, + int before_pos +) + -> bool +{ + // Adopt this statement into our list of statements + statements.insert( + statements.begin() + std::clamp( before_pos, 0, unchecked_narrow(std::ssize(statements)) ), + std::move(statement) + ); + + return true; +} auto compound_statement_node::visit(auto& v, int depth) -> void @@ -2336,7 +2835,9 @@ struct parameter_declaration_node // API // - auto to_string() const + auto to_string( + bool verbose = true + ) const -> std::string; auto has_name() const @@ -2434,7 +2935,9 @@ struct parameter_declaration_list_node // API // - auto to_string() const + auto to_string( + bool verbose = true + ) const -> std::string { assert(open_paren && close_paren); @@ -2442,7 +2945,15 @@ struct parameter_declaration_list_node auto ret = open_paren->to_string(); for (auto const& p: parameters) { - ret += p->to_string() + ", "; + ret += p->to_string(verbose) + ", "; + } + + if ( + !verbose + && std::ssize(ret) > 3 + ) + { + ret.resize( std::ssize(ret) - 2 ); // omit the final ", " } ret += close_paren->as_string_view(); @@ -2488,6 +2999,19 @@ struct parameter_declaration_list_node }; +auto statement_node::get_parameters() + -> std::vector +{ + auto ret = std::vector{}; + if (parameters) { + for (auto& param : parameters->parameters) { + ret.push_back( param.get() ); + } + } + return ret; +} + + auto statement_node::visit(auto& v, int depth) -> void { @@ -2655,6 +3179,15 @@ struct function_type_node return {}; } + auto parameters_to_string( + bool verbose = true + ) const + -> std::string + { + assert (parameters); + return parameters->to_string(verbose); + } + auto has_bool_return_type() const -> bool { @@ -2707,6 +3240,28 @@ struct function_type_node return false; } + auto has_return_named(std::string_view s) const + -> bool + { + auto list = std::get_if(&returns); + if (!list) { + return false; + } + + for (auto& param : (*list)->parameters) { + if (param->has_name(s)) { + return true; + } + } + return false; + } + + auto has_parameter_or_return_named(std::string_view s) const + -> bool + { + return has_parameter_named(s) || has_return_named(s); + } + auto has_parameter_with_name_and_pass( std::string_view s, passing_style pass @@ -2997,6 +3552,8 @@ struct declaration_node std::unique_ptr > type; + bool is_static = false; + std::vector> metafunctions; std::unique_ptr template_parameters; source_position requires_pos = {}; @@ -3011,6 +3568,7 @@ struct declaration_node // Attributes currently configurable only via metafunction API, // not directly in the base language grammar bool member_function_generation = true; + bool ref_qualifier_generation = true; // Cache some context bool is_a_template_parameter = false; @@ -3029,7 +3587,12 @@ struct declaration_node // API // - auto to_string() const + auto to_string( + bool verbose = true + ) const + -> std::string; + + auto signature_to_string() const -> std::string; auto is_template_parameter() const @@ -3101,6 +3664,12 @@ struct declaration_node member_function_generation = false; } + auto type_disable_ref_qualifier_generation() + -> void + { + ref_qualifier_generation = false; + } + auto object_type() const -> std::string { @@ -3244,6 +3813,24 @@ struct declaration_node return std::get(type)->has_parameter_named(s); } + auto has_return_named(std::string_view s) const + -> bool + { + if (!is_function()) { + return false; + } + return std::get(type)->has_return_named(s); + } + + auto has_parameter_or_return_named(std::string_view s) const + -> bool + { + if (!is_function()) { + return false; + } + return std::get(type)->has_parameter_or_return_named(s); + } + auto has_in_parameter_named(std::string_view s) const -> bool { @@ -3351,7 +3938,7 @@ struct declaration_node auto is_polymorphic() const // has base types or virtual functions -> bool { - for (auto& decl : get_type_scope_declarations()) { + for (auto& decl : get_nested_declarations()) { if ( decl->has_name("this") || decl->is_virtual_function() @@ -3378,7 +3965,7 @@ struct declaration_node } // Else if we have a copy constructor, we're copyable - for (auto& decl : get_type_scope_declarations()) + for (auto& decl : get_nested_declarations()) if (decl->is_constructor_with_that()) { return false; @@ -3388,15 +3975,17 @@ struct declaration_node return true; } - auto parent_is_function () const -> bool + auto parent_is_function () const -> bool { return parent_declaration && parent_declaration->type.index() == a_function; } - auto parent_is_object () const -> bool + auto parent_is_object () const -> bool { return parent_declaration && parent_declaration->type.index() == an_object; } - auto parent_is_type () const -> bool + auto parent_is_type () const -> bool { return parent_declaration && parent_declaration->type.index() == a_type; } - auto parent_is_namespace () const -> bool + auto parent_is_namespace () const -> bool { return !parent_declaration || parent_declaration->type.index() == a_namespace; } - auto parent_is_alias () const -> bool + auto parent_is_nonglobal_namespace() const -> bool + { return parent_declaration && parent_declaration->type.index() == a_namespace; } + auto parent_is_alias () const -> bool { return parent_declaration && parent_declaration->type.index() == an_alias; } auto parent_is_type_alias () const -> bool @@ -3432,11 +4021,11 @@ struct declaration_node // think of right now to write the following two get_ // functions (without duplicating their bodies, and // without resorting to const_casts) - auto gather_type_scope_declarations(which w) const + auto gather_nested_declarations(which w) const -> std::vector { if ( - !is_type() + (!is_type() && !is_namespace()) || !initializer || !initializer->is_compound() ) @@ -3453,10 +4042,6 @@ struct declaration_node auto decl = o->get_if(); if (decl) { - assert( - !decl->is_namespace() - && "ICE: a type shouldn't be able to contain a namespace" - ); if ( (w & functions && decl->is_function()) || (w & objects && decl->is_object() ) @@ -3473,28 +4058,28 @@ struct declaration_node } public: - auto get_type_scope_declarations(which w = all) + auto get_nested_declarations(which w = all) -> std::vector { // Only want to return the gather_ results as // non-const* in a non-const function - return gather_type_scope_declarations(w); + return gather_nested_declarations(w); } - auto get_type_scope_declarations(which w = all) const + auto get_nested_declarations(which w = all) const -> std::vector { // Convert the gather_ results to const* - auto tmp = gather_type_scope_declarations(w); + auto tmp = gather_nested_declarations(w); return {tmp.begin(), tmp.end()}; } - auto add_type_member( std::unique_ptr&& statement ) + auto add_type_or_namespace_member( std::unique_ptr&& statement ) -> bool { if ( - !is_type() + !(is_type() || is_namespace()) || !initializer || !initializer->is_compound() || !statement->is_declaration() @@ -3565,7 +4150,7 @@ struct declaration_node // Look for a name match and if so remember the type, // and look for a base type after that match - auto objects = decl->get_type_scope_declarations(); + auto objects = decl->get_nested_declarations(); auto found_name = false; auto found_later_base_type = false; @@ -3621,6 +4206,37 @@ struct declaration_node return ret; } + auto is_function_with_body() const + -> bool + { + return + is_function() + && initializer + ; + } + + auto get_function_body() const + -> statement_node* + { + return initializer.get(); + } + + auto is_function_with_compound_body() const + -> bool + { + return + is_function() + && initializer + && initializer->is_compound() + ; + } + + auto get_function_compound_body() const + -> compound_statement_node* + { + return initializer->get_if(); + } + auto is_function_with_this() const -> bool { @@ -3909,19 +4525,38 @@ struct declaration_node } auto get_function_parameters() - -> std::vector + -> std::vector { if (!is_function()) { return {}; } - // else - auto ret = std::vector{}; + + auto ret = std::vector{}; for (auto& param : std::get(type)->parameters->parameters) { ret.push_back( param.get() ); } return ret; } + auto get_function_returns() + -> std::vector + { + if (!is_function()) { + return {}; + } + + auto returns = std::get_if(&std::get(type)->returns); + if (!returns) { + return {}; + } + + auto ret = std::vector{}; + for (auto& param : (*returns)->parameters) { + ret.push_back( param.get() ); + } + return ret; + } + auto unnamed_return_type_to_string() const -> std::string { @@ -4073,7 +4708,9 @@ struct declaration_node }; -auto parameter_declaration_node::to_string() const +auto parameter_declaration_node::to_string( + bool verbose /*= true*/ +) const -> std::string { auto ret = std::string{}; @@ -4091,7 +4728,15 @@ auto parameter_declaration_node::to_string() const ; } - ret += to_string_view(pass) + declaration->to_string(); + if ( + verbose + || pass != passing_style::in + ) + { + ret += to_string_view(pass); + ret += " "; + } + ret += declaration->to_string( verbose ); return ret; } @@ -4151,13 +4796,16 @@ auto parameter_declaration_node::is_in_function_scope() const -> bool { return - my_list->in_statement_param_list - || ( - declaration->parent_is_function() - && !declaration->parent_declaration->parent_is_type() - && !declaration->parent_declaration->parent_is_namespace() - ) - ; + my_list + && declaration + && ( + my_list->in_statement_param_list + || ( + declaration->parent_is_function() + && !declaration->parent_declaration->parent_is_type() + && !declaration->parent_declaration->parent_is_namespace() + ) + ); } @@ -4261,9 +4909,10 @@ auto function_type_node::is_constructor() const (*parameters).ssize() > 0 && (*parameters)[0]->has_name("this") && (*parameters)[0]->direction() == passing_style::out + && my_decl + && my_decl->has_name("operator=") ) { - assert(my_decl && my_decl->has_name("operator=")); return true; } return false; @@ -4525,10 +5174,7 @@ auto primary_expression_node::template_arguments() const auto primary_expression_node::get_token() const -> token const* { - if (expr.index() == identifier) { - return std::get(expr); - } - else if (expr.index() == id_expression) { + if (expr.index() == id_expression) { return std::get(expr)->get_token(); } else if (expr.index() == literal) { @@ -4548,12 +5194,6 @@ auto primary_expression_node::position() const break;case empty: return { 0, 0 }; - break;case identifier: { - auto const& s = std::get(expr); - assert (s); - return s->position(); - } - break;case expression_list: { auto const& s = std::get(expr); assert (s); @@ -4595,7 +5235,6 @@ auto primary_expression_node::visit(auto& v, int depth) -> void { v.start(*this, depth); - try_visit(expr, v, depth); try_visit(expr, v, depth); try_visit(expr, v, depth); try_visit(expr, v, depth); @@ -4826,9 +5465,9 @@ auto pretty_print_visualize(is_as_expression_node const& n, int indent) -> std::string; auto pretty_print_visualize(id_expression_node const& n, int indent) -> std::string; -auto pretty_print_visualize(compound_statement_node const& n, int indent) +auto pretty_print_visualize(compound_statement_node const& n, int indent, bool after_else = false) -> std::string; -auto pretty_print_visualize(selection_statement_node const& n, int indent) +auto pretty_print_visualize(selection_statement_node const& n, int indent, bool no_indent = false) -> std::string; auto pretty_print_visualize(iteration_statement_node const& n, int indent) -> std::string; @@ -4844,7 +5483,7 @@ auto pretty_print_visualize(jump_statement_node const& n, int indent) -> std::string; auto pretty_print_visualize(using_statement_node const& n, int indent) -> std::string; -auto pretty_print_visualize(statement_node const& n, int indent) +auto pretty_print_visualize(statement_node const& n, int indent, bool no_indent = false) -> std::string; auto pretty_print_visualize(parameter_declaration_node const& n, int indent, bool is_template_param = false) -> std::string; @@ -4856,15 +5495,32 @@ auto pretty_print_visualize(type_node const& n, int indent) -> std::string; auto pretty_print_visualize(namespace_node const& n, int indent) -> std::string; -auto pretty_print_visualize(declaration_node const& n, int indent, bool include_metafunctions_list = false) +auto pretty_print_visualize(declaration_node const& n, int indent, bool include_metafunctions_list = false, bool verbose = true) -> std::string; -auto declaration_node::to_string() const +auto declaration_node::to_string( + bool verbose /*= true*/ +) const -> std::string { // These need to be unified someday... let's not duplicate this long function... - return pretty_print_visualize(*this, 0); + return pretty_print_visualize(*this, 0, false, verbose); +} + + +auto declaration_node::signature_to_string() const + -> std::string +{ + auto ret = std::string{}; + if (auto fname = name()) { + ret += *fname; + } + if (auto func = std::get_if(&type)) { + assert ((*func)->parameters); + ret += (*func)->parameters->to_string(false); + } + return ret; } @@ -4876,12 +5532,6 @@ auto primary_expression_node::to_string() const break; case empty: return {}; - break; case identifier: { - auto const& s = std::get(expr); - assert(s); - return s->to_string(); - } - break; case expression_list: { auto const& s = std::get(expr); assert(s); @@ -4968,7 +5618,6 @@ auto pretty_print_visualize(primary_expression_node const& n, int indent) { auto ret = std::string{}; - ret += try_pretty_print_visualize(n.expr, indent); ret += try_pretty_print_visualize(n.expr, indent); ret += try_pretty_print_visualize(n.expr, indent); ret += try_pretty_print_visualize(n.expr, indent); @@ -5200,30 +5849,65 @@ auto pretty_print_visualize(id_expression_node const& n, int indent) } -auto pretty_print_visualize(compound_statement_node const& n, int indent) +auto pretty_print_visualize(compound_statement_node const& n, int indent, bool after_else /* = false */ ) -> std::string { - auto ret = std::string{"\n"} + pre(indent) + "{"; + auto ret = std::string{}; - for (auto& stmt : n.statements) { - assert (stmt); - ret += pretty_print_visualize(*stmt, indent+1); + // If this is just a plain "if" right after an "else", pull them together visually + if ( + after_else + && std::ssize(n.statements) == 1 + && n.statements[0] + && n.statements[0]->is_selection() + && n.statements[0]->get_parameters().empty() + ) + { + assert (n.handlers.empty()); + ret += pretty_print_visualize(*n.statements[0], indent, true); } - ret += std::string{"\n"} + pre(indent) + "}"; + else + { + ret += std::string{"\n"} + pre(indent); + + if (!n.handlers.empty()) { + ret += "try "; + } + + ret += "{"; + + for (auto& stmt : n.statements) { + assert (stmt); + ret += pretty_print_visualize(*stmt, indent+1); + } + + ret += std::string{"\n"} + pre(indent) + "}"; + + for (auto& h: n.handlers) + { + ret += std::string{"\n"} + pre(indent) + "catch (" + + pretty_print_visualize(*h.param, indent+1) + " ) " + + pretty_print_visualize(*h.statement, indent); + } + } return ret; } -auto pretty_print_visualize(selection_statement_node const& n, int indent) +auto pretty_print_visualize(selection_statement_node const& n, int indent, bool no_indent /* = false */) -> std::string { assert (n.identifier && n.expression && n.true_branch && n.false_branch); auto ret = std::string{}; - ret += std::string{"\n"} + pre(indent) + n.identifier->as_string_view() + " "; + if (!no_indent) { + ret += std::string{"\n"} + pre(indent); + } + ret += n.identifier->as_string_view(); + ret += " "; if (n.is_constexpr) { ret += "constexpr "; @@ -5234,7 +5918,7 @@ auto pretty_print_visualize(selection_statement_node const& n, int indent) if (n.has_source_false_branch) { ret += std::string{"\n"} + pre(indent) + "else " - + pretty_print_visualize(*n.false_branch, indent); + + pretty_print_visualize(*n.false_branch, indent, true); } return ret; @@ -5439,7 +6123,7 @@ auto pretty_print_visualize(using_statement_node const& n, int indent) } -auto pretty_print_visualize(statement_node const& n, int indent) +auto pretty_print_visualize(statement_node const& n, int indent, bool no_indent /* = false */ ) -> std::string { auto ret = std::string{}; @@ -5460,7 +6144,7 @@ auto pretty_print_visualize(statement_node const& n, int indent) } ret += try_pretty_print_visualize(n.statement, indent); - ret += try_pretty_print_visualize(n.statement, indent); + ret += try_pretty_print_visualize(n.statement, indent, no_indent); ret += try_pretty_print_visualize(n.statement, indent); ret += try_pretty_print_visualize(n.statement, indent); ret += try_pretty_print_visualize(n.statement, indent); @@ -5579,7 +6263,12 @@ auto pretty_print_visualize(namespace_node const&) } -auto pretty_print_visualize(declaration_node const& n, int indent, bool include_metafunctions_list /* = false */ ) +auto pretty_print_visualize( + declaration_node const& n, + int indent, + bool include_metafunctions_list /* = false */, + bool verbose /* = true */ +) -> std::string { indent_spaces = 4; @@ -5613,23 +6302,25 @@ auto pretty_print_visualize(declaration_node const& n, int indent, bool include_ } auto initializer = std::string{}; - if (n.initializer) { - auto adjusted_indent = indent; - if (!n.name()) { - ++adjusted_indent; - } - initializer = " ="; - if (n.is_function() && n.is_constexpr) { - initializer += "="; + if (verbose) { + if (n.initializer) { + auto adjusted_indent = indent; + if (!n.name()) { + ++adjusted_indent; + } + initializer = " ="; + if (n.is_function() && n.is_constexpr) { + initializer += "="; + } + initializer += " " + pretty_print_visualize(*n.initializer, adjusted_indent); + if (initializer.ends_with(";;")) { + initializer.pop_back(); + } } - initializer += " " + pretty_print_visualize(*n.initializer, adjusted_indent); - if (initializer.ends_with(";;")) { - initializer.pop_back(); + else if (!n.is_parameter()) { + initializer = ";"; } } - else if (!n.is_parameter()) { - initializer = ";"; - } // Then slot them in where appropriate @@ -5660,6 +6351,10 @@ auto pretty_print_visualize(declaration_node const& n, int indent, bool include_ ret += std::string{"\n"} + pre(indent); } + if (n.is_static) { + ret += "static "; + } + switch (n.access) { break;case accessibility::public_ : ret += "public "; break;case accessibility::protected_ : ret += "protected "; @@ -5708,7 +6403,7 @@ auto pretty_print_visualize(declaration_node const& n, int indent, bool include_ + initializer; } else if (n.is_namespace()) { - auto& t = std::get(n.type); + auto& t = std::get(n.type); assert(t); ret += "namespace = " + initializer; @@ -5783,6 +6478,9 @@ class parser { std::vector& errors; std::set& includes; + std::vector& extra_cpp1; + std::vector& extra_build; + std::string filename; std::unique_ptr parse_tree = {}; @@ -5909,20 +6607,38 @@ class parser // parser( std::vector& errors_, - std::set& includes_ + std::set& includes_, + std::vector& extra_cpp1_, + std::vector& extra_build_, + std::string_view filename_ ) - : errors{ errors_ } - , includes{ includes_ } - , parse_tree{std::make_unique()} + : errors { errors_ } + , includes { includes_ } + , extra_cpp1 { extra_cpp1_ } + , extra_build{ extra_build_ } + , filename { filename_ } + , parse_tree {std::make_unique()} { } parser( parser const& that ) : errors{ that.errors } , includes{ that.includes } + , extra_cpp1{ that.extra_cpp1 } + , extra_build{ that.extra_build } , parse_tree{std::make_unique()} { } + //----------------------------------------------------------------------- + // get_filename + // + auto get_filename() const + -> std::string + { + return filename; + } + + //----------------------------------------------------------------------- // parse // @@ -5964,7 +6680,7 @@ class parser //----------------------------------------------------------------------- - // parse_one_statement + // parse_one_declaration // // tokens input tokens for this section of Cpp2 source code // generated_tokens a shared place to store generated tokens @@ -5988,8 +6704,10 @@ class parser // and there were no new errors, and all tokens were consumed auto errors_size = std::ssize(errors); pos = 0; - if (auto d = statement(); - d + + auto d = std::unique_ptr{}; + statement(d); + if (d && std::ssize(errors) == errors_size && done() ) @@ -6292,6 +7010,16 @@ class parser auto postfix_expression() -> std::unique_ptr { + if ( + curr() == "throw" + && peek(1) + && peek(1)->type() != lexeme::LeftParen + ) + { + error("'throw " + peek(1)->to_string() + "' is not allowed without parentheses - did you mean 'throw (" + *peek(1) + "))' ?"); + return {}; + } + auto n = std::make_unique(); n->expr = primary_expression(); if (!(n->expr)) { @@ -7005,6 +7733,7 @@ class parser if (auto id = postfix_expression(); id && id->ops.size() == 1 + && id->ops[0].expr_list && id->ops[0].expr_list->expressions.size() == 1 && id->ops[0].expr_list->open_paren->type() == lexeme::LeftParen ) @@ -7505,10 +8234,7 @@ class parser return {}; } - if (auto s = compound_statement()) { - n->true_branch = std::move(s); - } - else { + if (!compound_statement(n->true_branch)) { error("invalid if branch body", true, {}, true); return {}; } @@ -7536,8 +8262,8 @@ class parser return {}; } - if (auto s = compound_statement( source_position{}, true )) { - n->false_branch = std::move(s); + compound_statement(n->false_branch, source_position{}, true ); + if (n->false_branch) { n->has_source_false_branch = true; } else { @@ -7665,7 +8391,8 @@ class parser }; auto handle_compound_statement = [&]() -> bool { - auto s = compound_statement(); + auto s = std::unique_ptr{}; + compound_statement(s); if (!s) { error("invalid while loop body", true, {}, true); return false; @@ -7755,7 +8482,7 @@ class parser } next(); // eat ')' - n->body = statement(); + statement(n->body); if (!n->body) { error("invalid for..do loop body", false, source_position{}, true); return {}; @@ -7828,7 +8555,9 @@ class parser n->equal_sign = curr().position(); next(); - if (auto s = statement(true, n->equal_sign)) { + auto s = std::unique_ptr{}; + statement(s, true, n->equal_sign); + if (s) { n->statement = std::move(s); } else { @@ -8026,6 +8755,71 @@ class parser } + //G try-block: + //G 'try' compound-statement handler-seq + //G + //G handler-seq: + //G handler + //G handler-seq handler + //G + //G handler: + //G 'catch' '(' parameter-declaration ')' compound-statement + //G + auto try_block() + -> std::unique_ptr + { + if (curr() != "try") { + return {}; + } + next(); + + auto n = std::unique_ptr{}; + if (!compound_statement( n )) { + error("'try' must be followed by a block enclosed in braces"); + return {}; + } + + if (curr() != "catch") { + error("a 'try' block must be followed by at least one 'catch' handler"); + return {}; + } + + while (curr() == "catch") + { + next(); + + if (curr() != "(") { + error("'catch' must be followed by a parenthesized parameter declaration"); + return {}; + } + next(); + + auto hnd = compound_statement_node::handler{}; + + hnd.param = parameter_declaration(nullptr, false, false, false); + if (!hnd.param) { + error("'catch (' must be followed by a parameter declaration"); + return {}; + } + + if (curr() != ")") { + error("expected ')' after catch parameter declaration"); + return {}; + } + next(); + + if (!compound_statement(hnd.statement)) { + error("'catch()' must be followed by a block enclosed in braces"); + return {}; + } + + n->handlers.push_back( std::move(hnd) ); + } + + return n; + } + + //G statement: //G selection-statement //G using-statement @@ -8037,28 +8831,29 @@ class parser //G contract-statement //G declaration //G expression-statement + //G try-block //G //G contract-statement: //G contract ';' // - //GTODO try-block - //G auto statement( - bool semicolon_required = true, - source_position equal_sign = source_position{}, - bool parameters_allowed = false, - compound_statement_node* compound_parent = nullptr, - bool allow_angle_operators = true + std::unique_ptr& n, // using an inout param makes partial parses available to reflection + bool semicolon_required = true, + source_position equal_sign = source_position{}, + bool parameters_allowed = false, + compound_statement_node* compound_parent = nullptr, + bool allow_angle_operators = true ) - -> std::unique_ptr + -> void { + n = std::make_unique(compound_parent); + if (!done() && curr().type() == lexeme::Semicolon) { error("empty statement is not allowed - remove extra semicolon"); - return {}; + n = nullptr; + return; } - auto n = std::make_unique(compound_parent); - // If a parameter list is allowed here, try to parse one if (parameters_allowed) { n->parameters = parameter_declaration_list(false, true, false, true); @@ -8071,7 +8866,8 @@ class parser ) { error("(temporary alpha limitation) parameters scoped to a block/statement must be 'in' (the default), 'copy', or 'inout'", false); - return {}; + n = nullptr; + return; } } } @@ -8082,70 +8878,81 @@ class parser if (auto s = selection_statement()) { n->statement = std::move(s); assert (n->is_selection()); - return n; + return; } else if (auto s = using_statement()) { n->statement = std::move(s); assert (n->is_using()); - return n; + return; } else if (auto i = inspect_expression(false)) { n->statement = std::move(i); assert (n->is_inspect()); - return n; + return; } else if (auto s = return_statement()) { n->statement = std::move(s); assert (n->is_return()); - return n; + return; } - + else if (auto s = jump_statement()) { n->statement = std::move(s); assert (n->is_jump()); - return n; + return; } else if (auto s = iteration_statement()) { n->statement = std::move(s); assert (n->is_iteration()); - return n; + return; } - else if (auto s = compound_statement(equal_sign)) { - n->statement = std::move(s); + else if ( // here we are careful to pass through the actual statement, so reflection can see it being built + (n->statement = std::unique_ptr{}).index() == statement_node::compound + && compound_statement(std::get(n->statement), equal_sign) + ) + { assert (n->is_compound()); - return n; + return; } else if (auto s = contract()) { if (*s->kind != "assert") { error("only 'assert' contracts are allowed at statement scope"); - return {}; + n = nullptr; + return; } if (curr().type() != lexeme::Semicolon) { error("missing ';' after contract-statement"); - return {}; + n = nullptr; + return; } next(); n->statement = std::move(s); assert (n->is_contract()); - return n; + return; } else if (auto s = declaration(semicolon_required, false, false, n.get())) { n->statement = std::move(s); assert (n->is_declaration()); - return n; + return; } else if (auto s = expression_statement(semicolon_required, allow_angle_operators)) { n->statement = std::move(s); assert (n->is_expression()); - return n; + return; + } + + else if (auto s = try_block()) { + n->statement = std::move(s); + assert (n->is_compound()); + return; } else { @@ -8157,7 +8964,8 @@ class parser { error("declaring multiple names at once is not currently supported"); } - return {}; + n = nullptr; + return; } } @@ -8170,10 +8978,11 @@ class parser //G statement-seq statement //G auto compound_statement( - source_position equal_sign = source_position{}, - bool allow_single_unbraced_statement = false + std::unique_ptr& n, // using an inout param makes partial parses available to reflection + source_position equal_sign = source_position{}, + bool allow_single_unbraced_statement = false ) - -> std::unique_ptr + -> bool { const bool is_braced = curr().type() == lexeme::LeftBrace; if ( @@ -8181,10 +8990,10 @@ class parser && !allow_single_unbraced_statement ) { - return {}; + return false; } - auto n = std::make_unique(); + n = std::make_unique(); if (!is_braced) { n->body_indent = curr().position().colno-1; } @@ -8217,14 +9026,15 @@ class parser { // Only inside a compound-statement, a // contained statement() may have parameters - auto s = statement(true, source_position{}, true, n.get()); + auto s = std::unique_ptr{}; + statement(s, true, source_position{}, true, n.get()); if (!s) { // Only add a general error when no specific one already exists if(!has_error()) { error("invalid statement encountered inside a compound-statement", true); } - return {}; + return false; } n->statements.push_back( std::move(s) ); } @@ -8234,7 +9044,7 @@ class parser n->close_brace = curr().position(); next(); } - return n; + return true; } @@ -8435,6 +9245,18 @@ class parser } } + if ( + !is_returns + && n->declaration->initializer + && !n->declaration->initializer->is_expression() + ) + { + // If the initializer is not an expression statement (like a function call), + // then it can't be used as a parameter. + error("parameter must be initialized with an expression"); + return {}; + } + return n; } @@ -8557,7 +9379,6 @@ class parser -> std::unique_ptr { auto n = std::make_unique(curr().position()); - auto guard = capture_groups_stack_guard(this, &n->captures); if ( curr() != "pre" @@ -8568,6 +9389,13 @@ class parser return {}; } n->kind = &curr(); + + auto guard = + curr() == "post" + ? std::make_unique(this, &n->captures) + : std::unique_ptr() + ; + next(); // Check if there's a @@ -9044,6 +9872,10 @@ class parser // Or a namespace else if (curr() == "namespace") { + if (n->parent_is_type()) { + error("types cannot contain namespaces"); + return {}; + } n->type = std::make_unique( &curr() ); assert (n->type.index() == declaration_node::a_namespace); next(); @@ -9219,7 +10051,8 @@ class parser { auto& type = std::get(n->type); // object initialized by the address of the curr() object - if (peek(1)->type() == lexeme::Ampersand) + if (peek(1)->type() == lexeme::Ampersand + && (!peek(2) || peek(2)->type() == lexeme::Semicolon)) { type->address_of = &curr(); } @@ -9241,13 +10074,15 @@ class parser } } - if (!(n->initializer = statement( + statement( + n->initializer, semicolon_required, n->equal_sign, false, nullptr, !is_template_parameter - ))) + ); + if (!n->initializer) { error( "ill-formed initializer", @@ -9285,7 +10120,8 @@ class parser ) { auto start_pos = pos; - auto stmt = statement(); + auto stmt = std::unique_ptr{}; + statement(stmt); auto at_a_statement = stmt != nullptr && !stmt->is_declaration(); pos = start_pos; // backtrack no matter what, we're just peeking here @@ -9575,9 +10411,12 @@ class parser a->initializer = std::move(e); } - // Anything else shouldn't be possible + // Anything else is illegal else { - assert(false && "ICE: should be unreachable - invalid alias declaration"); + errors.emplace_back( + curr().position(), + "invalid alias declaration - expected 'type', 'namespace', or a type-id after ':'" + ); return {}; } @@ -9622,6 +10461,13 @@ class parser auto n = std::unique_ptr{}; + auto is_static = false; + if (curr() == "static") + { + is_static = true; + next(); + } + // This scope is to ensure that once we've moved 'id' into the // declaration_node, we don't access the moved-from local name // (and similar hygiene for 'access' though that one doesn't matter as much) @@ -9777,6 +10623,9 @@ class parser } } + assert(n); + n->is_static = is_static; + // Note: Do this after trying to parse this as a declaration, for parse backtracking if ( diff --git a/source/reflect.h b/source/reflect.h index 27765339e..d119ec14b 100644 --- a/source/reflect.h +++ b/source/reflect.h @@ -1,3 +1,6 @@ +#line 13 "reflect.h2" +#include "parse.h" +#include "cpp2regex.h" #ifndef REFLECT_H_CPP2 #define REFLECT_H_CPP2 @@ -10,103 +13,207 @@ #line 1 "reflect.h2" -#line 22 "reflect.h2" +#line 17 "reflect.h2" namespace cpp2 { namespace meta { -#line 34 "reflect.h2" +#line 29 "reflect.h2" class compiler_services; -#line 233 "reflect.h2" -class declaration_base; +#line 212 "reflect.h2" +template class reflection_base; -#line 259 "reflect.h2" +#line 248 "reflect.h2" class declaration; -#line 341 "reflect.h2" +#line 333 "reflect.h2" class function_declaration; -#line 432 "reflect.h2" +#line 438 "reflect.h2" class object_declaration; -#line 468 "reflect.h2" +#line 474 "reflect.h2" +class type_or_namespace_declaration; + +#line 585 "reflect.h2" class type_declaration; -#line 606 "reflect.h2" +#line 629 "reflect.h2" +class namespace_declaration; + +#line 648 "reflect.h2" class alias_declaration; -#line 1056 "reflect.h2" +#line 667 "reflect.h2" +class parameter_declaration; + +#line 713 "reflect.h2" +template class binary_expression; + +#line 840 "reflect.h2" +class expression_list; + +#line 873 "reflect.h2" +class prefix_expression; + +#line 915 "reflect.h2" +class postfix_expression; + +#line 986 "reflect.h2" +class template_arg; + +#line 1012 "reflect.h2" +class unqualified_id; + +#line 1044 "reflect.h2" +class qualified_id; + +#line 1088 "reflect.h2" +class type_id; + +#line 1131 "reflect.h2" +class primary_expression; + +#line 1170 "reflect.h2" +class id_expression; + +#line 1206 "reflect.h2" +class expression; + +#line 1257 "reflect.h2" +class is_as_expression; + +#line 1318 "reflect.h2" +class statement; + +#line 1370 "reflect.h2" +class expression_statement; + +#line 1392 "reflect.h2" +class compound_statement; + +#line 1431 "reflect.h2" +class selection_statement; + +#line 1457 "reflect.h2" +class return_statement; + +#line 1479 "reflect.h2" +class iteration_statement; + +#line 1976 "reflect.h2" class value_member_info; -#line 1574 "reflect.h2" +#line 2689 "reflect.h2" +class simple_traverser; + +#line 4181 "reflect.h2" +class autodiff_special_func; + +#line 4225 "reflect.h2" +class autodiff_declared_variable; + +#line 4243 "reflect.h2" +class autodiff_declaration_stack_item; + +#line 4287 "reflect.h2" +class autodiff_context; + + +#line 4683 "reflect.h2" +class autodiff_diff_code; + + +#line 4732 "reflect.h2" +class autodiff_activity_check; + + +#line 4830 "reflect.h2" +class autodiff_handler_base; + + +#line 4848 "reflect.h2" +class autodiff_expression_handler; + + +#line 5491 "reflect.h2" +class autodiff_stmt_handler; + +#line 5961 "reflect.h2" +class autodiff_declaration_handler; + +#line 6313 "reflect.h2" class expression_flags; -#line 1590 "reflect.h2" +#line 6329 "reflect.h2" class regex_token; -#line 1616 "reflect.h2" +#line 6356 "reflect.h2" class regex_token_check; -#line 1635 "reflect.h2" +#line 6377 "reflect.h2" class regex_token_code; -#line 1654 "reflect.h2" +#line 6398 "reflect.h2" class regex_token_empty; -#line 1670 "reflect.h2" +#line 6416 "reflect.h2" class regex_token_list; -#line 1709 "reflect.h2" +#line 6468 "reflect.h2" class parse_context_group_state; -#line 1770 "reflect.h2" +#line 6529 "reflect.h2" class parse_context_branch_reset_state; -#line 1813 "reflect.h2" +#line 6572 "reflect.h2" class parse_context; -#line 2211 "reflect.h2" +#line 6973 "reflect.h2" class generation_function_context; -#line 2229 "reflect.h2" +#line 6991 "reflect.h2" class generation_context; -#line 2427 "reflect.h2" +#line 7190 "reflect.h2" class alternative_token; -#line 2442 "reflect.h2" +#line 7205 "reflect.h2" class alternative_token_gen; -#line 2494 "reflect.h2" +#line 7270 "reflect.h2" class any_token; -#line 2512 "reflect.h2" +#line 7287 "reflect.h2" +class atomic_group_token; + +#line 7317 "reflect.h2" class char_token; -#line 2615 "reflect.h2" +#line 7432 "reflect.h2" class class_token; -#line 2830 "reflect.h2" +#line 7656 "reflect.h2" class group_ref_token; -#line 2961 "reflect.h2" +#line 7793 "reflect.h2" class group_token; -#line 3248 "reflect.h2" -class lookahead_token; +#line 8140 "reflect.h2" +class lookahead_lookbehind_token; -#line 3329 "reflect.h2" +#line 8235 "reflect.h2" class range_token; -#line 3477 "reflect.h2" +#line 8392 "reflect.h2" class special_range_token; -#line 3544 "reflect.h2" +#line 8478 "reflect.h2" template class regex_generator; -#line 3791 "reflect.h2" +#line 8750 "reflect.h2" } } @@ -116,38 +223,35 @@ template class regex_generator; #line 1 "reflect.h2" -// Copyright (c) Herb Sutter -// SPDX-License-Identifier: CC-BY-NC-ND-4.0 - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. +// Copyright 2022-2026 Herb Sutter +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +// Part of the Cppfront Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://github.com/hsutter/cppfront/blob/main/LICENSE for license information. //=========================================================================== // Reflection and meta //=========================================================================== -#include "parse.h" -#include "cpp2regex.h" +#line 15 "reflect.h2" using namespace cpp2::regex; -#line 22 "reflect.h2" +#line 17 "reflect.h2" namespace cpp2 { namespace meta { -#line 34 "reflect.h2" +#line 29 "reflect.h2" class compiler_services { -#line 38 "reflect.h2" +#line 33 "reflect.h2" private: std::vector* errors; private: std::set* includes; + private: std::vector* extra_cpp1; + private: std::vector* extra_build; + private: std::string file_name; private: int errors_original_size; private: stable_vector* generated_tokens; private: cpp2::parser parser; @@ -155,97 +259,111 @@ class compiler_services private: std::vector metafunction_args {}; private: bool metafunctions_used {false}; -#line 49 "reflect.h2" - public: explicit compiler_services( - - std::vector* errors_, - std::set* includes_, - stable_vector* generated_tokens_ +#line 47 "reflect.h2" + public: compiler_services( + + cpp2::impl::in*> errors_, + cpp2::impl::in*> includes_, + cpp2::impl::in*> extra_cpp1_, + cpp2::impl::in*> extra_build_, + cpp2::impl::in filename, + cpp2::impl::in*> generated_tokens_ ); -#line 65 "reflect.h2" +#line 69 "reflect.h2" + public: [[nodiscard]] auto filename() const& -> std::string_view; + public: auto set_metafunction_name(cpp2::impl::in name, cpp2::impl::in> args) & -> void; -#line 71 "reflect.h2" +#line 77 "reflect.h2" public: [[nodiscard]] auto get_metafunction_name() const& -> std::string_view; public: [[nodiscard]] auto get_argument(cpp2::impl::in index) & -> std::string; -#line 81 "reflect.h2" +#line 87 "reflect.h2" public: [[nodiscard]] auto get_arguments() & -> std::vector; -#line 86 "reflect.h2" +#line 92 "reflect.h2" public: [[nodiscard]] auto arguments_were_used() const& -> bool; using parse_statement_ret = std::unique_ptr; -#line 88 "reflect.h2" +#line 94 "reflect.h2" protected: [[nodiscard]] auto parse_statement( std::string_view source ) & -> parse_statement_ret; -#line 141 "reflect.h2" - public: [[nodiscard]] auto add_runtime_support_include(cpp2::impl::in s) & -> decltype(auto); +#line 147 "reflect.h2" + public: auto add_runtime_support_include(cpp2::impl::in s, cpp2::impl::in angles = false) & -> void; + +#line 158 "reflect.h2" + public: [[nodiscard]] auto add_extra_cpp1_code(cpp2::impl::in s) & -> decltype(auto); + public: [[nodiscard]] auto add_extra_build_step(cpp2::impl::in s) & -> decltype(auto); public: [[nodiscard]] virtual auto position() const -> source_position; -#line 152 "reflect.h2" +#line 170 "reflect.h2" public: auto require( cpp2::impl::in b, cpp2::impl::in msg ) const& -> void; -#line 163 "reflect.h2" +#line 181 "reflect.h2" public: auto error(cpp2::impl::in msg) const& -> void; -#line 175 "reflect.h2" +#line 193 "reflect.h2" public: auto report_violation(auto const& msg) const& -> void; -#line 183 "reflect.h2" +#line 201 "reflect.h2" public: [[nodiscard]] auto is_active() const& -> decltype(auto); public: virtual ~compiler_services() noexcept; public: compiler_services(compiler_services const& that); +public: compiler_services(compiler_services&& that) noexcept; -#line 184 "reflect.h2" +#line 202 "reflect.h2" }; -#line 233 "reflect.h2" -class declaration_base +#line 212 "reflect.h2" +template class reflection_base : public compiler_services { -#line 237 "reflect.h2" - protected: declaration_node* n; +#line 216 "reflect.h2" + protected: T* n; - protected: explicit declaration_base( + protected: reflection_base( - declaration_node* n_, + cpp2::impl::in n_, cpp2::impl::in s ); -#line 250 "reflect.h2" +#line 229 "reflect.h2" public: [[nodiscard]] auto position() const -> source_position override; public: [[nodiscard]] auto print() const& -> std::string; - public: virtual ~declaration_base() noexcept; -public: declaration_base(declaration_base const& that); -#line 253 "reflect.h2" + public: [[nodiscard]] auto is_same(cpp2::impl::in o) const& -> bool; + public: template [[nodiscard]] auto is_same([[maybe_unused]] reflection_base const& unnamed_param_2) const& -> bool; + public: virtual ~reflection_base() noexcept; +public: reflection_base(reflection_base const& that); +public: reflection_base(reflection_base&& that) noexcept; + +#line 235 "reflect.h2" }; -#line 259 "reflect.h2" +#line 248 "reflect.h2" class declaration -: public declaration_base { +: public reflection_base { -#line 263 "reflect.h2" - public: explicit declaration( +#line 252 "reflect.h2" + public: declaration( - declaration_node* n_, + cpp2::impl::in n_, cpp2::impl::in s ); -#line 272 "reflect.h2" +#line 261 "reflect.h2" public: [[nodiscard]] auto is_public() const& -> bool; public: [[nodiscard]] auto is_protected() const& -> bool; public: [[nodiscard]] auto is_private() const& -> bool; @@ -264,9 +382,11 @@ class declaration public: [[nodiscard]] auto name() const& -> std::string_view; -#line 293 "reflect.h2" +#line 282 "reflect.h2" public: [[nodiscard]] auto has_initializer() const& -> bool; + public: [[nodiscard]] auto get_initializer() const& -> statement; + public: [[nodiscard]] auto is_global() const& -> bool; public: [[nodiscard]] auto is_function() const& -> bool; public: [[nodiscard]] auto is_object() const& -> bool; @@ -285,6 +405,7 @@ class declaration public: [[nodiscard]] auto as_function() const& -> function_declaration; public: [[nodiscard]] auto as_object() const& -> object_declaration; public: [[nodiscard]] auto as_type() const& -> type_declaration; + public: [[nodiscard]] auto as_nonglobal_namespace() const& -> namespace_declaration; public: [[nodiscard]] auto as_alias() const& -> alias_declaration; public: [[nodiscard]] auto get_parent() const& -> declaration; @@ -292,7 +413,7 @@ class declaration public: [[nodiscard]] auto parent_is_function() const& -> bool; public: [[nodiscard]] auto parent_is_object() const& -> bool; public: [[nodiscard]] auto parent_is_type() const& -> bool; - public: [[nodiscard]] auto parent_is_namespace() const& -> bool; + public: [[nodiscard]] auto parent_is_nonglobal_namespace() const& -> bool; public: [[nodiscard]] auto parent_is_alias() const& -> bool; public: [[nodiscard]] auto parent_is_type_alias() const& -> bool; @@ -304,25 +425,28 @@ class declaration public: auto mark_for_removal_from_enclosing_type() & -> void; public: virtual ~declaration() noexcept; public: declaration(declaration const& that); +public: declaration(declaration&& that) noexcept; -#line 335 "reflect.h2" +#line 327 "reflect.h2" }; -#line 341 "reflect.h2" +#line 333 "reflect.h2" class function_declaration : public declaration { -#line 345 "reflect.h2" - public: explicit function_declaration( +#line 337 "reflect.h2" + public: function_declaration( - declaration_node* n_, + cpp2::impl::in n_, cpp2::impl::in s ); -#line 355 "reflect.h2" +#line 347 "reflect.h2" public: [[nodiscard]] auto index_of_parameter_named(cpp2::impl::in s) const& -> int; public: [[nodiscard]] auto has_parameter_named(cpp2::impl::in s) const& -> bool; + public: [[nodiscard]] auto has_return_named(cpp2::impl::in s) const& -> bool; + public: [[nodiscard]] auto has_parameter_or_return_named(cpp2::impl::in s) const& -> bool; public: [[nodiscard]] auto has_in_parameter_named(cpp2::impl::in s) const& -> bool; public: [[nodiscard]] auto has_in_ref_parameter_named(cpp2::impl::in s) const& -> bool; public: [[nodiscard]] auto has_copy_parameter_named(cpp2::impl::in s) const& -> bool; @@ -357,2810 +481,9848 @@ class function_declaration public: [[nodiscard]] auto has_bool_return_type() const& -> bool; public: [[nodiscard]] auto has_non_void_return_type() const& -> bool; - public: [[nodiscard]] auto unnamed_return_type() const& -> std::string; + public: [[nodiscard]] auto has_compound_body() const& -> bool; - public: [[nodiscard]] auto get_parameters() const& -> std::vector; + public: [[nodiscard]] auto get_body() const& -> statement; + public: [[nodiscard]] auto get_compound_body() const& -> compound_statement; + public: [[nodiscard]] auto get_unnamed_return_type() const& -> std::string; + public: [[nodiscard]] auto get_signature() const& -> std::string; -#line 403 "reflect.h2" public: [[nodiscard]] auto is_binary_comparison_function() const& -> bool; + public: [[nodiscard]] auto get_parameters() const& -> std::vector; + +#line 404 "reflect.h2" + public: [[nodiscard]] auto get_returns() const& -> std::vector; + +#line 416 "reflect.h2" public: [[nodiscard]] auto default_to_virtual() & -> decltype(auto); public: [[nodiscard]] auto make_virtual() & -> bool; public: auto add_initializer(cpp2::impl::in source) & -> void; public: function_declaration(function_declaration const& that); +public: function_declaration(function_declaration&& that) noexcept; -#line 426 "reflect.h2" +#line 432 "reflect.h2" }; -#line 432 "reflect.h2" +#line 438 "reflect.h2" class object_declaration : public declaration { -#line 436 "reflect.h2" - public: explicit object_declaration( +#line 442 "reflect.h2" + public: object_declaration( - declaration_node* n_, + cpp2::impl::in n_, cpp2::impl::in s ); -#line 446 "reflect.h2" +#line 452 "reflect.h2" public: [[nodiscard]] auto is_const() const& -> bool; public: [[nodiscard]] auto has_wildcard_type() const& -> bool; public: [[nodiscard]] auto type() const& -> std::string; -#line 456 "reflect.h2" +#line 462 "reflect.h2" public: [[nodiscard]] auto initializer() const& -> std::string; public: object_declaration(object_declaration const& that); +public: object_declaration(object_declaration&& that) noexcept; -#line 462 "reflect.h2" +#line 468 "reflect.h2" }; -#line 468 "reflect.h2" -class type_declaration +#line 474 "reflect.h2" +class type_or_namespace_declaration : public declaration { -#line 472 "reflect.h2" - public: explicit type_declaration( +#line 478 "reflect.h2" + public: type_or_namespace_declaration( - declaration_node* n_, + cpp2::impl::in n_, cpp2::impl::in s ); -#line 482 "reflect.h2" +#line 488 "reflect.h2" public: auto reserve_names(cpp2::impl::in name, auto&& ...etc) const& -> void; -#line 496 "reflect.h2" - public: [[nodiscard]] auto is_polymorphic() const& -> bool; - public: [[nodiscard]] auto is_final() const& -> bool; - public: [[nodiscard]] auto make_final() & -> bool; - +#line 502 "reflect.h2" public: [[nodiscard]] auto get_member_functions() const& -> std::vector; -#line 511 "reflect.h2" +#line 513 "reflect.h2" public: [[nodiscard]] auto get_member_functions_needing_initializer() const& -> std::vector; -#line 526 "reflect.h2" +#line 528 "reflect.h2" public: [[nodiscard]] auto get_member_objects() const& -> std::vector; -#line 536 "reflect.h2" +#line 538 "reflect.h2" public: [[nodiscard]] auto get_member_types() const& -> std::vector; -#line 546 "reflect.h2" +#line 548 "reflect.h2" public: [[nodiscard]] auto get_member_aliases() const& -> std::vector; -#line 556 "reflect.h2" +#line 558 "reflect.h2" public: [[nodiscard]] auto get_members() const& -> std::vector; + +#line 568 "reflect.h2" + public: auto add_member(cpp2::impl::in source) & -> void; + public: type_or_namespace_declaration(type_or_namespace_declaration const& that); +public: type_or_namespace_declaration(type_or_namespace_declaration&& that) noexcept; + + +#line 582 "reflect.h2" +}; + +#line 585 "reflect.h2" +class type_declaration +: public type_or_namespace_declaration { + +#line 589 "reflect.h2" + public: type_declaration( + + cpp2::impl::in n_, + cpp2::impl::in s + ); + +#line 600 "reflect.h2" + public: [[nodiscard]] auto is_polymorphic() const& -> bool; + public: [[nodiscard]] auto is_final() const& -> bool; + public: [[nodiscard]] auto make_final() & -> bool; struct query_declared_value_set_functions_ret { bool out_this_in_that; bool out_this_move_that; bool inout_this_in_that; bool inout_this_move_that; }; -#line 566 "reflect.h2" +#line 604 "reflect.h2" public: [[nodiscard]] auto query_declared_value_set_functions() const& -> query_declared_value_set_functions_ret; -#line 582 "reflect.h2" - public: auto add_member(cpp2::impl::in source) & -> void; +#line 620 "reflect.h2" + public: [[nodiscard]] auto disable_member_function_generation() & -> decltype(auto); + public: [[nodiscard]] auto disable_ref_qualifier_generation() & -> decltype(auto); -#line 596 "reflect.h2" +#line 624 "reflect.h2" public: [[nodiscard]] auto remove_marked_members() & -> decltype(auto); public: [[nodiscard]] auto remove_all_members() & -> decltype(auto); - - public: [[nodiscard]] auto disable_member_function_generation() & -> decltype(auto); public: type_declaration(type_declaration const& that); +public: type_declaration(type_declaration&& that) noexcept; -#line 600 "reflect.h2" +#line 626 "reflect.h2" }; -#line 606 "reflect.h2" -class alias_declaration -: public declaration { +#line 629 "reflect.h2" +class namespace_declaration +: public type_or_namespace_declaration { -#line 610 "reflect.h2" - public: explicit alias_declaration( +#line 633 "reflect.h2" + public: namespace_declaration( - declaration_node* n_, + cpp2::impl::in n_, cpp2::impl::in s ); - public: alias_declaration(alias_declaration const& that); + public: namespace_declaration(namespace_declaration const& that); +public: namespace_declaration(namespace_declaration&& that) noexcept; -#line 619 "reflect.h2" +#line 642 "reflect.h2" }; -#line 634 "reflect.h2" -auto add_virtual_destructor(meta::type_declaration& t) -> void; +#line 648 "reflect.h2" +class alias_declaration +: public declaration { #line 652 "reflect.h2" -auto interface(meta::type_declaration& t) -> void; + public: alias_declaration( -#line 698 "reflect.h2" -auto polymorphic_base(meta::type_declaration& t) -> void; + cpp2::impl::in n_, + cpp2::impl::in s + ); + public: alias_declaration(alias_declaration const& that); +public: alias_declaration(alias_declaration&& that) noexcept; -#line 743 "reflect.h2" -auto ordered_impl( - meta::type_declaration& t, - cpp2::impl::in ordering -) -> void; -#line 772 "reflect.h2" -auto ordered(meta::type_declaration& t) -> void; +#line 661 "reflect.h2" +}; -#line 780 "reflect.h2" -auto weakly_ordered(meta::type_declaration& t) -> void; +#line 667 "reflect.h2" +class parameter_declaration +: public reflection_base { -#line 788 "reflect.h2" -auto partially_ordered(meta::type_declaration& t) -> void; +#line 671 "reflect.h2" + public: parameter_declaration( -#line 810 "reflect.h2" -auto copyable(meta::type_declaration& t) -> void; + cpp2::impl::in n_, + cpp2::impl::in s + ); -#line 843 "reflect.h2" -auto hashable(meta::type_declaration& t) -> void; +#line 680 "reflect.h2" + public: [[nodiscard]] auto get_declaration() const& -> object_declaration; + public: [[nodiscard]] auto get_passing_style() const& -> passing_style; -#line 876 "reflect.h2" -auto basic_value(meta::type_declaration& t) -> void; + public: [[nodiscard]] auto is_implicit() const& -> bool; + public: [[nodiscard]] auto is_virtual() const& -> bool; + public: [[nodiscard]] auto is_override() const& -> bool; + public: [[nodiscard]] auto is_final() const& -> bool; + public: parameter_declaration(parameter_declaration const& that); +public: parameter_declaration(parameter_declaration&& that) noexcept; -#line 904 "reflect.h2" -auto value(meta::type_declaration& t) -> void; +#line 687 "reflect.h2" +}; -#line 910 "reflect.h2" -auto weakly_ordered_value(meta::type_declaration& t) -> void; +#line 700 "reflect.h2" +using multiplicative_expression = binary_expression<"multiplicative",is_as_expression_node>; +using additive_expression = binary_expression<"additive",multiplicative_expression_node>; +using shift_expression = binary_expression<"shift",additive_expression_node>; +using compare_expression = binary_expression<"compare",shift_expression_node>; +using relational_expression = binary_expression<"relational",compare_expression_node>; +using equality_expression = binary_expression<"equality",relational_expression_node>; +using bit_and_expression = binary_expression<"bit-and",equality_expression_node>; +using bit_xor_expression = binary_expression<"bit-xor",bit_and_expression_node>; +using bit_or_expression = binary_expression<"bit-or",bit_xor_expression_node>; +using logical_and_expression = binary_expression<"logical-and",bit_or_expression_node>; +using logical_or_expression = binary_expression<"logical-or",logical_and_expression_node>; +using assignment_expression = binary_expression<"assignment",logical_or_expression_node>; + +template class binary_expression +: public reflection_base> { + +#line 717 "reflect.h2" + public: binary_expression( + + binary_expression_node* const& n_, + cpp2::impl::in s + ); -#line 916 "reflect.h2" -auto partially_ordered_value(meta::type_declaration& t) -> void; +#line 726 "reflect.h2" + public: [[nodiscard]] auto is_fold_expression() const& -> bool; + public: [[nodiscard]] auto lhs_is_id_expression() const& -> bool; + public: [[nodiscard]] auto is_standalone_expression() const& -> bool; + public: [[nodiscard]] auto terms_size() const& -> int; + public: [[nodiscard]] auto is_identifier() const& -> bool; + public: [[nodiscard]] auto is_id_expression() const& -> bool; + public: [[nodiscard]] auto is_unqualified_id() const& -> bool; + public: [[nodiscard]] auto is_expression_list() const& -> bool; + public: [[nodiscard]] auto is_literal() const& -> bool; -#line 945 "reflect.h2" -auto cpp1_rule_of_zero(meta::type_declaration& t) -> void; + public: template class term_t { + private: std::string op; + private: T term; -#line 987 "reflect.h2" -auto cpp2_struct(meta::type_declaration& t) -> void; + public: term_t(auto&& o, auto&& ptr, auto&& cs); -#line 1056 "reflect.h2" -class value_member_info { - public: std::string name; - public: std::string type; - public: std::string value; - public: value_member_info(auto const& name_, auto const& type_, auto const& value_); + public: [[nodiscard]] auto get_op() const& -> std::string; + public: [[nodiscard]] auto get_term() const& -> T; + public: term_t(term_t const& that); -#line 1060 "reflect.h2" -}; +public: auto operator=(term_t const& that) -> term_t& ; +public: term_t(term_t&& that) noexcept; +public: auto operator=(term_t&& that) noexcept -> term_t& ; -auto basic_enum( - meta::type_declaration& t, - auto const& nextval, - cpp2::impl::in bitwise - ) -> void; +#line 744 "reflect.h2" + }; -#line 1326 "reflect.h2" -auto cpp2_enum(meta::type_declaration& t) -> void; + public: [[nodiscard]] auto get_terms() const& -> auto; -#line 1353 "reflect.h2" -auto flag_enum(meta::type_declaration& t) -> void; +#line 821 "reflect.h2" + public: [[nodiscard]] auto as_expression_list() const& -> expression_list; + public: [[nodiscard]] auto as_literal() const& -> std::string; -#line 1399 "reflect.h2" -auto cpp2_union(meta::type_declaration& t) -> void; +#line 825 "reflect.h2" + public: [[nodiscard]] auto get_if_only_a_postfix_expression() const& -> postfix_expression; -#line 1550 "reflect.h2" -auto print(cpp2::impl::in t) -> void; + public: [[nodiscard]] auto get_lhs_postfix_expression() const& -> postfix_expression; -#line 1570 "reflect.h2" -using error_func = std::function x)>; + public: [[nodiscard]] auto get_second_postfix_expression() const& -> postfix_expression; -#line 1574 "reflect.h2" -class expression_flags - { -private: cpp2::u8 _value; private: constexpr expression_flags(cpp2::impl::in _val); + public: [[nodiscard]] auto is_result_a_temporary_variable() const& -> bool; -private: constexpr auto operator=(cpp2::impl::in _val) -> expression_flags& ; -public: constexpr auto operator|=(expression_flags const& that) & -> decltype(auto); -public: constexpr auto operator&=(expression_flags const& that) & -> decltype(auto); -public: constexpr auto operator^=(expression_flags const& that) & -> decltype(auto); -public: [[nodiscard]] constexpr auto operator|(expression_flags const& that) const& -> expression_flags; -public: [[nodiscard]] constexpr auto operator&(expression_flags const& that) const& -> expression_flags; -public: [[nodiscard]] constexpr auto operator^(expression_flags const& that) const& -> expression_flags; -public: [[nodiscard]] constexpr auto has(expression_flags const& that) const& -> bool; -public: constexpr auto set(expression_flags const& that) & -> void; -public: constexpr auto clear(expression_flags const& that) & -> void; -public: static const expression_flags case_insensitive; -public: static const expression_flags multiple_lines; -public: static const expression_flags single_line; -public: static const expression_flags no_group_captures; -public: static const expression_flags perl_code_syntax; -public: static const expression_flags perl_code_syntax_in_classes; -public: static const expression_flags none; -public: [[nodiscard]] constexpr auto get_raw_value() const& -> cpp2::u8; -public: constexpr explicit expression_flags(); -public: constexpr expression_flags(expression_flags const& that); -public: constexpr auto operator=(expression_flags const& that) -> expression_flags& ; -public: constexpr expression_flags(expression_flags&& that) noexcept; -public: constexpr auto operator=(expression_flags&& that) noexcept -> expression_flags& ; -public: [[nodiscard]] auto operator<=>(expression_flags const& that) const& -> std::strong_ordering = default; -public: [[nodiscard]] auto to_string_impl(cpp2::impl::in prefix, cpp2::impl::in separator) const& -> std::string; -public: [[nodiscard]] auto to_string() const& -> std::string; -public: [[nodiscard]] auto to_code() const& -> std::string; -public: [[nodiscard]] static auto from_string(cpp2::impl::in s) -> expression_flags; -public: [[nodiscard]] static auto from_code(cpp2::impl::in s) -> expression_flags; + public: [[nodiscard]] auto to_string() const& -> std::string; + public: binary_expression(binary_expression const& that); +public: binary_expression(binary_expression&& that) noexcept; -#line 1582 "reflect.h2" +#line 834 "reflect.h2" }; -#line 1590 "reflect.h2" -class regex_token - { - public: std::string string_rep; +#line 840 "reflect.h2" +class expression_list +: public reflection_base { - public: explicit regex_token(cpp2::impl::in str); +#line 844 "reflect.h2" + public: expression_list( -#line 1598 "reflect.h2" - public: explicit regex_token(); + cpp2::impl::in n_, + cpp2::impl::in s + ); -#line 1603 "reflect.h2" - public: virtual auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void = 0; +#line 853 "reflect.h2" + public: [[nodiscard]] auto is_empty() const& -> bool; + public: [[nodiscard]] auto is_fold_expression() const& -> bool; - public: virtual auto add_groups([[maybe_unused]] std::set& unnamed_param_2) const -> void; - public: [[nodiscard]] auto to_string() const& -> std::string; - public: auto set_string(cpp2::impl::in s) & -> void; - public: virtual ~regex_token() noexcept; + public: [[nodiscard]] auto get_expressions() const& -> std::vector; - public: regex_token(regex_token const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(regex_token const&) -> void = delete; +#line 866 "reflect.h2" + public: [[nodiscard]] auto to_string() const& -> std::string; + public: expression_list(expression_list const& that); +public: expression_list(expression_list&& that) noexcept; -#line 1608 "reflect.h2" +#line 867 "reflect.h2" }; -using token_ptr = std::shared_ptr; -using token_vec = std::vector; +#line 873 "reflect.h2" +class prefix_expression +: public reflection_base { -#line 1614 "reflect.h2" -// Adds a check in code generation. -// -class regex_token_check -: public regex_token { +#line 877 "reflect.h2" + public: prefix_expression( -#line 1620 "reflect.h2" - private: std::string check; + cpp2::impl::in n_, + cpp2::impl::in s + ); - public: explicit regex_token_check(cpp2::impl::in str, cpp2::impl::in check_); +#line 886 "reflect.h2" + public: [[nodiscard]] auto get_ops() const& -> std::vector; -#line 1627 "reflect.h2" - public: auto generate_code(generation_context& ctx) const -> void override; - public: virtual ~regex_token_check() noexcept; +#line 894 "reflect.h2" + public: [[nodiscard]] auto get_postfix_expression() const& -> postfix_expression; - public: regex_token_check(regex_token_check const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(regex_token_check const&) -> void = delete; + public: [[nodiscard]] auto is_fold_expression() const& -> bool; + public: [[nodiscard]] auto is_identifier() const& -> bool; + public: [[nodiscard]] auto is_id_expression() const& -> bool; + public: [[nodiscard]] auto is_unqualified_id() const& -> bool; + public: [[nodiscard]] auto is_expression_list() const& -> bool; + public: [[nodiscard]] auto is_literal() const& -> bool; + public: [[nodiscard]] auto is_result_a_temporary_variable() const& -> bool; + public: [[nodiscard]] auto as_expression_list() const& -> expression_list; + public: [[nodiscard]] auto as_literal() const& -> std::string; + public: [[nodiscard]] auto as_identifier() const& -> std::string; -#line 1630 "reflect.h2" + public: [[nodiscard]] auto to_string() const& -> std::string; + public: virtual ~prefix_expression() noexcept; +public: prefix_expression(prefix_expression const& that); +public: prefix_expression(prefix_expression&& that) noexcept; + +#line 909 "reflect.h2" }; -#line 1633 "reflect.h2" -// Adds code in code generation. -// -class regex_token_code -: public regex_token { +#line 915 "reflect.h2" +class postfix_expression +: public reflection_base { -#line 1639 "reflect.h2" - private: std::string code; +#line 919 "reflect.h2" + public: postfix_expression( - public: explicit regex_token_code(cpp2::impl::in str, cpp2::impl::in code_); + cpp2::impl::in n_, + cpp2::impl::in s + ); -#line 1646 "reflect.h2" - public: auto generate_code(generation_context& ctx) const -> void override; - public: virtual ~regex_token_code() noexcept; +#line 928 "reflect.h2" + public: [[nodiscard]] auto get_primary_expression() const& -> primary_expression; - public: regex_token_code(regex_token_code const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(regex_token_code const&) -> void = delete; + public: class term_t { + private: postfix_expression_node::term const* term_; + private: compiler_services const* cs_; + public: term_t(auto&& term, auto&& cs); -#line 1649 "reflect.h2" -}; + public: [[nodiscard]] auto get_op() const& -> std::string_view; -#line 1652 "reflect.h2" -// Token that does not influence the matching. E.g. comment. -// -class regex_token_empty -: public regex_token { +#line 944 "reflect.h2" + public: [[nodiscard]] auto is_id_expression() const& -> bool; + public: [[nodiscard]] auto is_expression_list() const& -> bool; + public: [[nodiscard]] auto is_expression() const& -> bool; -#line 1658 "reflect.h2" - public: explicit regex_token_empty(cpp2::impl::in str); + public: [[nodiscard]] auto get_id_expression() const& -> id_expression; + public: [[nodiscard]] auto get_expression_list() const& -> expression_list; + public: [[nodiscard]] auto get_expression() const& -> expression; + public: term_t(term_t const& that); +public: term_t(term_t&& that) noexcept; -#line 1662 "reflect.h2" - public: auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void override; - public: virtual ~regex_token_empty() noexcept; +#line 951 "reflect.h2" + }; - public: regex_token_empty(regex_token_empty const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(regex_token_empty const&) -> void = delete; + public: [[nodiscard]] auto get_terms() const& -> auto; +#line 959 "reflect.h2" + public: [[nodiscard]] auto is_fold_expression() const& -> bool; + public: [[nodiscard]] auto is_identifier() const& -> bool; + public: [[nodiscard]] auto is_id_expression() const& -> bool; + public: [[nodiscard]] auto is_unqualified_id() const& -> bool; + public: [[nodiscard]] auto is_expression_list() const& -> bool; + public: [[nodiscard]] auto is_literal() const& -> bool; -#line 1665 "reflect.h2" -}; + public: [[nodiscard]] auto as_identifier() const& -> std::string; + public: [[nodiscard]] auto as_expression_list() const& -> expression_list; + public: [[nodiscard]] auto as_literal() const& -> std::string; -#line 1668 "reflect.h2" -// Represents a list of regex tokens as one token. -// -class regex_token_list -: public regex_token { + public: [[nodiscard]] auto get_first_token_ignoring_this() const& -> std::string_view; -#line 1674 "reflect.h2" - public: token_vec tokens; +#line 976 "reflect.h2" + public: [[nodiscard]] auto starts_with_function_call_with_num_parameters(cpp2::impl::in num) const& -> bool; + public: [[nodiscard]] auto is_result_a_temporary_variable() const& -> bool; - public: explicit regex_token_list(cpp2::impl::in t); + public: [[nodiscard]] auto to_string() const& -> std::string; + public: postfix_expression(postfix_expression const& that); +public: postfix_expression(postfix_expression&& that) noexcept; -#line 1681 "reflect.h2" - public: auto generate_code(generation_context& ctx) const -> void override; +#line 980 "reflect.h2" +}; -#line 1687 "reflect.h2" - public: auto add_groups(std::set& groups) const -> void override; +#line 986 "reflect.h2" +class template_arg +: public reflection_base { -#line 1693 "reflect.h2" - public: [[nodiscard]] static auto gen_string(cpp2::impl::in vec) -> std::string; - public: virtual ~regex_token_list() noexcept; +#line 990 "reflect.h2" + public: template_arg( - public: regex_token_list(regex_token_list const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(regex_token_list const&) -> void = delete; + cpp2::impl::in n_, + cpp2::impl::in s + ); +#line 999 "reflect.h2" + public: [[nodiscard]] auto is_expression() const& -> bool; + public: [[nodiscard]] auto is_type_id() const& -> bool; -#line 1700 "reflect.h2" -}; + public: [[nodiscard]] auto as_expression() const& -> expression; + public: [[nodiscard]] auto as_type_id() const& -> type_id; -#line 1703 "reflect.h2" -// -// Parse and generation context. -// + public: [[nodiscard]] auto to_string() const& -> std::string; + public: template_arg(template_arg const& that); +public: template_arg(template_arg&& that) noexcept; -// State of the current capturing group. See '()' -// -class parse_context_group_state - { - public: token_vec cur_match_list {}; // Current list of matchers. - public: token_vec alternate_match_lists {}; // List of alternate matcher lists. E.g. ab|cd|xy. - public: expression_flags modifiers {}; // Current modifiers for the group/regular expression. +#line 1006 "reflect.h2" +}; - // Start a new alternative. - public: auto next_alternative() & -> void; +#line 1012 "reflect.h2" +class unqualified_id +: public reflection_base { -#line 1723 "reflect.h2" - // Swap this state with the other one. NOLINTNEXTLINE(performance-noexcept-swap) - public: auto swap(parse_context_group_state& t) & -> void; +#line 1016 "reflect.h2" + public: unqualified_id( -#line 1730 "reflect.h2" - // Convert this state into a regex token. - public: [[nodiscard]] auto get_as_token() & -> token_ptr; + cpp2::impl::in n_, + cpp2::impl::in s + ); -#line 1742 "reflect.h2" - // Add a token to the current matcher list. - public: auto add(cpp2::impl::in token) & -> void; +#line 1025 "reflect.h2" + public: [[nodiscard]] auto is_identifier() const& -> bool; -#line 1747 "reflect.h2" - // True if current matcher list is empty. - public: [[nodiscard]] auto empty() const& -> bool; + public: [[nodiscard]] auto get_identifier() const& -> std::string; -#line 1751 "reflect.h2" - // Apply optimizations to the matcher list. - public: static auto post_process_list(token_vec& list) -> void; - public: parse_context_group_state(auto const& cur_match_list_, auto const& alternate_match_lists_, auto const& modifiers_); -public: parse_context_group_state(); +#line 1035 "reflect.h2" + public: [[nodiscard]] auto as_token() const& -> std::string; + public: [[nodiscard]] auto to_string() const& -> std::string; + public: unqualified_id(unqualified_id const& that); +public: unqualified_id(unqualified_id&& that) noexcept; -#line 1765 "reflect.h2" +#line 1038 "reflect.h2" }; -#line 1768 "reflect.h2" -// State for the branch reset. Takes care of the group numbering. See '(|)'. -// -class parse_context_branch_reset_state - { - public: bool is_active {false}; // If we have a branch reset group. - public: int cur_group {1}; // Next group identifier. 0 == global capture group. - public: int max_group {1}; // Maximum group identifier generated. - public: int from {1}; // Starting identifier on new alternative branch. +#line 1044 "reflect.h2" +class qualified_id +: public reflection_base { - // Next group identifier. - public: [[nodiscard]] auto next() & -> int; +#line 1048 "reflect.h2" + public: qualified_id( -#line 1786 "reflect.h2" - // Set next group identifier. - public: auto set_next(cpp2::impl::in g) & -> void; + cpp2::impl::in n_, + cpp2::impl::in s + ); -#line 1792 "reflect.h2" - // Start a new alternative branch. - public: auto next_alternative() & -> void; +#line 1057 "reflect.h2" + public: class term_t { + private: std::string op; + private: unqualified_id unqualified; -#line 1799 "reflect.h2" - // Initialize for a branch reset group. - public: auto set_active_reset(cpp2::impl::in restart) & -> void; - public: parse_context_branch_reset_state(auto const& is_active_, auto const& cur_group_, auto const& max_group_, auto const& from_); -public: parse_context_branch_reset_state(); + public: term_t(auto&& o, auto&& ptr, auto&& cs); + public: [[nodiscard]] auto get_op() const& -> std::string; + public: [[nodiscard]] auto get_unqualified() const& -> unqualified_id; + public: term_t(term_t const& that); +public: term_t(term_t&& that) noexcept; -#line 1806 "reflect.h2" +#line 1065 "reflect.h2" + }; + + public: [[nodiscard]] auto get_terms() const& -> auto; + +#line 1079 "reflect.h2" + public: [[nodiscard]] auto as_token() const& -> std::string; + + public: [[nodiscard]] auto to_string() const& -> std::string; + public: qualified_id(qualified_id const& that); +public: qualified_id(qualified_id&& that) noexcept; + +#line 1082 "reflect.h2" }; -#line 1809 "reflect.h2" -// Context during parsing of the regular expressions. -// -// Keeps track of the distributed group identifiers, current parsed group and branch resets. -// -class parse_context - { - private: std::string_view regex; // Regular expression string. - private: size_t pos {0}; // Current parsing position. - private: token_ptr root; // Token representing the regular expression. +#line 1088 "reflect.h2" +class type_id +: public reflection_base { - private: parse_context_group_state cur_group_state {}; - private: parse_context_branch_reset_state cur_branch_reset_state {}; +#line 1092 "reflect.h2" + public: type_id( -#line 1823 "reflect.h2" - public: std::map named_groups {}; + cpp2::impl::in n_, + cpp2::impl::in s + ); - private: error_func error_out; // TODO: Declaring std::function fails for cpp2. - private: bool has_error {false}; +#line 1107 "reflect.h2" + public: [[nodiscard]] auto is_postfix_expression() const& -> bool; + public: [[nodiscard]] auto is_qualified_id() const& -> bool; + public: [[nodiscard]] auto is_unqualified_id() const& -> bool; + public: [[nodiscard]] auto is_function_typeid() const& -> bool; + public: [[nodiscard]] auto is_keyword() const& -> bool; + public: [[nodiscard]] auto is_wildcard() const& -> bool; + public: [[nodiscard]] auto is_pointer_qualified() const& -> bool; + public: [[nodiscard]] auto is_concept() const& -> bool; - public: explicit parse_context(cpp2::impl::in r, auto const& e); + public: [[nodiscard]] auto as_postfix_expression() const& -> postfix_expression; + public: [[nodiscard]] auto as_qualified_id() const& -> qualified_id; + public: [[nodiscard]] auto as_unqualified_id() const& -> unqualified_id; -#line 1834 "reflect.h2" - // State management functions - // +#line 1121 "reflect.h2" + public: [[nodiscard]] auto as_keyword() const& -> std::string; + public: [[nodiscard]] auto as_token() const& -> std::string; - // Returned group state needs to be stored and provided in `end_group`. - public: [[nodiscard]] auto start_group() & -> parse_context_group_state; + public: [[nodiscard]] auto to_string() const& -> std::string; + public: type_id(type_id const& that); +public: type_id(type_id&& that) noexcept; -#line 1847 "reflect.h2" - // `old_state` argument needs to be from start group. - public: [[nodiscard]] auto end_group(cpp2::impl::in old_state) & -> token_ptr; +#line 1125 "reflect.h2" +}; -#line 1855 "reflect.h2" - public: [[nodiscard]] auto get_modifiers() const& -> expression_flags; +#line 1131 "reflect.h2" +class primary_expression +: public reflection_base { -#line 1859 "reflect.h2" - public: auto set_modifiers(cpp2::impl::in mod) & -> void; +#line 1135 "reflect.h2" + public: primary_expression( -#line 1863 "reflect.h2" - // Branch reset management functions - // + cpp2::impl::in n_, + cpp2::impl::in s + ); - public: [[nodiscard]] auto branch_reset_new_state() & -> parse_context_branch_reset_state; +#line 1150 "reflect.h2" + public: [[nodiscard]] auto is_fold_expression() const& -> bool; + public: [[nodiscard]] auto is_identifier() const& -> bool; + public: [[nodiscard]] auto is_id_expression() const& -> bool; + public: [[nodiscard]] auto is_unqualified_id() const& -> bool; + public: [[nodiscard]] auto is_expression_list() const& -> bool; + public: [[nodiscard]] auto is_literal() const& -> bool; + public: [[nodiscard]] auto is_declaration() const& -> bool; -#line 1875 "reflect.h2" - public: auto branch_reset_restore_state(cpp2::impl::in old_state) & -> void; + public: [[nodiscard]] auto as_identifier() const& -> std::string; + public: [[nodiscard]] auto as_expression_list() const& -> expression_list; + public: [[nodiscard]] auto as_literal() const& -> std::string; + public: [[nodiscard]] auto as_declaration() const& -> declaration; -#line 1882 "reflect.h2" - public: auto next_alternative() & -> void; + public: [[nodiscard]] auto to_string() const& -> std::string; + public: primary_expression(primary_expression const& that); +public: primary_expression(primary_expression&& that) noexcept; -#line 1888 "reflect.h2" - // Regex token management - // - public: auto add_token(cpp2::impl::in token) & -> void; +#line 1164 "reflect.h2" +}; -#line 1894 "reflect.h2" - public: [[nodiscard]] auto has_token() const& -> bool; +#line 1170 "reflect.h2" +class id_expression +: public reflection_base { -#line 1898 "reflect.h2" - public: [[nodiscard]] auto pop_token() & -> token_ptr; +#line 1174 "reflect.h2" + public: id_expression( -#line 1909 "reflect.h2" - public: [[nodiscard]] auto get_as_token() & -> token_ptr; + cpp2::impl::in n_, + cpp2::impl::in s + ); -#line 1913 "reflect.h2" - // Group management - // - public: [[nodiscard]] auto get_cur_group() const& -> int; +#line 1189 "reflect.h2" + public: [[nodiscard]] auto is_fold_expression() const& -> bool; + public: [[nodiscard]] auto is_empty() const& -> bool; + public: [[nodiscard]] auto is_identifier() const& -> bool; + public: [[nodiscard]] auto is_qualified() const& -> bool; + public: [[nodiscard]] auto is_unqualified() const& -> bool; -#line 1919 "reflect.h2" - public: [[nodiscard]] auto next_group() & -> int; + public: [[nodiscard]] auto as_identifier() const& -> std::string; + public: [[nodiscard]] auto as_qualified() const& -> qualified_id; + public: [[nodiscard]] auto as_unqualified() const& -> unqualified_id; -#line 1923 "reflect.h2" - public: auto set_named_group(cpp2::impl::in name, cpp2::impl::in id) & -> void; + public: [[nodiscard]] auto to_string() const& -> std::string; + public: virtual ~id_expression() noexcept; +public: id_expression(id_expression const& that); +public: id_expression(id_expression&& that) noexcept; -#line 1930 "reflect.h2" - public: [[nodiscard]] auto get_named_group(cpp2::impl::in name) const& -> int; +#line 1200 "reflect.h2" +}; -#line 1941 "reflect.h2" - // Position management functions - // - public: [[nodiscard]] auto current() const& -> char; +#line 1206 "reflect.h2" +class expression +: public reflection_base { - // Get the next token in the regex, skipping spaces according to the parameters. See `x` and `xx` modifiers. - private: [[nodiscard]] auto get_next_position(cpp2::impl::in in_class, cpp2::impl::in no_skip) const& -> size_t; +#line 1210 "reflect.h2" + public: expression( -#line 1985 "reflect.h2" - // Return true if next token is available. - private: [[nodiscard]] auto next_impl(cpp2::impl::in in_class, cpp2::impl::in no_skip) & -> bool; + cpp2::impl::in n_, + cpp2::impl::in s + ); -#line 1997 "reflect.h2" - public: [[nodiscard]] auto next() & -> decltype(auto); - public: [[nodiscard]] auto next_in_class() & -> decltype(auto); - public: [[nodiscard]] auto next_no_skip() & -> decltype(auto); +#line 1219 "reflect.h2" + public: [[nodiscard]] auto is_fold_expression() const& -> bool; + public: [[nodiscard]] auto is_standalone_expression() const& -> bool; + public: [[nodiscard]] auto subexpression_count() const& -> int; + public: [[nodiscard]] auto is_identifier() const& -> bool; + public: [[nodiscard]] auto is_id_expression() const& -> bool; + public: [[nodiscard]] auto is_unqualified_id() const& -> bool; + public: [[nodiscard]] auto is_expression_list() const& -> bool; + public: [[nodiscard]] auto is_empty_expression_list() const& -> bool; + public: [[nodiscard]] auto is_literal() const& -> bool; + public: [[nodiscard]] auto is_assignment_expression() const& -> bool; - public: [[nodiscard]] auto next_n(cpp2::impl::in n) & -> bool; + public: [[nodiscard]] auto is_simple_assignment() const& -> bool; +struct get_lhs_rhs_if_simple_assignment_ret { postfix_expression lhs; logical_or_expression rhs; }; -#line 2010 "reflect.h2" - public: [[nodiscard]] auto has_next() const& -> bool; - private: [[nodiscard]] auto grab_until_impl(cpp2::impl::in e, cpp2::impl::out r, cpp2::impl::in any) & -> bool; -#line 2033 "reflect.h2" - public: [[nodiscard]] auto grab_until(cpp2::impl::in e, cpp2::impl::out r) & -> decltype(auto); - public: [[nodiscard]] auto grab_until(cpp2::impl::in e, cpp2::impl::out r) & -> decltype(auto); - public: [[nodiscard]] auto grab_until_one_of(cpp2::impl::in e, cpp2::impl::out r) & -> decltype(auto); +#line 1235 "reflect.h2" + public: [[nodiscard]] auto get_lhs_rhs_if_simple_assignment() const& -> get_lhs_rhs_if_simple_assignment_ret; - public: [[nodiscard]] auto grab_n(cpp2::impl::in n, cpp2::impl::out r) & -> bool; +#line 1246 "reflect.h2" + public: [[nodiscard]] auto as_assignment_expression() const& -> assignment_expression; + public: [[nodiscard]] auto as_expression_list() const& -> expression_list; + public: [[nodiscard]] auto as_literal() const& -> std::string; -#line 2050 "reflect.h2" - public: [[nodiscard]] auto grab_number() & -> std::string; + public: [[nodiscard]] auto to_string() const& -> std::string; + public: virtual ~expression() noexcept; +public: expression(expression const& that); +public: expression(expression&& that) noexcept; -#line 2071 "reflect.h2" - private: [[nodiscard]] auto peek_impl(cpp2::impl::in in_class) const& -> char; +#line 1251 "reflect.h2" +}; -#line 2081 "reflect.h2" - public: [[nodiscard]] auto peek() const& -> decltype(auto); - public: [[nodiscard]] auto peek_in_class() const& -> decltype(auto); +#line 1257 "reflect.h2" +class is_as_expression +: public reflection_base { -#line 2085 "reflect.h2" - // Parsing functions - // - public: [[nodiscard]] auto parser_group_modifiers(cpp2::impl::in change_str, expression_flags& parser_modifiers) & -> bool; +#line 1261 "reflect.h2" + public: is_as_expression( -#line 2141 "reflect.h2" - public: [[nodiscard]] auto parse_until(cpp2::impl::in term) & -> bool; + cpp2::impl::in n_, + cpp2::impl::in s + ); -#line 2179 "reflect.h2" - public: [[nodiscard]] auto parse(cpp2::impl::in modifiers) & -> bool; +#line 1270 "reflect.h2" + public: class term_t { + private: std::string op; + private: expression expr; -#line 2194 "reflect.h2" - // Misc functions + public: term_t(auto&& o, auto&& ptr, auto&& cs); - public: [[nodiscard]] auto get_pos() const& -> decltype(auto); - public: [[nodiscard]] auto get_range(cpp2::impl::in start, cpp2::impl::in end) const& -> decltype(auto); - public: [[nodiscard]] auto valid() const& -> bool; + public: [[nodiscard]] auto get_op() const& -> std::string; + public: [[nodiscard]] auto get_expr() const& -> expression; + public: term_t(term_t const& that); +public: term_t(term_t&& that) noexcept; - public: [[nodiscard]] auto error(cpp2::impl::in err) & -> token_ptr; - public: parse_context(parse_context const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(parse_context const&) -> void = delete; +#line 1278 "reflect.h2" + }; + public: [[nodiscard]] auto get_expression() const& -> prefix_expression; -#line 2205 "reflect.h2" -}; + public: [[nodiscard]] auto get_terms() const& -> auto; -#line 2208 "reflect.h2" -// Context for one function generation. Generation of functions can be interleaved, -// therefore we buffer the code for one function here. -// -class generation_function_context { - public: std::string code {""}; - public: std::string tabs {""}; +#line 1288 "reflect.h2" + public: [[nodiscard]] auto is_fold_expression() const& -> bool; + public: [[nodiscard]] auto is_identifier() const& -> bool; + public: [[nodiscard]] auto is_id_expression() const& -> bool; + public: [[nodiscard]] auto is_unqualified_id() const& -> bool; + public: [[nodiscard]] auto is_expression_list() const& -> bool; + public: [[nodiscard]] auto is_literal() const& -> bool; - public: auto add_tabs(cpp2::impl::in c) & -> void; + public: [[nodiscard]] auto as_expression_list() const& -> expression_list; + public: [[nodiscard]] auto as_literal() const& -> std::string; -#line 2222 "reflect.h2" - public: auto remove_tabs(cpp2::impl::in c) & -> void; - public: generation_function_context(auto const& code_, auto const& tabs_); -public: generation_function_context(); + public: [[nodiscard]] auto get_identifier() const& -> std::string_view; +#line 1304 "reflect.h2" + public: [[nodiscard]] auto to_string() const& -> std::string; + public: virtual ~is_as_expression() noexcept; +public: is_as_expression(is_as_expression const& that); +public: is_as_expression(is_as_expression&& that) noexcept; -#line 2225 "reflect.h2" +#line 1305 "reflect.h2" }; -#line 2228 "reflect.h2" -// Context for generating the state machine. -class generation_context - { - private: std::vector gen_stack {1}; // Element 0 contains all the code. - - private: int matcher_func {0}; - private: int reset_func {0}; - private: int temp_name {0}; - private: std::string entry_func {""}; +#line 1318 "reflect.h2" +class statement +: public reflection_base { - // Generation helpers - // - public: [[nodiscard]] auto match_parameters() const& -> std::string; +#line 1322 "reflect.h2" + public: statement( - // Code generation. + cpp2::impl::in n_, + cpp2::impl::in s + ); - // Add code line. - public: auto add(cpp2::impl::in s) & -> void; +#line 1331 "reflect.h2" + public: [[nodiscard]] auto get_parameters() const& -> std::vector; + +#line 1341 "reflect.h2" + public: [[nodiscard]] auto is_expression_statement() const& -> bool; + public: [[nodiscard]] auto is_compound_statement() const& -> bool; + public: [[nodiscard]] auto is_selection_statement() const& -> bool; + public: [[nodiscard]] auto is_declaration() const& -> bool; + public: [[nodiscard]] auto is_return_statement() const& -> bool; + public: [[nodiscard]] auto is_iteration_statement() const& -> bool; + public: [[nodiscard]] auto is_using_statement() const& -> bool; + public: [[nodiscard]] auto is_contract() const& -> bool; + public: [[nodiscard]] auto is_inspect_expression() const& -> bool; + public: [[nodiscard]] auto is_jump_statement() const& -> bool; + + public: [[nodiscard]] auto as_expression_statement() const& -> expression_statement; + public: [[nodiscard]] auto as_compound_statement() const& -> compound_statement; + public: [[nodiscard]] auto as_selection_statement() const& -> selection_statement; + public: [[nodiscard]] auto as_declaration() const& -> declaration; + public: [[nodiscard]] auto as_return_statement() const& -> return_statement; + public: [[nodiscard]] auto as_iteration_statement() const& -> iteration_statement; + +#line 1363 "reflect.h2" + public: [[nodiscard]] auto to_string() const& -> std::string; + public: virtual ~statement() noexcept; +public: statement(statement const& that); +public: statement(statement&& that) noexcept; -#line 2250 "reflect.h2" - // Add check for token. The check needs to be a function call that returns a boolean. - public: auto add_check(cpp2::impl::in check) & -> void; +#line 1364 "reflect.h2" +}; -#line 2256 "reflect.h2" - // Add a stateful check. The check needs to return a `match_return`. - public: auto add_statefull(cpp2::impl::in next_func, cpp2::impl::in check) & -> void; +#line 1370 "reflect.h2" +class expression_statement +: public reflection_base { -#line 2265 "reflect.h2" - protected: auto start_func_named(cpp2::impl::in name) & -> void; +#line 1374 "reflect.h2" + public: expression_statement( -#line 2276 "reflect.h2" - protected: [[nodiscard]] auto start_func() & -> std::string; + cpp2::impl::in n_, + cpp2::impl::in s + ); -#line 2283 "reflect.h2" - protected: auto end_func_statefull(cpp2::impl::in s) & -> void; +#line 1383 "reflect.h2" + public: [[nodiscard]] auto get_expression() const& -> expression; -#line 2302 "reflect.h2" - // Generate the function for a token. - public: [[nodiscard]] auto generate_func(cpp2::impl::in token) & -> std::string; + public: [[nodiscard]] auto to_string() const& -> std::string; + public: expression_statement(expression_statement const& that); +public: expression_statement(expression_statement&& that) noexcept; -#line 2312 "reflect.h2" - // Generate the reset for a list of group identifiers. - public: [[nodiscard]] auto generate_reset(cpp2::impl::in> groups) & -> std::string; +#line 1386 "reflect.h2" +}; -#line 2335 "reflect.h2" - // Name generation - // - protected: [[nodiscard]] auto gen_func_name() & -> std::string; +#line 1392 "reflect.h2" +class compound_statement +: public reflection_base { -#line 2343 "reflect.h2" - public: [[nodiscard]] auto next_func_name() & -> std::string; +#line 1396 "reflect.h2" + public: compound_statement( -#line 2347 "reflect.h2" - protected: [[nodiscard]] auto gen_reset_func_name() & -> std::string; + cpp2::impl::in n_, + cpp2::impl::in s + ); -#line 2353 "reflect.h2" - public: [[nodiscard]] auto gen_temp() & -> std::string; +#line 1405 "reflect.h2" + public: [[nodiscard]] auto get_statements() const& -> std::vector; -#line 2359 "reflect.h2" - // Context management - // - public: [[nodiscard]] auto new_context() & -> generation_function_context*; +#line 1415 "reflect.h2" + public: auto add_statement(cpp2::impl::in source, cpp2::impl::in before_position = 0) & -> void; + public: compound_statement(compound_statement const& that); +public: compound_statement(compound_statement&& that) noexcept; -#line 2369 "reflect.h2" - public: auto finish_context() & -> void; -#line 2377 "reflect.h2" - // Misc functions - // - private: [[nodiscard]] auto get_current() & -> generation_function_context*; +#line 1425 "reflect.h2" +}; -#line 2383 "reflect.h2" - private: [[nodiscard]] auto get_base() & -> generation_function_context*; +#line 1431 "reflect.h2" +class selection_statement +: public reflection_base { -#line 2387 "reflect.h2" - public: [[nodiscard]] auto get_entry_func() const& -> std::string; +#line 1435 "reflect.h2" + public: selection_statement( -#line 2391 "reflect.h2" - public: [[nodiscard]] auto create_named_group_lookup(cpp2::impl::in> named_groups) const& -> std::string; + cpp2::impl::in n_, + cpp2::impl::in s + ); -#line 2415 "reflect.h2" - // Run the generation for the token. - public: [[nodiscard]] auto run(cpp2::impl::in token) & -> std::string; - public: generation_context() = default; - public: generation_context(generation_context const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(generation_context const&) -> void = delete; +#line 1444 "reflect.h2" + public: [[nodiscard]] auto has_false_branch_in_source_code() const& -> bool; + public: [[nodiscard]] auto has_false_branch() const& -> bool; + public: [[nodiscard]] auto get_identifier() const& -> std::string_view; + public: [[nodiscard]] auto get_expression() const& -> logical_or_expression; + public: [[nodiscard]] auto get_true_branch() const& -> compound_statement; + public: [[nodiscard]] auto get_false_branch() const& -> compound_statement; + public: selection_statement(selection_statement const& that); +public: selection_statement(selection_statement&& that) noexcept; -#line 2421 "reflect.h2" +#line 1451 "reflect.h2" }; -// Regex syntax: | Example: ab|ba -// -// Non greedy implementation. First alternative that matches is chosen. -// -class alternative_token -: public regex_token_empty { - // No code gen here. alternative_token_gen is created in the parse_context +#line 1457 "reflect.h2" +class return_statement +: public reflection_base { - public: explicit alternative_token(); +#line 1461 "reflect.h2" + public: return_statement( - public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr; - public: virtual ~alternative_token() noexcept; + cpp2::impl::in n_, + cpp2::impl::in s + ); - public: alternative_token(alternative_token const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(alternative_token const&) -> void = delete; +#line 1470 "reflect.h2" + public: [[nodiscard]] auto has_expression() const& -> bool; + public: [[nodiscard]] auto get_expression() const& -> expression; + public: return_statement(return_statement const& that); +public: return_statement(return_statement&& that) noexcept; -#line 2440 "reflect.h2" +#line 1473 "reflect.h2" }; -class alternative_token_gen -: public regex_token { +#line 1479 "reflect.h2" +class iteration_statement +: public reflection_base { -#line 2446 "reflect.h2" - private: token_vec alternatives; +#line 1483 "reflect.h2" + public: iteration_statement( - public: explicit alternative_token_gen(cpp2::impl::in a); + cpp2::impl::in n_, + cpp2::impl::in s + ); -#line 2453 "reflect.h2" - public: auto generate_code(generation_context& ctx) const -> void override; +#line 1492 "reflect.h2" + public: [[nodiscard]] auto is_do() const& -> bool; + public: [[nodiscard]] auto is_while() const& -> bool; + public: [[nodiscard]] auto is_for() const& -> bool; + public: [[nodiscard]] auto has_next() const& -> bool; -#line 2470 "reflect.h2" - public: auto add_groups(std::set& groups) const -> void override; + public: [[nodiscard]] auto get_label() const& -> std::string; + public: [[nodiscard]] auto get_next_expression() const& -> assignment_expression; + public: [[nodiscard]] auto get_do_while_condition() const& -> logical_or_expression; + public: [[nodiscard]] auto get_do_while_body() const& -> compound_statement; + public: [[nodiscard]] auto get_for_range() const& -> expression; + public: [[nodiscard]] auto get_for_parameter() const& -> parameter_declaration; + public: [[nodiscard]] auto get_for_body() const& -> statement; + public: iteration_statement(iteration_statement const& that); +public: iteration_statement(iteration_statement&& that) noexcept; + +#line 1504 "reflect.h2" +}; -#line 2477 "reflect.h2" - public: [[nodiscard]] static auto gen_string(cpp2::impl::in a) -> std::string; - public: virtual ~alternative_token_gen() noexcept; +#line 1519 "reflect.h2" +auto add_virtual_destructor(meta::type_declaration& t) -> void; - public: alternative_token_gen(alternative_token_gen const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(alternative_token_gen const&) -> void = delete; +#line 1539 "reflect.h2" +auto interface(meta::type_declaration& t) -> void; +#line 1587 "reflect.h2" +auto polymorphic_base(meta::type_declaration& t) -> void; -#line 2489 "reflect.h2" -}; +#line 1632 "reflect.h2" +auto ordered_impl( + meta::type_declaration& t, + cpp2::impl::in ordering +) -> void; -#line 2492 "reflect.h2" -// Regex syntax: . -// -class any_token -: public regex_token_check { +#line 1661 "reflect.h2" +auto ordered(meta::type_declaration& t) -> void; -#line 2498 "reflect.h2" - public: explicit any_token(cpp2::impl::in single_line); +#line 1669 "reflect.h2" +auto weakly_ordered(meta::type_declaration& t) -> void; -#line 2502 "reflect.h2" - public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr; - public: virtual ~any_token() noexcept; +#line 1677 "reflect.h2" +auto partially_ordered(meta::type_declaration& t) -> void; - public: any_token(any_token const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(any_token const&) -> void = delete; +#line 1699 "reflect.h2" +auto copyable(meta::type_declaration& t) -> void; +#line 1731 "reflect.h2" +auto copy_constructible(meta::type_declaration& t) -> void; -#line 2507 "reflect.h2" -}; +#line 1763 "reflect.h2" +auto hashable(meta::type_declaration& t) -> void; -#line 2510 "reflect.h2" -// Regex syntax: a -// -class char_token -: public regex_token { +#line 1796 "reflect.h2" +auto basic_value(meta::type_declaration& t) -> void; -#line 2516 "reflect.h2" - private: std::string token; - private: bool ignore_case; +#line 1824 "reflect.h2" +auto value(meta::type_declaration& t) -> void; - public: explicit char_token(cpp2::impl::in t, cpp2::impl::in ignore_case_); +#line 1830 "reflect.h2" +auto weakly_ordered_value(meta::type_declaration& t) -> void; -#line 2525 "reflect.h2" - public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr; +#line 1836 "reflect.h2" +auto partially_ordered_value(meta::type_declaration& t) -> void; -#line 2529 "reflect.h2" - public: auto generate_code(generation_context& ctx) const -> void override; +#line 1865 "reflect.h2" +auto cpp1_rule_of_zero(meta::type_declaration& t) -> void; -#line 2552 "reflect.h2" - public: auto gen_case_insensitive(cpp2::impl::in lower, cpp2::impl::in upper, generation_context& ctx) const& -> void; +#line 1907 "reflect.h2" +auto cpp2_struct(meta::type_declaration& t) -> void; -#line 2573 "reflect.h2" - public: auto gen_case_sensitive(generation_context& ctx) const& -> void; +#line 1976 "reflect.h2" +class value_member_info { + public: std::string name; + public: std::string type; + public: std::string value; + public: value_member_info(auto const& name_, auto const& type_, auto const& value_); -#line 2591 "reflect.h2" - public: [[nodiscard]] auto add_escapes(std::string str) const& -> std::string; +#line 1980 "reflect.h2" +}; -#line 2606 "reflect.h2" - public: auto append(char_token const& that) & -> void; - public: virtual ~char_token() noexcept; +auto basic_enum( + meta::type_declaration& t, + auto const& nextval, + cpp2::impl::in bitwise + ) -> void; - public: char_token(char_token const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(char_token const&) -> void = delete; +#line 2246 "reflect.h2" +auto cpp2_enum(meta::type_declaration& t) -> void; +#line 2273 "reflect.h2" +auto flag_enum(meta::type_declaration& t) -> void; -#line 2610 "reflect.h2" -}; +#line 2319 "reflect.h2" +auto cpp2_union(meta::type_declaration& t) -> void; -#line 2613 "reflect.h2" -// Regex syntax: [] Example: [abcx-y[:digits:]] -// -class class_token -: public regex_token { +#line 2472 "reflect.h2" +auto encapsulated(meta::type_declaration& t) -> void; -#line 2619 "reflect.h2" - private: bool negate; - private: bool case_insensitive; - private: std::string class_str; +#line 2491 "reflect.h2" +auto noncopyable(meta::type_declaration& t) -> void; - public: explicit class_token(cpp2::impl::in negate_, cpp2::impl::in case_insensitive_, cpp2::impl::in class_str_, cpp2::impl::in str); +#line 2513 "reflect.h2" +auto singleton(meta::type_declaration& t) -> void; -#line 2631 "reflect.h2" - // TODO: Rework class generation: Generate check functions for classes. - public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr; +#line 2540 "reflect.h2" +auto print(cpp2::impl::in t) -> void; -#line 2757 "reflect.h2" - public: auto generate_code(generation_context& ctx) const -> void override; +#line 2551 "reflect.h2" +auto noisy(cpp2::impl::in t) -> void; +struct python_param_names_and_types_ret { std::string names; std::string types; }; -#line 2762 "reflect.h2" - private: [[nodiscard]] static auto create_matcher(cpp2::impl::in name, cpp2::impl::in template_arguments) -> std::string; - public: virtual ~class_token() noexcept; - public: class_token(class_token const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(class_token const&) -> void = delete; +#line 2575 "reflect.h2" +[[nodiscard]] auto python_param_names_and_types(cpp2::impl::in mf) -> python_param_names_and_types_ret; -#line 2769 "reflect.h2" -}; +#line 2597 "reflect.h2" +auto python(meta::type_declaration& t) -> void; -#line 2772 "reflect.h2" -// Regex syntax: \a or \n or \[ -// -[[nodiscard]] auto escape_token_parse(parse_context& ctx) -> token_ptr; +#line 2640 "reflect.h2" +auto javascript(meta::type_declaration& t) -> void; -#line 2813 "reflect.h2" -// Regex syntax: \K Example: ab\Kcd -// -[[nodiscard]] auto global_group_reset_token_parse(parse_context& ctx) -> token_ptr; +#line 2681 "reflect.h2" +auto sample_print(cpp2::impl::in s, cpp2::impl::in indent) -> void; -#line 2824 "reflect.h2" -// Regex syntax: \ Example: \1 -// \g{name_or_number} -// \k{name_or_number} -// \k -// \k'name_or_number' -// -class group_ref_token -: public regex_token { +#line 2689 "reflect.h2" +class simple_traverser { -#line 2834 "reflect.h2" - private: int id; - private: bool case_insensitive; + public: virtual auto pre_traverse(cpp2::impl::in decl) -> void; - public: explicit group_ref_token(cpp2::impl::in id_, cpp2::impl::in case_insensitive_, cpp2::impl::in str); +#line 2695 "reflect.h2" + public: virtual auto traverse(cpp2::impl::in decl) -> void; -#line 2844 "reflect.h2" - public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr; +#line 2715 "reflect.h2" + public: virtual auto pre_traverse(cpp2::impl::in f) -> void; -#line 2945 "reflect.h2" - public: auto generate_code(generation_context& ctx) const -> void override; - public: virtual ~group_ref_token() noexcept; +#line 2719 "reflect.h2" + public: virtual auto traverse(cpp2::impl::in f) -> void; - public: group_ref_token(group_ref_token const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(group_ref_token const&) -> void = delete; +#line 2740 "reflect.h2" + public: virtual auto pre_traverse(cpp2::impl::in o) -> void; +#line 2744 "reflect.h2" + public: virtual auto traverse(cpp2::impl::in o) -> void; -#line 2948 "reflect.h2" -}; +#line 2752 "reflect.h2" + public: virtual auto pre_traverse(cpp2::impl::in t) -> void; -#line 2951 "reflect.h2" -// Regex syntax: () Example: (abc) -// (?:) (?i:abc) -// (?<>:) (?:abc) -// (?#) (#Step 1 finished) -// (?|) (?|(abc)|(cde)) -// (?=) (?=abc) -// (?!) (?!abc) -// (*: t) -> void; -#line 2965 "reflect.h2" - private: int number {-1}; - private: token_ptr inner {nullptr}; +#line 2764 "reflect.h2" + public: virtual auto pre_traverse(cpp2::impl::in t) -> void; - public: [[nodiscard]] static auto parse_lookahead(parse_context& ctx, cpp2::impl::in syntax, cpp2::impl::in positive) -> token_ptr; +#line 2768 "reflect.h2" + public: virtual auto traverse(cpp2::impl::in t) -> void; -#line 2982 "reflect.h2" - public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr; +#line 2773 "reflect.h2" + public: virtual auto pre_traverse(cpp2::impl::in stmt) -> void; -#line 3119 "reflect.h2" - public: [[nodiscard]] static auto gen_string(cpp2::impl::in name, cpp2::impl::in name_brackets, cpp2::impl::in has_modifier, cpp2::impl::in modifiers, cpp2::impl::in inner_) -> std::string; +#line 2777 "reflect.h2" + public: virtual auto traverse(cpp2::impl::in stmt) -> void; -#line 3137 "reflect.h2" - public: auto generate_code(generation_context& ctx) const -> void override; +#line 2812 "reflect.h2" + public: virtual auto pre_traverse(cpp2::impl::in stmt) -> void; -#line 3157 "reflect.h2" - public: auto add_groups(std::set& groups) const -> void override; - public: virtual ~group_token() noexcept; +#line 2816 "reflect.h2" + public: virtual auto traverse(cpp2::impl::in stmt) -> void; - public: group_token() = default; - public: group_token(group_token const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(group_token const&) -> void = delete; +#line 2826 "reflect.h2" + public: virtual auto pre_traverse(cpp2::impl::in stmt) -> void; +#line 2830 "reflect.h2" + public: virtual auto traverse(cpp2::impl::in stmt) -> void; -#line 3164 "reflect.h2" -}; +#line 2838 "reflect.h2" + public: virtual auto pre_traverse(cpp2::impl::in stmt) -> void; -#line 3167 "reflect.h2" -// Regex syntax: \x or \x{} Example: \x{62} -// -[[nodiscard]] auto hexadecimal_token_parse(parse_context& ctx) -> token_ptr; +#line 2842 "reflect.h2" + public: virtual auto traverse(cpp2::impl::in stmt) -> void; -#line 3208 "reflect.h2" -// Regex syntax: $ Example: aa$ -// -[[nodiscard]] auto line_end_token_parse(parse_context& ctx) -> token_ptr; +#line 2861 "reflect.h2" + public: virtual auto pre_traverse(cpp2::impl::in stmt) -> void; -#line 3228 "reflect.h2" -// Regex syntax: ^ Example: ^aa -// -[[nodiscard]] auto line_start_token_parse(parse_context& ctx) -> token_ptr; +#line 2865 "reflect.h2" + public: virtual auto traverse(cpp2::impl::in stmt) -> void; -#line 3244 "reflect.h2" -// Regex syntax: (?=) or (?!) or (*pla), etc. Example: (?=AA) -// -// Parsed in group_token. -// -class lookahead_token -: public regex_token { +#line 2876 "reflect.h2" + public: virtual auto pre_traverse(cpp2::impl::in expr) -> void; -#line 3252 "reflect.h2" - protected: bool positive; - public: token_ptr inner {nullptr}; +#line 2882 "reflect.h2" + public: virtual auto traverse(cpp2::impl::in expr) -> void; - public: explicit lookahead_token(cpp2::impl::in positive_); +#line 2896 "reflect.h2" + public: virtual auto pre_traverse(cpp2::impl::in binexpr) -> void; -#line 3259 "reflect.h2" - public: auto generate_code(generation_context& ctx) const -> void override; +#line 2913 "reflect.h2" + public: virtual auto traverse(cpp2::impl::in binexpr) -> void; -#line 3265 "reflect.h2" - public: auto add_groups(std::set& groups) const -> void override; - public: virtual ~lookahead_token() noexcept; +#line 2924 "reflect.h2" + public: virtual auto pre_traverse(cpp2::impl::in binexpr) -> void; - public: lookahead_token(lookahead_token const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(lookahead_token const&) -> void = delete; +#line 2941 "reflect.h2" + public: virtual auto traverse(cpp2::impl::in binexpr) -> void; +#line 2953 "reflect.h2" + public: virtual auto pre_traverse(cpp2::impl::in binexpr) -> void; -#line 3268 "reflect.h2" -}; +#line 2970 "reflect.h2" + public: virtual auto traverse(cpp2::impl::in binexpr) -> void; -#line 3271 "reflect.h2" -// Named character classes -// -[[nodiscard]] auto named_class_token_parse(parse_context& ctx) -> token_ptr; +#line 2981 "reflect.h2" + public: virtual auto pre_traverse(cpp2::impl::in binexpr) -> void; -#line 3299 "reflect.h2" -// Regex syntax: \o{} Example: \o{142} -// -[[nodiscard]] auto octal_token_parse(parse_context& ctx) -> token_ptr; +#line 2998 "reflect.h2" + public: virtual auto traverse(cpp2::impl::in binexpr) -> void; -#line 3327 "reflect.h2" -// Regex syntax: {min, max} Example: a{2,4} -// -class range_token -: public regex_token { +#line 3009 "reflect.h2" + public: virtual auto pre_traverse(cpp2::impl::in binexpr) -> void; -#line 3333 "reflect.h2" - protected: int min_count {-1}; - protected: int max_count {-1}; - protected: int kind {range_flags::greedy}; - protected: token_ptr inner_token {nullptr}; +#line 3026 "reflect.h2" + public: virtual auto traverse(cpp2::impl::in binexpr) -> void; - public: explicit range_token(); +#line 3038 "reflect.h2" + public: virtual auto pre_traverse(cpp2::impl::in binexpr) -> void; - public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr; +#line 3055 "reflect.h2" + public: virtual auto traverse(cpp2::impl::in binexpr) -> void; -#line 3413 "reflect.h2" - public: auto parse_modifier(parse_context& ctx) & -> void; +#line 3067 "reflect.h2" + public: virtual auto pre_traverse(cpp2::impl::in binexpr) -> void; -#line 3425 "reflect.h2" - public: [[nodiscard]] auto gen_mod_string() const& -> std::string; +#line 3084 "reflect.h2" + public: virtual auto traverse(cpp2::impl::in binexpr) -> void; -#line 3438 "reflect.h2" - public: [[nodiscard]] auto gen_range_string() const& -> std::string; +#line 3095 "reflect.h2" + public: virtual auto pre_traverse(cpp2::impl::in binexpr) -> void; -#line 3457 "reflect.h2" - public: auto generate_code(generation_context& ctx) const -> void override; +#line 3112 "reflect.h2" + public: virtual auto traverse(cpp2::impl::in binexpr) -> void; -#line 3468 "reflect.h2" - public: auto add_groups(std::set& groups) const -> void override; - public: virtual ~range_token() noexcept; +#line 3123 "reflect.h2" + public: virtual auto pre_traverse(cpp2::impl::in binexpr) -> void; - public: range_token(range_token const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(range_token const&) -> void = delete; +#line 3140 "reflect.h2" + public: virtual auto traverse(cpp2::impl::in binexpr) -> void; +#line 3151 "reflect.h2" + public: virtual auto pre_traverse(cpp2::impl::in binexpr) -> void; -#line 3472 "reflect.h2" -}; +#line 3168 "reflect.h2" + public: virtual auto traverse(cpp2::impl::in binexpr) -> void; -#line 3475 "reflect.h2" -// Regex syntax: *, +, or ? Example: aa* -// -class special_range_token -: public range_token { +#line 3179 "reflect.h2" + public: virtual auto pre_traverse(cpp2::impl::in binexpr) -> void; -#line 3481 "reflect.h2" - public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr; - public: virtual ~special_range_token() noexcept; +#line 3196 "reflect.h2" + public: virtual auto traverse(cpp2::impl::in binexpr) -> void; - public: special_range_token() = default; - public: special_range_token(special_range_token const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(special_range_token const&) -> void = delete; +#line 3208 "reflect.h2" + public: virtual auto pre_traverse(cpp2::impl::in binexpr) -> void; +#line 3225 "reflect.h2" + public: virtual auto traverse(cpp2::impl::in binexpr) -> void; -#line 3511 "reflect.h2" -}; +#line 3236 "reflect.h2" + public: virtual auto pre_traverse(cpp2::impl::in isas) -> void; -#line 3514 "reflect.h2" -// Regex syntax: \b or \B Example: \bword\b -// -// Matches the start end end of word boundaries. -// -[[nodiscard]] auto word_boundary_token_parse(parse_context& ctx) -> token_ptr; +#line 3252 "reflect.h2" + public: virtual auto traverse(cpp2::impl::in isas) -> void; -#line 3536 "reflect.h2" -//----------------------------------------------------------------------- -// -// Parser for regular expression. -// -//----------------------------------------------------------------------- -// +#line 3263 "reflect.h2" + public: virtual auto traverse(cpp2::impl::in exprs) -> void; -// Parser and generator for regular expressions. -template class regex_generator - { - private: std::string_view regex; - private: std::string modifier {""}; - private: std::string modifier_escape {""}; +#line 3270 "reflect.h2" + public: virtual auto pre_traverse(cpp2::impl::in prefix) -> void; - private: Error_out error_out; +#line 3286 "reflect.h2" + public: virtual auto traverse(cpp2::impl::in prefix) -> void; - private: std::string source {""}; +#line 3291 "reflect.h2" + public: virtual auto pre_traverse(cpp2::impl::in postfix) -> void; - public: explicit regex_generator(cpp2::impl::in r, Error_out const& e); +#line 3307 "reflect.h2" + public: virtual auto traverse(cpp2::impl::in postfix) -> void; -#line 3559 "reflect.h2" - public: [[nodiscard]] auto parse() & -> std::string; +#line 3326 "reflect.h2" + public: virtual auto traverse(cpp2::impl::in uid) -> void; -#line 3594 "reflect.h2" - private: auto extract_modifiers() & -> void; - public: regex_generator(regex_generator const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(regex_generator const&) -> void = delete; +#line 3332 "reflect.h2" + public: virtual auto traverse(cpp2::impl::in qid) -> void; +#line 3342 "reflect.h2" + public: virtual auto traverse(cpp2::impl::in tid) -> void; -#line 3608 "reflect.h2" -}; +#line 3359 "reflect.h2" + public: virtual auto traverse(cpp2::impl::in primary) -> void; -template [[nodiscard]] auto generate_regex(cpp2::impl::in regex, Err const& err) -> std::string; +#line 3379 "reflect.h2" + public: virtual auto traverse(cpp2::impl::in idexpr) -> void; + public: simple_traverser() = default; + public: simple_traverser(simple_traverser const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(simple_traverser const&) -> void = delete; -#line 3620 "reflect.h2" -auto regex_gen(meta::type_declaration& t) -> void; -#line 3675 "reflect.h2" -//----------------------------------------------------------------------- -// -// apply_metafunctions -// -[[nodiscard]] auto apply_metafunctions( - declaration_node& n, - type_declaration& rtype, - auto const& error - ) -> bool; +#line 3394 "reflect.h2" +}; -#line 3791 "reflect.h2" -} +#line 3407 "reflect.h2" +auto sample_traverser(cpp2::impl::in decl, cpp2::impl::in indent) -> void; -} +#line 3429 "reflect.h2" +auto sample_traverser(cpp2::impl::in f, cpp2::impl::in indent = 0) -> void; +#line 3459 "reflect.h2" +auto sample_traverser(cpp2::impl::in o, cpp2::impl::in indent) -> void; -//=== Cpp2 function definitions ================================================= +#line 3469 "reflect.h2" +auto sample_traverser(cpp2::impl::in t, cpp2::impl::in indent = 0) -> void; -#line 1 "reflect.h2" +#line 3490 "reflect.h2" +auto sample_traverser(cpp2::impl::in t, cpp2::impl::in indent = 0) -> void; -#line 22 "reflect.h2" -namespace cpp2 { +#line 3509 "reflect.h2" +auto sample_traverser(cpp2::impl::in stmt, cpp2::impl::in indent) -> void; -namespace meta { +#line 3564 "reflect.h2" +auto sample_traverser(cpp2::impl::in stmt, cpp2::impl::in indent) -> void; -#line 27 "reflect.h2" -//----------------------------------------------------------------------- -// -// Compiler services -// -//----------------------------------------------------------------------- -// +#line 3581 "reflect.h2" +auto sample_traverser(cpp2::impl::in stmt, cpp2::impl::in indent) -> void; -#line 36 "reflect.h2" - // Common data members - // +#line 3591 "reflect.h2" +auto sample_traverser(cpp2::impl::in stmt, cpp2::impl::in indent) -> void; -#line 47 "reflect.h2" - // Constructor - // -#line 49 "reflect.h2" - compiler_services::compiler_services( +#line 3623 "reflect.h2" +auto sample_traverser(cpp2::impl::in expr, cpp2::impl::in indent) -> void; - std::vector* errors_, - std::set* includes_, - stable_vector* generated_tokens_ - ) - : errors{ errors_ } - , includes{ includes_ } - , errors_original_size{ cpp2::unchecked_narrow(std::ssize(*cpp2::impl::assert_not_null(errors))) } - , generated_tokens{ generated_tokens_ } - , parser{ *cpp2::impl::assert_not_null(errors), *cpp2::impl::assert_not_null(includes) } -#line 55 "reflect.h2" - { +#line 3637 "reflect.h2" +auto sample_traverser(cpp2::impl::in binexpr, cpp2::impl::in indent) -> void; -#line 61 "reflect.h2" - } +#line 3667 "reflect.h2" +auto sample_traverser(cpp2::impl::in binexpr, cpp2::impl::in indent) -> void; - // Common API - // -#line 65 "reflect.h2" - auto compiler_services::set_metafunction_name(cpp2::impl::in name, cpp2::impl::in> args) & -> void{ - metafunction_name = name; - metafunction_args = args; - metafunctions_used = CPP2_UFCS(empty)(args); - } +#line 3697 "reflect.h2" +auto sample_traverser(cpp2::impl::in binexpr, cpp2::impl::in indent) -> void; -#line 71 "reflect.h2" - [[nodiscard]] auto compiler_services::get_metafunction_name() const& -> std::string_view { return metafunction_name; } +#line 3727 "reflect.h2" +auto sample_traverser(cpp2::impl::in binexpr, cpp2::impl::in indent) -> void; -#line 73 "reflect.h2" - [[nodiscard]] auto compiler_services::get_argument(cpp2::impl::in index) & -> std::string{ - metafunctions_used = true; - if (([_0 = 0, _1 = index, _2 = CPP2_UFCS(ssize)(metafunction_args)]{ return cpp2::impl::cmp_less_eq(_0,_1) && cpp2::impl::cmp_less(_1,_2); }())) { - return CPP2_ASSERT_IN_BOUNDS(metafunction_args, index); - } - return ""; - } +#line 3757 "reflect.h2" +auto sample_traverser(cpp2::impl::in binexpr, cpp2::impl::in indent) -> void; -#line 81 "reflect.h2" - [[nodiscard]] auto compiler_services::get_arguments() & -> std::vector{ - metafunctions_used = true; - return metafunction_args; - } +#line 3787 "reflect.h2" +auto sample_traverser(cpp2::impl::in binexpr, cpp2::impl::in indent) -> void; -#line 86 "reflect.h2" - [[nodiscard]] auto compiler_services::arguments_were_used() const& -> bool { return metafunctions_used; } +#line 3817 "reflect.h2" +auto sample_traverser(cpp2::impl::in binexpr, cpp2::impl::in indent) -> void; -#line 88 "reflect.h2" - [[nodiscard]] auto compiler_services::parse_statement( +#line 3847 "reflect.h2" +auto sample_traverser(cpp2::impl::in binexpr, cpp2::impl::in indent) -> void; - std::string_view source - ) & -> parse_statement_ret +#line 3877 "reflect.h2" +auto sample_traverser(cpp2::impl::in binexpr, cpp2::impl::in indent) -> void; - { - cpp2::impl::deferred_init> ret; -#line 94 "reflect.h2" - auto original_source {source}; +#line 3907 "reflect.h2" +auto sample_traverser(cpp2::impl::in binexpr, cpp2::impl::in indent) -> void; - CPP2_UFCS(push_back)(generated_lines, std::vector()); - auto lines {&CPP2_UFCS(back)(generated_lines)}; +#line 3937 "reflect.h2" +auto sample_traverser(cpp2::impl::in binexpr, cpp2::impl::in indent) -> void; - auto add_line {[&, _1 = lines](cpp2::impl::in s) mutable -> void{ - static_cast(CPP2_UFCS(emplace_back)((*cpp2::impl::assert_not_null(_1)), s, source_line::category::cpp2)); - }}; -{ -auto newline_pos{CPP2_UFCS(find)(source, '\n')}; +#line 3967 "reflect.h2" +auto sample_traverser(cpp2::impl::in binexpr, cpp2::impl::in indent) -> void; - // First split this string into source_lines - // +#line 3997 "reflect.h2" +auto sample_traverser(cpp2::impl::in isas, cpp2::impl::in indent) -> void; -#line 106 "reflect.h2" - if ( cpp2::impl::cmp_greater(CPP2_UFCS(ssize)(source),1) - && newline_pos != source.npos) - { - while( newline_pos != source.npos ) - { - add_line(CPP2_UFCS(substr)(source, 0, newline_pos)); - CPP2_UFCS(remove_prefix)(source, newline_pos + 1); - newline_pos = CPP2_UFCS(find)(source, '\n'); - } - } -} +#line 4023 "reflect.h2" +auto sample_traverser(cpp2::impl::in exprs, cpp2::impl::in indent) -> void; -#line 117 "reflect.h2" - if (!(CPP2_UFCS(empty)(source))) { - cpp2::move(add_line)(cpp2::move(source)); - } +#line 4038 "reflect.h2" +auto sample_traverser(cpp2::impl::in prefix, cpp2::impl::in indent) -> void; - // Now lex this source fragment to generate - // a single grammar_map entry, whose .second - // is the vector of tokens - static_cast(CPP2_UFCS(emplace_back)(generated_lexers, *cpp2::impl::assert_not_null(errors))); - auto tokens {&CPP2_UFCS(back)(generated_lexers)}; - CPP2_UFCS(lex)((*cpp2::impl::assert_not_null(tokens)), *cpp2::impl::assert_not_null(cpp2::move(lines)), true); +#line 4062 "reflect.h2" +auto sample_traverser(cpp2::impl::in postfix, cpp2::impl::in indent) -> void; - if (cpp2::cpp2_default.is_active() && !(std::ssize(CPP2_UFCS(get_map)((*cpp2::impl::assert_not_null(tokens)))) == 1) ) { cpp2::cpp2_default.report_violation(""); } +#line 4095 "reflect.h2" +auto sample_traverser(cpp2::impl::in uid, cpp2::impl::in indent) -> void; - // Now parse this single declaration from - // the lexed tokens - ret.construct(CPP2_UFCS(parse_one_declaration)(parser, - (*cpp2::impl::assert_not_null(CPP2_UFCS(begin)(CPP2_UFCS(get_map)(*cpp2::impl::assert_not_null(cpp2::move(tokens)))))).second, - *cpp2::impl::assert_not_null(generated_tokens) - )); - if (!(ret.value())) { - error("parse failed - the source string is not a valid statement:\n" + cpp2::to_string(cpp2::move(original_source)) + ""); - }return std::move(ret.value()); - } +#line 4106 "reflect.h2" +auto sample_traverser(cpp2::impl::in qid, cpp2::impl::in indent) -> void; -#line 141 "reflect.h2" - [[nodiscard]] auto compiler_services::add_runtime_support_include(cpp2::impl::in s) & -> decltype(auto) { return static_cast(CPP2_UFCS(emplace)((*cpp2::impl::assert_not_null(includes)), s)); } +#line 4122 "reflect.h2" +auto sample_traverser(cpp2::impl::in tid, cpp2::impl::in indent) -> void; -#line 143 "reflect.h2" - [[nodiscard]] auto compiler_services::position() const -> source_position +#line 4139 "reflect.h2" +auto sample_traverser(cpp2::impl::in primary, cpp2::impl::in indent) -> void; - { - return { }; - } +#line 4159 "reflect.h2" +auto sample_traverser(cpp2::impl::in idexpr, cpp2::impl::in indent) -> void; - // Error diagnosis and handling, integrated with compiler output - // Unlike a contract violation, .requires continues further processing - // -#line 152 "reflect.h2" - auto compiler_services::require( +#line 4181 "reflect.h2" +class autodiff_special_func { + public: std::string name; + public: int n_args; + public: bool is_member; - cpp2::impl::in b, - cpp2::impl::in msg - ) const& -> void - { - if (!(b)) { - error(msg); - } - } + public: std::string code_primal; + public: std::string code_fwd; + public: std::string code_rws; + public: std::string code_primal_higher_order; + public: std::string code_fwd_higher_order; + public: std::string code_rws_higher_order; -#line 163 "reflect.h2" - auto compiler_services::error(cpp2::impl::in msg) const& -> void - { - auto message {cpp2::impl::as_(msg)}; - if (!(CPP2_UFCS(empty)(metafunction_name))) { - message = "while applying @" + cpp2::to_string(metafunction_name) + " - " + cpp2::to_string(message) + ""; - } - static_cast(CPP2_UFCS(emplace_back)((*cpp2::impl::assert_not_null(errors)), position(), cpp2::move(message))); - } + public: autodiff_special_func(cpp2::impl::in name_, cpp2::impl::in n_args_, cpp2::impl::in is_member_, cpp2::impl::in code_primal_ = "", cpp2::impl::in code_fwd_ = "", + cpp2::impl::in code_rws_ = "", cpp2::impl::in code_primal_higher_order_ = "", cpp2::impl::in code_fwd_higher_order_ = "", + cpp2::impl::in code_rws_higher_order_ = ""); - // Enable custom contracts on this object, integrated with compiler output - // Unlike .requires, a contract violation stops further processing - // -#line 175 "reflect.h2" - auto compiler_services::report_violation(auto const& msg) const& -> void{ - error(msg); - throw(std::runtime_error( - " ==> programming bug found in metafunction @" + cpp2::to_string(metafunction_name) + " " - "- contract violation - see previous errors" - )); - } +#line 4218 "reflect.h2" + public: autodiff_special_func(autodiff_special_func const& that); +#line 4218 "reflect.h2" + public: auto operator=(autodiff_special_func const& that) -> autodiff_special_func& ; +#line 4218 "reflect.h2" + public: autodiff_special_func(autodiff_special_func&& that) noexcept; +#line 4218 "reflect.h2" + public: auto operator=(autodiff_special_func&& that) noexcept -> autodiff_special_func& ; -#line 183 "reflect.h2" - [[nodiscard]] auto compiler_services::is_active() const& -> decltype(auto) { return true; } + public: [[nodiscard]] auto is_match(cpp2::impl::in o) const& -> bool; - compiler_services::~compiler_services() noexcept{} -compiler_services::compiler_services(compiler_services const& that) - : errors{ that.errors } - , includes{ that.includes } - , errors_original_size{ that.errors_original_size } - , generated_tokens{ that.generated_tokens } - , parser{ that.parser } - , metafunction_name{ that.metafunction_name } - , metafunction_args{ that.metafunction_args } - , metafunctions_used{ that.metafunctions_used }{} - -#line 187 "reflect.h2" -/* -//----------------------------------------------------------------------- -// -// Type IDs -// -//----------------------------------------------------------------------- -// +#line 4223 "reflect.h2" +}; -// All type_ids are wrappers around a pointer to node -// -type_id: @polymorphic_base @copyable type = -{ - this: compiler_services = (); +class autodiff_declared_variable { + public: std::string name {""}; + public: std::string decl {""}; + public: bool is_active {false}; + public: bool is_member {false}; - n: type_id_node; + public: explicit autodiff_declared_variable(); - protected operator=: ( - out this, - n_: type_id_node, - s : compiler_services - ) - = { - compiler_services = s; - n = n_; - assert( n, "a meta::type_id must point to a valid type_id_node, not null" ); - } + public: autodiff_declared_variable(cpp2::impl::in name_, cpp2::impl::in decl_, cpp2::impl::in is_active_, cpp2::impl::in is_member_); - is_wildcard : (this) -> bool = n.is_wildcard(); - is_pointer_qualified: (this) -> bool = n.is_pointer_qualified(); - template_args_count : (this) -> int = n.template_arguments().ssize(); - to_string : (this) -> std::string = n.to_string(); +#line 4240 "reflect.h2" + public: autodiff_declared_variable(autodiff_declared_variable const& that); +#line 4240 "reflect.h2" + public: auto operator=(autodiff_declared_variable const& that) -> autodiff_declared_variable& ; +#line 4240 "reflect.h2" + public: autodiff_declared_variable(autodiff_declared_variable&& that) noexcept; +#line 4240 "reflect.h2" + public: auto operator=(autodiff_declared_variable&& that) noexcept -> autodiff_declared_variable& ; +}; - position: (override this) -> source_position = n.position(); -} -*/ +class autodiff_declaration_stack_item { + public: std::string full_name; + public: meta::type_or_namespace_declaration decl; -#line 224 "reflect.h2" -//----------------------------------------------------------------------- -// -// Declarations -// -//----------------------------------------------------------------------- -// + public: std::vector diff_request {}; + public: std::vector diff_done {}; -// All declarations are wrappers around a pointer to node -// + public: std::vector> declared_variables_stack {1}; -#line 239 "reflect.h2" - declaration_base::declaration_base( + public: autodiff_declaration_stack_item(cpp2::impl::in full_name_, cpp2::impl::in decl_); +using lookup_declaration_ret = std::vector; - declaration_node* n_, - cpp2::impl::in s - ) - : compiler_services{ s } - , n{ n_ } -#line 244 "reflect.h2" - { -#line 247 "reflect.h2" - if (cpp2::cpp2_default.is_active() && !(n) ) { cpp2::cpp2_default.report_violation(CPP2_CONTRACT_MSG("a meta::declaration must point to a valid declaration_node, not null")); } - } +#line 4257 "reflect.h2" + public: [[nodiscard]] auto lookup_declaration(cpp2::impl::in decl_name) const& -> lookup_declaration_ret; +struct lookup_variable_declaration_ret { bool found; autodiff_declared_variable r; }; -#line 250 "reflect.h2" - [[nodiscard]] auto declaration_base::position() const -> source_position { return CPP2_UFCS(position)((*cpp2::impl::assert_not_null(n))); } -#line 252 "reflect.h2" - [[nodiscard]] auto declaration_base::print() const& -> std::string { return CPP2_UFCS(pretty_print_visualize)((*cpp2::impl::assert_not_null(n)), 0); } - declaration_base::~declaration_base() noexcept{} -declaration_base::declaration_base(declaration_base const& that) - : compiler_services{ static_cast(that) } - , n{ that.n }{} +#line 4267 "reflect.h2" + public: [[nodiscard]] auto lookup_variable_declaration(cpp2::impl::in decl_name) const& -> lookup_variable_declaration_ret; + public: autodiff_declaration_stack_item(autodiff_declaration_stack_item const& that); +public: autodiff_declaration_stack_item(autodiff_declaration_stack_item&& that) noexcept; -#line 256 "reflect.h2" -//----------------------------------------------------------------------- -// All declarations -// -#line 263 "reflect.h2" - declaration::declaration( +#line 4285 "reflect.h2" +}; - declaration_node* n_, - cpp2::impl::in s - ) - : declaration_base{ n_, s } -#line 268 "reflect.h2" - { +class autodiff_context { + private: int temporary_count {0}; + +#line 4297 "reflect.h2" + public: std::vector special_funcs { + autodiff_special_func("sin", 1, false, + "sin(_a1_)", + "cos(_a1_) * _ad1_", + "_ab1_ += cos(_a1_) * _rb_;\n", + "sin(_a1_)", + "_ad1_.sin(_a1_)", + "TODO" - } + ), + autodiff_special_func("cos", 1, false, + "cos(_a1_)", + "-sin(_a1_) * _ad1_", + "_ab1_ += -sin(_a1_) * _rb_;\n", + "cos(_a1_)", + "_ad1_.cos(_a1_)", + "TODO" + ), + autodiff_special_func("exp", 1, false, + "exp(_a1_)", + "exp(_a1_) * _ad1_", + "_ab1_ += exp(_a1_) * _rb_;\n", + "exp(_a1_)", + "_ad1_.exp(_a1_)", + "TODO" + ), + autodiff_special_func("sqrt", 1, false, + "sqrt(_a1_)", + "0.5 * _ad1_ / sqrt(_a1_)", + "_ab1_ += 0.5 * _rb_ / sqrt(_a1_);\n", + "sqrt(_a1_)", + "_ad1_.sqrt(_a1_)", + "TODO" + ), + autodiff_special_func("push_back", 1, true, + "_o_.push_back(_a1_);", + "_od_.push_back(_ad1_);", + "TODO")}; -#line 272 "reflect.h2" - [[nodiscard]] auto declaration::is_public() const& -> bool { return CPP2_UFCS(is_public)((*cpp2::impl::assert_not_null(n))); } -#line 273 "reflect.h2" - [[nodiscard]] auto declaration::is_protected() const& -> bool { return CPP2_UFCS(is_protected)((*cpp2::impl::assert_not_null(n))); } -#line 274 "reflect.h2" - [[nodiscard]] auto declaration::is_private() const& -> bool { return CPP2_UFCS(is_private)((*cpp2::impl::assert_not_null(n))); } -#line 275 "reflect.h2" - [[nodiscard]] auto declaration::is_default_access() const& -> bool { return CPP2_UFCS(is_default_access)((*cpp2::impl::assert_not_null(n))); } +#line 4337 "reflect.h2" + public: std::string fwd_suffix {"_d"}; + public: std::string rws_suffix {"_b"}; + private: int order {1}; + public: bool reverse {false}; -#line 277 "reflect.h2" - [[nodiscard]] auto declaration::default_to_public() & -> decltype(auto) { return static_cast(CPP2_UFCS(make_public)((*cpp2::impl::assert_not_null(n)))); } -#line 278 "reflect.h2" - [[nodiscard]] auto declaration::default_to_protected() & -> decltype(auto) { return static_cast(CPP2_UFCS(make_protected)((*cpp2::impl::assert_not_null(n)))); } -#line 279 "reflect.h2" - [[nodiscard]] auto declaration::default_to_private() & -> decltype(auto) { return static_cast(CPP2_UFCS(make_private)((*cpp2::impl::assert_not_null(n)))); } +#line 4343 "reflect.h2" + public: std::string fwd_ad_type {"double"}; + public: std::string rws_ad_type {"double"}; -#line 281 "reflect.h2" - [[nodiscard]] auto declaration::make_public() & -> bool { return CPP2_UFCS(make_public)((*cpp2::impl::assert_not_null(n))); } -#line 282 "reflect.h2" - [[nodiscard]] auto declaration::make_protected() & -> bool { return CPP2_UFCS(make_protected)((*cpp2::impl::assert_not_null(n))); } -#line 283 "reflect.h2" - [[nodiscard]] auto declaration::make_private() & -> bool { return CPP2_UFCS(make_private)((*cpp2::impl::assert_not_null(n))); } + public: std::map> declaration_map {}; + public: std::vector declaration_stack {}; -#line 285 "reflect.h2" - [[nodiscard]] auto declaration::has_name() const& -> bool { return CPP2_UFCS(has_name)((*cpp2::impl::assert_not_null(n))); } -#line 286 "reflect.h2" - [[nodiscard]] auto declaration::has_name(cpp2::impl::in s) const& -> bool { return CPP2_UFCS(has_name)((*cpp2::impl::assert_not_null(n)), s); } + public: explicit autodiff_context(); + public: autodiff_context(cpp2::impl::in order_, cpp2::impl::in reverse_); -#line 288 "reflect.h2" - [[nodiscard]] auto declaration::name() const& -> std::string_view{ - if (has_name()) {return CPP2_UFCS(as_string_view)((*cpp2::impl::assert_not_null(CPP2_UFCS(name)(*cpp2::impl::assert_not_null(n))))); } - else { return ""; } - } +#line 4366 "reflect.h2" + public: auto add_variable_declaration(cpp2::impl::in name, cpp2::impl::in type, cpp2::impl::in is_active, cpp2::impl::in is_member = false) & -> void; -#line 293 "reflect.h2" - [[nodiscard]] auto declaration::has_initializer() const& -> bool { return CPP2_UFCS(has_initializer)((*cpp2::impl::assert_not_null(n))); } +#line 4370 "reflect.h2" + public: [[nodiscard]] auto is_variable_active(cpp2::impl::in name) & -> bool; -#line 295 "reflect.h2" - [[nodiscard]] auto declaration::is_global() const& -> bool { return CPP2_UFCS(is_global)((*cpp2::impl::assert_not_null(n))); } -#line 296 "reflect.h2" - [[nodiscard]] auto declaration::is_function() const& -> bool { return CPP2_UFCS(is_function)((*cpp2::impl::assert_not_null(n))); } -#line 297 "reflect.h2" - [[nodiscard]] auto declaration::is_object() const& -> bool { return CPP2_UFCS(is_object)((*cpp2::impl::assert_not_null(n))); } -#line 298 "reflect.h2" - [[nodiscard]] auto declaration::is_base_object() const& -> bool { return CPP2_UFCS(is_base_object)((*cpp2::impl::assert_not_null(n))); } -#line 299 "reflect.h2" - [[nodiscard]] auto declaration::is_member_object() const& -> bool { return CPP2_UFCS(is_member_object)((*cpp2::impl::assert_not_null(n))); } -#line 300 "reflect.h2" - [[nodiscard]] auto declaration::is_type() const& -> bool { return CPP2_UFCS(is_type)((*cpp2::impl::assert_not_null(n))); } -#line 301 "reflect.h2" - [[nodiscard]] auto declaration::is_namespace() const& -> bool { return CPP2_UFCS(is_namespace)((*cpp2::impl::assert_not_null(n))); } -#line 302 "reflect.h2" - [[nodiscard]] auto declaration::is_alias() const& -> bool { return CPP2_UFCS(is_alias)((*cpp2::impl::assert_not_null(n))); } +#line 4374 "reflect.h2" + public: auto create_namespace_stack(cpp2::impl::in t) & -> void; -#line 304 "reflect.h2" - [[nodiscard]] auto declaration::is_type_alias() const& -> bool { return CPP2_UFCS(is_type_alias)((*cpp2::impl::assert_not_null(n))); } -#line 305 "reflect.h2" - [[nodiscard]] auto declaration::is_namespace_alias() const& -> bool { return CPP2_UFCS(is_namespace_alias)((*cpp2::impl::assert_not_null(n))); } -#line 306 "reflect.h2" - [[nodiscard]] auto declaration::is_object_alias() const& -> bool { return CPP2_UFCS(is_object_alias)((*cpp2::impl::assert_not_null(n))); } +#line 4391 "reflect.h2" + public: [[nodiscard]] auto is_forward() const& -> decltype(auto); + public: [[nodiscard]] auto is_reverse() const& -> decltype(auto); + public: [[nodiscard]] auto is_taylor() const& -> decltype(auto); -#line 308 "reflect.h2" - [[nodiscard]] auto declaration::is_function_expression() const& -> bool { return CPP2_UFCS(is_function_expression)((*cpp2::impl::assert_not_null(n))); } + public: [[nodiscard]] auto gen_temporary() & -> std::string; -#line 310 "reflect.h2" - [[nodiscard]] auto declaration::as_function() const& -> function_declaration { return function_declaration(n, (*this)); } -#line 311 "reflect.h2" - [[nodiscard]] auto declaration::as_object() const& -> object_declaration { return object_declaration(n, (*this)); } -#line 312 "reflect.h2" - [[nodiscard]] auto declaration::as_type() const& -> type_declaration { return type_declaration(n, (*this)); } -#line 313 "reflect.h2" - [[nodiscard]] auto declaration::as_alias() const& -> alias_declaration { return alias_declaration(n, (*this)); } +#line 4400 "reflect.h2" + public: [[nodiscard]] auto is_type_active(cpp2::impl::in type) & -> bool; -#line 315 "reflect.h2" - [[nodiscard]] auto declaration::get_parent() const& -> declaration { return declaration((*cpp2::impl::assert_not_null(n)).parent_declaration, (*this)); } +#line 4421 "reflect.h2" + public: [[nodiscard]] auto get_fwd_ad_type(cpp2::impl::in type) & -> std::string; -#line 317 "reflect.h2" - [[nodiscard]] auto declaration::parent_is_function() const& -> bool { return CPP2_UFCS(parent_is_function)((*cpp2::impl::assert_not_null(n))); } -#line 318 "reflect.h2" - [[nodiscard]] auto declaration::parent_is_object() const& -> bool { return CPP2_UFCS(parent_is_object)((*cpp2::impl::assert_not_null(n))); } -#line 319 "reflect.h2" - [[nodiscard]] auto declaration::parent_is_type() const& -> bool { return CPP2_UFCS(parent_is_type)((*cpp2::impl::assert_not_null(n))); } -#line 320 "reflect.h2" - [[nodiscard]] auto declaration::parent_is_namespace() const& -> bool { return CPP2_UFCS(parent_is_namespace)((*cpp2::impl::assert_not_null(n))); } -#line 321 "reflect.h2" - [[nodiscard]] auto declaration::parent_is_alias() const& -> bool { return CPP2_UFCS(parent_is_alias)((*cpp2::impl::assert_not_null(n))); } +#line 4439 "reflect.h2" + public: [[nodiscard]] auto get_rws_ad_type(cpp2::impl::in type) & -> std::string; -#line 323 "reflect.h2" - [[nodiscard]] auto declaration::parent_is_type_alias() const& -> bool { return CPP2_UFCS(parent_is_type_alias)((*cpp2::impl::assert_not_null(n))); } -#line 324 "reflect.h2" - [[nodiscard]] auto declaration::parent_is_namespace_alias() const& -> bool { return CPP2_UFCS(parent_is_namespace_alias)((*cpp2::impl::assert_not_null(n))); } -#line 325 "reflect.h2" - [[nodiscard]] auto declaration::parent_is_object_alias() const& -> bool { return CPP2_UFCS(parent_is_object_alias)((*cpp2::impl::assert_not_null(n))); } +#line 4457 "reflect.h2" + public: [[nodiscard]] auto get_reverse_passing_style(cpp2::impl::in p) const& -> passing_style; +using lookup_declaration_ret = std::vector; -#line 327 "reflect.h2" - [[nodiscard]] auto declaration::parent_is_polymorphic() const& -> bool { return CPP2_UFCS(parent_is_polymorphic)((*cpp2::impl::assert_not_null(n))); } -#line 329 "reflect.h2" - auto declaration::mark_for_removal_from_enclosing_type() & -> void - // this precondition should be sufficient ... - { - if (cpp2::type_safety.is_active() && !(parent_is_type()) ) { cpp2::type_safety.report_violation(""); } -#line 332 "reflect.h2" - auto test {CPP2_UFCS(type_member_mark_for_removal)((*cpp2::impl::assert_not_null(n)))}; - if (cpp2::cpp2_default.is_active() && !(cpp2::move(test)) ) { cpp2::cpp2_default.report_violation(""); }// ... to ensure this assert is true - } +#line 4485 "reflect.h2" + public: [[nodiscard]] auto lookup_declaration(cpp2::impl::in decl_name) & -> lookup_declaration_ret; - declaration::~declaration() noexcept{} -declaration::declaration(declaration const& that) - : declaration_base{ static_cast(that) }{} +#line 4512 "reflect.h2" + public: [[nodiscard]] auto lookup_variable_declaration(cpp2::impl::in name) & -> autodiff_declared_variable; +using lookup_function_declaration_ret = std::vector; -#line 338 "reflect.h2" -//----------------------------------------------------------------------- -// Function declarations -// -#line 345 "reflect.h2" - function_declaration::function_declaration( +#line 4534 "reflect.h2" + public: [[nodiscard]] auto lookup_function_declaration(cpp2::impl::in decl_name) & -> lookup_function_declaration_ret; +using lookup_member_function_declaration_ret = std::vector; - declaration_node* n_, - cpp2::impl::in s - ) - : declaration{ n_, s } -#line 350 "reflect.h2" - { - if (cpp2::cpp2_default.is_active() && !(CPP2_UFCS(is_function)((*cpp2::impl::assert_not_null(n)))) ) { cpp2::cpp2_default.report_violation(""); } - } +#line 4544 "reflect.h2" + public: [[nodiscard]] auto lookup_member_function_declaration(cpp2::impl::in obj_type, cpp2::impl::in decl_name) & -> lookup_member_function_declaration_ret; +using lookup_type_declaration_ret = std::vector; -#line 355 "reflect.h2" - [[nodiscard]] auto function_declaration::index_of_parameter_named(cpp2::impl::in s) const& -> int { return CPP2_UFCS(index_of_parameter_named)((*cpp2::impl::assert_not_null(n)), s); } -#line 356 "reflect.h2" - [[nodiscard]] auto function_declaration::has_parameter_named(cpp2::impl::in s) const& -> bool { return CPP2_UFCS(has_parameter_named)((*cpp2::impl::assert_not_null(n)), s); } -#line 357 "reflect.h2" - [[nodiscard]] auto function_declaration::has_in_parameter_named(cpp2::impl::in s) const& -> bool { return CPP2_UFCS(has_in_parameter_named)((*cpp2::impl::assert_not_null(n)), s); } -#line 358 "reflect.h2" - [[nodiscard]] auto function_declaration::has_in_ref_parameter_named(cpp2::impl::in s) const& -> bool { return CPP2_UFCS(has_in_ref_parameter_named)((*cpp2::impl::assert_not_null(n)), s); } -#line 359 "reflect.h2" - [[nodiscard]] auto function_declaration::has_copy_parameter_named(cpp2::impl::in s) const& -> bool { return CPP2_UFCS(has_copy_parameter_named)((*cpp2::impl::assert_not_null(n)), s); } -#line 360 "reflect.h2" - [[nodiscard]] auto function_declaration::has_inout_parameter_named(cpp2::impl::in s) const& -> bool { return CPP2_UFCS(has_inout_parameter_named)((*cpp2::impl::assert_not_null(n)), s); } -#line 361 "reflect.h2" - [[nodiscard]] auto function_declaration::has_out_parameter_named(cpp2::impl::in s) const& -> bool { return CPP2_UFCS(has_out_parameter_named)((*cpp2::impl::assert_not_null(n)), s); } -#line 362 "reflect.h2" - [[nodiscard]] auto function_declaration::has_move_parameter_named(cpp2::impl::in s) const& -> bool { return CPP2_UFCS(has_move_parameter_named)((*cpp2::impl::assert_not_null(n)), s); } -#line 363 "reflect.h2" - [[nodiscard]] auto function_declaration::has_forward_parameter_named(cpp2::impl::in s) const& -> bool { return CPP2_UFCS(has_forward_parameter_named)((*cpp2::impl::assert_not_null(n)), s); } -#line 364 "reflect.h2" - [[nodiscard]] auto function_declaration::first_parameter_name() const& -> std::string { return CPP2_UFCS(first_parameter_name)((*cpp2::impl::assert_not_null(n))); } -#line 366 "reflect.h2" - [[nodiscard]] auto function_declaration::has_parameter_with_name_and_pass(cpp2::impl::in s, cpp2::impl::in pass) const& -> bool { - return CPP2_UFCS(has_parameter_with_name_and_pass)((*cpp2::impl::assert_not_null(n)), s, pass); } -#line 368 "reflect.h2" - [[nodiscard]] auto function_declaration::is_function_with_this() const& -> bool { return CPP2_UFCS(is_function_with_this)((*cpp2::impl::assert_not_null(n))); } -#line 369 "reflect.h2" - [[nodiscard]] auto function_declaration::is_virtual() const& -> bool { return CPP2_UFCS(is_virtual_function)((*cpp2::impl::assert_not_null(n))); } -#line 370 "reflect.h2" - [[nodiscard]] auto function_declaration::is_defaultable() const& -> bool { return CPP2_UFCS(is_defaultable_function)((*cpp2::impl::assert_not_null(n))); } -#line 371 "reflect.h2" - [[nodiscard]] auto function_declaration::is_constructor() const& -> bool { return CPP2_UFCS(is_constructor)((*cpp2::impl::assert_not_null(n))); } -#line 372 "reflect.h2" - [[nodiscard]] auto function_declaration::is_default_constructor() const& -> bool { return CPP2_UFCS(is_default_constructor)((*cpp2::impl::assert_not_null(n))); } -#line 373 "reflect.h2" - [[nodiscard]] auto function_declaration::is_move() const& -> bool { return CPP2_UFCS(is_move)((*cpp2::impl::assert_not_null(n))); } -#line 374 "reflect.h2" - [[nodiscard]] auto function_declaration::is_swap() const& -> bool { return CPP2_UFCS(is_swap)((*cpp2::impl::assert_not_null(n))); } -#line 375 "reflect.h2" - [[nodiscard]] auto function_declaration::is_constructor_with_that() const& -> bool { return CPP2_UFCS(is_constructor_with_that)((*cpp2::impl::assert_not_null(n))); } -#line 376 "reflect.h2" - [[nodiscard]] auto function_declaration::is_constructor_with_in_that() const& -> bool { return CPP2_UFCS(is_constructor_with_in_that)((*cpp2::impl::assert_not_null(n))); } -#line 377 "reflect.h2" - [[nodiscard]] auto function_declaration::is_constructor_with_move_that() const& -> bool { return CPP2_UFCS(is_constructor_with_move_that)((*cpp2::impl::assert_not_null(n))); } -#line 378 "reflect.h2" - [[nodiscard]] auto function_declaration::is_assignment() const& -> bool { return CPP2_UFCS(is_assignment)((*cpp2::impl::assert_not_null(n))); } -#line 379 "reflect.h2" - [[nodiscard]] auto function_declaration::is_assignment_with_that() const& -> bool { return CPP2_UFCS(is_assignment_with_that)((*cpp2::impl::assert_not_null(n))); } -#line 380 "reflect.h2" - [[nodiscard]] auto function_declaration::is_assignment_with_in_that() const& -> bool { return CPP2_UFCS(is_assignment_with_in_that)((*cpp2::impl::assert_not_null(n))); } -#line 381 "reflect.h2" - [[nodiscard]] auto function_declaration::is_assignment_with_move_that() const& -> bool { return CPP2_UFCS(is_assignment_with_move_that)((*cpp2::impl::assert_not_null(n))); } -#line 382 "reflect.h2" - [[nodiscard]] auto function_declaration::is_destructor() const& -> bool { return CPP2_UFCS(is_destructor)((*cpp2::impl::assert_not_null(n))); } +#line 4554 "reflect.h2" + public: [[nodiscard]] auto lookup_type_declaration(cpp2::impl::in decl_name) & -> lookup_type_declaration_ret; +struct lookup_special_function_handling_ret { bool m; std::string code_primal; std::string code_fwd; std::string code_rws; }; -#line 384 "reflect.h2" - [[nodiscard]] auto function_declaration::is_copy_or_move() const& -> bool { return is_constructor_with_that() || is_assignment_with_that(); } -#line 386 "reflect.h2" - [[nodiscard]] auto function_declaration::has_declared_return_type() const& -> bool { return CPP2_UFCS(has_declared_return_type)((*cpp2::impl::assert_not_null(n))); } -#line 387 "reflect.h2" - [[nodiscard]] auto function_declaration::has_deduced_return_type() const& -> bool { return CPP2_UFCS(has_deduced_return_type)((*cpp2::impl::assert_not_null(n))); } -#line 388 "reflect.h2" - [[nodiscard]] auto function_declaration::has_bool_return_type() const& -> bool { return CPP2_UFCS(has_bool_return_type)((*cpp2::impl::assert_not_null(n))); } -#line 389 "reflect.h2" - [[nodiscard]] auto function_declaration::has_non_void_return_type() const& -> bool { return CPP2_UFCS(has_non_void_return_type)((*cpp2::impl::assert_not_null(n))); } -#line 391 "reflect.h2" - [[nodiscard]] auto function_declaration::unnamed_return_type() const& -> std::string { return CPP2_UFCS(unnamed_return_type_to_string)((*cpp2::impl::assert_not_null(n))); } +#line 4564 "reflect.h2" + public: [[nodiscard]] auto lookup_special_function_handling(cpp2::impl::in func_name, cpp2::impl::in n_args, cpp2::impl::in is_member) const& -> lookup_special_function_handling_ret; -#line 393 "reflect.h2" - [[nodiscard]] auto function_declaration::get_parameters() const& -> std::vector +#line 4589 "reflect.h2" + public: auto add_as_differentiated(cpp2::impl::in t) & -> void; - { - std::vector ret {}; - for ( auto const& param : CPP2_UFCS(get_function_parameters)((*cpp2::impl::assert_not_null(n))) ) { - static_cast(CPP2_UFCS(emplace_back)(ret, &*cpp2::impl::assert_not_null((*cpp2::impl::assert_not_null(param)).declaration), (*this))); - } - return ret; - } +#line 4597 "reflect.h2" + public: auto add_for_differentiation(cpp2::impl::in t) & -> void; -#line 403 "reflect.h2" - [[nodiscard]] auto function_declaration::is_binary_comparison_function() const& -> bool { return CPP2_UFCS(is_binary_comparison_function)((*cpp2::impl::assert_not_null(n))); } +#line 4623 "reflect.h2" + public: [[nodiscard]] static auto is_in_list(cpp2::impl::in v, cpp2::impl::in> list) -> bool; -#line 405 "reflect.h2" - [[nodiscard]] auto function_declaration::default_to_virtual() & -> decltype(auto) { return static_cast(CPP2_UFCS(make_function_virtual)((*cpp2::impl::assert_not_null(n)))); } +#line 4633 "reflect.h2" + public: auto enter_function() & -> void; -#line 407 "reflect.h2" - [[nodiscard]] auto function_declaration::make_virtual() & -> bool { return CPP2_UFCS(make_function_virtual)((*cpp2::impl::assert_not_null(n))); } +#line 4638 "reflect.h2" + public: auto leave_function() & -> void; -#line 409 "reflect.h2" - auto function_declaration::add_initializer(cpp2::impl::in source) & -> void +#line 4642 "reflect.h2" + public: auto push_stack(cpp2::impl::in decl) & -> void; -#line 412 "reflect.h2" - { - if ((*this).is_active() && !(!(has_initializer())) ) { (*this).report_violation(CPP2_CONTRACT_MSG("cannot add an initializer to a function that already has one")); } - if ((*this).is_active() && !(parent_is_type()) ) { (*this).report_violation(CPP2_CONTRACT_MSG("cannot add an initializer to a function that isn't in a type scope")); } - //require( !has_initializer(), - // "cannot add an initializer to a function that already has one"); - //require( parent_is_type(), - // "cannot add an initializer to a function that isn't in a type scope"); +#line 4655 "reflect.h2" + public: auto pop_stack() & -> void; -#line 418 "reflect.h2" - auto stmt {parse_statement(source)}; - if (!((cpp2::impl::as_(stmt)))) { - error("cannot add an initializer that is not a valid statement"); - return ; - } - require(CPP2_UFCS(add_function_initializer)((*cpp2::impl::assert_not_null(n)), std::move(cpp2::move(stmt))), - std::string("unexpected error while attempting to add initializer")); - } +#line 4670 "reflect.h2" + public: auto finish() & -> void; - function_declaration::function_declaration(function_declaration const& that) - : declaration{ static_cast(that) }{} +#line 4677 "reflect.h2" + public: [[nodiscard]] auto get_self() & -> autodiff_context*; + public: autodiff_context(autodiff_context const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(autodiff_context const&) -> void = delete; -#line 429 "reflect.h2" -//----------------------------------------------------------------------- -// Object declarations -// -#line 436 "reflect.h2" - object_declaration::object_declaration( +#line 4681 "reflect.h2" +}; - declaration_node* n_, - cpp2::impl::in s - ) - : declaration{ n_, s } -#line 441 "reflect.h2" - { +class autodiff_diff_code { + public: autodiff_context* ctx; - if (cpp2::cpp2_default.is_active() && !(CPP2_UFCS(is_object)((*cpp2::impl::assert_not_null(n)))) ) { cpp2::cpp2_default.report_violation(""); } - } + public: std::string fwd {""}; + public: std::string rws_primal {""}; + public: std::string rws_backprop {""}; -#line 446 "reflect.h2" - [[nodiscard]] auto object_declaration::is_const() const& -> bool { return CPP2_UFCS(is_const)((*cpp2::impl::assert_not_null(n))); } -#line 447 "reflect.h2" - [[nodiscard]] auto object_declaration::has_wildcard_type() const& -> bool { return CPP2_UFCS(has_wildcard_type)((*cpp2::impl::assert_not_null(n))); } + public: autodiff_diff_code(cpp2::impl::in ctx_); +#line 4690 "reflect.h2" + public: auto operator=(cpp2::impl::in ctx_) -> autodiff_diff_code& ; -#line 449 "reflect.h2" - [[nodiscard]] auto object_declaration::type() const& -> std::string{ - auto ret {CPP2_UFCS(object_type)((*cpp2::impl::assert_not_null(n)))}; - require(!(contains(ret, "(*ERROR*)")), - "cannot to_string this type: " + ret); - return ret; - } +#line 4693 "reflect.h2" + public: autodiff_diff_code(autodiff_diff_code const& that); +#line 4693 "reflect.h2" + public: auto operator=(autodiff_diff_code const& that) -> autodiff_diff_code& ; +#line 4693 "reflect.h2" + public: autodiff_diff_code(autodiff_diff_code&& that) noexcept; +#line 4693 "reflect.h2" + public: auto operator=(autodiff_diff_code&& that) noexcept -> autodiff_diff_code& ; -#line 456 "reflect.h2" - [[nodiscard]] auto object_declaration::initializer() const& -> std::string{ - auto ret {CPP2_UFCS(object_initializer)((*cpp2::impl::assert_not_null(n)))}; - require(!(contains(ret, "(*ERROR*)")), - "cannot to_string this initializer: " + ret); - return ret; - } + public: auto add_forward(cpp2::impl::in v) & -> void; + public: auto add_reverse_primal(cpp2::impl::in v) & -> void; + public: auto add_reverse_backprop(cpp2::impl::in v) & -> void; - object_declaration::object_declaration(object_declaration const& that) - : declaration{ static_cast(that) }{} + public: auto reset() & -> void; -#line 465 "reflect.h2" -//----------------------------------------------------------------------- -// Type declarations -// +#line 4706 "reflect.h2" + public: auto operator=(cpp2::impl::in v) -> autodiff_diff_code& ; -#line 472 "reflect.h2" - type_declaration::type_declaration( +#line 4712 "reflect.h2" + public: auto operator+=(cpp2::impl::in v) & -> void; - declaration_node* n_, - cpp2::impl::in s - ) - : declaration{ n_, s } -#line 477 "reflect.h2" - { +#line 4717 "reflect.h2" + public: auto operator+=(cpp2::impl::in v) & -> void; - if (cpp2::cpp2_default.is_active() && !(CPP2_UFCS(is_type)((*cpp2::impl::assert_not_null(n)))) ) { cpp2::cpp2_default.report_violation(""); } - } +#line 4722 "reflect.h2" + public: [[nodiscard]] auto empty() const& -> bool; -#line 482 "reflect.h2" - auto type_declaration::reserve_names(cpp2::impl::in name, auto&& ...etc) const& -> void - { // etc is not declared ':string_view' for compatibility with GCC 10.x - for ( - auto const& m : get_members() ) { - CPP2_UFCS(require)(m, !(CPP2_UFCS(has_name)(m, name)), - "in a '" + cpp2::to_string(get_metafunction_name()) + "' type, the name '" + cpp2::to_string(name) + "' " - "is reserved for use by the '" + cpp2::to_string(get_metafunction_name()) + "' implementation" - ); - } - if constexpr (!(CPP2_PACK_EMPTY(etc))) { - reserve_names(CPP2_FORWARD(etc)...); - } - } +#line 4725 "reflect.h2" +}; -#line 496 "reflect.h2" - [[nodiscard]] auto type_declaration::is_polymorphic() const& -> bool { return CPP2_UFCS(is_polymorphic)((*cpp2::impl::assert_not_null(n))); } -#line 497 "reflect.h2" - [[nodiscard]] auto type_declaration::is_final() const& -> bool { return CPP2_UFCS(is_type_final)((*cpp2::impl::assert_not_null(n))); } -#line 498 "reflect.h2" - [[nodiscard]] auto type_declaration::make_final() & -> bool { return CPP2_UFCS(make_type_final)((*cpp2::impl::assert_not_null(n))); } +#line 4732 "reflect.h2" +class autodiff_activity_check: public simple_traverser { -#line 500 "reflect.h2" - [[nodiscard]] auto type_declaration::get_member_functions() const& -> std::vector +#line 4735 "reflect.h2" + public: autodiff_context* ctx; + public: bool active {false}; - { - std::vector ret {}; - for ( - auto const& d : CPP2_UFCS(get_type_scope_declarations)((*cpp2::impl::assert_not_null(n)), declaration_node::functions) ) { - static_cast(CPP2_UFCS(emplace_back)(ret, d, (*this))); - } - return ret; - } + public: autodiff_activity_check(cpp2::impl::in ctx_); -#line 511 "reflect.h2" - [[nodiscard]] auto type_declaration::get_member_functions_needing_initializer() const& -> std::vector +#line 4742 "reflect.h2" + public: auto traverse(cpp2::impl::in t) -> void override; - { - std::vector ret {}; - for ( - auto const& d : CPP2_UFCS(get_type_scope_declarations)((*cpp2::impl::assert_not_null(n)), declaration_node::functions) ) - if ( !(CPP2_UFCS(has_initializer)((*cpp2::impl::assert_not_null(d)))) - && !(CPP2_UFCS(is_virtual_function)((*cpp2::impl::assert_not_null(d)))) - && !(CPP2_UFCS(is_defaultable_function)((*cpp2::impl::assert_not_null(d))))) - { - static_cast(CPP2_UFCS(emplace_back)(ret, d, (*this))); - } - return ret; - } +#line 4754 "reflect.h2" + public: auto traverse(cpp2::impl::in o) -> void override; -#line 526 "reflect.h2" - [[nodiscard]] auto type_declaration::get_member_objects() const& -> std::vector +#line 4772 "reflect.h2" + public: auto traverse(cpp2::impl::in primary) -> void override; - { - std::vector ret {}; - for ( auto const& d : CPP2_UFCS(get_type_scope_declarations)((*cpp2::impl::assert_not_null(n)), declaration_node::objects) ) { - static_cast(CPP2_UFCS(emplace_back)(ret, d, (*this))); - } - return ret; - } +#line 4796 "reflect.h2" + public: auto traverse(cpp2::impl::in postfix) -> void override; + public: autodiff_activity_check(autodiff_activity_check const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(autodiff_activity_check const&) -> void = delete; -#line 536 "reflect.h2" - [[nodiscard]] auto type_declaration::get_member_types() const& -> std::vector - { - std::vector ret {}; - for ( auto const& d : CPP2_UFCS(get_type_scope_declarations)((*cpp2::impl::assert_not_null(n)), declaration_node::types) ) { - static_cast(CPP2_UFCS(emplace_back)(ret, d, (*this))); - } - return ret; - } +#line 4828 "reflect.h2" +}; -#line 546 "reflect.h2" - [[nodiscard]] auto type_declaration::get_member_aliases() const& -> std::vector +class autodiff_handler_base { + public: autodiff_context* ctx; - { - std::vector ret {}; - for ( auto const& d : CPP2_UFCS(get_type_scope_declarations)((*cpp2::impl::assert_not_null(n)), declaration_node::aliases) ) { - static_cast(CPP2_UFCS(emplace_back)(ret, d, (*this))); - } - return ret; - } + public: autodiff_diff_code diff; -#line 556 "reflect.h2" - [[nodiscard]] auto type_declaration::get_members() const& -> std::vector + public: autodiff_handler_base(cpp2::impl::in ctx_); +#line 4835 "reflect.h2" + public: auto operator=(cpp2::impl::in ctx_) -> autodiff_handler_base& ; - { - std::vector ret {}; - for ( auto const& d : CPP2_UFCS(get_type_scope_declarations)((*cpp2::impl::assert_not_null(n)), declaration_node::all) ) { - static_cast(CPP2_UFCS(emplace_back)(ret, d, (*this))); - } - return ret; - } +#line 4841 "reflect.h2" + public: auto append(autodiff_handler_base const& o) & -> void; + public: autodiff_handler_base(autodiff_handler_base const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(autodiff_handler_base const&) -> void = delete; -#line 566 "reflect.h2" - [[nodiscard]] auto type_declaration::query_declared_value_set_functions() const& -> query_declared_value_set_functions_ret -#line 573 "reflect.h2" - { - cpp2::impl::deferred_init out_this_in_that; - cpp2::impl::deferred_init out_this_move_that; - cpp2::impl::deferred_init inout_this_in_that; - cpp2::impl::deferred_init inout_this_move_that; -#line 574 "reflect.h2" - auto declared {CPP2_UFCS(find_declared_value_set_functions)((*cpp2::impl::assert_not_null(n)))}; - out_this_in_that.construct(declared.out_this_in_that != nullptr); - out_this_move_that.construct(declared.out_this_move_that != nullptr); - inout_this_in_that.construct(declared.inout_this_in_that != nullptr); - inout_this_move_that.construct(cpp2::move(declared).inout_this_move_that != nullptr); - return { std::move(out_this_in_that.value()), std::move(out_this_move_that.value()), std::move(inout_this_in_that.value()), std::move(inout_this_move_that.value()) }; // NOLINT(performance-move-const-arg) - } +#line 4846 "reflect.h2" +}; -#line 582 "reflect.h2" - auto type_declaration::add_member(cpp2::impl::in source) & -> void - { - auto decl {parse_statement(source)}; - if (!((cpp2::impl::as_(decl)))) { - error("the provided source string is not a valid statement"); - return ; - } - if (!(CPP2_UFCS(is_declaration)((*cpp2::impl::assert_not_null(decl))))) { - error("cannot add a member that is not a declaration"); - } - require(CPP2_UFCS(add_type_member)((*cpp2::impl::assert_not_null(n)), std::move(cpp2::move(decl))), - std::string("unexpected error while attempting to add member:\n") + source); - } +class autodiff_expression_handler: public simple_traverser, public autodiff_handler_base { -#line 596 "reflect.h2" - [[nodiscard]] auto type_declaration::remove_marked_members() & -> decltype(auto) { return CPP2_UFCS(type_remove_marked_members)((*cpp2::impl::assert_not_null(n))); } -#line 597 "reflect.h2" - [[nodiscard]] auto type_declaration::remove_all_members() & -> decltype(auto) { return CPP2_UFCS(type_remove_all_members)((*cpp2::impl::assert_not_null(n))); } +#line 4852 "reflect.h2" + public: using base = simple_traverser; -#line 599 "reflect.h2" - [[nodiscard]] auto type_declaration::disable_member_function_generation() & -> decltype(auto) { return CPP2_UFCS(type_disable_member_function_generation)((*cpp2::impl::assert_not_null(n))); } + public: std::string primal_expr {""}; + public: std::string fwd_expr {""}; + public: std::string rws_expr {""}; - type_declaration::type_declaration(type_declaration const& that) - : declaration{ static_cast(that) }{} + public: autodiff_expression_handler(cpp2::impl::in ctx_); -#line 603 "reflect.h2" -//----------------------------------------------------------------------- -// Alias declarations -// +#line 4862 "reflect.h2" + public: [[nodiscard]] auto add_suffix_if_not_wildcard(cpp2::impl::in lhs, cpp2::impl::in suffix) const& -> std::string; -#line 610 "reflect.h2" - alias_declaration::alias_declaration( +#line 4871 "reflect.h2" + public: [[nodiscard]] auto prepare_backprop(cpp2::impl::in rhs_b, cpp2::impl::in lhs, cpp2::impl::in lhs_d, cpp2::impl::in lhs_b) const& -> std::string; - declaration_node* n_, - cpp2::impl::in s - ) - : declaration{ n_, s } -#line 615 "reflect.h2" - { +#line 4879 "reflect.h2" + public: [[nodiscard]] auto prepare_backprop(cpp2::impl::in rhs_b, cpp2::impl::in lhs) const& -> std::string; - if (cpp2::cpp2_default.is_active() && !(CPP2_UFCS(is_alias)((*cpp2::impl::assert_not_null(n)))) ) { cpp2::cpp2_default.report_violation(""); } - } + public: auto gen_assignment(cpp2::impl::in lhs, cpp2::impl::in lhs_d, cpp2::impl::in lhs_b, cpp2::impl::in rhs, cpp2::impl::in rhs_d, cpp2::impl::in rhs_b) & -> void; - alias_declaration::alias_declaration(alias_declaration const& that) - : declaration{ static_cast(that) }{} +#line 4892 "reflect.h2" + public: [[nodiscard]] auto gen_assignment(cpp2::impl::in lhs, cpp2::impl::in lhs_d, cpp2::impl::in lhs_b) & -> decltype(auto); -#line 622 "reflect.h2" -//----------------------------------------------------------------------- -// -// Metafunctions - these are hardwired for now until we get to the -// step of writing a Cpp2 interpreter to run inside the compiler -// -//----------------------------------------------------------------------- -// + public: [[nodiscard]] auto gen_assignment(cpp2::impl::in lhs) & -> decltype(auto); -//----------------------------------------------------------------------- -// Some common metafunction helpers (metafunctions are just functions, -// so they can be factored as usual) -// -#line 634 "reflect.h2" -auto add_virtual_destructor(meta::type_declaration& t) -> void -{ - CPP2_UFCS(add_member)(t, "operator=: (virtual move this) = { }"); -} +#line 4898 "reflect.h2" + public: auto gen_declaration(cpp2::impl::in lhs, cpp2::impl::in lhs_d, cpp2::impl::in lhs_b, cpp2::impl::in rhs, cpp2::impl::in rhs_d, cpp2::impl::in rhs_b, cpp2::impl::in type, cpp2::impl::in type_d, cpp2::impl::in type_b) & -> void; -#line 640 "reflect.h2" -//----------------------------------------------------------------------- -// -// "... an abstract base class defines an interface ..." -// -// -- Stroustrup (The Design and Evolution of C++, 12.3.1) -// -//----------------------------------------------------------------------- -// -// interface -// -// an abstract base class having only pure virtual functions -// -#line 652 "reflect.h2" -auto interface(meta::type_declaration& t) -> void -{ - auto has_dtor {false}; +#line 4910 "reflect.h2" + public: [[nodiscard]] auto gen_declaration(cpp2::impl::in lhs, cpp2::impl::in lhs_d, cpp2::impl::in lhs_b, cpp2::impl::in rhs, cpp2::impl::in rhs_d, cpp2::impl::in rhs_b, cpp2::impl::in type) & -> decltype(auto); - for ( auto& m : CPP2_UFCS(get_members)(t) ) - { - CPP2_UFCS(require)(m, !(CPP2_UFCS(is_object)(m)), - "interfaces may not contain data objects"); - if (CPP2_UFCS(is_function)(m)) { - auto mf {CPP2_UFCS(as_function)(m)}; - CPP2_UFCS(require)(mf, !(CPP2_UFCS(is_copy_or_move)(mf)), - "interfaces may not copy or move; consider a virtual clone() instead"); - CPP2_UFCS(require)(mf, !(CPP2_UFCS(has_initializer)(mf)), - "interface functions must not have a function body; remove the '=' initializer"); - CPP2_UFCS(require)(mf, CPP2_UFCS(make_public)(mf), - "interface functions must be public"); - CPP2_UFCS(default_to_virtual)(mf); - has_dtor |= CPP2_UFCS(is_destructor)(cpp2::move(mf)); - } - } + public: [[nodiscard]] auto gen_declaration(cpp2::impl::in lhs, cpp2::impl::in lhs_d, cpp2::impl::in lhs_b, cpp2::impl::in type) & -> decltype(auto); - if (!(cpp2::move(has_dtor))) { - CPP2_UFCS(add_virtual_destructor)(t); - } -} + public: [[nodiscard]] auto gen_declaration(cpp2::impl::in lhs, cpp2::impl::in type) & -> decltype(auto); -#line 679 "reflect.h2" -//----------------------------------------------------------------------- -// -// "C.35: A base class destructor should be either public and -// virtual, or protected and non-virtual." -// -// "[C.43] ... a base class should not be copyable, and so does not -// necessarily need a default constructor." -// -// -- Stroustrup, Sutter, et al. (C++ Core Guidelines) -// -//----------------------------------------------------------------------- -// -// polymorphic_base -// -// A pure polymorphic base type that is not copyable, and whose -// destructor is either public and virtual or protected and nonvirtual. -// -// Unlike an interface, it can have nonpublic and nonvirtual functions. -// -#line 698 "reflect.h2" -auto polymorphic_base(meta::type_declaration& t) -> void -{ - auto has_dtor {false}; +#line 4919 "reflect.h2" + public: class primal_fwd_rws_name { + public: std::string primal {""}; + public: std::string fwd {""}; + public: std::string rws {""}; + public: bool active {false}; + public: primal_fwd_rws_name(auto const& primal_, auto const& fwd_, auto const& rws_, auto const& active_); +public: primal_fwd_rws_name(); - for ( auto& mf : CPP2_UFCS(get_member_functions)(t) ) - { - if (CPP2_UFCS(is_default_access)(mf)) { - CPP2_UFCS(default_to_public)(mf); - } - CPP2_UFCS(require)(mf, !(CPP2_UFCS(is_copy_or_move)(mf)), - "polymorphic base types may not copy or move; consider a virtual clone() instead"); - if (CPP2_UFCS(is_destructor)(mf)) { - has_dtor = true; - CPP2_UFCS(require)(mf, ((CPP2_UFCS(is_public)(mf) || CPP2_UFCS(is_default_access)(mf)) && CPP2_UFCS(is_virtual)(mf)) - || (CPP2_UFCS(is_protected)(mf) && !(CPP2_UFCS(is_virtual)(mf))), - "a polymorphic base type destructor must be public and virtual, or protected and nonvirtual"); - } - } +#line 4924 "reflect.h2" + }; - if (!(cpp2::move(has_dtor))) { - CPP2_UFCS(add_virtual_destructor)(t); - } -} + public: [[nodiscard]] auto handle_expression_list(cpp2::impl::in list) & -> std::vector; -#line 723 "reflect.h2" -//----------------------------------------------------------------------- -// -// "... A totally ordered type ... requires operator<=> that -// returns std::strong_ordering. If the function is not -// user-written, a lexicographical memberwise implementation -// is generated by default..." +#line 4935 "reflect.h2" + public: [[nodiscard]] auto handle_expression_term(auto const& term) & -> primal_fwd_rws_name; + +#line 4996 "reflect.h2" + public: auto handle_function_call(cpp2::impl::in postfix, cpp2::impl::in has_return) & -> void; + +#line 5176 "reflect.h2" + public: [[nodiscard]] auto handle_special_function(cpp2::impl::in object, cpp2::impl::in object_d, cpp2::impl::in object_b, cpp2::impl::in function_name, cpp2::impl::in> args) & -> bool; + +#line 5221 "reflect.h2" + public: auto traverse(cpp2::impl::in expr) -> void override; + +#line 5225 "reflect.h2" + public: auto traverse(cpp2::impl::in binexpr) -> void override; + +#line 5229 "reflect.h2" + public: auto traverse(cpp2::impl::in binexpr) -> void override; + +#line 5233 "reflect.h2" + public: auto traverse(cpp2::impl::in binexpr) -> void override; + +#line 5237 "reflect.h2" + public: auto traverse(cpp2::impl::in binexpr) -> void override; + +#line 5241 "reflect.h2" + public: auto traverse(cpp2::impl::in binexpr) -> void override; + +#line 5245 "reflect.h2" + public: auto traverse(cpp2::impl::in binexpr) -> void override; + +#line 5249 "reflect.h2" + public: auto traverse(cpp2::impl::in binexpr) -> void override; + +#line 5253 "reflect.h2" + public: auto traverse(cpp2::impl::in binexpr) -> void override; + +#line 5257 "reflect.h2" + public: auto traverse(cpp2::impl::in binexpr) -> void override; + +#line 5261 "reflect.h2" + public: auto traverse(cpp2::impl::in binexpr) -> void override; + +#line 5265 "reflect.h2" + public: auto traverse(cpp2::impl::in binexpr) -> void override; + +#line 5307 "reflect.h2" + public: auto traverse(cpp2::impl::in binexpr) -> void override; + +#line 5394 "reflect.h2" + public: auto traverse(cpp2::impl::in isas) -> void override; + +#line 5398 "reflect.h2" + public: auto traverse(cpp2::impl::in prefix) -> void override; + +#line 5414 "reflect.h2" + public: auto traverse(cpp2::impl::in postfix) -> void override; + +#line 5454 "reflect.h2" + public: auto traverse(cpp2::impl::in primary) -> void override; + public: autodiff_expression_handler(autodiff_expression_handler const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(autodiff_expression_handler const&) -> void = delete; + + +#line 5489 "reflect.h2" +}; + +class autodiff_stmt_handler: public simple_traverser, public autodiff_handler_base { + +#line 5495 "reflect.h2" + public: using base = simple_traverser; + + private: meta::function_declaration mf; + + private: std::vector last_params {}; + private: std::vector overwritten {}; + + private: bool overwrite_push_pop {false}; + + public: autodiff_stmt_handler(cpp2::impl::in ctx_, cpp2::impl::in mf_); + +#line 5509 "reflect.h2" + public: [[nodiscard]] auto handle_stmt_parameters(cpp2::impl::in> params) & -> autodiff_diff_code; + +#line 5551 "reflect.h2" + public: auto traverse(cpp2::impl::in decl) -> void override; + +#line 5556 "reflect.h2" + public: auto traverse(cpp2::impl::in f) -> void override; + +#line 5561 "reflect.h2" + public: auto traverse(cpp2::impl::in o) -> void override; + +#line 5623 "reflect.h2" + public: auto traverse(cpp2::impl::in t) -> void override; + +#line 5628 "reflect.h2" + public: auto traverse(cpp2::impl::in t) -> void override; + +#line 5633 "reflect.h2" + public: auto traverse(cpp2::impl::in stmt) -> void override; + +#line 5640 "reflect.h2" + public: auto traverse(cpp2::impl::in stmt) -> void override; + +#line 5675 "reflect.h2" + public: auto traverse(cpp2::impl::in stmt) -> void override; + +#line 5691 "reflect.h2" + public: [[nodiscard]] auto reverse_next(cpp2::impl::in expr) const& -> std::string; + +#line 5706 "reflect.h2" + public: auto traverse(cpp2::impl::in stmt) -> void override; + +#line 5804 "reflect.h2" + public: auto traverse(cpp2::impl::in stmt) -> void override; + +#line 5815 "reflect.h2" + public: auto traverse(cpp2::impl::in expr) -> void override; + +#line 5819 "reflect.h2" + public: auto traverse(cpp2::impl::in binexpr) -> void override; + +#line 5870 "reflect.h2" + public: auto traverse(cpp2::impl::in binexpr) -> void override; + +#line 5874 "reflect.h2" + public: auto traverse(cpp2::impl::in binexpr) -> void override; + +#line 5878 "reflect.h2" + public: auto traverse(cpp2::impl::in binexpr) -> void override; + +#line 5882 "reflect.h2" + public: auto traverse(cpp2::impl::in binexpr) -> void override; + +#line 5886 "reflect.h2" + public: auto traverse(cpp2::impl::in binexpr) -> void override; + +#line 5890 "reflect.h2" + public: auto traverse(cpp2::impl::in binexpr) -> void override; + +#line 5894 "reflect.h2" + public: auto traverse(cpp2::impl::in binexpr) -> void override; + +#line 5898 "reflect.h2" + public: auto traverse(cpp2::impl::in binexpr) -> void override; + +#line 5902 "reflect.h2" + public: auto traverse(cpp2::impl::in binexpr) -> void override; + +#line 5906 "reflect.h2" + public: auto traverse(cpp2::impl::in binexpr) -> void override; + +#line 5910 "reflect.h2" + public: auto traverse(cpp2::impl::in binexpr) -> void override; + +#line 5914 "reflect.h2" + public: auto traverse(cpp2::impl::in isas) -> void override; + +#line 5918 "reflect.h2" + public: auto traverse(cpp2::impl::in prefix) -> void override; + +#line 5923 "reflect.h2" + public: auto traverse(cpp2::impl::in postfix) -> void override; + +#line 5955 "reflect.h2" + public: auto traverse(cpp2::impl::in primary) -> void override; + public: autodiff_stmt_handler(autodiff_stmt_handler const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(autodiff_stmt_handler const&) -> void = delete; + + +#line 5959 "reflect.h2" +}; + +class autodiff_declaration_handler: public simple_traverser, public autodiff_handler_base { + +#line 5965 "reflect.h2" + public: using base = simple_traverser; + + private: meta::type_or_namespace_declaration decl; + + private: bool is_type_context {false}; + private: std::string diff_ad_type {""}; + + public: autodiff_declaration_handler(cpp2::impl::in ctx_, cpp2::impl::in decl_); + +#line 5977 "reflect.h2" + public: auto traverse(cpp2::impl::in decl_) -> void override; + +#line 5982 "reflect.h2" + public: auto traverse(cpp2::impl::in f) -> void override; + +#line 6140 "reflect.h2" + public: auto traverse(cpp2::impl::in o) -> void override; + +#line 6168 "reflect.h2" + public: auto traverse(cpp2::impl::in t) -> void override; + +#line 6192 "reflect.h2" + public: auto traverse(cpp2::impl::in t) -> void override; + +#line 6197 "reflect.h2" + public: auto traverse(cpp2::impl::in stmt) -> void override; + public: autodiff_declaration_handler(autodiff_declaration_handler const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(autodiff_declaration_handler const&) -> void = delete; + + +#line 6200 "reflect.h2" +}; + +#line 6203 "reflect.h2" +auto autodiff(meta::type_declaration& t) -> void; + +#line 6309 "reflect.h2" +using error_func = std::function x)>; + +#line 6313 "reflect.h2" +class expression_flags + { +private: cpp2::u8 _value; private: constexpr expression_flags(cpp2::impl::in _val); + +private: constexpr auto operator=(cpp2::impl::in _val) -> expression_flags& ; +public: constexpr auto operator|=(expression_flags const& that) & -> decltype(auto); +public: constexpr auto operator&=(expression_flags const& that) & -> decltype(auto); +public: constexpr auto operator^=(expression_flags const& that) & -> decltype(auto); +public: [[nodiscard]] constexpr auto operator|(expression_flags const& that) const& -> expression_flags; +public: [[nodiscard]] constexpr auto operator&(expression_flags const& that) const& -> expression_flags; +public: [[nodiscard]] constexpr auto operator^(expression_flags const& that) const& -> expression_flags; +public: [[nodiscard]] constexpr auto has(expression_flags const& that) const& -> bool; +public: constexpr auto set(expression_flags const& that) & -> void; +public: constexpr auto clear(expression_flags const& that) & -> void; +public: static const expression_flags case_insensitive; +public: static const expression_flags multiple_lines; +public: static const expression_flags single_line; +public: static const expression_flags no_group_captures; +public: static const expression_flags perl_code_syntax; +public: static const expression_flags perl_code_syntax_in_classes; +public: static const expression_flags none; +public: [[nodiscard]] constexpr auto get_raw_value() const& -> cpp2::u8; +public: constexpr explicit expression_flags(); +public: constexpr expression_flags(expression_flags const& that); +public: constexpr auto operator=(expression_flags const& that) -> expression_flags& ; +public: constexpr expression_flags(expression_flags&& that) noexcept; +public: constexpr auto operator=(expression_flags&& that) noexcept -> expression_flags& ; +public: [[nodiscard]] auto operator<=>(expression_flags const& that) const& -> std::strong_ordering = default; +public: [[nodiscard]] auto to_string_impl(cpp2::impl::in prefix, cpp2::impl::in separator) const& -> std::string; +public: [[nodiscard]] auto to_string() const& -> std::string; +public: [[nodiscard]] auto to_code() const& -> std::string; +public: [[nodiscard]] static auto from_string(cpp2::impl::in s) -> expression_flags; +public: [[nodiscard]] static auto from_code(cpp2::impl::in s) -> expression_flags; + +#line 6321 "reflect.h2" +}; + +#line 6329 "reflect.h2" +class regex_token + { + public: std::string string_rep; + + public: regex_token(cpp2::impl::in str); + +#line 6337 "reflect.h2" + public: explicit regex_token(); + +#line 6342 "reflect.h2" + public: virtual auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void = 0; + public: [[nodiscard]] virtual auto reverse() const -> std::shared_ptr = 0; + + public: virtual auto add_groups([[maybe_unused]] std::set& unnamed_param_2) const -> void; + public: [[nodiscard]] auto to_string() const& -> std::string; + public: auto set_string(cpp2::impl::in s) & -> void; + public: virtual ~regex_token() noexcept; + + public: regex_token(regex_token const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_token const&) -> void = delete; + +#line 6348 "reflect.h2" +}; + +using token_ptr = std::shared_ptr; +using token_vec = std::vector; + +#line 6354 "reflect.h2" +// Adds a check in code generation. // -// -- P0707R4, section 3 +class regex_token_check +: public regex_token { + +#line 6360 "reflect.h2" + private: std::string check; + + public: regex_token_check(cpp2::impl::in str, cpp2::impl::in check_); + +#line 6367 "reflect.h2" + public: auto generate_code(generation_context& ctx) const -> void override; + +#line 6371 "reflect.h2" + public: [[nodiscard]] auto reverse() const -> token_ptr override; + public: virtual ~regex_token_check() noexcept; + + public: regex_token_check(regex_token_check const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_token_check const&) -> void = delete; + +#line 6372 "reflect.h2" +}; + +#line 6375 "reflect.h2" +// Adds code in code generation. // -// Note: This feature derived from Cpp2 was already adopted -// into Standard C++ via paper P0515, so most of the -// heavy lifting is done by the Cpp1 C++20/23 compiler, -// including the memberwise default semantics -// (In contrast, cppfront has to do the work itself for -// default memberwise semantics for operator= assignment -// as those aren't yet part of Standard C++) +class regex_token_code +: public regex_token { + +#line 6381 "reflect.h2" + private: std::string code; + + public: regex_token_code(cpp2::impl::in str, cpp2::impl::in code_); + +#line 6388 "reflect.h2" + public: auto generate_code(generation_context& ctx) const -> void override; + +#line 6392 "reflect.h2" + public: [[nodiscard]] auto reverse() const -> token_ptr override; + public: virtual ~regex_token_code() noexcept; + + public: regex_token_code(regex_token_code const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_token_code const&) -> void = delete; + +#line 6393 "reflect.h2" +}; + +#line 6396 "reflect.h2" +// Token that does not influence the matching. E.g. comment. // -//----------------------------------------------------------------------- +class regex_token_empty +: public regex_token { + +#line 6402 "reflect.h2" + public: regex_token_empty(cpp2::impl::in str); + +#line 6406 "reflect.h2" + public: auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void override; + +#line 6410 "reflect.h2" + public: [[nodiscard]] auto reverse() const -> token_ptr override; + public: virtual ~regex_token_empty() noexcept; + + public: regex_token_empty(regex_token_empty const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_token_empty const&) -> void = delete; + +#line 6411 "reflect.h2" +}; + +#line 6414 "reflect.h2" +// Represents a list of regex tokens as one token. +// +class regex_token_list +: public regex_token { + +#line 6420 "reflect.h2" + public: token_vec tokens; + + public: regex_token_list(cpp2::impl::in t); + +#line 6427 "reflect.h2" + public: auto generate_code(generation_context& ctx) const -> void override; + +#line 6433 "reflect.h2" + public: auto add_groups(std::set& groups) const -> void override; + +#line 6439 "reflect.h2" + public: [[nodiscard]] static auto gen_string(cpp2::impl::in vec) -> std::string; + +#line 6447 "reflect.h2" + public: [[nodiscard]] auto reverse() const -> token_ptr override; + public: virtual ~regex_token_list() noexcept; + + public: regex_token_list(regex_token_list const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_token_list const&) -> void = delete; + + +#line 6459 "reflect.h2" +}; + +#line 6462 "reflect.h2" +// +// Parse and generation context. +// + +// State of the current capturing group. See '()' +// +class parse_context_group_state + { + public: token_vec cur_match_list {}; // Current list of matchers. + public: token_vec alternate_match_lists {}; // List of alternate matcher lists. E.g. ab|cd|xy. + public: expression_flags modifiers {}; // Current modifiers for the group/regular expression. + + // Start a new alternative. + public: auto next_alternative() & -> void; + +#line 6482 "reflect.h2" + // Swap this state with the other one. NOLINTNEXTLINE(performance-noexcept-swap) + public: auto swap(parse_context_group_state& t) & -> void; + +#line 6489 "reflect.h2" + // Convert this state into a regex token. + public: [[nodiscard]] auto get_as_token() & -> token_ptr; + +#line 6501 "reflect.h2" + // Add a token to the current matcher list. + public: auto add(cpp2::impl::in token) & -> void; + +#line 6506 "reflect.h2" + // True if current matcher list is empty. + public: [[nodiscard]] auto empty() const& -> bool; + +#line 6510 "reflect.h2" + // Apply optimizations to the matcher list. + public: static auto post_process_list(token_vec& list) -> void; + public: parse_context_group_state(auto const& cur_match_list_, auto const& alternate_match_lists_, auto const& modifiers_); +public: parse_context_group_state(); + + +#line 6524 "reflect.h2" +}; + +#line 6527 "reflect.h2" +// State for the branch reset. Takes care of the group numbering. See '(|)'. // +class parse_context_branch_reset_state + { + public: bool is_active {false}; // If we have a branch reset group. + public: int cur_group {1}; // Next group identifier. 0 == global capture group. + public: int max_group {1}; // Maximum group identifier generated. + public: int from {1}; // Starting identifier on new alternative branch. + + // Next group identifier. + public: [[nodiscard]] auto next() & -> int; + +#line 6545 "reflect.h2" + // Set next group identifier. + public: auto set_next(cpp2::impl::in g) & -> void; + +#line 6551 "reflect.h2" + // Start a new alternative branch. + public: auto next_alternative() & -> void; + +#line 6558 "reflect.h2" + // Initialize for a branch reset group. + public: auto set_active_reset(cpp2::impl::in restart) & -> void; + public: parse_context_branch_reset_state(auto const& is_active_, auto const& cur_group_, auto const& max_group_, auto const& from_); +public: parse_context_branch_reset_state(); + + +#line 6565 "reflect.h2" +}; + +#line 6568 "reflect.h2" +// Context during parsing of the regular expressions. +// +// Keeps track of the distributed group identifiers, current parsed group and branch resets. +// +class parse_context + { + private: std::string_view regex; // Regular expression string. + private: size_t pos {0}; // Current parsing position. + private: token_ptr root; // Token representing the regular expression. + + public: bool is_start_match {false}; // If the regex contains \G at the beginning. + + private: parse_context_group_state cur_group_state {}; + private: parse_context_branch_reset_state cur_branch_reset_state {}; + +#line 6584 "reflect.h2" + public: std::map named_groups {}; + + private: error_func error_out; // TODO: Declaring std::function fails for cpp2. + private: bool has_error {false}; + + public: parse_context(cpp2::impl::in r, auto const& e); + +#line 6595 "reflect.h2" + // State management functions + // + + // Returned group state needs to be stored and provided in `end_group`. + public: [[nodiscard]] auto start_group() & -> parse_context_group_state; + +#line 6608 "reflect.h2" + // `old_state` argument needs to be from start group. + public: [[nodiscard]] auto end_group(cpp2::impl::in old_state) & -> token_ptr; + +#line 6616 "reflect.h2" + public: [[nodiscard]] auto get_modifiers() const& -> expression_flags; + +#line 6620 "reflect.h2" + public: auto set_modifiers(cpp2::impl::in mod) & -> void; + +#line 6624 "reflect.h2" + // Branch reset management functions + // + + public: [[nodiscard]] auto branch_reset_new_state() & -> parse_context_branch_reset_state; + +#line 6636 "reflect.h2" + public: auto branch_reset_restore_state(cpp2::impl::in old_state) & -> void; + +#line 6643 "reflect.h2" + public: auto next_alternative() & -> void; + +#line 6649 "reflect.h2" + // Regex token management + // + public: auto add_token(cpp2::impl::in token) & -> void; + +#line 6655 "reflect.h2" + public: [[nodiscard]] auto has_token() const& -> bool; + +#line 6659 "reflect.h2" + public: [[nodiscard]] auto pop_token() & -> token_ptr; + +#line 6670 "reflect.h2" + public: [[nodiscard]] auto get_as_token() & -> token_ptr; + +#line 6674 "reflect.h2" + // Group management + // + public: [[nodiscard]] auto get_cur_group() const& -> int; + +#line 6680 "reflect.h2" + public: [[nodiscard]] auto next_group() & -> int; + +#line 6684 "reflect.h2" + public: auto set_named_group(cpp2::impl::in name, cpp2::impl::in id) & -> void; + +#line 6691 "reflect.h2" + public: [[nodiscard]] auto get_named_group(cpp2::impl::in name) const& -> int; + +#line 6702 "reflect.h2" + // Position management functions + // + public: [[nodiscard]] auto current() const& -> char; + + // Get the next token in the regex, skipping spaces according to the parameters. See `x` and `xx` modifiers. + private: [[nodiscard]] auto get_next_position(cpp2::impl::in in_class, cpp2::impl::in no_skip) const& -> size_t; + +#line 6746 "reflect.h2" + // Return true if next token is available. + private: [[nodiscard]] auto next_impl(cpp2::impl::in in_class, cpp2::impl::in no_skip) & -> bool; + +#line 6758 "reflect.h2" + public: [[nodiscard]] auto next() & -> decltype(auto); + public: [[nodiscard]] auto next_in_class() & -> decltype(auto); + public: [[nodiscard]] auto next_no_skip() & -> decltype(auto); + + public: [[nodiscard]] auto next_n(cpp2::impl::in n) & -> bool; + +#line 6771 "reflect.h2" + public: [[nodiscard]] auto has_next() const& -> bool; + + private: [[nodiscard]] auto grab_until_impl(cpp2::impl::in e, cpp2::impl::out r, cpp2::impl::in any) & -> bool; + +#line 6794 "reflect.h2" + public: [[nodiscard]] auto grab_until(cpp2::impl::in e, cpp2::impl::out r) & -> decltype(auto); + public: [[nodiscard]] auto grab_until(cpp2::impl::in e, cpp2::impl::out r) & -> decltype(auto); + public: [[nodiscard]] auto grab_until_one_of(cpp2::impl::in e, cpp2::impl::out r) & -> decltype(auto); + + public: [[nodiscard]] auto grab_n(cpp2::impl::in n, cpp2::impl::out r) & -> bool; + +#line 6811 "reflect.h2" + public: [[nodiscard]] auto grab_number() & -> std::string; + +#line 6832 "reflect.h2" + private: [[nodiscard]] auto peek_impl(cpp2::impl::in in_class) const& -> char; + +#line 6842 "reflect.h2" + public: [[nodiscard]] auto peek() const& -> decltype(auto); + public: [[nodiscard]] auto peek_in_class() const& -> decltype(auto); + +#line 6846 "reflect.h2" + // Parsing functions + // + public: [[nodiscard]] auto parser_group_modifiers(cpp2::impl::in change_str, expression_flags& parser_modifiers) & -> bool; + +#line 6902 "reflect.h2" + public: [[nodiscard]] auto parse_until(cpp2::impl::in term) & -> bool; + +#line 6941 "reflect.h2" + public: [[nodiscard]] auto parse(cpp2::impl::in modifiers) & -> bool; + +#line 6956 "reflect.h2" + // Misc functions + + public: [[nodiscard]] auto get_pos() const& -> decltype(auto); + public: [[nodiscard]] auto get_range(cpp2::impl::in start, cpp2::impl::in end) const& -> decltype(auto); + public: [[nodiscard]] auto valid() const& -> bool; + + public: [[nodiscard]] auto error(cpp2::impl::in err) & -> token_ptr; + public: parse_context(parse_context const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(parse_context const&) -> void = delete; + + +#line 6967 "reflect.h2" +}; + +#line 6970 "reflect.h2" +// Context for one function generation. Generation of functions can be interleaved, +// therefore we buffer the code for one function here. +// +class generation_function_context { + public: std::string code {""}; + public: std::string tabs {""}; + + public: auto add_tabs(cpp2::impl::in c) & -> void; + +#line 6984 "reflect.h2" + public: auto remove_tabs(cpp2::impl::in c) & -> void; + public: generation_function_context(auto const& code_, auto const& tabs_); +public: generation_function_context(); + + +#line 6987 "reflect.h2" +}; + +#line 6990 "reflect.h2" +// Context for generating the state machine. +class generation_context + { + private: std::vector gen_stack {1}; // Element 0 contains all the code. + + private: int matcher_func {0}; + private: int reset_func {0}; + private: int temp_name {0}; + private: std::string entry_func {""}; + + // Generation helpers + // + public: [[nodiscard]] auto match_parameters() const& -> std::string; + + // Code generation. + + // Add code line. + public: auto add(cpp2::impl::in s) & -> void; + +#line 7012 "reflect.h2" + // Add check for token. The check needs to be a function call that returns a boolean. + public: auto add_check(cpp2::impl::in check) & -> void; + +#line 7018 "reflect.h2" + // Add a stateful check. The check needs to return a `match_return`. + public: auto add_statefull(cpp2::impl::in next_func, cpp2::impl::in check) & -> void; + +#line 7027 "reflect.h2" + protected: auto start_func_named(cpp2::impl::in name) & -> void; + +#line 7038 "reflect.h2" + protected: [[nodiscard]] auto start_func() & -> std::string; + +#line 7045 "reflect.h2" + protected: auto end_func_statefull(cpp2::impl::in s) & -> void; + +#line 7065 "reflect.h2" + // Generate the function for a token. + public: [[nodiscard]] auto generate_func(cpp2::impl::in token) & -> std::string; + +#line 7075 "reflect.h2" + // Generate the reset for a list of group identifiers. + public: [[nodiscard]] auto generate_reset(cpp2::impl::in> groups) & -> std::string; + +#line 7098 "reflect.h2" + // Name generation + // + protected: [[nodiscard]] auto gen_func_name() & -> std::string; + +#line 7106 "reflect.h2" + public: [[nodiscard]] auto next_func_name() & -> std::string; + +#line 7110 "reflect.h2" + protected: [[nodiscard]] auto gen_reset_func_name() & -> std::string; + +#line 7116 "reflect.h2" + public: [[nodiscard]] auto gen_temp() & -> std::string; + +#line 7122 "reflect.h2" + // Context management + // + public: [[nodiscard]] auto new_context() & -> generation_function_context*; + +#line 7132 "reflect.h2" + public: auto finish_context() & -> void; + +#line 7140 "reflect.h2" + // Misc functions + // + private: [[nodiscard]] auto get_current() & -> generation_function_context*; + +#line 7146 "reflect.h2" + private: [[nodiscard]] auto get_base() & -> generation_function_context*; + +#line 7150 "reflect.h2" + public: [[nodiscard]] auto get_entry_func() const& -> std::string; + +#line 7154 "reflect.h2" + public: [[nodiscard]] auto create_named_group_lookup(cpp2::impl::in> named_groups) const& -> std::string; + +#line 7178 "reflect.h2" + // Run the generation for the token. + public: [[nodiscard]] auto run(cpp2::impl::in token) & -> std::string; + public: generation_context() = default; + public: generation_context(generation_context const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(generation_context const&) -> void = delete; + + +#line 7184 "reflect.h2" +}; + +// Regex syntax: | Example: ab|ba +// +// Non greedy implementation. First alternative that matches is chosen. +// +class alternative_token +: public regex_token_empty { + // No code gen here. alternative_token_gen is created in the parse_context + + public: explicit alternative_token(); + + public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr; + public: virtual ~alternative_token() noexcept; + + public: alternative_token(alternative_token const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(alternative_token const&) -> void = delete; + + +#line 7203 "reflect.h2" +}; + +class alternative_token_gen +: public regex_token { + +#line 7209 "reflect.h2" + private: token_vec alternatives; + + public: alternative_token_gen(cpp2::impl::in a); + +#line 7216 "reflect.h2" + public: auto generate_code(generation_context& ctx) const -> void override; + +#line 7233 "reflect.h2" + public: auto add_groups(std::set& groups) const -> void override; + +#line 7240 "reflect.h2" + public: [[nodiscard]] static auto gen_string(cpp2::impl::in a) -> std::string; + +#line 7253 "reflect.h2" + public: [[nodiscard]] auto reverse() const -> token_ptr override; + public: virtual ~alternative_token_gen() noexcept; + + public: alternative_token_gen(alternative_token_gen const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(alternative_token_gen const&) -> void = delete; + + +#line 7265 "reflect.h2" +}; + +#line 7268 "reflect.h2" +// Regex syntax: . +// +class any_token +: public regex_token_check { + +#line 7274 "reflect.h2" + public: any_token(cpp2::impl::in single_line); + +#line 7278 "reflect.h2" + public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr; + public: virtual ~any_token() noexcept; + + public: any_token(any_token const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(any_token const&) -> void = delete; + + +#line 7283 "reflect.h2" +}; + +// Regex syntax: (?>) Example: a(?>bc|c)c +// +class atomic_group_token +: public regex_token { + +#line 7291 "reflect.h2" + public: token_ptr inner_token {nullptr}; + + public: explicit atomic_group_token(); + + public: [[nodiscard]] auto reverse() const -> token_ptr override; + +#line 7302 "reflect.h2" + public: auto generate_code(generation_context& ctx) const -> void override; + +#line 7310 "reflect.h2" + public: auto add_groups(std::set& groups) const -> void override; + public: virtual ~atomic_group_token() noexcept; + + public: atomic_group_token(atomic_group_token const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(atomic_group_token const&) -> void = delete; + + +#line 7313 "reflect.h2" +}; + +// Regex syntax: a +// +class char_token +: public regex_token { + +#line 7321 "reflect.h2" + private: std::string token; + private: bool ignore_case; + + public: char_token(cpp2::impl::in t, cpp2::impl::in ignore_case_); + +#line 7330 "reflect.h2" + public: char_token(cpp2::impl::in t, cpp2::impl::in ignore_case_); + +#line 7336 "reflect.h2" + public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr; + +#line 7340 "reflect.h2" + public: auto generate_code(generation_context& ctx) const -> void override; + +#line 7363 "reflect.h2" + public: auto gen_case_insensitive(cpp2::impl::in lower, cpp2::impl::in upper, generation_context& ctx) const& -> void; + +#line 7384 "reflect.h2" + public: auto gen_case_sensitive(generation_context& ctx) const& -> void; + +#line 7402 "reflect.h2" + public: [[nodiscard]] auto add_escapes(std::string str) const& -> std::string; + +#line 7417 "reflect.h2" + public: [[nodiscard]] auto reverse() const -> token_ptr override; + +#line 7423 "reflect.h2" + public: auto append(char_token const& that) & -> void; + public: virtual ~char_token() noexcept; + + public: char_token(char_token const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(char_token const&) -> void = delete; + + +#line 7427 "reflect.h2" +}; + +#line 7430 "reflect.h2" +// Regex syntax: [] Example: [abcx-y[:digits:]] +// +class class_token +: public regex_token { + +#line 7436 "reflect.h2" + private: bool negate; + private: bool case_insensitive; + private: std::string class_str; + + public: class_token(cpp2::impl::in negate_, cpp2::impl::in case_insensitive_, cpp2::impl::in class_str_, cpp2::impl::in str); + +#line 7448 "reflect.h2" + // TODO: Rework class generation: Generate check functions for classes. + public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr; + +#line 7574 "reflect.h2" + public: [[nodiscard]] auto reverse() const -> token_ptr override; + +#line 7583 "reflect.h2" + public: auto generate_code(generation_context& ctx) const -> void override; + +#line 7588 "reflect.h2" + private: [[nodiscard]] static auto create_matcher(cpp2::impl::in name, cpp2::impl::in template_arguments) -> std::string; + public: virtual ~class_token() noexcept; + + public: class_token(class_token const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(class_token const&) -> void = delete; + + +#line 7595 "reflect.h2" +}; + +#line 7598 "reflect.h2" +// Regex syntax: \a or \n or \[ +// +[[nodiscard]] auto escape_token_parse(parse_context& ctx) -> token_ptr; + +#line 7639 "reflect.h2" +// Regex syntax: \K Example: ab\Kcd +// +[[nodiscard]] auto global_group_reset_token_parse(parse_context& ctx) -> token_ptr; + +#line 7650 "reflect.h2" +// Regex syntax: \ Example: \1 +// \g{name_or_number} +// \k{name_or_number} +// \k +// \k'name_or_number' +// +class group_ref_token +: public regex_token { + +#line 7660 "reflect.h2" + private: int id; + private: bool case_insensitive; + private: bool reverse_eval; + + public: group_ref_token(cpp2::impl::in id_, cpp2::impl::in case_insensitive_, cpp2::impl::in reverse_, cpp2::impl::in str); + +#line 7672 "reflect.h2" + public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr; + +#line 7773 "reflect.h2" + public: [[nodiscard]] auto reverse() const -> token_ptr override; + +#line 7777 "reflect.h2" + public: auto generate_code(generation_context& ctx) const -> void override; + public: virtual ~group_ref_token() noexcept; + + public: group_ref_token(group_ref_token const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(group_ref_token const&) -> void = delete; + + +#line 7780 "reflect.h2" +}; + +#line 7783 "reflect.h2" +// Regex syntax: () Example: (abc) +// (?:) (?i:abc) +// (?<>:) (?:abc) +// (?#) (#Step 1 finished) +// (?|) (?|(abc)|(cde)) +// (?=) (?=abc) +// (?!) (?!abc) +// (*: syntax, cpp2::impl::in lookahead, cpp2::impl::in positive) -> token_ptr; + +#line 7819 "reflect.h2" + public: [[nodiscard]] static auto parse_atomic_pattern(parse_context& ctx, cpp2::impl::in syntax) -> token_ptr; + +#line 7833 "reflect.h2" + public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr; + +#line 7992 "reflect.h2" + public: [[nodiscard]] auto reverse() const -> token_ptr override; + +#line 8000 "reflect.h2" + public: [[nodiscard]] static auto gen_string(cpp2::impl::in name, cpp2::impl::in name_brackets, cpp2::impl::in has_modifier, cpp2::impl::in modifiers, cpp2::impl::in inner_) -> std::string; + +#line 8018 "reflect.h2" + public: auto generate_code(generation_context& ctx) const -> void override; + +#line 8049 "reflect.h2" + public: auto add_groups(std::set& groups) const -> void override; + public: virtual ~group_token() noexcept; + + public: group_token() = default; + public: group_token(group_token const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(group_token const&) -> void = delete; + + +#line 8056 "reflect.h2" +}; + +#line 8059 "reflect.h2" +// Regex syntax: \x or \x{} Example: \x{62} +// +[[nodiscard]] auto hexadecimal_token_parse(parse_context& ctx) -> token_ptr; + +#line 8100 "reflect.h2" +// Regex syntax: $ Example: aa$ +// +[[nodiscard]] auto line_end_token_parse(parse_context& ctx) -> token_ptr; + +#line 8120 "reflect.h2" +// Regex syntax: ^ Example: ^aa +// +[[nodiscard]] auto line_start_token_parse(parse_context& ctx) -> token_ptr; + +#line 8136 "reflect.h2" +// Regex syntax: (?=) or (?!) or (*pla), etc. Example: (?=AA) +// +// Parsed in group_token. +// +class lookahead_lookbehind_token +: public regex_token { + +#line 8144 "reflect.h2" + protected: bool lookahead; + protected: bool positive; + public: token_ptr inner {nullptr}; + + public: lookahead_lookbehind_token(cpp2::impl::in lookahead_, cpp2::impl::in positive_); + +#line 8153 "reflect.h2" + public: auto generate_code(generation_context& ctx) const -> void override; + +#line 8164 "reflect.h2" + public: [[nodiscard]] auto reverse() const -> token_ptr override; + +#line 8171 "reflect.h2" + public: auto add_groups(std::set& groups) const -> void override; + public: virtual ~lookahead_lookbehind_token() noexcept; + + public: lookahead_lookbehind_token(lookahead_lookbehind_token const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(lookahead_lookbehind_token const&) -> void = delete; + + +#line 8174 "reflect.h2" +}; + +#line 8177 "reflect.h2" +// Named character classes +// +[[nodiscard]] auto named_class_token_parse(parse_context& ctx) -> token_ptr; + +#line 8205 "reflect.h2" +// Regex syntax: \o{} Example: \o{142} +// +[[nodiscard]] auto octal_token_parse(parse_context& ctx) -> token_ptr; + +#line 8233 "reflect.h2" +// Regex syntax: {min, max} Example: a{2,4} +// +class range_token +: public regex_token { + +#line 8239 "reflect.h2" + protected: int min_count {-1}; + protected: int max_count {-1}; + protected: int kind {range_flags::greedy}; + protected: token_ptr inner_token {nullptr}; + + public: explicit range_token(); + + public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr; + +#line 8319 "reflect.h2" + public: auto parse_modifier(parse_context& ctx) & -> void; + +#line 8331 "reflect.h2" + public: [[nodiscard]] auto gen_mod_string() const& -> std::string; + +#line 8344 "reflect.h2" + public: [[nodiscard]] auto gen_range_string() const& -> std::string; + +#line 8363 "reflect.h2" + public: [[nodiscard]] auto reverse() const -> token_ptr override; + +#line 8373 "reflect.h2" + public: auto generate_code(generation_context& ctx) const -> void override; + +#line 8384 "reflect.h2" + public: auto add_groups(std::set& groups) const -> void override; + public: virtual ~range_token() noexcept; + + public: range_token(range_token const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(range_token const&) -> void = delete; + + +#line 8387 "reflect.h2" +}; + +#line 8390 "reflect.h2" +// Regex syntax: *, +, or ? Example: aa* +// +class special_range_token +: public range_token { + +#line 8396 "reflect.h2" + public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr; + public: virtual ~special_range_token() noexcept; + + public: special_range_token() = default; + public: special_range_token(special_range_token const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(special_range_token const&) -> void = delete; + + +#line 8426 "reflect.h2" +}; + +// Regex syntax: \G Example: \Gaa +// +// Forces the match and/or consecutive matches to start at the position of the last match. +// +[[nodiscard]] auto start_match_parse(parse_context& ctx) -> token_ptr; + +#line 8448 "reflect.h2" +// Regex syntax: \b or \B Example: \bword\b +// +// Matches the start end end of word boundaries. +// +[[nodiscard]] auto word_boundary_token_parse(parse_context& ctx) -> token_ptr; + +#line 8470 "reflect.h2" +//----------------------------------------------------------------------- +// +// Parser for regular expression. +// +//----------------------------------------------------------------------- +// + +// Parser and generator for regular expressions. +template class regex_generator + { + private: std::string_view regex; + private: std::string modifier {""}; + private: std::string modifier_escape {""}; + + private: Error_out error_out; + + private: std::string source {""}; + + public: regex_generator(cpp2::impl::in r, Error_out const& e); + +#line 8493 "reflect.h2" + public: [[nodiscard]] auto parse() & -> std::string; + +#line 8528 "reflect.h2" + private: auto extract_modifiers() & -> void; + public: regex_generator(regex_generator const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_generator const&) -> void = delete; + + +#line 8542 "reflect.h2" +}; + +template [[nodiscard]] auto generate_regex(cpp2::impl::in regex, Err const& err) -> std::string; + +#line 8554 "reflect.h2" +auto regex_gen(meta::type_declaration& t) -> void; + +#line 8609 "reflect.h2" +//----------------------------------------------------------------------- +// +// apply_metafunctions +// +[[nodiscard]] auto apply_metafunctions( + declaration_node& n, + type_declaration& rtype, + auto const& error + ) -> bool; + +#line 8750 "reflect.h2" +} + +} + + +//=== Cpp2 function definitions ================================================= + +#line 1 "reflect.h2" + +#line 17 "reflect.h2" +namespace cpp2 { + +namespace meta { + +#line 22 "reflect.h2" +//----------------------------------------------------------------------- +// +// Compiler services +// +//----------------------------------------------------------------------- +// + +#line 31 "reflect.h2" + // Common data members + // + +#line 45 "reflect.h2" + // Constructor + // +#line 47 "reflect.h2" + compiler_services::compiler_services( + + cpp2::impl::in*> errors_, + cpp2::impl::in*> includes_, + cpp2::impl::in*> extra_cpp1_, + cpp2::impl::in*> extra_build_, + cpp2::impl::in filename, + cpp2::impl::in*> generated_tokens_ + ) + : errors{ errors_ } + , includes{ includes_ } + , extra_cpp1{ extra_cpp1_ } + , extra_build{ extra_build_ } + , file_name{ filename } + , errors_original_size{ cpp2::unchecked_narrow(std::ssize(*cpp2::impl::assert_not_null(errors))) } + , generated_tokens{ generated_tokens_ } + , parser{ *cpp2::impl::assert_not_null(errors), *cpp2::impl::assert_not_null(includes), *cpp2::impl::assert_not_null(extra_cpp1), *cpp2::impl::assert_not_null(extra_build), file_name } +#line 56 "reflect.h2" + { + +#line 65 "reflect.h2" + } + + // Common API + // +#line 69 "reflect.h2" + [[nodiscard]] auto compiler_services::filename() const& -> std::string_view { return file_name; } + +#line 71 "reflect.h2" + auto compiler_services::set_metafunction_name(cpp2::impl::in name, cpp2::impl::in> args) & -> void{ + metafunction_name = name; + metafunction_args = args; + metafunctions_used = CPP2_UFCS(empty)(args); + } + +#line 77 "reflect.h2" + [[nodiscard]] auto compiler_services::get_metafunction_name() const& -> std::string_view { return metafunction_name; } + +#line 79 "reflect.h2" + [[nodiscard]] auto compiler_services::get_argument(cpp2::impl::in index) & -> std::string{ + metafunctions_used = true; + if (([_0 = 0, _1 = index, _2 = CPP2_UFCS(ssize)(metafunction_args)]{ return cpp2::impl::cmp_less_eq(_0,_1) && cpp2::impl::cmp_less(_1,_2); }())) { + return CPP2_ASSERT_IN_BOUNDS(metafunction_args, index); + } + return ""; + } + +#line 87 "reflect.h2" + [[nodiscard]] auto compiler_services::get_arguments() & -> std::vector{ + metafunctions_used = true; + return metafunction_args; + } + +#line 92 "reflect.h2" + [[nodiscard]] auto compiler_services::arguments_were_used() const& -> bool { return metafunctions_used; } + +#line 94 "reflect.h2" + [[nodiscard]] auto compiler_services::parse_statement( + + std::string_view source + ) & -> parse_statement_ret + + { + cpp2::impl::deferred_init> ret; +#line 100 "reflect.h2" + auto original_source {source}; + + CPP2_UFCS(push_back)(generated_lines, std::vector()); + auto lines {&CPP2_UFCS(back)(generated_lines)}; + + auto add_line {[&, _1 = lines](cpp2::impl::in s) mutable -> void{ + static_cast(CPP2_UFCS(emplace_back)((*cpp2::impl::assert_not_null(_1)), s, source_line::category::cpp2)); + }}; +{ +auto newline_pos{CPP2_UFCS(find)(source, '\n')}; + + // First split this string into source_lines + // + +#line 112 "reflect.h2" + if ( cpp2::impl::cmp_greater(CPP2_UFCS(ssize)(source),1) + && newline_pos != source.npos) + { + while( newline_pos != source.npos ) + { + add_line(CPP2_UFCS(substr)(source, 0, newline_pos)); + CPP2_UFCS(remove_prefix)(source, newline_pos + 1); + newline_pos = CPP2_UFCS(find)(source, '\n'); + } + } +} + +#line 123 "reflect.h2" + if (!(CPP2_UFCS(empty)(source))) { + cpp2::move(add_line)(cpp2::move(source)); + } + + // Now lex this source fragment to generate + // a single grammar_map entry, whose .second + // is the vector of tokens + static_cast(CPP2_UFCS(emplace_back)(generated_lexers, *cpp2::impl::assert_not_null(errors))); + auto tokens {&CPP2_UFCS(back)(generated_lexers)}; + CPP2_UFCS(lex)((*cpp2::impl::assert_not_null(tokens)), *cpp2::impl::assert_not_null(cpp2::move(lines)), true); + + if (cpp2::cpp2_default.is_active() && !(std::ssize(CPP2_UFCS(get_map)((*cpp2::impl::assert_not_null(tokens)))) == 1) ) { cpp2::cpp2_default.report_violation(""); } + + // Now parse this single declaration from + // the lexed tokens + ret.construct(CPP2_UFCS(parse_one_declaration)(parser, + (*cpp2::impl::assert_not_null(CPP2_UFCS(begin)(CPP2_UFCS(get_map)(*cpp2::impl::assert_not_null(cpp2::move(tokens)))))).second, + *cpp2::impl::assert_not_null(generated_tokens) + )); + if (!((cpp2::impl::as_(ret.value())))) { + error("parse failed - the source string is not a valid statement:\n" + cpp2::to_string(cpp2::move(original_source)) + ""); + }return std::move(ret.value()); + } + +#line 147 "reflect.h2" + auto compiler_services::add_runtime_support_include(cpp2::impl::in s, cpp2::impl::in angles) & -> void{ + std::string inc {s}; + if (angles) { + inc = "<" + inc + ">"; + } + else { + inc = "\"" + inc + "\""; + } + static_cast(CPP2_UFCS(emplace)((*cpp2::impl::assert_not_null(includes)), cpp2::move(inc))); + } + +#line 158 "reflect.h2" + [[nodiscard]] auto compiler_services::add_extra_cpp1_code(cpp2::impl::in s) & -> decltype(auto) { return CPP2_UFCS(push_back)((*cpp2::impl::assert_not_null(extra_cpp1)), s); } +#line 159 "reflect.h2" + [[nodiscard]] auto compiler_services::add_extra_build_step(cpp2::impl::in s) & -> decltype(auto) { return CPP2_UFCS(push_back)((*cpp2::impl::assert_not_null(extra_build)), s + "\n"); } + +#line 161 "reflect.h2" + [[nodiscard]] auto compiler_services::position() const -> source_position + + { + return { }; + } + + // Error diagnosis and handling, integrated with compiler output + // Unlike a contract violation, .requires continues further processing + // +#line 170 "reflect.h2" + auto compiler_services::require( + + cpp2::impl::in b, + cpp2::impl::in msg + ) const& -> void + { + if (!(b)) { + error(msg); + } + } + +#line 181 "reflect.h2" + auto compiler_services::error(cpp2::impl::in msg) const& -> void + { + auto message {cpp2::impl::as_(msg)}; + if (!(CPP2_UFCS(empty)(metafunction_name))) { + message = "while applying @" + cpp2::to_string(metafunction_name) + " - " + cpp2::to_string(message) + ""; + } + static_cast(CPP2_UFCS(emplace_back)((*cpp2::impl::assert_not_null(errors)), position(), cpp2::move(message))); + } + + // Enable custom contracts on this object, integrated with compiler output + // Unlike .requires, a contract violation stops further processing + // +#line 193 "reflect.h2" + auto compiler_services::report_violation(auto const& msg) const& -> void{ + error(msg); + throw(std::runtime_error( + " ==> programming bug found in metafunction @" + cpp2::to_string(metafunction_name) + " " + "- contract violation - see previous errors" + )); + } + +#line 201 "reflect.h2" + [[nodiscard]] auto compiler_services::is_active() const& -> decltype(auto) { return true; } + + compiler_services::~compiler_services() noexcept{} +compiler_services::compiler_services(compiler_services const& that) + : errors{ that.errors } + , includes{ that.includes } + , extra_cpp1{ that.extra_cpp1 } + , extra_build{ that.extra_build } + , file_name{ that.file_name } + , errors_original_size{ that.errors_original_size } + , generated_tokens{ that.generated_tokens } + , parser{ that.parser } + , metafunction_name{ that.metafunction_name } + , metafunction_args{ that.metafunction_args } + , metafunctions_used{ that.metafunctions_used }{} +compiler_services::compiler_services(compiler_services&& that) noexcept + : errors{ std::move(that).errors } + , includes{ std::move(that).includes } + , extra_cpp1{ std::move(that).extra_cpp1 } + , extra_build{ std::move(that).extra_build } + , file_name{ std::move(that).file_name } + , errors_original_size{ std::move(that).errors_original_size } + , generated_tokens{ std::move(that).generated_tokens } + , parser{ std::move(that).parser } + , metafunction_name{ std::move(that).metafunction_name } + , metafunction_args{ std::move(that).metafunction_args } + , metafunctions_used{ std::move(that).metafunctions_used }{} + +#line 205 "reflect.h2" +//----------------------------------------------------------------------- +// +// All reflection types are wrappers around a pointer to node +// +//----------------------------------------------------------------------- +// + +#line 218 "reflect.h2" + template reflection_base::reflection_base( + + cpp2::impl::in n_, + cpp2::impl::in s + ) + : compiler_services{ s } + , n{ n_ } +#line 223 "reflect.h2" + { + +#line 226 "reflect.h2" + if (cpp2::cpp2_default.is_active() && !(n) ) { cpp2::cpp2_default.report_violation(CPP2_CONTRACT_MSG("a meta:: reflection must point to a valid node, not null")); } + } + +#line 229 "reflect.h2" + template [[nodiscard]] auto reflection_base::position() const -> source_position { return CPP2_UFCS(position)((*cpp2::impl::assert_not_null(n))); } + +#line 231 "reflect.h2" + template [[nodiscard]] auto reflection_base::print() const& -> std::string { return CPP2_UFCS(pretty_print_visualize)((*cpp2::impl::assert_not_null(n)), 0); } + +#line 233 "reflect.h2" + template [[nodiscard]] auto reflection_base::is_same(cpp2::impl::in o) const& -> bool { return n == o.n; }// Test pointers +#line 234 "reflect.h2" + template template [[nodiscard]] auto reflection_base::is_same([[maybe_unused]] reflection_base const& unnamed_param_2) const& -> bool { return false; } + + template reflection_base::~reflection_base() noexcept{} +template reflection_base::reflection_base(reflection_base const& that) + : compiler_services{ static_cast(that) } + , n{ that.n }{} +template reflection_base::reflection_base(reflection_base&& that) noexcept + : compiler_services{ static_cast(that) } + , n{ std::move(that).n }{}// Different types => false + +#line 238 "reflect.h2" +//----------------------------------------------------------------------- +// +// Declarations +// +//----------------------------------------------------------------------- +// + +//----------------------------------------------------------------------- +// All declarations +// + +#line 252 "reflect.h2" + declaration::declaration( + + cpp2::impl::in n_, + cpp2::impl::in s + ) + : reflection_base{ n_, s } +#line 257 "reflect.h2" + { + + } + +#line 261 "reflect.h2" + [[nodiscard]] auto declaration::is_public() const& -> bool { return CPP2_UFCS(is_public)((*cpp2::impl::assert_not_null(n))); } +#line 262 "reflect.h2" + [[nodiscard]] auto declaration::is_protected() const& -> bool { return CPP2_UFCS(is_protected)((*cpp2::impl::assert_not_null(n))); } +#line 263 "reflect.h2" + [[nodiscard]] auto declaration::is_private() const& -> bool { return CPP2_UFCS(is_private)((*cpp2::impl::assert_not_null(n))); } +#line 264 "reflect.h2" + [[nodiscard]] auto declaration::is_default_access() const& -> bool { return CPP2_UFCS(is_default_access)((*cpp2::impl::assert_not_null(n))); } + +#line 266 "reflect.h2" + [[nodiscard]] auto declaration::default_to_public() & -> decltype(auto) { return static_cast(CPP2_UFCS(make_public)((*cpp2::impl::assert_not_null(n)))); } +#line 267 "reflect.h2" + [[nodiscard]] auto declaration::default_to_protected() & -> decltype(auto) { return static_cast(CPP2_UFCS(make_protected)((*cpp2::impl::assert_not_null(n)))); } +#line 268 "reflect.h2" + [[nodiscard]] auto declaration::default_to_private() & -> decltype(auto) { return static_cast(CPP2_UFCS(make_private)((*cpp2::impl::assert_not_null(n)))); } + +#line 270 "reflect.h2" + [[nodiscard]] auto declaration::make_public() & -> bool { return CPP2_UFCS(make_public)((*cpp2::impl::assert_not_null(n))); } +#line 271 "reflect.h2" + [[nodiscard]] auto declaration::make_protected() & -> bool { return CPP2_UFCS(make_protected)((*cpp2::impl::assert_not_null(n))); } +#line 272 "reflect.h2" + [[nodiscard]] auto declaration::make_private() & -> bool { return CPP2_UFCS(make_private)((*cpp2::impl::assert_not_null(n))); } + +#line 274 "reflect.h2" + [[nodiscard]] auto declaration::has_name() const& -> bool { return CPP2_UFCS(has_name)((*cpp2::impl::assert_not_null(n))); } +#line 275 "reflect.h2" + [[nodiscard]] auto declaration::has_name(cpp2::impl::in s) const& -> bool { return CPP2_UFCS(has_name)((*cpp2::impl::assert_not_null(n)), s); } + +#line 277 "reflect.h2" + [[nodiscard]] auto declaration::name() const& -> std::string_view{ + if (has_name()) {return CPP2_UFCS(as_string_view)((*cpp2::impl::assert_not_null(CPP2_UFCS(name)(*cpp2::impl::assert_not_null(n))))); } + else { return ""; } + } + +#line 282 "reflect.h2" + [[nodiscard]] auto declaration::has_initializer() const& -> bool { return CPP2_UFCS(has_initializer)((*cpp2::impl::assert_not_null(n))); } + +#line 284 "reflect.h2" + [[nodiscard]] auto declaration::get_initializer() const& -> statement { return { CPP2_UFCS(get)((*cpp2::impl::assert_not_null(n)).initializer), (*this) }; } + +#line 286 "reflect.h2" + [[nodiscard]] auto declaration::is_global() const& -> bool { return CPP2_UFCS(is_global)((*cpp2::impl::assert_not_null(n))); } +#line 287 "reflect.h2" + [[nodiscard]] auto declaration::is_function() const& -> bool { return CPP2_UFCS(is_function)((*cpp2::impl::assert_not_null(n))); } +#line 288 "reflect.h2" + [[nodiscard]] auto declaration::is_object() const& -> bool { return CPP2_UFCS(is_object)((*cpp2::impl::assert_not_null(n))); } +#line 289 "reflect.h2" + [[nodiscard]] auto declaration::is_base_object() const& -> bool { return CPP2_UFCS(is_base_object)((*cpp2::impl::assert_not_null(n))); } +#line 290 "reflect.h2" + [[nodiscard]] auto declaration::is_member_object() const& -> bool { return CPP2_UFCS(is_member_object)((*cpp2::impl::assert_not_null(n))); } +#line 291 "reflect.h2" + [[nodiscard]] auto declaration::is_type() const& -> bool { return CPP2_UFCS(is_type)((*cpp2::impl::assert_not_null(n))); } +#line 292 "reflect.h2" + [[nodiscard]] auto declaration::is_namespace() const& -> bool { return CPP2_UFCS(is_namespace)((*cpp2::impl::assert_not_null(n))); } +#line 293 "reflect.h2" + [[nodiscard]] auto declaration::is_alias() const& -> bool { return CPP2_UFCS(is_alias)((*cpp2::impl::assert_not_null(n))); } + +#line 295 "reflect.h2" + [[nodiscard]] auto declaration::is_type_alias() const& -> bool { return CPP2_UFCS(is_type_alias)((*cpp2::impl::assert_not_null(n))); } +#line 296 "reflect.h2" + [[nodiscard]] auto declaration::is_namespace_alias() const& -> bool { return CPP2_UFCS(is_namespace_alias)((*cpp2::impl::assert_not_null(n))); } +#line 297 "reflect.h2" + [[nodiscard]] auto declaration::is_object_alias() const& -> bool { return CPP2_UFCS(is_object_alias)((*cpp2::impl::assert_not_null(n))); } + +#line 299 "reflect.h2" + [[nodiscard]] auto declaration::is_function_expression() const& -> bool { return CPP2_UFCS(is_function_expression)((*cpp2::impl::assert_not_null(n))); } + +#line 301 "reflect.h2" + [[nodiscard]] auto declaration::as_function() const& -> function_declaration { return { n, (*this) }; } +#line 302 "reflect.h2" + [[nodiscard]] auto declaration::as_object() const& -> object_declaration { return { n, (*this) }; } +#line 303 "reflect.h2" + [[nodiscard]] auto declaration::as_type() const& -> type_declaration { return { n, (*this) }; } +#line 304 "reflect.h2" + [[nodiscard]] auto declaration::as_nonglobal_namespace() const& -> namespace_declaration { return { n, (*this) }; } +#line 305 "reflect.h2" + [[nodiscard]] auto declaration::as_alias() const& -> alias_declaration { return { n, (*this) }; } + +#line 307 "reflect.h2" + [[nodiscard]] auto declaration::get_parent() const& -> declaration { return declaration((*cpp2::impl::assert_not_null(n)).parent_declaration, (*this)); } + +#line 309 "reflect.h2" + [[nodiscard]] auto declaration::parent_is_function() const& -> bool { return CPP2_UFCS(parent_is_function)((*cpp2::impl::assert_not_null(n))); } +#line 310 "reflect.h2" + [[nodiscard]] auto declaration::parent_is_object() const& -> bool { return CPP2_UFCS(parent_is_object)((*cpp2::impl::assert_not_null(n))); } +#line 311 "reflect.h2" + [[nodiscard]] auto declaration::parent_is_type() const& -> bool { return CPP2_UFCS(parent_is_type)((*cpp2::impl::assert_not_null(n))); } +#line 312 "reflect.h2" + [[nodiscard]] auto declaration::parent_is_nonglobal_namespace() const& -> bool { return CPP2_UFCS(parent_is_nonglobal_namespace)((*cpp2::impl::assert_not_null(n))); } +#line 313 "reflect.h2" + [[nodiscard]] auto declaration::parent_is_alias() const& -> bool { return CPP2_UFCS(parent_is_alias)((*cpp2::impl::assert_not_null(n))); } + +#line 315 "reflect.h2" + [[nodiscard]] auto declaration::parent_is_type_alias() const& -> bool { return CPP2_UFCS(parent_is_type_alias)((*cpp2::impl::assert_not_null(n))); } +#line 316 "reflect.h2" + [[nodiscard]] auto declaration::parent_is_namespace_alias() const& -> bool { return CPP2_UFCS(parent_is_namespace_alias)((*cpp2::impl::assert_not_null(n))); } +#line 317 "reflect.h2" + [[nodiscard]] auto declaration::parent_is_object_alias() const& -> bool { return CPP2_UFCS(parent_is_object_alias)((*cpp2::impl::assert_not_null(n))); } + +#line 319 "reflect.h2" + [[nodiscard]] auto declaration::parent_is_polymorphic() const& -> bool { return CPP2_UFCS(parent_is_polymorphic)((*cpp2::impl::assert_not_null(n))); } + +#line 321 "reflect.h2" + auto declaration::mark_for_removal_from_enclosing_type() & -> void + // this precondition should be sufficient ... + { + if (cpp2::type_safety.is_active() && !(parent_is_type()) ) { cpp2::type_safety.report_violation(""); } +#line 324 "reflect.h2" + auto test {CPP2_UFCS(type_member_mark_for_removal)((*cpp2::impl::assert_not_null(n)))}; + if (cpp2::cpp2_default.is_active() && !(cpp2::move(test)) ) { cpp2::cpp2_default.report_violation(""); }// ... to ensure this assert is true + } + + declaration::~declaration() noexcept{} +declaration::declaration(declaration const& that) + : reflection_base{ static_cast const&>(that) }{} +declaration::declaration(declaration&& that) noexcept + : reflection_base{ static_cast&&>(that) }{} + +#line 330 "reflect.h2" +//----------------------------------------------------------------------- +// Function declarations +// + +#line 337 "reflect.h2" + function_declaration::function_declaration( + + cpp2::impl::in n_, + cpp2::impl::in s + ) + : declaration{ n_, s } +#line 342 "reflect.h2" + { + + if (cpp2::cpp2_default.is_active() && !(CPP2_UFCS(is_function)((*cpp2::impl::assert_not_null(n)))) ) { cpp2::cpp2_default.report_violation(""); } + } + +#line 347 "reflect.h2" + [[nodiscard]] auto function_declaration::index_of_parameter_named(cpp2::impl::in s) const& -> int { return CPP2_UFCS(index_of_parameter_named)((*cpp2::impl::assert_not_null(n)), s); } +#line 348 "reflect.h2" + [[nodiscard]] auto function_declaration::has_parameter_named(cpp2::impl::in s) const& -> bool { return CPP2_UFCS(has_parameter_named)((*cpp2::impl::assert_not_null(n)), s); } +#line 349 "reflect.h2" + [[nodiscard]] auto function_declaration::has_return_named(cpp2::impl::in s) const& -> bool { return CPP2_UFCS(has_return_named)((*cpp2::impl::assert_not_null(n)), s); } +#line 350 "reflect.h2" + [[nodiscard]] auto function_declaration::has_parameter_or_return_named(cpp2::impl::in s) const& -> bool { return CPP2_UFCS(has_parameter_or_return_named)((*cpp2::impl::assert_not_null(n)), s); } +#line 351 "reflect.h2" + [[nodiscard]] auto function_declaration::has_in_parameter_named(cpp2::impl::in s) const& -> bool { return CPP2_UFCS(has_in_parameter_named)((*cpp2::impl::assert_not_null(n)), s); } +#line 352 "reflect.h2" + [[nodiscard]] auto function_declaration::has_in_ref_parameter_named(cpp2::impl::in s) const& -> bool { return CPP2_UFCS(has_in_ref_parameter_named)((*cpp2::impl::assert_not_null(n)), s); } +#line 353 "reflect.h2" + [[nodiscard]] auto function_declaration::has_copy_parameter_named(cpp2::impl::in s) const& -> bool { return CPP2_UFCS(has_copy_parameter_named)((*cpp2::impl::assert_not_null(n)), s); } +#line 354 "reflect.h2" + [[nodiscard]] auto function_declaration::has_inout_parameter_named(cpp2::impl::in s) const& -> bool { return CPP2_UFCS(has_inout_parameter_named)((*cpp2::impl::assert_not_null(n)), s); } +#line 355 "reflect.h2" + [[nodiscard]] auto function_declaration::has_out_parameter_named(cpp2::impl::in s) const& -> bool { return CPP2_UFCS(has_out_parameter_named)((*cpp2::impl::assert_not_null(n)), s); } +#line 356 "reflect.h2" + [[nodiscard]] auto function_declaration::has_move_parameter_named(cpp2::impl::in s) const& -> bool { return CPP2_UFCS(has_move_parameter_named)((*cpp2::impl::assert_not_null(n)), s); } +#line 357 "reflect.h2" + [[nodiscard]] auto function_declaration::has_forward_parameter_named(cpp2::impl::in s) const& -> bool { return CPP2_UFCS(has_forward_parameter_named)((*cpp2::impl::assert_not_null(n)), s); } +#line 358 "reflect.h2" + [[nodiscard]] auto function_declaration::first_parameter_name() const& -> std::string { return CPP2_UFCS(first_parameter_name)((*cpp2::impl::assert_not_null(n))); } + +#line 360 "reflect.h2" + [[nodiscard]] auto function_declaration::has_parameter_with_name_and_pass(cpp2::impl::in s, cpp2::impl::in pass) const& -> bool { + return CPP2_UFCS(has_parameter_with_name_and_pass)((*cpp2::impl::assert_not_null(n)), s, pass); } +#line 362 "reflect.h2" + [[nodiscard]] auto function_declaration::is_function_with_this() const& -> bool { return CPP2_UFCS(is_function_with_this)((*cpp2::impl::assert_not_null(n))); } +#line 363 "reflect.h2" + [[nodiscard]] auto function_declaration::is_virtual() const& -> bool { return CPP2_UFCS(is_virtual_function)((*cpp2::impl::assert_not_null(n))); } +#line 364 "reflect.h2" + [[nodiscard]] auto function_declaration::is_defaultable() const& -> bool { return CPP2_UFCS(is_defaultable_function)((*cpp2::impl::assert_not_null(n))); } +#line 365 "reflect.h2" + [[nodiscard]] auto function_declaration::is_constructor() const& -> bool { return CPP2_UFCS(is_constructor)((*cpp2::impl::assert_not_null(n))); } +#line 366 "reflect.h2" + [[nodiscard]] auto function_declaration::is_default_constructor() const& -> bool { return CPP2_UFCS(is_default_constructor)((*cpp2::impl::assert_not_null(n))); } +#line 367 "reflect.h2" + [[nodiscard]] auto function_declaration::is_move() const& -> bool { return CPP2_UFCS(is_move)((*cpp2::impl::assert_not_null(n))); } +#line 368 "reflect.h2" + [[nodiscard]] auto function_declaration::is_swap() const& -> bool { return CPP2_UFCS(is_swap)((*cpp2::impl::assert_not_null(n))); } +#line 369 "reflect.h2" + [[nodiscard]] auto function_declaration::is_constructor_with_that() const& -> bool { return CPP2_UFCS(is_constructor_with_that)((*cpp2::impl::assert_not_null(n))); } +#line 370 "reflect.h2" + [[nodiscard]] auto function_declaration::is_constructor_with_in_that() const& -> bool { return CPP2_UFCS(is_constructor_with_in_that)((*cpp2::impl::assert_not_null(n))); } +#line 371 "reflect.h2" + [[nodiscard]] auto function_declaration::is_constructor_with_move_that() const& -> bool { return CPP2_UFCS(is_constructor_with_move_that)((*cpp2::impl::assert_not_null(n))); } +#line 372 "reflect.h2" + [[nodiscard]] auto function_declaration::is_assignment() const& -> bool { return CPP2_UFCS(is_assignment)((*cpp2::impl::assert_not_null(n))); } +#line 373 "reflect.h2" + [[nodiscard]] auto function_declaration::is_assignment_with_that() const& -> bool { return CPP2_UFCS(is_assignment_with_that)((*cpp2::impl::assert_not_null(n))); } +#line 374 "reflect.h2" + [[nodiscard]] auto function_declaration::is_assignment_with_in_that() const& -> bool { return CPP2_UFCS(is_assignment_with_in_that)((*cpp2::impl::assert_not_null(n))); } +#line 375 "reflect.h2" + [[nodiscard]] auto function_declaration::is_assignment_with_move_that() const& -> bool { return CPP2_UFCS(is_assignment_with_move_that)((*cpp2::impl::assert_not_null(n))); } +#line 376 "reflect.h2" + [[nodiscard]] auto function_declaration::is_destructor() const& -> bool { return CPP2_UFCS(is_destructor)((*cpp2::impl::assert_not_null(n))); } + +#line 378 "reflect.h2" + [[nodiscard]] auto function_declaration::is_copy_or_move() const& -> bool { return is_constructor_with_that() || is_assignment_with_that(); } + +#line 380 "reflect.h2" + [[nodiscard]] auto function_declaration::has_declared_return_type() const& -> bool { return CPP2_UFCS(has_declared_return_type)((*cpp2::impl::assert_not_null(n))); } +#line 381 "reflect.h2" + [[nodiscard]] auto function_declaration::has_deduced_return_type() const& -> bool { return CPP2_UFCS(has_deduced_return_type)((*cpp2::impl::assert_not_null(n))); } +#line 382 "reflect.h2" + [[nodiscard]] auto function_declaration::has_bool_return_type() const& -> bool { return CPP2_UFCS(has_bool_return_type)((*cpp2::impl::assert_not_null(n))); } +#line 383 "reflect.h2" + [[nodiscard]] auto function_declaration::has_non_void_return_type() const& -> bool { return CPP2_UFCS(has_non_void_return_type)((*cpp2::impl::assert_not_null(n))); } + +#line 385 "reflect.h2" + [[nodiscard]] auto function_declaration::has_compound_body() const& -> bool { return CPP2_UFCS(is_function_with_compound_body)((*cpp2::impl::assert_not_null(n))); } + +#line 387 "reflect.h2" + [[nodiscard]] auto function_declaration::get_body() const& -> statement { return { CPP2_UFCS(get_function_body)((*cpp2::impl::assert_not_null(n))), (*this) }; } +#line 388 "reflect.h2" + [[nodiscard]] auto function_declaration::get_compound_body() const& -> compound_statement { return { CPP2_UFCS(get_function_compound_body)((*cpp2::impl::assert_not_null(n))), (*this) }; } +#line 389 "reflect.h2" + [[nodiscard]] auto function_declaration::get_unnamed_return_type() const& -> std::string { return CPP2_UFCS(unnamed_return_type_to_string)((*cpp2::impl::assert_not_null(n))); } +#line 390 "reflect.h2" + [[nodiscard]] auto function_declaration::get_signature() const& -> std::string { return CPP2_UFCS(signature_to_string)((*cpp2::impl::assert_not_null(n))); } + +#line 392 "reflect.h2" + [[nodiscard]] auto function_declaration::is_binary_comparison_function() const& -> bool { return CPP2_UFCS(is_binary_comparison_function)((*cpp2::impl::assert_not_null(n))); } + +#line 394 "reflect.h2" + [[nodiscard]] auto function_declaration::get_parameters() const& -> std::vector + + { + std::vector ret {}; + for ( auto const& param : CPP2_UFCS(get_function_parameters)((*cpp2::impl::assert_not_null(n))) ) { + static_cast(CPP2_UFCS(emplace_back)(ret, param, (*this))); + } + return ret; + } + +#line 404 "reflect.h2" + [[nodiscard]] auto function_declaration::get_returns() const& -> std::vector + + { + std::vector ret {}; + for ( auto const& param : CPP2_UFCS(get_function_returns)((*cpp2::impl::assert_not_null(n))) ) { + static_cast(CPP2_UFCS(emplace_back)(ret, param, (*this))); + } + return ret; + } + + // Modifying operations + // +#line 416 "reflect.h2" + [[nodiscard]] auto function_declaration::default_to_virtual() & -> decltype(auto) { return static_cast(CPP2_UFCS(make_function_virtual)((*cpp2::impl::assert_not_null(n)))); } + +#line 418 "reflect.h2" + [[nodiscard]] auto function_declaration::make_virtual() & -> bool { return CPP2_UFCS(make_function_virtual)((*cpp2::impl::assert_not_null(n))); } + +#line 420 "reflect.h2" + auto function_declaration::add_initializer(cpp2::impl::in source) & -> void + +#line 423 "reflect.h2" + { + if ((*this).is_active() && !(!(has_initializer())) ) { (*this).report_violation(CPP2_CONTRACT_MSG("cannot add an initializer to a function that already has one")); } + if ((*this).is_active() && !(parent_is_type()) ) { (*this).report_violation(CPP2_CONTRACT_MSG("cannot add an initializer to a function that isn't in a type scope")); } +#line 424 "reflect.h2" + auto stmt {parse_statement(source)}; + if (!((cpp2::impl::as_(stmt)))) { + error("cannot add an initializer that is not a valid statement"); + return ; + } + require(CPP2_UFCS(add_function_initializer)((*cpp2::impl::assert_not_null(n)), std::move(cpp2::move(stmt))), + std::string("unexpected error while attempting to add initializer")); + } + + function_declaration::function_declaration(function_declaration const& that) + : declaration{ static_cast(that) }{} +function_declaration::function_declaration(function_declaration&& that) noexcept + : declaration{ static_cast(that) }{} + +#line 435 "reflect.h2" +//----------------------------------------------------------------------- +// Object declarations +// + +#line 442 "reflect.h2" + object_declaration::object_declaration( + + cpp2::impl::in n_, + cpp2::impl::in s + ) + : declaration{ n_, s } +#line 447 "reflect.h2" + { + + if (cpp2::cpp2_default.is_active() && !(CPP2_UFCS(is_object)((*cpp2::impl::assert_not_null(n)))) ) { cpp2::cpp2_default.report_violation(""); } + } + +#line 452 "reflect.h2" + [[nodiscard]] auto object_declaration::is_const() const& -> bool { return CPP2_UFCS(is_const)((*cpp2::impl::assert_not_null(n))); } +#line 453 "reflect.h2" + [[nodiscard]] auto object_declaration::has_wildcard_type() const& -> bool { return CPP2_UFCS(has_wildcard_type)((*cpp2::impl::assert_not_null(n))); } + +#line 455 "reflect.h2" + [[nodiscard]] auto object_declaration::type() const& -> std::string{ + auto ret {CPP2_UFCS(object_type)((*cpp2::impl::assert_not_null(n)))}; + require(!(contains(ret, "(*ERROR*)")), + "cannot to_string this type: " + ret); + return ret; + } + +#line 462 "reflect.h2" + [[nodiscard]] auto object_declaration::initializer() const& -> std::string{ + auto ret {CPP2_UFCS(object_initializer)((*cpp2::impl::assert_not_null(n)))}; + require(!(contains(ret, "(*ERROR*)")), + "cannot to_string this initializer: " + ret); + return ret; + } + + object_declaration::object_declaration(object_declaration const& that) + : declaration{ static_cast(that) }{} +object_declaration::object_declaration(object_declaration&& that) noexcept + : declaration{ static_cast(that) }{} + +#line 471 "reflect.h2" +//----------------------------------------------------------------------- +// Type and namespace declarations +// + +#line 478 "reflect.h2" + type_or_namespace_declaration::type_or_namespace_declaration( + + cpp2::impl::in n_, + cpp2::impl::in s + ) + : declaration{ n_, s } +#line 483 "reflect.h2" + { + + if (cpp2::cpp2_default.is_active() && !(CPP2_UFCS(is_type)((*cpp2::impl::assert_not_null(n))) || CPP2_UFCS(is_namespace)((*cpp2::impl::assert_not_null(n)))) ) { cpp2::cpp2_default.report_violation(""); } + } + +#line 488 "reflect.h2" + auto type_or_namespace_declaration::reserve_names(cpp2::impl::in name, auto&& ...etc) const& -> void + { // etc is not declared ':string_view' for compatibility with GCC 10.x + for ( + auto const& m : get_members() ) { + CPP2_UFCS(require)(m, !(CPP2_UFCS(has_name)(m, name)), + "in a '" + cpp2::to_string(get_metafunction_name()) + "' type, the name '" + cpp2::to_string(name) + "' " + "is reserved for use by the '" + cpp2::to_string(get_metafunction_name()) + "' implementation" + ); + } + if constexpr (!(CPP2_PACK_EMPTY(etc))) { + reserve_names(CPP2_FORWARD(etc)...); + } + } + +#line 502 "reflect.h2" + [[nodiscard]] auto type_or_namespace_declaration::get_member_functions() const& -> std::vector + + { + std::vector ret {}; + for ( + auto const& d : CPP2_UFCS(get_nested_declarations)((*cpp2::impl::assert_not_null(n)), declaration_node::functions) ) { + static_cast(CPP2_UFCS(emplace_back)(ret, d, (*this))); + } + return ret; + } + +#line 513 "reflect.h2" + [[nodiscard]] auto type_or_namespace_declaration::get_member_functions_needing_initializer() const& -> std::vector + + { + std::vector ret {}; + for ( + auto const& d : CPP2_UFCS(get_nested_declarations)((*cpp2::impl::assert_not_null(n)), declaration_node::functions) ) + if ( !(CPP2_UFCS(has_initializer)((*cpp2::impl::assert_not_null(d)))) + && !(CPP2_UFCS(is_virtual_function)((*cpp2::impl::assert_not_null(d)))) + && !(CPP2_UFCS(is_defaultable_function)((*cpp2::impl::assert_not_null(d))))) + { + static_cast(CPP2_UFCS(emplace_back)(ret, d, (*this))); + } + return ret; + } + +#line 528 "reflect.h2" + [[nodiscard]] auto type_or_namespace_declaration::get_member_objects() const& -> std::vector + + { + std::vector ret {}; + for ( auto const& d : CPP2_UFCS(get_nested_declarations)((*cpp2::impl::assert_not_null(n)), declaration_node::objects) ) { + static_cast(CPP2_UFCS(emplace_back)(ret, d, (*this))); + } + return ret; + } + +#line 538 "reflect.h2" + [[nodiscard]] auto type_or_namespace_declaration::get_member_types() const& -> std::vector + + { + std::vector ret {}; + for ( auto const& d : CPP2_UFCS(get_nested_declarations)((*cpp2::impl::assert_not_null(n)), declaration_node::types) ) { + static_cast(CPP2_UFCS(emplace_back)(ret, d, (*this))); + } + return ret; + } + +#line 548 "reflect.h2" + [[nodiscard]] auto type_or_namespace_declaration::get_member_aliases() const& -> std::vector + + { + std::vector ret {}; + for ( auto const& d : CPP2_UFCS(get_nested_declarations)((*cpp2::impl::assert_not_null(n)), declaration_node::aliases) ) { + static_cast(CPP2_UFCS(emplace_back)(ret, d, (*this))); + } + return ret; + } + +#line 558 "reflect.h2" + [[nodiscard]] auto type_or_namespace_declaration::get_members() const& -> std::vector + + { + std::vector ret {}; + for ( auto const& d : CPP2_UFCS(get_nested_declarations)((*cpp2::impl::assert_not_null(n)), declaration_node::all) ) { + static_cast(CPP2_UFCS(emplace_back)(ret, d, (*this))); + } + return ret; + } + +#line 568 "reflect.h2" + auto type_or_namespace_declaration::add_member(cpp2::impl::in source) & -> void + { + auto decl {parse_statement(source)}; + if (!((cpp2::impl::as_(decl)))) { + error("the provided source string is not a valid statement"); + return ; + } + if (!(CPP2_UFCS(is_declaration)((*cpp2::impl::assert_not_null(decl))))) { + error("cannot add a member that is not a declaration"); + } + + require(CPP2_UFCS(add_type_or_namespace_member)((*cpp2::impl::assert_not_null(n)), std::move(cpp2::move(decl))), + std::string("unexpected error while attempting to add member:\n") + source); + } + + type_or_namespace_declaration::type_or_namespace_declaration(type_or_namespace_declaration const& that) + : declaration{ static_cast(that) }{} +type_or_namespace_declaration::type_or_namespace_declaration(type_or_namespace_declaration&& that) noexcept + : declaration{ static_cast(that) }{} + +#line 589 "reflect.h2" + type_declaration::type_declaration( + + cpp2::impl::in n_, + cpp2::impl::in s + ) + : type_or_namespace_declaration{ n_, s } +#line 594 "reflect.h2" + { + + if (cpp2::cpp2_default.is_active() && !(CPP2_UFCS(is_type)((*cpp2::impl::assert_not_null(n)))) ) { cpp2::cpp2_default.report_violation(""); } + } + +#line 600 "reflect.h2" + [[nodiscard]] auto type_declaration::is_polymorphic() const& -> bool { return CPP2_UFCS(is_polymorphic)((*cpp2::impl::assert_not_null(n))); } +#line 601 "reflect.h2" + [[nodiscard]] auto type_declaration::is_final() const& -> bool { return CPP2_UFCS(is_type_final)((*cpp2::impl::assert_not_null(n))); } +#line 602 "reflect.h2" + [[nodiscard]] auto type_declaration::make_final() & -> bool { return CPP2_UFCS(make_type_final)((*cpp2::impl::assert_not_null(n))); } + +#line 604 "reflect.h2" + [[nodiscard]] auto type_declaration::query_declared_value_set_functions() const& -> query_declared_value_set_functions_ret + +#line 611 "reflect.h2" + { + cpp2::impl::deferred_init out_this_in_that; + cpp2::impl::deferred_init out_this_move_that; + cpp2::impl::deferred_init inout_this_in_that; + cpp2::impl::deferred_init inout_this_move_that; +#line 612 "reflect.h2" + auto declared {CPP2_UFCS(find_declared_value_set_functions)((*cpp2::impl::assert_not_null(n)))}; + out_this_in_that.construct(declared.out_this_in_that != nullptr); + out_this_move_that.construct(declared.out_this_move_that != nullptr); + inout_this_in_that.construct(declared.inout_this_in_that != nullptr); + inout_this_move_that.construct(cpp2::move(declared).inout_this_move_that != nullptr); + return { std::move(out_this_in_that.value()), std::move(out_this_move_that.value()), std::move(inout_this_in_that.value()), std::move(inout_this_move_that.value()) }; // NOLINT(performance-move-const-arg) + } + +#line 620 "reflect.h2" + [[nodiscard]] auto type_declaration::disable_member_function_generation() & -> decltype(auto) { return CPP2_UFCS(type_disable_member_function_generation)((*cpp2::impl::assert_not_null(n))); } +#line 621 "reflect.h2" + [[nodiscard]] auto type_declaration::disable_ref_qualifier_generation() & -> decltype(auto) { return CPP2_UFCS(type_disable_ref_qualifier_generation)((*cpp2::impl::assert_not_null(n))); } + + // At some point we may want to allow this also for namespaces, but for now only types +#line 624 "reflect.h2" + [[nodiscard]] auto type_declaration::remove_marked_members() & -> decltype(auto) { return CPP2_UFCS(type_remove_marked_members)((*cpp2::impl::assert_not_null(n))); } +#line 625 "reflect.h2" + [[nodiscard]] auto type_declaration::remove_all_members() & -> decltype(auto) { return CPP2_UFCS(type_remove_all_members)((*cpp2::impl::assert_not_null(n))); } + + type_declaration::type_declaration(type_declaration const& that) + : type_or_namespace_declaration{ static_cast(that) }{} +type_declaration::type_declaration(type_declaration&& that) noexcept + : type_or_namespace_declaration{ static_cast(that) }{} + +#line 633 "reflect.h2" + namespace_declaration::namespace_declaration( + + cpp2::impl::in n_, + cpp2::impl::in s + ) + : type_or_namespace_declaration{ n_, s } +#line 638 "reflect.h2" + { + + if (cpp2::cpp2_default.is_active() && !(CPP2_UFCS(is_namespace)((*cpp2::impl::assert_not_null(n)))) ) { cpp2::cpp2_default.report_violation(""); } + } + + namespace_declaration::namespace_declaration(namespace_declaration const& that) + : type_or_namespace_declaration{ static_cast(that) }{} +namespace_declaration::namespace_declaration(namespace_declaration&& that) noexcept + : type_or_namespace_declaration{ static_cast(that) }{} + +#line 645 "reflect.h2" +//----------------------------------------------------------------------- +// Alias declarations +// + +#line 652 "reflect.h2" + alias_declaration::alias_declaration( + + cpp2::impl::in n_, + cpp2::impl::in s + ) + : declaration{ n_, s } +#line 657 "reflect.h2" + { + + if (cpp2::cpp2_default.is_active() && !(CPP2_UFCS(is_alias)((*cpp2::impl::assert_not_null(n)))) ) { cpp2::cpp2_default.report_violation(""); } + } + + alias_declaration::alias_declaration(alias_declaration const& that) + : declaration{ static_cast(that) }{} +alias_declaration::alias_declaration(alias_declaration&& that) noexcept + : declaration{ static_cast(that) }{} + +#line 664 "reflect.h2" +//----------------------------------------------------------------------- +// Parameter declarations +// + +#line 671 "reflect.h2" + parameter_declaration::parameter_declaration( + + cpp2::impl::in n_, + cpp2::impl::in s + ) + : reflection_base{ n_, s } +#line 676 "reflect.h2" + { + + } + +#line 680 "reflect.h2" + [[nodiscard]] auto parameter_declaration::get_declaration() const& -> object_declaration { return { CPP2_UFCS(get)((*cpp2::impl::assert_not_null(n)).declaration), (*this) }; } +#line 681 "reflect.h2" + [[nodiscard]] auto parameter_declaration::get_passing_style() const& -> passing_style { return (*cpp2::impl::assert_not_null(n)).pass; } + +#line 683 "reflect.h2" + [[nodiscard]] auto parameter_declaration::is_implicit() const& -> bool { return (*cpp2::impl::assert_not_null(n)).mod == parameter_declaration_node::modifier::implicit; } +#line 684 "reflect.h2" + [[nodiscard]] auto parameter_declaration::is_virtual() const& -> bool { return (*cpp2::impl::assert_not_null(n)).mod == parameter_declaration_node::modifier::virtual_; } +#line 685 "reflect.h2" + [[nodiscard]] auto parameter_declaration::is_override() const& -> bool { return (*cpp2::impl::assert_not_null(n)).mod == parameter_declaration_node::modifier::override_; } +#line 686 "reflect.h2" + [[nodiscard]] auto parameter_declaration::is_final() const& -> bool { return (*cpp2::impl::assert_not_null(n)).mod == parameter_declaration_node::modifier::final_; } + + parameter_declaration::parameter_declaration(parameter_declaration const& that) + : reflection_base{ static_cast const&>(that) }{} +parameter_declaration::parameter_declaration(parameter_declaration&& that) noexcept + : reflection_base{ static_cast&&>(that) }{} + +#line 690 "reflect.h2" +//----------------------------------------------------------------------- +// +// Expressions +// +//----------------------------------------------------------------------- +// + +//----------------------------------------------------------------------- +// Binary expressions +// + +#line 717 "reflect.h2" + template binary_expression::binary_expression( + + binary_expression_node* const& n_, + cpp2::impl::in s + ) + : reflection_base>{ n_, s } +#line 722 "reflect.h2" + { + + } + +#line 726 "reflect.h2" + template [[nodiscard]] auto binary_expression::is_fold_expression() const& -> bool { return CPP2_UFCS(is_fold_expression)((*cpp2::impl::assert_not_null((*this).n))); } +#line 727 "reflect.h2" + template [[nodiscard]] auto binary_expression::lhs_is_id_expression() const& -> bool { return CPP2_UFCS(lhs_is_id_expression)((*cpp2::impl::assert_not_null((*this).n))); } +#line 728 "reflect.h2" + template [[nodiscard]] auto binary_expression::is_standalone_expression() const& -> bool { return CPP2_UFCS(is_standalone_expression)((*cpp2::impl::assert_not_null((*this).n))); } +#line 729 "reflect.h2" + template [[nodiscard]] auto binary_expression::terms_size() const& -> int { return CPP2_UFCS(terms_size)((*cpp2::impl::assert_not_null((*this).n))); } +#line 730 "reflect.h2" + template [[nodiscard]] auto binary_expression::is_identifier() const& -> bool { return CPP2_UFCS(is_identifier)((*cpp2::impl::assert_not_null((*this).n))); } +#line 731 "reflect.h2" + template [[nodiscard]] auto binary_expression::is_id_expression() const& -> bool { return CPP2_UFCS(is_id_expression)((*cpp2::impl::assert_not_null((*this).n))); } +#line 732 "reflect.h2" + template [[nodiscard]] auto binary_expression::is_unqualified_id() const& -> bool { return CPP2_UFCS(is_unqualified_id)((*cpp2::impl::assert_not_null((*this).n))); } +#line 733 "reflect.h2" + template [[nodiscard]] auto binary_expression::is_expression_list() const& -> bool { return CPP2_UFCS(is_expression_list)((*cpp2::impl::assert_not_null((*this).n))); } +#line 734 "reflect.h2" + template [[nodiscard]] auto binary_expression::is_literal() const& -> bool { return CPP2_UFCS(is_literal)((*cpp2::impl::assert_not_null((*this).n))); } + +#line 740 "reflect.h2" + template template binary_expression::term_t::term_t(auto&& o, auto&& ptr, auto&& cs) + : op{ CPP2_FORWARD(o) } + , term{ CPP2_FORWARD(ptr), CPP2_FORWARD(cs) }{} + +#line 742 "reflect.h2" + template template [[nodiscard]] auto binary_expression::term_t::get_op() const& -> std::string { return op; } +#line 743 "reflect.h2" + template template [[nodiscard]] auto binary_expression::term_t::get_term() const& -> T { return term; } + + template template binary_expression::term_t::term_t(term_t const& that) + : op{ that.op } + , term{ that.term }{} + +template template auto binary_expression::term_t::operator=(term_t const& that) -> term_t& { + op = that.op; + term = that.term; + return *this;} +template template binary_expression::term_t::term_t(term_t&& that) noexcept + : op{ std::move(that).op } + , term{ std::move(that).term }{} +template template auto binary_expression::term_t::operator=(term_t&& that) noexcept -> term_t& { + op = std::move(that).op; + term = std::move(that).term; + return *this;} +#line 746 "reflect.h2" + template [[nodiscard]] auto binary_expression::get_terms() const& -> auto{ + if constexpr (std::is_same_v) { + std::vector> ret {}; + static_cast(CPP2_UFCS(emplace_back)(ret, "", CPP2_UFCS(get)((*cpp2::impl::assert_not_null((*this).n)).expr), (*this))); + for ( auto const& t : (*cpp2::impl::assert_not_null((*this).n)).terms ) {static_cast(CPP2_UFCS(emplace_back)(ret, *cpp2::impl::assert_not_null(t.op), CPP2_UFCS(get)(t.expr), (*this))); } + return ret; + } + if constexpr (std::is_same_v) { + std::vector> ret {}; + static_cast(CPP2_UFCS(emplace_back)(ret, "", CPP2_UFCS(get)((*cpp2::impl::assert_not_null((*this).n)).expr), (*this))); + for ( auto const& t : (*cpp2::impl::assert_not_null((*this).n)).terms ) {static_cast(CPP2_UFCS(emplace_back)(ret, *cpp2::impl::assert_not_null(t.op), CPP2_UFCS(get)(t.expr), (*this))); } + return ret; + } + if constexpr (std::is_same_v) { + std::vector> ret {}; + static_cast(CPP2_UFCS(emplace_back)(ret, "", CPP2_UFCS(get)((*cpp2::impl::assert_not_null((*this).n)).expr), (*this))); + for ( auto const& t : (*cpp2::impl::assert_not_null((*this).n)).terms ) {static_cast(CPP2_UFCS(emplace_back)(ret, *cpp2::impl::assert_not_null(t.op), CPP2_UFCS(get)(t.expr), (*this))); } + return ret; + } + if constexpr (std::is_same_v) { + std::vector> ret {}; + static_cast(CPP2_UFCS(emplace_back)(ret, "", CPP2_UFCS(get)((*cpp2::impl::assert_not_null((*this).n)).expr), (*this))); + for ( auto const& t : (*cpp2::impl::assert_not_null((*this).n)).terms ) {static_cast(CPP2_UFCS(emplace_back)(ret, *cpp2::impl::assert_not_null(t.op), CPP2_UFCS(get)(t.expr), (*this))); } + return ret; + } + if constexpr (std::is_same_v) { + std::vector> ret {}; + static_cast(CPP2_UFCS(emplace_back)(ret, "", CPP2_UFCS(get)((*cpp2::impl::assert_not_null((*this).n)).expr), (*this))); + for ( auto const& t : (*cpp2::impl::assert_not_null((*this).n)).terms ) {static_cast(CPP2_UFCS(emplace_back)(ret, *cpp2::impl::assert_not_null(t.op), CPP2_UFCS(get)(t.expr), (*this))); } + return ret; + } + if constexpr (std::is_same_v) { + std::vector> ret {}; + static_cast(CPP2_UFCS(emplace_back)(ret, "", CPP2_UFCS(get)((*cpp2::impl::assert_not_null((*this).n)).expr), (*this))); + for ( auto const& t : (*cpp2::impl::assert_not_null((*this).n)).terms ) {static_cast(CPP2_UFCS(emplace_back)(ret, *cpp2::impl::assert_not_null(t.op), CPP2_UFCS(get)(t.expr), (*this))); } + return ret; + } + if constexpr (std::is_same_v) { + std::vector> ret {}; + static_cast(CPP2_UFCS(emplace_back)(ret, "", CPP2_UFCS(get)((*cpp2::impl::assert_not_null((*this).n)).expr), (*this))); + for ( auto const& t : (*cpp2::impl::assert_not_null((*this).n)).terms ) {static_cast(CPP2_UFCS(emplace_back)(ret, *cpp2::impl::assert_not_null(t.op), CPP2_UFCS(get)(t.expr), (*this))); } + return ret; + } + if constexpr (std::is_same_v) { + std::vector> ret {}; + static_cast(CPP2_UFCS(emplace_back)(ret, "", CPP2_UFCS(get)((*cpp2::impl::assert_not_null((*this).n)).expr), (*this))); + for ( auto const& t : (*cpp2::impl::assert_not_null((*this).n)).terms ) {static_cast(CPP2_UFCS(emplace_back)(ret, *cpp2::impl::assert_not_null(t.op), CPP2_UFCS(get)(t.expr), (*this))); } + return ret; + } + if constexpr (std::is_same_v) { + std::vector> ret {}; + static_cast(CPP2_UFCS(emplace_back)(ret, "", CPP2_UFCS(get)((*cpp2::impl::assert_not_null((*this).n)).expr), (*this))); + for ( auto const& t : (*cpp2::impl::assert_not_null((*this).n)).terms ) {static_cast(CPP2_UFCS(emplace_back)(ret, *cpp2::impl::assert_not_null(t.op), CPP2_UFCS(get)(t.expr), (*this))); } + return ret; + } + if constexpr (std::is_same_v) { + std::vector> ret {}; + static_cast(CPP2_UFCS(emplace_back)(ret, "", CPP2_UFCS(get)((*cpp2::impl::assert_not_null((*this).n)).expr), (*this))); + for ( auto const& t : (*cpp2::impl::assert_not_null((*this).n)).terms ) {static_cast(CPP2_UFCS(emplace_back)(ret, *cpp2::impl::assert_not_null(t.op), CPP2_UFCS(get)(t.expr), (*this))); } + return ret; + } + if constexpr (std::is_same_v) { + std::vector> ret {}; + static_cast(CPP2_UFCS(emplace_back)(ret, "", CPP2_UFCS(get)((*cpp2::impl::assert_not_null((*this).n)).expr), (*this))); + for ( auto const& t : (*cpp2::impl::assert_not_null((*this).n)).terms ) {static_cast(CPP2_UFCS(emplace_back)(ret, *cpp2::impl::assert_not_null(t.op), CPP2_UFCS(get)(t.expr), (*this))); } + return ret; + } + if constexpr (std::is_same_v) { + std::vector> ret {}; + static_cast(CPP2_UFCS(emplace_back)(ret, "", CPP2_UFCS(get)((*cpp2::impl::assert_not_null((*this).n)).expr), (*this))); + for ( auto const& t : (*cpp2::impl::assert_not_null((*this).n)).terms ) {static_cast(CPP2_UFCS(emplace_back)(ret, *cpp2::impl::assert_not_null(t.op), CPP2_UFCS(get)(t.expr), (*this))); } + return ret; + } + } + +#line 821 "reflect.h2" + template [[nodiscard]] auto binary_expression::as_expression_list() const& -> expression_list { return { CPP2_UFCS(get_expression_list)((*cpp2::impl::assert_not_null((*this).n))), (*this) }; } +#line 822 "reflect.h2" + template [[nodiscard]] auto binary_expression::as_literal() const& -> std::string { return CPP2_UFCS(to_string)((*cpp2::impl::assert_not_null(CPP2_UFCS(get_literal)(*cpp2::impl::assert_not_null((*this).n))))); } + + // Get the postfix-expression, if that's the entire expression (not actually binary) +#line 825 "reflect.h2" + template [[nodiscard]] auto binary_expression::get_if_only_a_postfix_expression() const& -> postfix_expression { return { CPP2_UFCS(get_if_only_a_postfix_expression_node)((*cpp2::impl::assert_not_null((*this).n))), (*this) }; } + // Get left-hand postfix-expression +#line 827 "reflect.h2" + template [[nodiscard]] auto binary_expression::get_lhs_postfix_expression() const& -> postfix_expression { return { CPP2_UFCS(get_postfix_expression_node)((*cpp2::impl::assert_not_null((*this).n))), (*this) }; } + // Get first right-hand postfix-expression, if there is one +#line 829 "reflect.h2" + template [[nodiscard]] auto binary_expression::get_second_postfix_expression() const& -> postfix_expression { return { CPP2_UFCS(get_second_postfix_expression_node)((*cpp2::impl::assert_not_null((*this).n))), (*this) }; } + +#line 831 "reflect.h2" + template [[nodiscard]] auto binary_expression::is_result_a_temporary_variable() const& -> bool { return CPP2_UFCS(is_result_a_temporary_variable)((*cpp2::impl::assert_not_null((*this).n))); } + +#line 833 "reflect.h2" + template [[nodiscard]] auto binary_expression::to_string() const& -> std::string { return CPP2_UFCS(to_string)((*cpp2::impl::assert_not_null((*this).n))); } + + template binary_expression::binary_expression(binary_expression const& that) + : reflection_base>{ static_cast> const&>(that) }{} +template binary_expression::binary_expression(binary_expression&& that) noexcept + : reflection_base>{ static_cast>&&>(that) }{} + +#line 837 "reflect.h2" +//----------------------------------------------------------------------- +// Expression list +// + +#line 844 "reflect.h2" + expression_list::expression_list( + + cpp2::impl::in n_, + cpp2::impl::in s + ) + : reflection_base{ n_, s } +#line 849 "reflect.h2" + { + + } + +#line 853 "reflect.h2" + [[nodiscard]] auto expression_list::is_empty() const& -> bool { return CPP2_UFCS(is_empty)((*cpp2::impl::assert_not_null(n))); } +#line 854 "reflect.h2" + [[nodiscard]] auto expression_list::is_fold_expression() const& -> bool { return CPP2_UFCS(is_fold_expression)((*cpp2::impl::assert_not_null(n))); } + +#line 856 "reflect.h2" + [[nodiscard]] auto expression_list::get_expressions() const& -> std::vector + + { + std::vector ret {}; + for ( auto const& expr : CPP2_UFCS(get_expressions)((*cpp2::impl::assert_not_null(n))) ) { + static_cast(CPP2_UFCS(emplace_back)(ret, expression(CPP2_UFCS(get)(expr.expr), (*this)))); + } + return ret; + } + +#line 866 "reflect.h2" + [[nodiscard]] auto expression_list::to_string() const& -> std::string { return CPP2_UFCS(to_string)((*cpp2::impl::assert_not_null(n))); } + + expression_list::expression_list(expression_list const& that) + : reflection_base{ static_cast const&>(that) }{} +expression_list::expression_list(expression_list&& that) noexcept + : reflection_base{ static_cast&&>(that) }{} + +#line 870 "reflect.h2" +//----------------------------------------------------------------------- +// Prefix expressions +// + +#line 877 "reflect.h2" + prefix_expression::prefix_expression( + + cpp2::impl::in n_, + cpp2::impl::in s + ) + : reflection_base{ n_, s } +#line 882 "reflect.h2" + { + + } + +#line 886 "reflect.h2" + [[nodiscard]] auto prefix_expression::get_ops() const& -> std::vector{ + std::vector ret {}; + for ( auto const& op : (*cpp2::impl::assert_not_null(n)).ops ) { + static_cast(CPP2_UFCS(emplace_back)(ret, CPP2_UFCS(to_string)((*cpp2::impl::assert_not_null(op))))); + } + return ret; + } + +#line 894 "reflect.h2" + [[nodiscard]] auto prefix_expression::get_postfix_expression() const& -> postfix_expression { return { CPP2_UFCS(get)((*cpp2::impl::assert_not_null((*this).n)).expr), (*this) }; } + +#line 896 "reflect.h2" + [[nodiscard]] auto prefix_expression::is_fold_expression() const& -> bool { return CPP2_UFCS(is_fold_expression)((*cpp2::impl::assert_not_null(n))); } +#line 897 "reflect.h2" + [[nodiscard]] auto prefix_expression::is_identifier() const& -> bool { return CPP2_UFCS(is_identifier)((*cpp2::impl::assert_not_null(n))); } +#line 898 "reflect.h2" + [[nodiscard]] auto prefix_expression::is_id_expression() const& -> bool { return CPP2_UFCS(is_id_expression)((*cpp2::impl::assert_not_null(n))); } +#line 899 "reflect.h2" + [[nodiscard]] auto prefix_expression::is_unqualified_id() const& -> bool { return CPP2_UFCS(is_unqualified_id)((*cpp2::impl::assert_not_null(n))); } +#line 900 "reflect.h2" + [[nodiscard]] auto prefix_expression::is_expression_list() const& -> bool { return CPP2_UFCS(is_expression_list)((*cpp2::impl::assert_not_null(n))); } +#line 901 "reflect.h2" + [[nodiscard]] auto prefix_expression::is_literal() const& -> bool { return CPP2_UFCS(is_literal)((*cpp2::impl::assert_not_null(n))); } +#line 902 "reflect.h2" + [[nodiscard]] auto prefix_expression::is_result_a_temporary_variable() const& -> bool { return CPP2_UFCS(is_result_a_temporary_variable)((*cpp2::impl::assert_not_null(n))); } + +#line 904 "reflect.h2" + [[nodiscard]] auto prefix_expression::as_expression_list() const& -> expression_list { return { CPP2_UFCS(get_expression_list)((*cpp2::impl::assert_not_null((*this).n))), (*this) }; } +#line 905 "reflect.h2" + [[nodiscard]] auto prefix_expression::as_literal() const& -> std::string { return CPP2_UFCS(to_string)((*cpp2::impl::assert_not_null(CPP2_UFCS(get_literal)(*cpp2::impl::assert_not_null(n))))); } +#line 906 "reflect.h2" + [[nodiscard]] auto prefix_expression::as_identifier() const& -> std::string { return CPP2_UFCS(to_string)((*cpp2::impl::assert_not_null(CPP2_UFCS(get_identifier)(*cpp2::impl::assert_not_null(n))))); } + +#line 908 "reflect.h2" + [[nodiscard]] auto prefix_expression::to_string() const& -> std::string { return CPP2_UFCS(to_string)((*cpp2::impl::assert_not_null((*this).n))); } + + prefix_expression::~prefix_expression() noexcept{} +prefix_expression::prefix_expression(prefix_expression const& that) + : reflection_base{ static_cast const&>(that) }{} +prefix_expression::prefix_expression(prefix_expression&& that) noexcept + : reflection_base{ static_cast&&>(that) }{} + +#line 912 "reflect.h2" +//----------------------------------------------------------------------- +// Postfix expressions +// + +#line 919 "reflect.h2" + postfix_expression::postfix_expression( + + cpp2::impl::in n_, + cpp2::impl::in s + ) + : reflection_base{ n_, s } +#line 924 "reflect.h2" + { + + } + +#line 928 "reflect.h2" + [[nodiscard]] auto postfix_expression::get_primary_expression() const& -> primary_expression { return { CPP2_UFCS(get)((*cpp2::impl::assert_not_null((*this).n)).expr), (*this) }; } + +#line 934 "reflect.h2" + postfix_expression::term_t::term_t(auto&& term, auto&& cs) + : term_{ CPP2_FORWARD(term) } + , cs_{ CPP2_FORWARD(cs) }{} + +#line 936 "reflect.h2" + [[nodiscard]] auto postfix_expression::term_t::get_op() const& -> std::string_view { return CPP2_UFCS(as_string_view)((*cpp2::impl::assert_not_null((*cpp2::impl::assert_not_null(term_)).op))); } + + // If op is More is contained in the Notes + // + // . id_expression member selection + // [ ( expression_list subscript or function call + // ... expression fold expression + +#line 944 "reflect.h2" + [[nodiscard]] auto postfix_expression::term_t::is_id_expression() const& -> bool { return CPP2_UFCS(get)((*cpp2::impl::assert_not_null(term_)).id_expr) != nullptr; } +#line 945 "reflect.h2" + [[nodiscard]] auto postfix_expression::term_t::is_expression_list() const& -> bool { return CPP2_UFCS(get)((*cpp2::impl::assert_not_null(term_)).expr_list) != nullptr; } +#line 946 "reflect.h2" + [[nodiscard]] auto postfix_expression::term_t::is_expression() const& -> bool { return CPP2_UFCS(get)((*cpp2::impl::assert_not_null(term_)).last_expr) != nullptr; } + +#line 948 "reflect.h2" + [[nodiscard]] auto postfix_expression::term_t::get_id_expression() const& -> id_expression { return { CPP2_UFCS(get)((*cpp2::impl::assert_not_null(term_)).id_expr), *cpp2::impl::assert_not_null(cs_) }; } +#line 949 "reflect.h2" + [[nodiscard]] auto postfix_expression::term_t::get_expression_list() const& -> expression_list { return { CPP2_UFCS(get)((*cpp2::impl::assert_not_null(term_)).expr_list), *cpp2::impl::assert_not_null(cs_) }; } +#line 950 "reflect.h2" + [[nodiscard]] auto postfix_expression::term_t::get_expression() const& -> expression { return { CPP2_UFCS(get)((*cpp2::impl::assert_not_null(term_)).last_expr), *cpp2::impl::assert_not_null(cs_) }; } + + postfix_expression::term_t::term_t(term_t const& that) + : term_{ that.term_ } + , cs_{ that.cs_ }{} +postfix_expression::term_t::term_t(term_t&& that) noexcept + : term_{ std::move(that).term_ } + , cs_{ std::move(that).cs_ }{} + +#line 953 "reflect.h2" + [[nodiscard]] auto postfix_expression::get_terms() const& -> auto{ + std::vector ret {}; + for ( auto const& t : (*cpp2::impl::assert_not_null((*this).n)).ops ) {static_cast(CPP2_UFCS(emplace_back)(ret, &t, &(*this))); } + return ret; + } + +#line 959 "reflect.h2" + [[nodiscard]] auto postfix_expression::is_fold_expression() const& -> bool { return CPP2_UFCS(is_fold_expression)((*cpp2::impl::assert_not_null(n))); } +#line 960 "reflect.h2" + [[nodiscard]] auto postfix_expression::is_identifier() const& -> bool { return CPP2_UFCS(is_identifier)((*cpp2::impl::assert_not_null(n))); } +#line 961 "reflect.h2" + [[nodiscard]] auto postfix_expression::is_id_expression() const& -> bool { return CPP2_UFCS(is_id_expression)((*cpp2::impl::assert_not_null(n))); } +#line 962 "reflect.h2" + [[nodiscard]] auto postfix_expression::is_unqualified_id() const& -> bool { return CPP2_UFCS(is_unqualified_id)((*cpp2::impl::assert_not_null(n))); } +#line 963 "reflect.h2" + [[nodiscard]] auto postfix_expression::is_expression_list() const& -> bool { return CPP2_UFCS(is_expression_list)((*cpp2::impl::assert_not_null(n))); } +#line 964 "reflect.h2" + [[nodiscard]] auto postfix_expression::is_literal() const& -> bool { return CPP2_UFCS(is_literal)((*cpp2::impl::assert_not_null(n))); } + +#line 966 "reflect.h2" + [[nodiscard]] auto postfix_expression::as_identifier() const& -> std::string { return CPP2_UFCS(to_string)((*cpp2::impl::assert_not_null(CPP2_UFCS(get_identifier)(*cpp2::impl::assert_not_null(n))))); } +#line 967 "reflect.h2" + [[nodiscard]] auto postfix_expression::as_expression_list() const& -> expression_list { return { CPP2_UFCS(get_expression_list)((*cpp2::impl::assert_not_null((*this).n))), (*this) }; } +#line 968 "reflect.h2" + [[nodiscard]] auto postfix_expression::as_literal() const& -> std::string { return CPP2_UFCS(to_string)((*cpp2::impl::assert_not_null(CPP2_UFCS(get_literal)(*cpp2::impl::assert_not_null(n))))); } + +#line 970 "reflect.h2" + [[nodiscard]] auto postfix_expression::get_first_token_ignoring_this() const& -> std::string_view{ + auto ptok {CPP2_UFCS(get_first_token_ignoring_this)((*cpp2::impl::assert_not_null(n)))}; + if (ptok) {return *cpp2::impl::assert_not_null(cpp2::move(ptok)); } + return ""; + } + +#line 976 "reflect.h2" + [[nodiscard]] auto postfix_expression::starts_with_function_call_with_num_parameters(cpp2::impl::in num) const& -> bool { return CPP2_UFCS(starts_with_function_call_with_n_parameters)((*cpp2::impl::assert_not_null(n)), num); } +#line 977 "reflect.h2" + [[nodiscard]] auto postfix_expression::is_result_a_temporary_variable() const& -> bool { return CPP2_UFCS(is_result_a_temporary_variable)((*cpp2::impl::assert_not_null(n))); } + +#line 979 "reflect.h2" + [[nodiscard]] auto postfix_expression::to_string() const& -> std::string { return CPP2_UFCS(to_string)((*cpp2::impl::assert_not_null(n))); } + + postfix_expression::postfix_expression(postfix_expression const& that) + : reflection_base{ static_cast const&>(that) }{} +postfix_expression::postfix_expression(postfix_expression&& that) noexcept + : reflection_base{ static_cast&&>(that) }{} + +#line 983 "reflect.h2" +//----------------------------------------------------------------------- +// Template arguments +// + +#line 990 "reflect.h2" + template_arg::template_arg( + + cpp2::impl::in n_, + cpp2::impl::in s + ) + : reflection_base{ n_, s } +#line 995 "reflect.h2" + { + + } + +#line 999 "reflect.h2" + [[nodiscard]] auto template_arg::is_expression() const& -> bool { return CPP2_UFCS(is_expression)((*cpp2::impl::assert_not_null(n))); } +#line 1000 "reflect.h2" + [[nodiscard]] auto template_arg::is_type_id() const& -> bool { return CPP2_UFCS(is_type_id)((*cpp2::impl::assert_not_null(n))); } + +#line 1002 "reflect.h2" + [[nodiscard]] auto template_arg::as_expression() const& -> expression { return { CPP2_UFCS(get_expression)((*cpp2::impl::assert_not_null((*this).n))), (*this) }; } +#line 1003 "reflect.h2" + [[nodiscard]] auto template_arg::as_type_id() const& -> type_id { return { CPP2_UFCS(get_type_id)((*cpp2::impl::assert_not_null((*this).n))), (*this) }; } + +#line 1005 "reflect.h2" + [[nodiscard]] auto template_arg::to_string() const& -> std::string { return CPP2_UFCS(to_string)((*cpp2::impl::assert_not_null(n))); } + + template_arg::template_arg(template_arg const& that) + : reflection_base{ static_cast const&>(that) }{} +template_arg::template_arg(template_arg&& that) noexcept + : reflection_base{ static_cast&&>(that) }{} + +#line 1009 "reflect.h2" +//----------------------------------------------------------------------- +// Unqualified IDs +// + +#line 1016 "reflect.h2" + unqualified_id::unqualified_id( + + cpp2::impl::in n_, + cpp2::impl::in s + ) + : reflection_base{ n_, s } +#line 1021 "reflect.h2" + { + + } + +#line 1025 "reflect.h2" + [[nodiscard]] auto unqualified_id::is_identifier() const& -> bool { return CPP2_UFCS(is_identifier)((*cpp2::impl::assert_not_null(n))); } + +#line 1027 "reflect.h2" + [[nodiscard]] auto unqualified_id::get_identifier() const& -> std::string { return CPP2_UFCS(to_string)((*cpp2::impl::assert_not_null(CPP2_UFCS(get_identifier)(*cpp2::impl::assert_not_null(n))))); } + + //get_template_args: (this) -> std::vector = { + // ret: std::vector = (); + // for this.n*.template_arguments() do (t) { _ = ret.emplace_back( t&, this ); } + // return ret; + //} + +#line 1035 "reflect.h2" + [[nodiscard]] auto unqualified_id::as_token() const& -> std::string { return CPP2_UFCS(to_string)((*cpp2::impl::assert_not_null(CPP2_UFCS(get_token)(*cpp2::impl::assert_not_null(n))))); } + +#line 1037 "reflect.h2" + [[nodiscard]] auto unqualified_id::to_string() const& -> std::string { return CPP2_UFCS(to_string)((*cpp2::impl::assert_not_null(n))); } + + unqualified_id::unqualified_id(unqualified_id const& that) + : reflection_base{ static_cast const&>(that) }{} +unqualified_id::unqualified_id(unqualified_id&& that) noexcept + : reflection_base{ static_cast&&>(that) }{} + +#line 1041 "reflect.h2" +//----------------------------------------------------------------------- +// Qualified IDs +// + +#line 1048 "reflect.h2" + qualified_id::qualified_id( + + cpp2::impl::in n_, + cpp2::impl::in s + ) + : reflection_base{ n_, s } +#line 1053 "reflect.h2" + { + + } + +#line 1061 "reflect.h2" + qualified_id::term_t::term_t(auto&& o, auto&& ptr, auto&& cs) + : op{ CPP2_FORWARD(o) } + , unqualified{ CPP2_FORWARD(ptr), CPP2_FORWARD(cs) }{} + +#line 1063 "reflect.h2" + [[nodiscard]] auto qualified_id::term_t::get_op() const& -> std::string { return op; } +#line 1064 "reflect.h2" + [[nodiscard]] auto qualified_id::term_t::get_unqualified() const& -> unqualified_id { return unqualified; } + + qualified_id::term_t::term_t(term_t const& that) + : op{ that.op } + , unqualified{ that.unqualified }{} +qualified_id::term_t::term_t(term_t&& that) noexcept + : op{ std::move(that).op } + , unqualified{ std::move(that).unqualified }{} + +#line 1067 "reflect.h2" + [[nodiscard]] auto qualified_id::get_terms() const& -> auto{ + std::vector ret {}; + for ( auto const& t : (*cpp2::impl::assert_not_null((*this).n)).ids ) {static_cast(CPP2_UFCS(emplace_back)(ret, *cpp2::impl::assert_not_null(t.scope_op), CPP2_UFCS(get)(t.id), (*this))); } + return ret; + } + + //get_template_args: (this) -> std::vector = { + // ret: std::vector = (); + // for this.n*.template_arguments() do (t) { _ = ret.emplace_back( t&, this ); } + // return ret; + //} + +#line 1079 "reflect.h2" + [[nodiscard]] auto qualified_id::as_token() const& -> std::string { return CPP2_UFCS(to_string)((*cpp2::impl::assert_not_null(CPP2_UFCS(get_token)(*cpp2::impl::assert_not_null(n))))); } + +#line 1081 "reflect.h2" + [[nodiscard]] auto qualified_id::to_string() const& -> std::string { return CPP2_UFCS(to_string)((*cpp2::impl::assert_not_null(n))); } + + qualified_id::qualified_id(qualified_id const& that) + : reflection_base{ static_cast const&>(that) }{} +qualified_id::qualified_id(qualified_id&& that) noexcept + : reflection_base{ static_cast&&>(that) }{} + +#line 1085 "reflect.h2" +//----------------------------------------------------------------------- +// Type IDs +// + +#line 1092 "reflect.h2" + type_id::type_id( + + cpp2::impl::in n_, + cpp2::impl::in s + ) + : reflection_base{ n_, s } +#line 1097 "reflect.h2" + { + + } + + //get_template_args: (this) -> std::vector = { + // ret: std::vector = (); + // for this.n*.template_arguments() do (t) { _ = ret.emplace_back( t&, this ); } + // return ret; + //} + +#line 1107 "reflect.h2" + [[nodiscard]] auto type_id::is_postfix_expression() const& -> bool { return CPP2_UFCS(is_postfix_expression)((*cpp2::impl::assert_not_null((*this).n))); } +#line 1108 "reflect.h2" + [[nodiscard]] auto type_id::is_qualified_id() const& -> bool { return CPP2_UFCS(is_qualified_id)((*cpp2::impl::assert_not_null((*this).n))); } +#line 1109 "reflect.h2" + [[nodiscard]] auto type_id::is_unqualified_id() const& -> bool { return CPP2_UFCS(is_unqualified_id)((*cpp2::impl::assert_not_null((*this).n))); } +#line 1110 "reflect.h2" + [[nodiscard]] auto type_id::is_function_typeid() const& -> bool { return CPP2_UFCS(is_function_typeid)((*cpp2::impl::assert_not_null((*this).n))); } +#line 1111 "reflect.h2" + [[nodiscard]] auto type_id::is_keyword() const& -> bool { return CPP2_UFCS(is_keyword)((*cpp2::impl::assert_not_null((*this).n))); } +#line 1112 "reflect.h2" + [[nodiscard]] auto type_id::is_wildcard() const& -> bool { return CPP2_UFCS(is_wildcard)((*cpp2::impl::assert_not_null((*this).n))); } +#line 1113 "reflect.h2" + [[nodiscard]] auto type_id::is_pointer_qualified() const& -> bool { return CPP2_UFCS(is_pointer_qualified)((*cpp2::impl::assert_not_null((*this).n))); } +#line 1114 "reflect.h2" + [[nodiscard]] auto type_id::is_concept() const& -> bool { return CPP2_UFCS(is_concept)((*cpp2::impl::assert_not_null((*this).n))); } + +#line 1116 "reflect.h2" + [[nodiscard]] auto type_id::as_postfix_expression() const& -> postfix_expression { return { CPP2_UFCS(get_postfix_expression)((*cpp2::impl::assert_not_null(n))), (*this) }; } +#line 1117 "reflect.h2" + [[nodiscard]] auto type_id::as_qualified_id() const& -> qualified_id { return { CPP2_UFCS(get_qualified_id)((*cpp2::impl::assert_not_null(n))), (*this) }; } +#line 1118 "reflect.h2" + [[nodiscard]] auto type_id::as_unqualified_id() const& -> unqualified_id { return { CPP2_UFCS(get_unqualified_id)((*cpp2::impl::assert_not_null(n))), (*this) }; } + // TODO + //as_function_typeid : (this) -> function_typeid = (n*.get_function_typeid(), this); +#line 1121 "reflect.h2" + [[nodiscard]] auto type_id::as_keyword() const& -> std::string { return CPP2_UFCS(to_string)((*cpp2::impl::assert_not_null(CPP2_UFCS(get_keyword)(*cpp2::impl::assert_not_null(n))))); } +#line 1122 "reflect.h2" + [[nodiscard]] auto type_id::as_token() const& -> std::string { return CPP2_UFCS(to_string)((*cpp2::impl::assert_not_null(CPP2_UFCS(get_token)(*cpp2::impl::assert_not_null(n))))); } + +#line 1124 "reflect.h2" + [[nodiscard]] auto type_id::to_string() const& -> std::string { return CPP2_UFCS(to_string)((*cpp2::impl::assert_not_null(n))); } + + type_id::type_id(type_id const& that) + : reflection_base{ static_cast const&>(that) }{} +type_id::type_id(type_id&& that) noexcept + : reflection_base{ static_cast&&>(that) }{} + +#line 1128 "reflect.h2" +//----------------------------------------------------------------------- +// Primary expressions +// + +#line 1135 "reflect.h2" + primary_expression::primary_expression( + + cpp2::impl::in n_, + cpp2::impl::in s + ) + : reflection_base{ n_, s } +#line 1140 "reflect.h2" + { + + } + + //get_template_args: (this) -> std::vector = { + // ret: std::vector = (); + // for this.n*.template_arguments() do (t) { _ = ret.emplace_back( t&, this ); } + // return ret; + //} + +#line 1150 "reflect.h2" + [[nodiscard]] auto primary_expression::is_fold_expression() const& -> bool { return CPP2_UFCS(is_fold_expression)((*cpp2::impl::assert_not_null(n))); } +#line 1151 "reflect.h2" + [[nodiscard]] auto primary_expression::is_identifier() const& -> bool { return CPP2_UFCS(is_identifier)((*cpp2::impl::assert_not_null(n))); } +#line 1152 "reflect.h2" + [[nodiscard]] auto primary_expression::is_id_expression() const& -> bool { return CPP2_UFCS(is_id_expression)((*cpp2::impl::assert_not_null(n))); } +#line 1153 "reflect.h2" + [[nodiscard]] auto primary_expression::is_unqualified_id() const& -> bool { return CPP2_UFCS(is_unqualified_id)((*cpp2::impl::assert_not_null(n))); } +#line 1154 "reflect.h2" + [[nodiscard]] auto primary_expression::is_expression_list() const& -> bool { return CPP2_UFCS(is_expression_list)((*cpp2::impl::assert_not_null(n))); } +#line 1155 "reflect.h2" + [[nodiscard]] auto primary_expression::is_literal() const& -> bool { return CPP2_UFCS(is_literal)((*cpp2::impl::assert_not_null(n))); } +#line 1156 "reflect.h2" + [[nodiscard]] auto primary_expression::is_declaration() const& -> bool { return CPP2_UFCS(is_declaration)((*cpp2::impl::assert_not_null(n))); } + +#line 1158 "reflect.h2" + [[nodiscard]] auto primary_expression::as_identifier() const& -> std::string { return CPP2_UFCS(to_string)((*cpp2::impl::assert_not_null(CPP2_UFCS(get_identifier)(*cpp2::impl::assert_not_null(n))))); } +#line 1159 "reflect.h2" + [[nodiscard]] auto primary_expression::as_expression_list() const& -> expression_list { return { CPP2_UFCS(get_expression_list)((*cpp2::impl::assert_not_null((*this).n))), (*this) }; } +#line 1160 "reflect.h2" + [[nodiscard]] auto primary_expression::as_literal() const& -> std::string { return CPP2_UFCS(to_string)((*cpp2::impl::assert_not_null(CPP2_UFCS(get_literal)(*cpp2::impl::assert_not_null(n))))); } +#line 1161 "reflect.h2" + [[nodiscard]] auto primary_expression::as_declaration() const& -> declaration { return { CPP2_UFCS(get_declaration)((*cpp2::impl::assert_not_null((*this).n))), (*this) }; } + +#line 1163 "reflect.h2" + [[nodiscard]] auto primary_expression::to_string() const& -> std::string { return CPP2_UFCS(to_string)((*cpp2::impl::assert_not_null(n))); } + + primary_expression::primary_expression(primary_expression const& that) + : reflection_base{ static_cast const&>(that) }{} +primary_expression::primary_expression(primary_expression&& that) noexcept + : reflection_base{ static_cast&&>(that) }{} + +#line 1167 "reflect.h2" +//----------------------------------------------------------------------- +// ID expression +// + +#line 1174 "reflect.h2" + id_expression::id_expression( + + cpp2::impl::in n_, + cpp2::impl::in s + ) + : reflection_base{ n_, s } +#line 1179 "reflect.h2" + { + + } + + //get_template_args: (this) -> std::vector = { + // ret: std::vector = (); + // for this.n*.template_arguments() do (t) { _ = ret.emplace_back( t&, this ); } + // return ret; + //} + +#line 1189 "reflect.h2" + [[nodiscard]] auto id_expression::is_fold_expression() const& -> bool { return CPP2_UFCS(is_fold_expression)((*cpp2::impl::assert_not_null(n))); } +#line 1190 "reflect.h2" + [[nodiscard]] auto id_expression::is_empty() const& -> bool { return CPP2_UFCS(is_empty)((*cpp2::impl::assert_not_null(n))); } +#line 1191 "reflect.h2" + [[nodiscard]] auto id_expression::is_identifier() const& -> bool { return CPP2_UFCS(is_identifier)((*cpp2::impl::assert_not_null(n))); } +#line 1192 "reflect.h2" + [[nodiscard]] auto id_expression::is_qualified() const& -> bool { return CPP2_UFCS(is_qualified)((*cpp2::impl::assert_not_null(n))); } +#line 1193 "reflect.h2" + [[nodiscard]] auto id_expression::is_unqualified() const& -> bool { return CPP2_UFCS(is_unqualified)((*cpp2::impl::assert_not_null(n))); } + +#line 1195 "reflect.h2" + [[nodiscard]] auto id_expression::as_identifier() const& -> std::string { return CPP2_UFCS(to_string)((*cpp2::impl::assert_not_null(CPP2_UFCS(get_identifier)(*cpp2::impl::assert_not_null(n))))); } +#line 1196 "reflect.h2" + [[nodiscard]] auto id_expression::as_qualified() const& -> qualified_id { return { CPP2_UFCS(get_qualified_id)((*cpp2::impl::assert_not_null(n))), (*this) }; } +#line 1197 "reflect.h2" + [[nodiscard]] auto id_expression::as_unqualified() const& -> unqualified_id { return { CPP2_UFCS(get_unqualified_id)((*cpp2::impl::assert_not_null(n))), (*this) }; } + +#line 1199 "reflect.h2" + [[nodiscard]] auto id_expression::to_string() const& -> std::string { return CPP2_UFCS(to_string)((*cpp2::impl::assert_not_null(n))); } + + id_expression::~id_expression() noexcept{} +id_expression::id_expression(id_expression const& that) + : reflection_base{ static_cast const&>(that) }{} +id_expression::id_expression(id_expression&& that) noexcept + : reflection_base{ static_cast&&>(that) }{} + +#line 1203 "reflect.h2" +//----------------------------------------------------------------------- +// General expression +// + +#line 1210 "reflect.h2" + expression::expression( + + cpp2::impl::in n_, + cpp2::impl::in s + ) + : reflection_base{ n_, s } +#line 1215 "reflect.h2" + { + + } + +#line 1219 "reflect.h2" + [[nodiscard]] auto expression::is_fold_expression() const& -> bool { return CPP2_UFCS(is_fold_expression)((*cpp2::impl::assert_not_null(n))); } +#line 1220 "reflect.h2" + [[nodiscard]] auto expression::is_standalone_expression() const& -> bool { return CPP2_UFCS(is_standalone_expression)((*cpp2::impl::assert_not_null(n))); } +#line 1221 "reflect.h2" + [[nodiscard]] auto expression::subexpression_count() const& -> int { return CPP2_UFCS(subexpression_count)((*cpp2::impl::assert_not_null(n))); } +#line 1222 "reflect.h2" + [[nodiscard]] auto expression::is_identifier() const& -> bool { return CPP2_UFCS(is_identifier)((*cpp2::impl::assert_not_null(n))); } +#line 1223 "reflect.h2" + [[nodiscard]] auto expression::is_id_expression() const& -> bool { return CPP2_UFCS(is_id_expression)((*cpp2::impl::assert_not_null(n))); } +#line 1224 "reflect.h2" + [[nodiscard]] auto expression::is_unqualified_id() const& -> bool { return CPP2_UFCS(is_unqualified_id)((*cpp2::impl::assert_not_null(n))); } +#line 1225 "reflect.h2" + [[nodiscard]] auto expression::is_expression_list() const& -> bool { return CPP2_UFCS(is_expression_list)((*cpp2::impl::assert_not_null(n))); } +#line 1226 "reflect.h2" + [[nodiscard]] auto expression::is_empty_expression_list() const& -> bool { return CPP2_UFCS(is_empty_expression_list)((*cpp2::impl::assert_not_null(n))); } +#line 1227 "reflect.h2" + [[nodiscard]] auto expression::is_literal() const& -> bool { return CPP2_UFCS(is_literal)((*cpp2::impl::assert_not_null(n))); } +#line 1228 "reflect.h2" + [[nodiscard]] auto expression::is_assignment_expression() const& -> bool { return CPP2_UFCS(is_assignment_expression)((*cpp2::impl::assert_not_null(n))); } + +#line 1230 "reflect.h2" + [[nodiscard]] auto expression::is_simple_assignment() const& -> bool{ + auto ret {CPP2_UFCS(get_lhs_rhs_if_simple_assignment)((*cpp2::impl::assert_not_null(n)))}; + return ret.lhs && ret.rhs; + } + +#line 1235 "reflect.h2" + [[nodiscard]] auto expression::get_lhs_rhs_if_simple_assignment() const& -> get_lhs_rhs_if_simple_assignment_ret + +#line 1240 "reflect.h2" + { + cpp2::impl::deferred_init lhs; + cpp2::impl::deferred_init rhs; +#line 1241 "reflect.h2" + auto ret {CPP2_UFCS(get_lhs_rhs_if_simple_assignment)((*cpp2::impl::assert_not_null(n)))}; + lhs.construct(ret.lhs, (*this)); + rhs.construct(cpp2::move(ret).rhs, (*this)); + return { std::move(lhs.value()), std::move(rhs.value()) }; } + +#line 1246 "reflect.h2" + [[nodiscard]] auto expression::as_assignment_expression() const& -> assignment_expression { return { CPP2_UFCS(get_assignment_expression)((*cpp2::impl::assert_not_null(n))), (*this) }; } +#line 1247 "reflect.h2" + [[nodiscard]] auto expression::as_expression_list() const& -> expression_list { return { CPP2_UFCS(get_expression_list)((*cpp2::impl::assert_not_null(n))), (*this) }; } +#line 1248 "reflect.h2" + [[nodiscard]] auto expression::as_literal() const& -> std::string { return CPP2_UFCS(to_string)((*cpp2::impl::assert_not_null(CPP2_UFCS(get_literal)(*cpp2::impl::assert_not_null(n))))); } + +#line 1250 "reflect.h2" + [[nodiscard]] auto expression::to_string() const& -> std::string { return CPP2_UFCS(to_string)((*cpp2::impl::assert_not_null(n))); } + + expression::~expression() noexcept{} +expression::expression(expression const& that) + : reflection_base{ static_cast const&>(that) }{} +expression::expression(expression&& that) noexcept + : reflection_base{ static_cast&&>(that) }{} + +#line 1254 "reflect.h2" +//----------------------------------------------------------------------- +// is_as_expression +// + +#line 1261 "reflect.h2" + is_as_expression::is_as_expression( + + cpp2::impl::in n_, + cpp2::impl::in s + ) + : reflection_base{ n_, s } +#line 1266 "reflect.h2" + { + + } + +#line 1274 "reflect.h2" + is_as_expression::term_t::term_t(auto&& o, auto&& ptr, auto&& cs) + : op{ CPP2_FORWARD(o) } + , expr{ CPP2_FORWARD(ptr), CPP2_FORWARD(cs) }{} + +#line 1276 "reflect.h2" + [[nodiscard]] auto is_as_expression::term_t::get_op() const& -> std::string { return op; } +#line 1277 "reflect.h2" + [[nodiscard]] auto is_as_expression::term_t::get_expr() const& -> expression { return expr; } + + is_as_expression::term_t::term_t(term_t const& that) + : op{ that.op } + , expr{ that.expr }{} +is_as_expression::term_t::term_t(term_t&& that) noexcept + : op{ std::move(that).op } + , expr{ std::move(that).expr }{} + +#line 1280 "reflect.h2" + [[nodiscard]] auto is_as_expression::get_expression() const& -> prefix_expression { return { CPP2_UFCS(get)((*cpp2::impl::assert_not_null(n)).expr), (*this) }; } + +#line 1282 "reflect.h2" + [[nodiscard]] auto is_as_expression::get_terms() const& -> auto{ + std::vector ret {}; + for ( auto const& t : (*cpp2::impl::assert_not_null((*this).n)).ops ) {static_cast(CPP2_UFCS(emplace_back)(ret, *cpp2::impl::assert_not_null(t.op), CPP2_UFCS(get)(t.expr), (*this))); } + return ret; + } + +#line 1288 "reflect.h2" + [[nodiscard]] auto is_as_expression::is_fold_expression() const& -> bool { return CPP2_UFCS(is_fold_expression)((*cpp2::impl::assert_not_null((*this).n))); } +#line 1289 "reflect.h2" + [[nodiscard]] auto is_as_expression::is_identifier() const& -> bool { return CPP2_UFCS(is_identifier)((*cpp2::impl::assert_not_null((*this).n))); } +#line 1290 "reflect.h2" + [[nodiscard]] auto is_as_expression::is_id_expression() const& -> bool { return CPP2_UFCS(is_id_expression)((*cpp2::impl::assert_not_null((*this).n))); } +#line 1291 "reflect.h2" + [[nodiscard]] auto is_as_expression::is_unqualified_id() const& -> bool { return CPP2_UFCS(is_unqualified_id)((*cpp2::impl::assert_not_null((*this).n))); } +#line 1292 "reflect.h2" + [[nodiscard]] auto is_as_expression::is_expression_list() const& -> bool { return CPP2_UFCS(is_expression_list)((*cpp2::impl::assert_not_null((*this).n))); } +#line 1293 "reflect.h2" + [[nodiscard]] auto is_as_expression::is_literal() const& -> bool { return CPP2_UFCS(is_literal)((*cpp2::impl::assert_not_null((*this).n))); } + +#line 1295 "reflect.h2" + [[nodiscard]] auto is_as_expression::as_expression_list() const& -> expression_list { return { CPP2_UFCS(get_expression_list)((*cpp2::impl::assert_not_null((*this).n))), (*this) }; } +#line 1296 "reflect.h2" + [[nodiscard]] auto is_as_expression::as_literal() const& -> std::string { return CPP2_UFCS(to_string)((*cpp2::impl::assert_not_null(CPP2_UFCS(get_literal)(*cpp2::impl::assert_not_null(n))))); } + +#line 1298 "reflect.h2" + [[nodiscard]] auto is_as_expression::get_identifier() const& -> std::string_view{ + auto ptok {CPP2_UFCS(get_identifier)((*cpp2::impl::assert_not_null((*this).n)))}; + if (ptok) {return *cpp2::impl::assert_not_null(cpp2::move(ptok)); } + return ""; + } + +#line 1304 "reflect.h2" + [[nodiscard]] auto is_as_expression::to_string() const& -> std::string { return CPP2_UFCS(to_string)((*cpp2::impl::assert_not_null((*this).n))); } + + is_as_expression::~is_as_expression() noexcept{} +is_as_expression::is_as_expression(is_as_expression const& that) + : reflection_base{ static_cast const&>(that) }{} +is_as_expression::is_as_expression(is_as_expression&& that) noexcept + : reflection_base{ static_cast&&>(that) }{} + +#line 1308 "reflect.h2" +//----------------------------------------------------------------------- +// +// Statements +// +//----------------------------------------------------------------------- +// + +//----------------------------------------------------------------------- +// General statement +// + +#line 1322 "reflect.h2" + statement::statement( + + cpp2::impl::in n_, + cpp2::impl::in s + ) + : reflection_base{ n_, s } +#line 1327 "reflect.h2" + { + + } + +#line 1331 "reflect.h2" + [[nodiscard]] auto statement::get_parameters() const& -> std::vector + + { + std::vector ret {}; + for ( auto const& param : CPP2_UFCS(get_parameters)((*cpp2::impl::assert_not_null(n))) ) { + static_cast(CPP2_UFCS(emplace_back)(ret, param, (*this))); + } + return ret; + } + +#line 1341 "reflect.h2" + [[nodiscard]] auto statement::is_expression_statement() const& -> bool { return CPP2_UFCS(is_expression)((*cpp2::impl::assert_not_null(n))); } +#line 1342 "reflect.h2" + [[nodiscard]] auto statement::is_compound_statement() const& -> bool { return CPP2_UFCS(is_compound)((*cpp2::impl::assert_not_null(n))); } +#line 1343 "reflect.h2" + [[nodiscard]] auto statement::is_selection_statement() const& -> bool { return CPP2_UFCS(is_selection)((*cpp2::impl::assert_not_null(n))); } +#line 1344 "reflect.h2" + [[nodiscard]] auto statement::is_declaration() const& -> bool { return CPP2_UFCS(is_declaration)((*cpp2::impl::assert_not_null(n))); } +#line 1345 "reflect.h2" + [[nodiscard]] auto statement::is_return_statement() const& -> bool { return CPP2_UFCS(is_return)((*cpp2::impl::assert_not_null(n))); } +#line 1346 "reflect.h2" + [[nodiscard]] auto statement::is_iteration_statement() const& -> bool { return CPP2_UFCS(is_iteration)((*cpp2::impl::assert_not_null(n))); } +#line 1347 "reflect.h2" + [[nodiscard]] auto statement::is_using_statement() const& -> bool { return CPP2_UFCS(is_using)((*cpp2::impl::assert_not_null(n))); } +#line 1348 "reflect.h2" + [[nodiscard]] auto statement::is_contract() const& -> bool { return CPP2_UFCS(is_contract)((*cpp2::impl::assert_not_null(n))); } +#line 1349 "reflect.h2" + [[nodiscard]] auto statement::is_inspect_expression() const& -> bool { return CPP2_UFCS(is_inspect)((*cpp2::impl::assert_not_null(n))); } +#line 1350 "reflect.h2" + [[nodiscard]] auto statement::is_jump_statement() const& -> bool { return CPP2_UFCS(is_jump)((*cpp2::impl::assert_not_null(n))); } + +#line 1352 "reflect.h2" + [[nodiscard]] auto statement::as_expression_statement() const& -> expression_statement { return { CPP2_UFCS_TEMPLATE(get_if)((*cpp2::impl::assert_not_null(n))), (*this) }; } +#line 1353 "reflect.h2" + [[nodiscard]] auto statement::as_compound_statement() const& -> compound_statement { return { CPP2_UFCS_TEMPLATE(get_if)((*cpp2::impl::assert_not_null(n))), (*this) }; } +#line 1354 "reflect.h2" + [[nodiscard]] auto statement::as_selection_statement() const& -> selection_statement { return selection_statement(CPP2_UFCS_TEMPLATE(get_if)((*cpp2::impl::assert_not_null(n))), (*this)); } +#line 1355 "reflect.h2" + [[nodiscard]] auto statement::as_declaration() const& -> declaration { return declaration(CPP2_UFCS_TEMPLATE(get_if)((*cpp2::impl::assert_not_null(n))), (*this)); } +#line 1356 "reflect.h2" + [[nodiscard]] auto statement::as_return_statement() const& -> return_statement { return return_statement(CPP2_UFCS_TEMPLATE(get_if)((*cpp2::impl::assert_not_null(n))), (*this)); } +#line 1357 "reflect.h2" + [[nodiscard]] auto statement::as_iteration_statement() const& -> iteration_statement { return iteration_statement(CPP2_UFCS_TEMPLATE(get_if)((*cpp2::impl::assert_not_null(n))), (*this)); } + //as_using_statement : (this) -> using_statement = using_statement (n*.get_if(), this); + //as_contract : (this) -> contract = contract (n*.get_if(), this); + //as_inspect_expression : (this) -> inspect_expression = inspect_expression (n*.get_if(), this); + //as_jump_statement : (this) -> jump_statement = jump_statement (n*.get_if(), this); + +#line 1363 "reflect.h2" + [[nodiscard]] auto statement::to_string() const& -> std::string { return CPP2_UFCS(to_string)((*cpp2::impl::assert_not_null(n))); } + + statement::~statement() noexcept{} +statement::statement(statement const& that) + : reflection_base{ static_cast const&>(that) }{} +statement::statement(statement&& that) noexcept + : reflection_base{ static_cast&&>(that) }{} + +#line 1367 "reflect.h2" +//----------------------------------------------------------------------- +// Expression statements +// + +#line 1374 "reflect.h2" + expression_statement::expression_statement( + + cpp2::impl::in n_, + cpp2::impl::in s + ) + : reflection_base{ n_, s } +#line 1379 "reflect.h2" + { + + } + +#line 1383 "reflect.h2" + [[nodiscard]] auto expression_statement::get_expression() const& -> expression { return { CPP2_UFCS(get)((*cpp2::impl::assert_not_null(n)).expr), (*this) }; } + +#line 1385 "reflect.h2" + [[nodiscard]] auto expression_statement::to_string() const& -> std::string { return CPP2_UFCS(to_string)((*cpp2::impl::assert_not_null(n))); } + + expression_statement::expression_statement(expression_statement const& that) + : reflection_base{ static_cast const&>(that) }{} +expression_statement::expression_statement(expression_statement&& that) noexcept + : reflection_base{ static_cast&&>(that) }{} + +#line 1389 "reflect.h2" +//----------------------------------------------------------------------- +// Compound statements +// + +#line 1396 "reflect.h2" + compound_statement::compound_statement( + + cpp2::impl::in n_, + cpp2::impl::in s + ) + : reflection_base{ n_, s } +#line 1401 "reflect.h2" + { + + } + +#line 1405 "reflect.h2" + [[nodiscard]] auto compound_statement::get_statements() const& -> std::vector + + { + std::vector ret {}; + for ( auto const& stmt : CPP2_UFCS(get_statements)((*cpp2::impl::assert_not_null(n))) ) { + static_cast(CPP2_UFCS(emplace_back)(ret, stmt, (*this))); + } + return ret; + } + +#line 1415 "reflect.h2" + auto compound_statement::add_statement(cpp2::impl::in source, cpp2::impl::in before_position) & -> void + { + auto stmt {parse_statement(source)}; + if (!((cpp2::impl::as_(stmt)))) { + error("the provided source string is not a valid statement"); + return ; + } + require(CPP2_UFCS(add_statement)((*cpp2::impl::assert_not_null(n)), std::move(cpp2::move(stmt)), before_position), + std::string("unexpected error while attempting to add statement:\n") + source); + } + + compound_statement::compound_statement(compound_statement const& that) + : reflection_base{ static_cast const&>(that) }{} +compound_statement::compound_statement(compound_statement&& that) noexcept + : reflection_base{ static_cast&&>(that) }{} + +#line 1428 "reflect.h2" +//----------------------------------------------------------------------- +// Selection statements +// + +#line 1435 "reflect.h2" + selection_statement::selection_statement( + + cpp2::impl::in n_, + cpp2::impl::in s + ) + : reflection_base{ n_, s } +#line 1440 "reflect.h2" + { + + } + +#line 1444 "reflect.h2" + [[nodiscard]] auto selection_statement::has_false_branch_in_source_code() const& -> bool { return CPP2_UFCS(has_false_branch_in_source_code)((*cpp2::impl::assert_not_null(n))); } +#line 1445 "reflect.h2" + [[nodiscard]] auto selection_statement::has_false_branch() const& -> bool { return CPP2_UFCS(has_false_branch)((*cpp2::impl::assert_not_null(n))); } + +#line 1447 "reflect.h2" + [[nodiscard]] auto selection_statement::get_identifier() const& -> std::string_view { return CPP2_UFCS(as_string_view)((*cpp2::impl::assert_not_null(CPP2_UFCS(get_identifier)(*cpp2::impl::assert_not_null(n))))); } +#line 1448 "reflect.h2" + [[nodiscard]] auto selection_statement::get_expression() const& -> logical_or_expression { return { CPP2_UFCS(get_expression)((*cpp2::impl::assert_not_null(n))), (*this) }; } +#line 1449 "reflect.h2" + [[nodiscard]] auto selection_statement::get_true_branch() const& -> compound_statement { return { CPP2_UFCS(get_true_branch)((*cpp2::impl::assert_not_null(n))), (*this) }; } +#line 1450 "reflect.h2" + [[nodiscard]] auto selection_statement::get_false_branch() const& -> compound_statement { return { CPP2_UFCS(get_false_branch)((*cpp2::impl::assert_not_null(n))), (*this) }; } + + selection_statement::selection_statement(selection_statement const& that) + : reflection_base{ static_cast const&>(that) }{} +selection_statement::selection_statement(selection_statement&& that) noexcept + : reflection_base{ static_cast&&>(that) }{} + +#line 1454 "reflect.h2" +//----------------------------------------------------------------------- +// Return statements +// + +#line 1461 "reflect.h2" + return_statement::return_statement( + + cpp2::impl::in n_, + cpp2::impl::in s + ) + : reflection_base{ n_, s } +#line 1466 "reflect.h2" + { + + } + +#line 1470 "reflect.h2" + [[nodiscard]] auto return_statement::has_expression() const& -> bool { return CPP2_UFCS(has_expression)((*cpp2::impl::assert_not_null(n))); } + +#line 1472 "reflect.h2" + [[nodiscard]] auto return_statement::get_expression() const& -> expression { return { CPP2_UFCS(get_expression)((*cpp2::impl::assert_not_null(n))), (*this) }; } + + return_statement::return_statement(return_statement const& that) + : reflection_base{ static_cast const&>(that) }{} +return_statement::return_statement(return_statement&& that) noexcept + : reflection_base{ static_cast&&>(that) }{} + +#line 1476 "reflect.h2" +//----------------------------------------------------------------------- +// Iteration statements - for, do, while +// + +#line 1483 "reflect.h2" + iteration_statement::iteration_statement( + + cpp2::impl::in n_, + cpp2::impl::in s + ) + : reflection_base{ n_, s } +#line 1488 "reflect.h2" + { + + } + +#line 1492 "reflect.h2" + [[nodiscard]] auto iteration_statement::is_do() const& -> bool { return CPP2_UFCS(is_do)((*cpp2::impl::assert_not_null(n))); } +#line 1493 "reflect.h2" + [[nodiscard]] auto iteration_statement::is_while() const& -> bool { return CPP2_UFCS(is_while)((*cpp2::impl::assert_not_null(n))); } +#line 1494 "reflect.h2" + [[nodiscard]] auto iteration_statement::is_for() const& -> bool { return CPP2_UFCS(is_for)((*cpp2::impl::assert_not_null(n))); } +#line 1495 "reflect.h2" + [[nodiscard]] auto iteration_statement::has_next() const& -> bool { return CPP2_UFCS(has_next)((*cpp2::impl::assert_not_null(n))); } + +#line 1497 "reflect.h2" + [[nodiscard]] auto iteration_statement::get_label() const& -> std::string { return CPP2_UFCS(to_string)(CPP2_UFCS(get_label)((*cpp2::impl::assert_not_null(n)))); } +#line 1498 "reflect.h2" + [[nodiscard]] auto iteration_statement::get_next_expression() const& -> assignment_expression { return { CPP2_UFCS(get_next_expression)((*cpp2::impl::assert_not_null(n))), (*this) }; } +#line 1499 "reflect.h2" + [[nodiscard]] auto iteration_statement::get_do_while_condition() const& -> logical_or_expression { return { CPP2_UFCS(get_do_while_condition)((*cpp2::impl::assert_not_null(n))), (*this) }; } +#line 1500 "reflect.h2" + [[nodiscard]] auto iteration_statement::get_do_while_body() const& -> compound_statement { return { CPP2_UFCS(get_do_while_body)((*cpp2::impl::assert_not_null(n))), (*this) }; } +#line 1501 "reflect.h2" + [[nodiscard]] auto iteration_statement::get_for_range() const& -> expression { return { CPP2_UFCS(get_for_range)((*cpp2::impl::assert_not_null(n))), (*this) }; } +#line 1502 "reflect.h2" + [[nodiscard]] auto iteration_statement::get_for_parameter() const& -> parameter_declaration { return { CPP2_UFCS(get_for_parameter)((*cpp2::impl::assert_not_null(n))), (*this) }; } +#line 1503 "reflect.h2" + [[nodiscard]] auto iteration_statement::get_for_body() const& -> statement { return { CPP2_UFCS(get_for_body)((*cpp2::impl::assert_not_null(n))), (*this) }; } + + iteration_statement::iteration_statement(iteration_statement const& that) + : reflection_base{ static_cast const&>(that) }{} +iteration_statement::iteration_statement(iteration_statement&& that) noexcept + : reflection_base{ static_cast&&>(that) }{} + +#line 1507 "reflect.h2" +//----------------------------------------------------------------------- +// +// Metafunctions - these are hardwired for now until we get to the +// step of writing a Cpp2 interpreter to run inside the compiler +// +//----------------------------------------------------------------------- +// + +//----------------------------------------------------------------------- +// Some common metafunction helpers (metafunctions are just functions, +// so they can be factored as usual) +// +#line 1519 "reflect.h2" +auto add_virtual_destructor(meta::type_declaration& t) -> void +{ + CPP2_UFCS(add_member)(t, "operator=: (virtual move this) = { }"); +} + +#line 1525 "reflect.h2" +//----------------------------------------------------------------------- +// +// "... an abstract base class defines an interface ..." +// +// -- Stroustrup (The Design and Evolution of C++, 12.3.1) +// +//----------------------------------------------------------------------- +// +// interface +// +// an abstract base class having only pure virtual named functions, +// a public default constructor, a public virtual destructor, and +// protected copy/move operations +// +#line 1539 "reflect.h2" +auto interface(meta::type_declaration& t) -> void +{ + auto has_dtor {false}; + + for ( auto& m : CPP2_UFCS(get_members)(t) ) + { + CPP2_UFCS(require)(m, !(CPP2_UFCS(is_object)(m)), + "interfaces may not contain data objects"); + if (CPP2_UFCS(is_function)(m)) { + auto mf {CPP2_UFCS(as_function)(m)}; + CPP2_UFCS(require)(mf, !(CPP2_UFCS(is_copy_or_move)(mf)), + "interfaces may not copy or move; consider a virtual clone() instead"); + CPP2_UFCS(require)(mf, !(CPP2_UFCS(has_initializer)(mf)), + "interface functions must not have a function body; remove the '=' initializer"); + CPP2_UFCS(require)(mf, CPP2_UFCS(make_public)(mf), + "interface functions must be public"); + CPP2_UFCS(default_to_virtual)(mf); + has_dtor |= CPP2_UFCS(is_destructor)(cpp2::move(mf)); + } + } + + // Add public default constructor + protected copy/move operations + CPP2_UFCS(add_member)(t, "operator=: (out this) = { }"); + CPP2_UFCS(add_member)(t, "protected operator=: (out this, that) = { }"); + + // Add public virtual destructor + if (!(cpp2::move(has_dtor))) { + CPP2_UFCS(add_virtual_destructor)(t); + } +} + +#line 1571 "reflect.h2" +//----------------------------------------------------------------------- +// +// "C.35: A base class destructor should be either public and +// virtual, or protected and non-virtual." +// +// -- Stroustrup, Sutter, et al. (C++ Core Guidelines) +// +//----------------------------------------------------------------------- +// +// polymorphic_base +// +// A polymorphic base type whose destructor is either public and virtual +// or else protected and nonvirtual. +// +// Unlike an interface, it can have nonpublic and nonvirtual functions. +// +#line 1587 "reflect.h2" +auto polymorphic_base(meta::type_declaration& t) -> void +{ + auto has_dtor {false}; + + for ( auto& mf : CPP2_UFCS(get_member_functions)(t) ) + { + if (CPP2_UFCS(is_default_access)(mf)) { + CPP2_UFCS(default_to_public)(mf); + } + CPP2_UFCS(require)(mf, !(CPP2_UFCS(is_copy_or_move)(mf)), + "polymorphic base types may not copy or move; consider a virtual clone() instead"); + if (CPP2_UFCS(is_destructor)(mf)) { + has_dtor = true; + CPP2_UFCS(require)(mf, ((CPP2_UFCS(is_public)(mf) || CPP2_UFCS(is_default_access)(mf)) && CPP2_UFCS(is_virtual)(mf)) + || (CPP2_UFCS(is_protected)(mf) && !(CPP2_UFCS(is_virtual)(mf))), + "a polymorphic base type destructor must be public and virtual, or protected and nonvirtual"); + } + } + + if (!(cpp2::move(has_dtor))) { + CPP2_UFCS(add_virtual_destructor)(t); + } +} + +#line 1612 "reflect.h2" +//----------------------------------------------------------------------- +// +// "... A totally ordered type ... requires operator<=> that +// returns std::strong_ordering. If the function is not +// user-written, a lexicographical memberwise implementation +// is generated by default..." +// +// -- P0707R4, section 3 +// +// Note: This feature derived from Cpp2 was already adopted +// into Standard C++ via paper P0515, so most of the +// heavy lifting is done by the Cpp1 C++20/23 compiler, +// including the memberwise default semantics +// (In contrast, cppfront has to do the work itself for +// default memberwise semantics for operator= assignment +// as those aren't yet part of Standard C++) +// +//----------------------------------------------------------------------- +// + +#line 1632 "reflect.h2" +auto ordered_impl( + meta::type_declaration& t, + cpp2::impl::in ordering// must be "strong_ordering" etc. +) -> void +{ + auto has_spaceship {false}; + + for ( auto& mf : CPP2_UFCS(get_member_functions)(t) ) + { + if (CPP2_UFCS(has_name)(mf, "operator<=>")) { + has_spaceship = true; + auto return_name {CPP2_UFCS(get_unnamed_return_type)(mf)}; + if (CPP2_UFCS(find)(return_name, ordering) == return_name.npos) + { + CPP2_UFCS(error)(mf, "operator<=> must return std::" + cpp2::impl::as_(ordering)); + } + } + } + + if (!(cpp2::move(has_spaceship))) { + CPP2_UFCS(add_member)(t, "operator<=>: (this, that) -> std::" + (cpp2::impl::as_(ordering)) + ";"); + } +} + +//----------------------------------------------------------------------- +// ordered - a totally ordered type +// +// Note: the ordering that should be encouraged as default gets the nice name +// +#line 1661 "reflect.h2" +auto ordered(meta::type_declaration& t) -> void +{ + ordered_impl(t, "strong_ordering"); +} + +//----------------------------------------------------------------------- +// weakly_ordered - a weakly ordered type +// +#line 1669 "reflect.h2" +auto weakly_ordered(meta::type_declaration& t) -> void +{ + ordered_impl(t, "weak_ordering"); +} + +//----------------------------------------------------------------------- +// partially_ordered - a partially ordered type +// +#line 1677 "reflect.h2" +auto partially_ordered(meta::type_declaration& t) -> void +{ + ordered_impl(t, "partial_ordering"); +} + +#line 1683 "reflect.h2" +//----------------------------------------------------------------------- +// +// "A value is ... a regular type. It must have all public +// default construction, copy/move construction/assignment, +// and destruction, all of which are generated by default +// if not user-written; and it must not have any protected +// or virtual functions (including the destructor)." +// +// -- P0707R4, section 3 +// +//----------------------------------------------------------------------- +// +// copyable +// +// A type with (copy and move) x (construction and assignment) +// +#line 1699 "reflect.h2" +auto copyable(meta::type_declaration& t) -> void +{ + // If the user explicitly wrote any of the copy/move functions, + // they must also have written the most general one - we can't + // assume we can safely generate it for them since they've opted + // into customized semantics + auto smfs {CPP2_UFCS(query_declared_value_set_functions)(t)}; + if ( !(smfs.out_this_in_that) + && ( + smfs.out_this_move_that + || smfs.inout_this_in_that + || smfs.inout_this_move_that)) + + { + CPP2_UFCS(error)(t, + "this type is partially copyable/movable - when you provide " + "any of the more-specific operator= signatures, you must also provide " + "the one with the general signature (out this, that); alternatively, " + "consider removing all the operator= functions and let them all be " + "generated for you with default memberwise semantics" + ); + } + else {if (!(cpp2::move(smfs).out_this_in_that)) { + CPP2_UFCS(add_member)(t, "operator=: (out this, that) = { }"); + }} +} + +#line 1727 "reflect.h2" +// copy_constructible +// +// A type with (copy and move) construction +// +#line 1731 "reflect.h2" +auto copy_constructible(meta::type_declaration& t) -> void +{ + // If the user explicitly wrote any of the copy/move constructors, + // they must also have written the most general one - we can't + // assume we can safely generate it for them since they've opted + // into customized semantics + auto smfs {CPP2_UFCS(query_declared_value_set_functions)(t)}; + if ( !(smfs.out_this_in_that) + && smfs.out_this_move_that) + { + CPP2_UFCS(error)(t, + "this type is partially copy/move constructible - when you provide " + "the (out this, move that) operator= signature, you must also provide " + "the one with the general signature (out this, that)" + ); + } + else {if ( + !(smfs.out_this_in_that) + && !(smfs.out_this_move_that)) + { + CPP2_UFCS(add_member)(t, "operator=: (out this, that) = { }"); + CPP2_UFCS(add_member)(t, "operator=: (out this, move that) = { }"); + }} +} + +#line 1757 "reflect.h2" +//----------------------------------------------------------------------- +// +// hashable +// +// A memberwise hashable type +// +#line 1763 "reflect.h2" +auto hashable(meta::type_declaration& t) -> void +{ + CPP2_UFCS(require)(t, !(CPP2_UFCS(empty)(CPP2_UFCS(get_member_objects)(t))), + "a hashable type must have at least one data member"); + + std::string hash {" hash: (this) -> size_t = {\n" + " ret: size_t = 0;"}; + + for ( + auto const& o : CPP2_UFCS(get_member_objects)(t) ) + { + cpp2::impl::deferred_init o_hash; + if (CPP2_UFCS(name)(o) == "this") { + o_hash.construct("" + cpp2::to_string(CPP2_UFCS(type)(o)) + "::hash()"); + } + else { + o_hash.construct("std::hash<" + cpp2::to_string(CPP2_UFCS(type)(o)) + ">()(" + cpp2::to_string(CPP2_UFCS(name)(o)) + ")"); + } + + hash += "\n cpp2::hash_combine( ret, " + cpp2::to_string(cpp2::move(o_hash.value())) + " );"; + } + + CPP2_UFCS(add_member)(t, cpp2::move(hash) + "\n return ret;\n }"); +} + +#line 1789 "reflect.h2" +//----------------------------------------------------------------------- +// +// basic_value +// +// A regular type: copyable, plus has public default construction +// and no protected or virtual functions +// +#line 1796 "reflect.h2" +auto basic_value(meta::type_declaration& t) -> void +{ + CPP2_UFCS(copyable)(t); + + auto has_default_ctor {false}; + for ( auto& mf : CPP2_UFCS(get_member_functions)(t) ) { + has_default_ctor |= CPP2_UFCS(is_default_constructor)(mf); + CPP2_UFCS(require)(mf, !(CPP2_UFCS(is_protected)(mf)) && !(CPP2_UFCS(is_virtual)(mf)), + "a value type may not have a protected or virtual function"); + CPP2_UFCS(require)(mf, !(CPP2_UFCS(is_destructor)(mf)) || CPP2_UFCS(is_public)(mf) || CPP2_UFCS(is_default_access)(mf), + "a value type may not have a non-public destructor"); + } + + if (!(cpp2::move(has_default_ctor))) { + CPP2_UFCS(add_member)(t, "operator=: (out this) = { }"); + } +} + +//----------------------------------------------------------------------- +// +// "A 'value' is a totally ordered basic_value..." +// +// -- P0707R4, section 3 +// +// value - a value type that is totally ordered +// +// Note: the ordering that should be encouraged as default gets the nice name +// +#line 1824 "reflect.h2" +auto value(meta::type_declaration& t) -> void +{ + CPP2_UFCS(ordered)(t); + CPP2_UFCS(basic_value)(t); +} + +#line 1830 "reflect.h2" +auto weakly_ordered_value(meta::type_declaration& t) -> void +{ + CPP2_UFCS(weakly_ordered)(t); + CPP2_UFCS(basic_value)(t); +} + +#line 1836 "reflect.h2" +auto partially_ordered_value(meta::type_declaration& t) -> void +{ + CPP2_UFCS(partially_ordered)(t); + CPP2_UFCS(basic_value)(t); +} + +#line 1843 "reflect.h2" +//----------------------------------------------------------------------- +// +// C.20: If you can avoid defining default operations, do +// +// ##### Reason +// +// It's the simplest and gives the cleanest semantics. +// +// ... +// +// This is known as "the rule of zero". +// +// -- C++ Core Guidelines +// C.20: If you can avoid defining any default operations, do +// +// +//----------------------------------------------------------------------- +// +// cpp1_rule_of_zero +// +// a type without declared copy/move/destructor functions +// +#line 1865 "reflect.h2" +auto cpp1_rule_of_zero(meta::type_declaration& t) -> void +{ + for ( auto& mf : CPP2_UFCS(get_member_functions)(t) ) + { + CPP2_UFCS(require)(t, !(CPP2_UFCS(is_constructor_with_that)(mf)) + && !(CPP2_UFCS(is_assignment_with_that)(mf)) + && !(CPP2_UFCS(is_destructor)(mf)), + "the rule of zero requires no copy/move/destructor functions"); + } + CPP2_UFCS(disable_member_function_generation)(t); +} + +//----------------------------------------------------------------------- +// +// "By definition, a `struct` is a `class` in which members +// are by default `public`; that is, +// +// struct s { ... +// +// is simply shorthand for +// +// class s { public: ... +// +// ... Which style you use depends on circumstances and taste. +// I usually prefer to use `struct` for classes that have all +// data `public`." +// +// -- Stroustrup (The C++ Programming Language, 3rd ed., p. 234) +// +//----------------------------------------------------------------------- +// +// struct +// +// a type with only public bases, objects, and functions, +// no virtual functions, and no user-defined constructors +// (i.e., no invariants) or assignment or destructors. +// +// For GCC 10 compatibility, optionally allow passing struct +// that generates a memberwise constructor with a generic deduced +// parameters instead of concrete forwarding parameters (mainly used +// for cppfront internal use, so cppfront builds under GCC 10) +// +#line 1907 "reflect.h2" +auto cpp2_struct(meta::type_declaration& t) -> void +{ + std::string ctor_params {}; + std::string ctor_inits {}; + + auto found_member_without_initializer {false}; + + for ( auto& m : CPP2_UFCS(get_members)(t) ) + { + CPP2_UFCS(require)(m, CPP2_UFCS(make_public)(m), + "all struct members must be public"); + if (CPP2_UFCS(is_function)(m)) { + auto mf {CPP2_UFCS(as_function)(m)}; + CPP2_UFCS(require)(t, !(CPP2_UFCS(is_virtual)(mf)), + "a struct may not have a virtual function"); + CPP2_UFCS(require)(t, !(CPP2_UFCS(has_name)(cpp2::move(mf), "operator=")), + "a struct may not have a user-defined operator="); + } + else {if (CPP2_UFCS(is_object)(m)) { + auto mo {CPP2_UFCS(as_object)(m)}; + if (CPP2_UFCS(name)(mo) != "this") { + if (CPP2_UFCS(get_argument)(t, 0) == "noforward") { + ctor_params += "" + cpp2::to_string(CPP2_UFCS(name)(mo)) + "_, "; + } + else { + ctor_params += "forward " + cpp2::to_string(CPP2_UFCS(name)(mo)) + "_ : " + cpp2::to_string(CPP2_UFCS(type)(mo)) + ", "; + } + ctor_inits += "" + cpp2::to_string(CPP2_UFCS(name)(mo)) + " = " + cpp2::to_string(CPP2_UFCS(name)(mo)) + "_; "; + } + else { + ctor_inits += "" + cpp2::to_string(CPP2_UFCS(type)(mo)) + " = (" + cpp2::to_string(CPP2_UFCS(initializer)(mo)) + "); "; + } + found_member_without_initializer |= !(CPP2_UFCS(has_initializer)(cpp2::move(mo))); + }} + } + CPP2_UFCS(cpp1_rule_of_zero)(t); + + // If we found any data members + if (!(CPP2_UFCS(empty)(ctor_params))) + { + // Then to enable construction from corresponding values + // requires a constructor... an exception to the rule of zero + CPP2_UFCS(add_member)(t, " operator=: (implicit out this, " + cpp2::to_string(cpp2::move(ctor_params)) + ") = { " + cpp2::to_string(cpp2::move(ctor_inits)) + " }"); + + // And if all members had initializers, we need a default constructor + if (!(cpp2::move(found_member_without_initializer))) { + CPP2_UFCS(add_member)(t, " operator=: (implicit out this) = { }"); + } + } +} + +value_member_info::value_member_info(auto const& name_, auto const& type_, auto const& value_) + : name{ name_ } + , type{ type_ } + , value{ value_ }{} + +#line 1959 "reflect.h2" +//----------------------------------------------------------------------- +// +// "C enumerations constitute a curiously half-baked concept. ... +// the cleanest way out was to deem each enumeration a separate type." +// +// -- Stroustrup (The Design and Evolution of C++, 11.7) +// +// "An enumeration is a distinct type ... with named constants" +// +// -- ISO C++ Standard +// +//----------------------------------------------------------------------- +// +// basic_enum +// +// a type together with named constants that are its possible values +// + +#line 1982 "reflect.h2" +auto basic_enum( + meta::type_declaration& t, + auto const& nextval, + cpp2::impl::in bitwise + ) -> void +{ + std::vector enumerators {}; + cpp2::i64 min_value {}; + cpp2::i64 max_value {}; + cpp2::impl::deferred_init underlying_type; + + t.reserve_names("operator=", "operator<=>"); + if (bitwise) { + t.reserve_names("has", "set", "clear", "to_string", "get_raw_value", "none"); + } + + // 1. Gather: The names of all the user-written members, and find/compute the type + + underlying_type.construct(CPP2_UFCS(get_argument)(t, 0));// use the first template argument, if there was one + + auto found_non_numeric {false}; +{ +std::string value{"-1"}; + +#line 2005 "reflect.h2" + for ( + auto const& m : CPP2_UFCS(get_members)(t) ) + if ( CPP2_UFCS(is_member_object)(m)) + { + CPP2_UFCS(require)(m, CPP2_UFCS(is_public)(m) || CPP2_UFCS(is_default_access)(m), + "an enumerator cannot be protected or private"); + + auto mo {CPP2_UFCS(as_object)(m)}; + if (!(CPP2_UFCS(has_wildcard_type)(mo))) { + CPP2_UFCS(error)(mo, + "an explicit underlying type should be specified as a compile-time argument " + "to the metafunction - try 'enum' or 'flag_enum'" + ); + } + + auto init {CPP2_UFCS(initializer)(mo)}; + + auto is_default_or_numeric {is_empty_or_a_decimal_number(init)}; + found_non_numeric |= !(CPP2_UFCS(empty)(init)) && !(is_default_or_numeric); + CPP2_UFCS(require)(m, !(cpp2::move(is_default_or_numeric)) || !(found_non_numeric) || CPP2_UFCS(has_name)(mo, "none"), + "" + cpp2::to_string(CPP2_UFCS(name)(mo)) + ": enumerators with non-numeric values must come after all default and numeric values"); + + nextval(value, cpp2::move(init)); + + auto v {std::strtoll(&CPP2_ASSERT_IN_BOUNDS_LITERAL(value, 0), nullptr, 10)}; // for non-numeric values we'll just get 0 which is okay for now + if (cpp2::impl::cmp_less(v,min_value)) { + min_value = v; + } + if (cpp2::impl::cmp_greater(v,max_value)) { + max_value = cpp2::move(v); + } + + // Adding local variable 'e' to work around a Clang warning + value_member_info e {cpp2::impl::as_(CPP2_UFCS(name)(mo)), "", value}; + CPP2_UFCS(push_back)(enumerators, cpp2::move(e)); + + CPP2_UFCS(mark_for_removal_from_enclosing_type)(mo); + static_cast(cpp2::move(mo)); + } +} + +#line 2045 "reflect.h2" + if ((CPP2_UFCS(empty)(enumerators))) { + CPP2_UFCS(error)(t, "an enumeration must contain at least one enumerator value"); + return ; + } + + // Compute the default underlying type, if it wasn't explicitly specified + if (underlying_type.value() == "") + { + CPP2_UFCS(require)(t, !(cpp2::move(found_non_numeric)), + "if you write an enumerator with a non-numeric-literal value, " + "you must specify the enumeration's underlying type" + ); + + if (!(bitwise)) { + if (cpp2::impl::cmp_greater_eq(min_value,std::numeric_limits::min()) && cpp2::impl::cmp_less_eq(max_value,std::numeric_limits::max())) { + underlying_type.value() = "i8"; + } + else {if (cpp2::impl::cmp_greater_eq(min_value,std::numeric_limits::min()) && cpp2::impl::cmp_less_eq(max_value,std::numeric_limits::max())) { + underlying_type.value() = "i16"; + } + else {if (cpp2::impl::cmp_greater_eq(min_value,std::numeric_limits::min()) && cpp2::impl::cmp_less_eq(max_value,std::numeric_limits::max())) { + underlying_type.value() = "i32"; + } + else {if (cpp2::impl::cmp_greater_eq(cpp2::move(min_value),std::numeric_limits::min()) && cpp2::impl::cmp_less_eq(cpp2::move(max_value),std::numeric_limits::max())) { + underlying_type.value() = "i64"; + } + else { + CPP2_UFCS(error)(t, + "values are outside the range representable by the " + "largest supported underlying signed type (i64)" + ); + }}}} + } + else { + auto umax {cpp2::move(max_value) * cpp2::impl::as_()}; + if (cpp2::impl::cmp_less_eq(umax,std::numeric_limits::max())) { + underlying_type.value() = "u8"; + } + else {if (cpp2::impl::cmp_less_eq(umax,std::numeric_limits::max())) { + underlying_type.value() = "u16"; + } + else {if (cpp2::impl::cmp_less_eq(cpp2::move(umax),std::numeric_limits::max())) { + underlying_type.value() = "u32"; + } + else { + underlying_type.value() = "u64"; + }}} + } + } + +#line 2096 "reflect.h2" + // 2. Replace: Erase the contents and replace with modified contents + // + // Note that most values and functions are declared as '==' compile-time values, i.e. Cpp1 'constexpr' + + CPP2_UFCS(remove_marked_members)(t); + + // Generate the 'none' value if appropriate, and use that or + // else the first enumerator as the default-constructed value + auto default_value {CPP2_ASSERT_IN_BOUNDS_LITERAL(enumerators, 0).name}; + if (bitwise) { + default_value = "none"; + value_member_info e {"none", "", "0"}; + CPP2_UFCS(push_back)(enumerators, cpp2::move(e)); + } + + // Generate all the private implementation + CPP2_UFCS(add_member)(t, " _value : " + cpp2::to_string(underlying_type.value()) + ";"); + CPP2_UFCS(add_member)(t, " private operator= : (implicit out this, _val: i64) == " + "_value = cpp2::unchecked_narrow<" + cpp2::to_string(underlying_type.value()) + ">(_val);"); + + // Generate the bitwise operations + if (bitwise) { + CPP2_UFCS(add_member)(t, " operator|=: ( inout this, that ) == _value |= that._value;"); + CPP2_UFCS(add_member)(t, " operator&=: ( inout this, that ) == _value &= that._value;"); + CPP2_UFCS(add_member)(t, " operator^=: ( inout this, that ) == _value ^= that._value;"); + CPP2_UFCS(add_member)(t, " operator| : ( this, that ) -> " + cpp2::to_string(CPP2_UFCS(name)(t)) + " == _value | that._value;"); + CPP2_UFCS(add_member)(t, " operator& : ( this, that ) -> " + cpp2::to_string(CPP2_UFCS(name)(t)) + " == _value & that._value;"); + CPP2_UFCS(add_member)(t, " operator^ : ( this, that ) -> " + cpp2::to_string(CPP2_UFCS(name)(t)) + " == _value ^ that._value;"); + CPP2_UFCS(add_member)(t, " has : ( this, that ) -> bool == _value & that._value;"); + CPP2_UFCS(add_member)(t, " set : ( inout this, that ) == { _value |= that._value; }"); + CPP2_UFCS(add_member)(t, " clear : ( inout this, that ) == { _value &= that._value~; }"); + } + + // Add the enumerators + for ( auto const& e : enumerators ) { + CPP2_UFCS(add_member)(t, " " + cpp2::to_string(e.name) + " : " + cpp2::to_string(CPP2_UFCS(name)(t)) + " == " + cpp2::to_string(e.value) + ";"); + } + + // Generate the common functions + CPP2_UFCS(add_member)(t, " get_raw_value : (this) -> " + cpp2::to_string(cpp2::move(underlying_type.value())) + " == _value;"); + CPP2_UFCS(add_member)(t, " operator= : (out this) == { _value = " + cpp2::to_string(default_value) + "._value; }"); + CPP2_UFCS(add_member)(t, " operator= : (out this, that) == { }"); + CPP2_UFCS(add_member)(t, " operator<=> : (this, that) -> std::strong_ordering;"); +{ +std::string to_string_impl{" to_string_impl: (this, prefix: std::string_view"}; + + // Provide 'to_string' and 'to_code' functions to print enumerator + // name(s) as human-readable strings or as code expressions + +#line 2143 "reflect.h2" + { + if (bitwise) { + to_string_impl += ", separator: std::string_view ) -> std::string = { \n" + " ret : std::string = \"(\";\n" + " sep : std::string = ();\n" + " if this == none { return \"(none)\"; }\n"; + } + else { + to_string_impl += ") -> std::string = { \n"; + } + + to_string_impl += " pref := cpp2::to_string(prefix);\n"; + + for ( + auto const& e : enumerators ) { + if (e.name != "_") {// ignore unnamed values + if (bitwise) { + if (e.name != "none") { + to_string_impl += " if (this & " + cpp2::to_string(CPP2_UFCS(name)(t)) + "::" + cpp2::to_string(e.name) + ") == " + cpp2::to_string(CPP2_UFCS(name)(t)) + "::" + cpp2::to_string(e.name) + " { " + "ret += sep + pref + \"" + cpp2::to_string(e.name) + "\"; sep = separator; " + "}\n"; + } + } + else { + to_string_impl += " if this == " + cpp2::to_string(CPP2_UFCS(name)(t)) + "::" + cpp2::to_string(e.name) + " { return pref + \"" + cpp2::to_string(e.name) + "\"; }\n"; + } + } + } + + if (bitwise) { + to_string_impl += " return ret+\")\";\n}\n"; + } + else { + to_string_impl += " return \"invalid " + cpp2::to_string(CPP2_UFCS(name)(t)) + " value\";\n}\n"; + } + + CPP2_UFCS(add_member)(t, cpp2::move(to_string_impl)); + } +} + +#line 2182 "reflect.h2" + if (bitwise) { + CPP2_UFCS(add_member)(t, " to_string: (this) -> std::string = to_string_impl( \"\", \", \" );"); + CPP2_UFCS(add_member)(t, " to_code : (this) -> std::string = to_string_impl( \"" + cpp2::to_string(CPP2_UFCS(name)(t)) + "::\", \" | \" );"); + } + else { + CPP2_UFCS(add_member)(t, " to_string: (this) -> std::string = to_string_impl( \"\" );"); + CPP2_UFCS(add_member)(t, " to_code : (this) -> std::string = to_string_impl( \"" + cpp2::to_string(CPP2_UFCS(name)(t)) + "::\" );"); + } +{ +std::string from_string{" from_string: (s: std::string_view) -> " + cpp2::to_string(CPP2_UFCS(name)(t)) + " = { \n"}; + + // Provide a 'from_string' function to parse strings into enumerators + +#line 2193 "reflect.h2" + { + std::string_view prefix {""}; + std::string_view combine_op {"return"}; + + // For flags, accept a list that we break apart and then |= together + if (bitwise) + { + prefix = "flag_"; + combine_op = "ret |="; + + from_string += " ret := none;\n" + " outer: do {\n" + " for cpp2::string_util::split_string_list(s) do (x) {\n"; + } + // Otherwise, accept just a single string + else { + from_string += " x := s;\n"; + } +{ +std::string_view else_{""}; + +#line 2213 "reflect.h2" + for ( + auto const& e : cpp2::move(enumerators) ) { + from_string += " " + cpp2::to_string(else_) + "if \"" + cpp2::to_string(e.name) + "\" == x { " + cpp2::to_string(combine_op) + " " + cpp2::to_string(CPP2_UFCS(name)(t)) + "::" + cpp2::to_string(e.name) + "; }\n"; + else_ = "else "; + } +} + +#line 2219 "reflect.h2" + if (bitwise) { + from_string += " else { break outer; }\n" + " }\n" + " return ret;\n" + " } while false;\n"; + } + + from_string += " cpp2::type_safety.report_violation( (\"can't convert string '\" + cpp2::to_string(s) + \"' to " + cpp2::to_string(cpp2::move(prefix)) + "enum of type " + cpp2::to_string(CPP2_UFCS(name)(t)) + "\").c_str() );\n" + " return " + cpp2::to_string(CPP2_UFCS(name)(t)) + "::" + cpp2::to_string(cpp2::move(default_value)) + ";\n" + " }\n\n"; + + CPP2_UFCS(add_member)(t, cpp2::move(from_string)); + } +} + +#line 2233 "reflect.h2" + CPP2_UFCS(add_member)(t, " from_code: (s: std::string_view) -> " + cpp2::to_string(CPP2_UFCS(name)(t)) + " = { str: std::string = s; return from_string( cpp2::string_util::replace_all(str, \"" + cpp2::to_string(CPP2_UFCS(name)(t)) + "::\", \"\" ) ); }"); +} + +#line 2237 "reflect.h2" +//----------------------------------------------------------------------- +// +// "An enum[...] is a totally ordered value type that stores a +// value of its enumerators's type, and otherwise has only public +// member variables of its enumerator's type, all of which are +// naturally scoped because they are members of a type." +// +// -- P0707R4, section 3 +// +#line 2246 "reflect.h2" +auto cpp2_enum(meta::type_declaration& t) -> void +{ + // Let basic_enum do its thing, with an incrementing value generator + CPP2_UFCS(basic_enum)(t, + [](std::string& value, cpp2::impl::in specified_value) -> void{ + if (!(CPP2_UFCS(empty)(specified_value))) { + value = specified_value; + }else { + auto v {std::strtoll(&CPP2_ASSERT_IN_BOUNDS_LITERAL(value, 0), nullptr, 10)}; + value = cpp2::impl::as_((cpp2::move(v) + 1)); + } + }, + false // disable bitwise operations + ); +} + +#line 2263 "reflect.h2" +//----------------------------------------------------------------------- +// +// "flag_enum expresses an enumeration that stores values +// corresponding to bitwise-or'd enumerators. The enumerators must +// be powers of two, and are automatically generated [...] A none +// value is provided [...] Operators | and & are provided to +// combine and extract values." +// +// -- P0707R4, section 3 +// +#line 2273 "reflect.h2" +auto flag_enum(meta::type_declaration& t) -> void +{ + // Let basic_enum do its thing, with a power-of-two value generator + CPP2_UFCS(basic_enum)(t, + [](std::string& value, cpp2::impl::in specified_value) -> void{ + if (!(CPP2_UFCS(empty)(specified_value))) { + value = specified_value; + }else { + auto v {std::strtoll(&CPP2_ASSERT_IN_BOUNDS_LITERAL(value, 0), nullptr, 10)}; + if (cpp2::impl::cmp_less(v,1)) { + value = "1"; + } + else { + value = cpp2::impl::as_((cpp2::move(v) * 2)); + } + } + }, + true // enable bitwise operations + ); +} + +#line 2295 "reflect.h2" +//----------------------------------------------------------------------- +// +// "As with void*, programmers should know that unions [...] are +// inherently dangerous, should be avoided wherever possible, +// and should be handled with special care when actually needed." +// +// -- Stroustrup (The Design and Evolution of C++, 14.3.4.1) +// +// "C++17 needs a type-safe union... The implications of the +// consensus `variant` design are well understood and have been +// explored over several LEWG discussions, over a thousand emails, +// a joint LEWG/EWG session, and not to mention 12 years of +// experience with Boost and other libraries." +// +// -- Axel Naumann, in P0088 (wg21.link/p0088), +// the adopted proposal for C++17 std::variant +// +//----------------------------------------------------------------------- +// +// union +// +// a type that contains exactly one of a fixed set of values at a time +// + +#line 2319 "reflect.h2" +auto cpp2_union(meta::type_declaration& t) -> void +{ + std::vector alternatives {}; +{ +auto value{0}; + + // 1. Gather: All the user-written members, and find/compute the max size + +#line 2326 "reflect.h2" + for ( + + auto const& m : CPP2_UFCS(get_members)(t) ) { do + if ( CPP2_UFCS(is_member_object)(m)) + { + CPP2_UFCS(require)(m, CPP2_UFCS(is_public)(m) || CPP2_UFCS(is_default_access)(m), + "a union alternative cannot be protected or private" + ); + + CPP2_UFCS(require)(m, !(CPP2_UFCS(starts_with)(CPP2_UFCS(name)(m), "is_")) + && !(CPP2_UFCS(starts_with)(CPP2_UFCS(name)(m), "set_")), + "a union alternative's name cannot start with 'is_' or 'set_' - that could cause " + "user confusion with the 'is_alternative' and 'set_alternative' generated functions" + ); + + auto mo {CPP2_UFCS(as_object)(m)}; + CPP2_UFCS(require)(mo, CPP2_UFCS(empty)(CPP2_UFCS(initializer)(mo)), + "a union alternative cannot have an initializer" + ); + + // Adding local variable 'e' to work around a Clang warning + value_member_info e {cpp2::impl::as_(CPP2_UFCS(name)(mo)), CPP2_UFCS(type)(mo), cpp2::impl::as_(value)}; + CPP2_UFCS(push_back)(alternatives, cpp2::move(e)); + + CPP2_UFCS(mark_for_removal_from_enclosing_type)(mo); + static_cast(cpp2::move(mo)); + } while (false); ++value; } +} + +#line 2354 "reflect.h2" + std::string discriminator_type {}; + if (cpp2::impl::cmp_less(CPP2_UFCS(ssize)(alternatives),std::numeric_limits::max())) { + discriminator_type = "i8"; + } + else {if (cpp2::impl::cmp_less(CPP2_UFCS(ssize)(alternatives),std::numeric_limits::max())) { + discriminator_type = "i16"; + } + else {if (cpp2::impl::cmp_less(CPP2_UFCS(ssize)(alternatives),std::numeric_limits::max())) { + discriminator_type = "i32"; + } + else { + discriminator_type = "i64"; + }}} + +#line 2369 "reflect.h2" + // 2. Replace: Erase the contents and replace with modified contents + + CPP2_UFCS(remove_marked_members)(t); +{ +std::string storage{" _storage: cpp2::aligned_storage bool = _discriminator == " + cpp2::to_string(a.value) + ";\n"); + + CPP2_UFCS(add_member)(t, " " + cpp2::to_string(a.name) + ": (this) -> forward " + cpp2::to_string(a.type) + " pre(is_" + cpp2::to_string(a.name) + "()) = " + "reinterpret_cast<* const " + cpp2::to_string(a.type) + ">(_storage&)*;\n" + ); + + CPP2_UFCS(add_member)(t, " " + cpp2::to_string(a.name) + ": (inout this) -> forward " + cpp2::to_string(a.type) + " pre(is_" + cpp2::to_string(a.name) + "()) = " + "reinterpret_cast<*" + cpp2::to_string(a.type) + ">(_storage&)*;\n" + ); + + CPP2_UFCS(add_member)(t, " set_" + cpp2::to_string(a.name) + ": (inout this, _value: " + cpp2::to_string(a.type) + ") = { " + "if !is_" + cpp2::to_string(a.name) + "() { _destroy(); std::construct_at( reinterpret_cast<*" + cpp2::to_string(a.type) + ">(_storage&), _value); } " + "else { reinterpret_cast<*" + cpp2::to_string(a.type) + ">(_storage&)* = _value; } " + "_discriminator = " + cpp2::to_string(a.value) + "; " + "}\n" + ); + + CPP2_UFCS(add_member)(t, " set_" + cpp2::to_string(a.name) + ": (inout this, forward _args...: _) = { " + "if !is_" + cpp2::to_string(a.name) + "() { _destroy(); std::construct_at( reinterpret_cast<*" + cpp2::to_string(a.type) + ">(_storage&), _args...); } " + " else { reinterpret_cast<*" + cpp2::to_string(a.type) + ">(_storage&)* = :" + cpp2::to_string(a.type) + " = (_args...); } " + "_discriminator = " + cpp2::to_string(a.value) + "; " + "}\n" + ); + } +{ +std::string destroy{" private _destroy: (inout this) = {\n"}; + + // Add destroy + +#line 2426 "reflect.h2" + { + for ( + auto const& a : alternatives ) { + destroy += " if _discriminator == " + cpp2::to_string(a.value) + " { std::destroy_at( reinterpret_cast<*" + cpp2::to_string(a.type) + ">(_storage&) ); }\n"; + } + + destroy += " _discriminator = -1;\n" + " }\n"; + CPP2_UFCS(add_member)(t, cpp2::move(destroy)); + } +} + + // Add the destructor +#line 2438 "reflect.h2" + CPP2_UFCS(add_member)(t, " operator=: (move this) = { _destroy(); _ = this; }"); + + // Add default constructor + CPP2_UFCS(add_member)(t, " operator=: (out this) = { }"); +{ +std::string value_set{""}; + + // Add copy/move construction and assignment + +#line 2445 "reflect.h2" + { + for ( + auto const& a : cpp2::move(alternatives) ) { + value_set += " if that.is_" + cpp2::to_string(a.name) + "() { set_" + cpp2::to_string(a.name) + "( that." + cpp2::to_string(a.name) + "() ); }\n"; + } + value_set += " }\n"; + + CPP2_UFCS(add_member)(t, " operator=: (out this, that) = {\n" + " _storage = ();\n" + " _discriminator = -1;\n" + + value_set + ); + CPP2_UFCS(add_member)(t, " operator=: (inout this, that) = {\n" + " _storage = _;\n" + " _discriminator = _;\n" + + cpp2::move(value_set) + ); + } +} +#line 2463 "reflect.h2" +} + +#line 2466 "reflect.h2" +//----------------------------------------------------------------------- +// +// encapsulated +// +// A type with no public data members +// +#line 2472 "reflect.h2" +auto encapsulated(meta::type_declaration& t) -> void +{ + for ( + auto const& m : CPP2_UFCS(get_member_objects)(t) ) + { + CPP2_UFCS(require)(m, + !(CPP2_UFCS(is_public)(m)), + "an @encapsulated type must not have public data members" + ); + } +} + +#line 2485 "reflect.h2" +//----------------------------------------------------------------------- +// +// noncopyable +// +// A type with no copy/move construction/assignment +// +#line 2491 "reflect.h2" +auto noncopyable(meta::type_declaration& t) -> void +{ + auto smfs {CPP2_UFCS(query_declared_value_set_functions)(t)}; + CPP2_UFCS(require)(t, + !(smfs.out_this_in_that) + && !(smfs.out_this_move_that) + && !(smfs.inout_this_in_that) + && !(smfs.inout_this_move_that), + "a @noncopyable type must not have operator= with this and that parameters" + ); +} + +#line 2504 "reflect.h2" +//----------------------------------------------------------------------- +// +// singleton +// +// An encapsulated noncopyable type with a single instance accessed via +// an ::instance() function +// +// A private default constructor is provided. +// +#line 2513 "reflect.h2" +auto singleton(meta::type_declaration& t) -> void +{ + CPP2_UFCS(noncopyable)(t); + CPP2_UFCS(encapsulated)(t); + + for ( + auto const& m : CPP2_UFCS(get_member_functions)(t) ) + { + CPP2_UFCS(require)(m, + !(CPP2_UFCS(is_constructor)(m)), + "a @singleton type must not have a user-written constructor - " + "a private default constructor will be generated automatically" + ); + } + + CPP2_UFCS(add_member)(t, " private operator=: (out this) = { }\n"); + CPP2_UFCS(add_member)(t, " instance: () -> forward " + cpp2::to_string(CPP2_UFCS(name)(t)) + " = {\n" + " static _instance: " + cpp2::to_string(CPP2_UFCS(name)(t)) + " = ();" + " return _instance;\n" + " }\n"); +} + +#line 2536 "reflect.h2" +//----------------------------------------------------------------------- +// +// print - output a pretty-printed visualization of t +// +#line 2540 "reflect.h2" +auto print(cpp2::impl::in t) -> void +{ + std::cout << CPP2_UFCS(print)(t) << "\n"; +} + +#line 2546 "reflect.h2" +//----------------------------------------------------------------------- +// +// noisy - make each function print its name and signature, +// so the programmer can see what's called +// +#line 2551 "reflect.h2" +auto noisy(cpp2::impl::in t) -> void +{ + for ( + auto const& m : CPP2_UFCS(get_members)(t) ) + if ( CPP2_UFCS(is_function)(m) + && !(CPP2_UFCS(has_name)(m, "operator="))) + { + auto mf {CPP2_UFCS(as_function)(m)}; + if (CPP2_UFCS(has_compound_body)(mf)) { + auto body {CPP2_UFCS(get_compound_body)(mf)}; + CPP2_UFCS(add_statement)(body, " std::cout << \"" + cpp2::to_string(CPP2_UFCS(get_signature)(cpp2::move(mf))) + "\\n\";"); + static_cast(cpp2::move(body)); + } + } +} + +#line 2568 "reflect.h2" +//----------------------------------------------------------------------- +// +// python - expose the type using pybind11 +// +// *** Basic proof of concept only, limited and not well tested +// Hardcoded for pybind11 and g++10 and my local cppfront include path +// +#line 2575 "reflect.h2" +[[nodiscard]] auto python_param_names_and_types(cpp2::impl::in mf) -> python_param_names_and_types_ret + +#line 2581 "reflect.h2" +{ + std::string names {}; + std::string types {}; +#line 2582 "reflect.h2" + for ( + auto const& param : CPP2_UFCS(get_parameters)(mf) ) + if ( CPP2_UFCS(name)(CPP2_UFCS(get_declaration)(param)) != "this") + { + names += ", "; + if (!(CPP2_UFCS(empty)(types))) { + types += ", "; + } + names += std::string("pybind11::arg(\"") + CPP2_UFCS(name)(CPP2_UFCS(get_declaration)(param)) + "\")"; + types += CPP2_UFCS(type)(CPP2_UFCS(get_declaration)(param)); + } + // TODO: Remove when fixed (https://github.com/hsutter/cppfront/issues/1426). Force newline for return. + static_cast(names); +return { std::move(names), std::move(types) }; } + +#line 2597 "reflect.h2" +auto python(meta::type_declaration& t) -> void +{ + std::string bind {}; + bind += "PYBIND11_MODULE(" + cpp2::to_string(CPP2_UFCS(name)(t)) + "lib, m) {\n"; + bind += " pybind11::class_<" + cpp2::to_string(CPP2_UFCS(name)(t)) + ">(m, \"" + cpp2::to_string(CPP2_UFCS(name)(t)) + "\")\n"; + + for ( + auto const& m : CPP2_UFCS(get_members)(t) ) + if ( CPP2_UFCS(is_function)(m)) + { + auto mf {CPP2_UFCS(as_function)(m)}; + auto params {CPP2_UFCS(python_param_names_and_types)(mf)}; + + if (CPP2_UFCS(is_constructor)(mf)) { + bind += " .def(pybind11::init<" + cpp2::to_string(cpp2::move(params).types) + ">())\n"; + } + else {if (!(CPP2_UFCS(has_name)(mf, "operator="))) { + bind += " .def(\"" + cpp2::to_string(CPP2_UFCS(name)(mf)) + "\", &" + cpp2::to_string(CPP2_UFCS(name)(t)) + "::" + cpp2::to_string(CPP2_UFCS(name)(mf)) + " " + cpp2::to_string(cpp2::move(params).names) + ")\n"; + }} + } + + bind += " ;\n"; + bind += "}\n"; + + auto file {CPP2_UFCS(filename)(t)}; + if (CPP2_UFCS(ends_with)(file, ".cpp2")) { + file = CPP2_UFCS(substr)(file, 0, CPP2_UFCS(size)(file) - 5);// drop the ".cpp2" + } + std::string build {"g++-10 -O3 -shared -std=c++20 -fPIC $(python3 -m pybind11 --includes) " + cpp2::to_string(file) + ".cpp -o " + cpp2::to_string(file) + "lib$(python3-config --extension-suffix)"}; + + CPP2_UFCS(add_runtime_support_include)(t, "pybind11/pybind11.h", true); + CPP2_UFCS(add_runtime_support_include)(t, "pybind11/stl.h", true); + CPP2_UFCS(add_extra_cpp1_code)(t, cpp2::move(bind)); + CPP2_UFCS(add_extra_build_step)(t, cpp2::move(build)); +} + +#line 2634 "reflect.h2" +//----------------------------------------------------------------------- +// +// javascript - expose the type using emscripten +// +// *** Basic proof of concept only, limited and not well tested +// +#line 2640 "reflect.h2" +auto javascript(meta::type_declaration& t) -> void +{ + std::string bind {}; + bind += "using namespace emscripten;\n"; + bind += "EMSCRIPTEN_BINDINGS(" + cpp2::to_string(CPP2_UFCS(name)(t)) + "_module) {\n"; + bind += " class_<" + cpp2::to_string(CPP2_UFCS(name)(t)) + ">(\"" + cpp2::to_string(CPP2_UFCS(name)(t)) + "\")\n"; + + for ( + auto const& m : CPP2_UFCS(get_members)(t) ) + if ( CPP2_UFCS(is_function)(m)) + { + auto mf {CPP2_UFCS(as_function)(m)}; + auto params {CPP2_UFCS(python_param_names_and_types)(mf)}; // good enough! only care about .types + + if (CPP2_UFCS(is_constructor)(mf)) { + bind += " .constructor<" + cpp2::to_string(cpp2::move(params).types) + ">()\n"; + } + else {if (!(CPP2_UFCS(has_name)(mf, "operator="))) { + bind += " .function(\"" + cpp2::to_string(CPP2_UFCS(name)(mf)) + "\", &" + cpp2::to_string(CPP2_UFCS(name)(t)) + "::" + cpp2::to_string(CPP2_UFCS(name)(mf)) + ")\n"; + }} + } + + bind += " ;\n"; + bind += "}\n"; + + auto file {CPP2_UFCS(filename)(t)}; + if (CPP2_UFCS(ends_with)(file, ".cpp2")) { + file = CPP2_UFCS(substr)(file, 0, CPP2_UFCS(size)(file) - 5);// drop the ".cpp2" + } + std::string build {"em++ -std=c++20 -O3 " + cpp2::to_string(file) + ".cpp --bind -s MODULARIZE=1 -s ENVIRONMENT='web,node' -s ALLOW_MEMORY_GROWTH=1 -s FILESYSTEM=0 -s LEGACY_VM_SUPPORT=1 -o " + cpp2::to_string(file) + ".js"}; + CPP2_UFCS(add_runtime_support_include)(t, "emscripten/bind.h", true); + CPP2_UFCS(add_extra_cpp1_code)(t, cpp2::move(bind)); + CPP2_UFCS(add_extra_build_step)(t, cpp2::move(build)); + CPP2_UFCS(disable_ref_qualifier_generation)(t); +} + +#line 2677 "reflect.h2" +//----------------------------------------------------------------------- +// +// For reflection test cases +// +#line 2681 "reflect.h2" +auto sample_print(cpp2::impl::in s, cpp2::impl::in indent) -> void +{ + std::cout + << pre(indent) + << s + << "\n"; +} + +#line 2691 "reflect.h2" + auto simple_traverser::pre_traverse(cpp2::impl::in decl) -> void{ + traverse(decl); + } + +#line 2695 "reflect.h2" + auto simple_traverser::traverse(cpp2::impl::in decl) -> void + { + if (CPP2_UFCS(is_function)(decl)) { + pre_traverse(CPP2_UFCS(as_function)(decl)); + } + + if (CPP2_UFCS(is_object)(decl)) { + pre_traverse(CPP2_UFCS(as_object)(decl)); + } + + if (CPP2_UFCS(is_type)(decl)) { + pre_traverse(CPP2_UFCS(as_type)(decl)); + } + + // ... + // ... extend as desired to namespace, alias, etc. + // ... + } + +#line 2715 "reflect.h2" + auto simple_traverser::pre_traverse(cpp2::impl::in f) -> void{ + traverse(f); + } + +#line 2719 "reflect.h2" + auto simple_traverser::traverse(cpp2::impl::in f) -> void + { + auto parameters {CPP2_UFCS(get_parameters)(f)}; + for ( auto const& param : cpp2::move(parameters) ) { + pre_traverse(param); + } + + auto returns {CPP2_UFCS(get_returns)(f)}; + for ( auto const& param : cpp2::move(returns) ) { + pre_traverse(param); + } + + if (!(CPP2_UFCS(has_compound_body)(f))) { + pre_traverse(CPP2_UFCS(get_body)(f)); + } + else { + pre_traverse(CPP2_UFCS(get_compound_body)(f)); + } + } + +#line 2740 "reflect.h2" + auto simple_traverser::pre_traverse(cpp2::impl::in o) -> void{ + traverse(o); + } + +#line 2744 "reflect.h2" + auto simple_traverser::traverse(cpp2::impl::in o) -> void + { + if (CPP2_UFCS(has_initializer)(o)) { + pre_traverse(CPP2_UFCS(get_initializer)(o)); + } + } + +#line 2752 "reflect.h2" + auto simple_traverser::pre_traverse(cpp2::impl::in t) -> void{ + traverse(t); + } + +#line 2756 "reflect.h2" + auto simple_traverser::traverse(cpp2::impl::in t) -> void + { + for ( auto const& m : CPP2_UFCS(get_members)(t) ) { + pre_traverse(m); + } + } + +#line 2764 "reflect.h2" + auto simple_traverser::pre_traverse(cpp2::impl::in t) -> void{ + traverse(t); + } + +#line 2768 "reflect.h2" + auto simple_traverser::traverse(cpp2::impl::in t) -> void + { + pre_traverse(CPP2_UFCS(get_declaration)(t)); + } + +#line 2773 "reflect.h2" + auto simple_traverser::pre_traverse(cpp2::impl::in stmt) -> void{ + traverse(stmt); + } + +#line 2777 "reflect.h2" + auto simple_traverser::traverse(cpp2::impl::in stmt) -> void + { + if (CPP2_UFCS(is_expression_statement)(stmt)) { + pre_traverse(CPP2_UFCS(get_expression)(CPP2_UFCS(as_expression_statement)(stmt))); + } + + if (CPP2_UFCS(is_compound_statement)(stmt)) { + pre_traverse(CPP2_UFCS(as_compound_statement)(stmt)); + } + + if (CPP2_UFCS(is_selection_statement)(stmt)) + { + pre_traverse(CPP2_UFCS(as_selection_statement)(stmt)); + } + + if (CPP2_UFCS(is_declaration)(stmt)) { + pre_traverse(CPP2_UFCS(as_declaration)(stmt)); + } + + if (CPP2_UFCS(is_return_statement)(stmt)) { + pre_traverse(CPP2_UFCS(as_return_statement)(stmt)); + } + + if (CPP2_UFCS(is_iteration_statement)(stmt)) { + pre_traverse(CPP2_UFCS(as_iteration_statement)(stmt)); + } + + // TODO: + // using + // contract + // inspect + // jump + } + +#line 2812 "reflect.h2" + auto simple_traverser::pre_traverse(cpp2::impl::in stmt) -> void{ + traverse(stmt); + } + +#line 2816 "reflect.h2" + auto simple_traverser::traverse(cpp2::impl::in stmt) -> void + { + auto stmts {CPP2_UFCS(get_statements)(stmt)}; + + for ( auto const& cur : cpp2::move(stmts) ) { + pre_traverse(cur); + } + } + +#line 2826 "reflect.h2" + auto simple_traverser::pre_traverse(cpp2::impl::in stmt) -> void{ + traverse(stmt); + } + +#line 2830 "reflect.h2" + auto simple_traverser::traverse(cpp2::impl::in stmt) -> void + { + if (CPP2_UFCS(has_expression)(stmt)) { + pre_traverse(CPP2_UFCS(get_expression)(stmt)); + } + } + +#line 2838 "reflect.h2" + auto simple_traverser::pre_traverse(cpp2::impl::in stmt) -> void{ + traverse(stmt); + } + +#line 2842 "reflect.h2" + auto simple_traverser::traverse(cpp2::impl::in stmt) -> void + { + if (CPP2_UFCS(is_do)(stmt) || CPP2_UFCS(is_while)(stmt)) { + pre_traverse(CPP2_UFCS(get_do_while_condition)(stmt)); + pre_traverse(CPP2_UFCS(get_do_while_body)(stmt)); + } + else { + if (cpp2::cpp2_default.is_active() && !(CPP2_UFCS(is_for)(stmt)) ) { cpp2::cpp2_default.report_violation(""); } + pre_traverse(CPP2_UFCS(get_for_range)(stmt)); + pre_traverse(CPP2_UFCS(get_for_parameter)(stmt)); + pre_traverse(CPP2_UFCS(get_for_body)(stmt)); + } + + if (CPP2_UFCS(has_next)(stmt)) { + pre_traverse(CPP2_UFCS(get_next_expression)(stmt)); + } + } + +#line 2861 "reflect.h2" + auto simple_traverser::pre_traverse(cpp2::impl::in stmt) -> void{ + traverse(stmt); + } + +#line 2865 "reflect.h2" + auto simple_traverser::traverse(cpp2::impl::in stmt) -> void + { + pre_traverse(CPP2_UFCS(get_expression)(stmt)); + pre_traverse(CPP2_UFCS(get_true_branch)(stmt)); + + if (CPP2_UFCS(has_false_branch)(stmt)) { + pre_traverse(CPP2_UFCS(get_false_branch)(stmt)); + } + } + +#line 2876 "reflect.h2" + auto simple_traverser::pre_traverse(cpp2::impl::in expr) -> void + { + // Nothing to select here. + traverse(expr); + } + +#line 2882 "reflect.h2" + auto simple_traverser::traverse(cpp2::impl::in expr) -> void + { + // An expression has other shortcuts to query deeper properties, + // but let's just traverse all the nested grammer elements to + // show how that traversal works + + // The expressions use the pre_traverse function to decide which expression + // they are. The correct one calls traverse only once. + + // The expression's basic payload is just an assignment expression + pre_traverse(CPP2_UFCS(as_assignment_expression)(expr)); + } + +#line 2896 "reflect.h2" + auto simple_traverser::pre_traverse(cpp2::impl::in binexpr) -> void + { + auto terms {CPP2_UFCS(get_terms)(binexpr)}; + if (cpp2::cpp2_default.is_active() && !(!(CPP2_UFCS(empty)(terms))) ) { cpp2::cpp2_default.report_violation(""); } + + // If this has only one term, it's not an actual assignment, + // it's holding a lower grammar production so go traverse that + if (CPP2_UFCS(ssize)(terms) == 1) { + pre_traverse(CPP2_UFCS(get_term)(CPP2_UFCS(front)(cpp2::move(terms)))); + } + + // Else we're at an actual binary expression with a rhs + else { + traverse(binexpr); + } + } + +#line 2913 "reflect.h2" + auto simple_traverser::traverse(cpp2::impl::in binexpr) -> void + { + auto terms {CPP2_UFCS(get_terms)(binexpr)}; + + for ( + auto const& term : cpp2::move(terms) ) + { + traverse(CPP2_UFCS(get_term)(term)); + } + } + +#line 2924 "reflect.h2" + auto simple_traverser::pre_traverse(cpp2::impl::in binexpr) -> void + { + auto terms {CPP2_UFCS(get_terms)(binexpr)}; + if (cpp2::cpp2_default.is_active() && !(!(CPP2_UFCS(empty)(terms))) ) { cpp2::cpp2_default.report_violation(""); } + + // If this has only one term, it's not an actual logical-or, + // it's holding a lower grammar production so go traverse that + if (CPP2_UFCS(ssize)(terms) == 1) { + pre_traverse(CPP2_UFCS(get_term)(CPP2_UFCS(front)(cpp2::move(terms)))); + } + + // Else we're at an actual binary expression with a rhs + else { + traverse(binexpr); + } + } + +#line 2941 "reflect.h2" + auto simple_traverser::traverse(cpp2::impl::in binexpr) -> void + { + auto terms {CPP2_UFCS(get_terms)(binexpr)}; + + for ( + auto const& term : cpp2::move(terms) ) + { + traverse(CPP2_UFCS(get_term)(term)); + } + } + +#line 2953 "reflect.h2" + auto simple_traverser::pre_traverse(cpp2::impl::in binexpr) -> void + { + auto terms {CPP2_UFCS(get_terms)(binexpr)}; + if (cpp2::cpp2_default.is_active() && !(!(CPP2_UFCS(empty)(terms))) ) { cpp2::cpp2_default.report_violation(""); } + + // If this has only one term, it's not an actual logical-and, + // it's holding a lower grammar production so go traverse that + if (CPP2_UFCS(ssize)(terms) == 1) { + pre_traverse(CPP2_UFCS(get_term)(CPP2_UFCS(front)(cpp2::move(terms)))); + } + + // Else we're at an actual binary expression with a rhs + else { + traverse(binexpr); + } + } + +#line 2970 "reflect.h2" + auto simple_traverser::traverse(cpp2::impl::in binexpr) -> void + { + auto terms {CPP2_UFCS(get_terms)(binexpr)}; + + for ( + auto const& term : cpp2::move(terms) ) + { + traverse(CPP2_UFCS(get_term)(term)); + } + } + +#line 2981 "reflect.h2" + auto simple_traverser::pre_traverse(cpp2::impl::in binexpr) -> void + { + auto terms {CPP2_UFCS(get_terms)(binexpr)}; + if (cpp2::cpp2_default.is_active() && !(!(CPP2_UFCS(empty)(terms))) ) { cpp2::cpp2_default.report_violation(""); } + + // If this has only one term, it's not an actual bit-or, + // it's holding a lower grammar production so go traverse that + if (CPP2_UFCS(ssize)(terms) == 1) { + pre_traverse(CPP2_UFCS(get_term)(CPP2_UFCS(front)(cpp2::move(terms)))); + } + + // Else we're at an actual binary expression with a rhs + else { + traverse(binexpr); + } + } + +#line 2998 "reflect.h2" + auto simple_traverser::traverse(cpp2::impl::in binexpr) -> void + { + auto terms {CPP2_UFCS(get_terms)(binexpr)}; + + for ( + auto const& term : cpp2::move(terms) ) + { + traverse(CPP2_UFCS(get_term)(term)); + } + } + +#line 3009 "reflect.h2" + auto simple_traverser::pre_traverse(cpp2::impl::in binexpr) -> void + { + auto terms {CPP2_UFCS(get_terms)(binexpr)}; + if (cpp2::cpp2_default.is_active() && !(!(CPP2_UFCS(empty)(terms))) ) { cpp2::cpp2_default.report_violation(""); } + + // If this has only one term, it's not an actual bit-xor, + // it's holding a lower grammar production so go traverse that + if (CPP2_UFCS(ssize)(terms) == 1) { + pre_traverse(CPP2_UFCS(get_term)(CPP2_UFCS(front)(cpp2::move(terms)))); + } + + // Else we're at an actual binary expression with a rhs + else { + traverse(binexpr); + } + } + +#line 3026 "reflect.h2" + auto simple_traverser::traverse(cpp2::impl::in binexpr) -> void + { + auto terms {CPP2_UFCS(get_terms)(binexpr)}; + + for ( + auto const& term : cpp2::move(terms) ) + { + traverse(CPP2_UFCS(get_term)(term)); + } + } + +#line 3038 "reflect.h2" + auto simple_traverser::pre_traverse(cpp2::impl::in binexpr) -> void + { + auto terms {CPP2_UFCS(get_terms)(binexpr)}; + if (cpp2::cpp2_default.is_active() && !(!(CPP2_UFCS(empty)(terms))) ) { cpp2::cpp2_default.report_violation(""); } + + // If this has only one term, it's not an actual bit-and, + // it's holding a lower grammar production so go traverse that + if (CPP2_UFCS(ssize)(terms) == 1) { + pre_traverse(CPP2_UFCS(get_term)(CPP2_UFCS(front)(cpp2::move(terms)))); + } + + // Else we're at an actual binary expression with a rhs + else { + traverse(binexpr); + } + } + +#line 3055 "reflect.h2" + auto simple_traverser::traverse(cpp2::impl::in binexpr) -> void + { + auto terms {CPP2_UFCS(get_terms)(binexpr)}; + + for ( + auto const& term : cpp2::move(terms) ) + { + traverse(CPP2_UFCS(get_term)(term)); + } + } + +#line 3067 "reflect.h2" + auto simple_traverser::pre_traverse(cpp2::impl::in binexpr) -> void + { + auto terms {CPP2_UFCS(get_terms)(binexpr)}; + if (cpp2::cpp2_default.is_active() && !(!(CPP2_UFCS(empty)(terms))) ) { cpp2::cpp2_default.report_violation(""); } + + // If this has only one term, it's not an actual equality, + // it's holding a lower grammar production so go traverse that + if (CPP2_UFCS(ssize)(terms) == 1) { + pre_traverse(CPP2_UFCS(get_term)(CPP2_UFCS(front)(cpp2::move(terms)))); + } + + // Else we're at an actual binary expression with a rhs + else { + traverse(binexpr); + } + } + +#line 3084 "reflect.h2" + auto simple_traverser::traverse(cpp2::impl::in binexpr) -> void + { + auto terms {CPP2_UFCS(get_terms)(binexpr)}; + + for ( + auto const& term : cpp2::move(terms) ) + { + traverse(CPP2_UFCS(get_term)(term)); + } + } + +#line 3095 "reflect.h2" + auto simple_traverser::pre_traverse(cpp2::impl::in binexpr) -> void + { + auto terms {CPP2_UFCS(get_terms)(binexpr)}; + if (cpp2::cpp2_default.is_active() && !(!(CPP2_UFCS(empty)(terms))) ) { cpp2::cpp2_default.report_violation(""); } + + // If this has only one term, it's not an actual relational, + // it's holding a lower grammar production so go traverse that + if (CPP2_UFCS(ssize)(terms) == 1) { + pre_traverse(CPP2_UFCS(get_term)(CPP2_UFCS(front)(cpp2::move(terms)))); + } + + // Else we're at an actual binary expression with a rhs + else { + traverse(binexpr); + } + } + +#line 3112 "reflect.h2" + auto simple_traverser::traverse(cpp2::impl::in binexpr) -> void + { + auto terms {CPP2_UFCS(get_terms)(binexpr)}; + + for ( + auto const& term : cpp2::move(terms) ) + { + traverse(CPP2_UFCS(get_term)(term)); + } + } + +#line 3123 "reflect.h2" + auto simple_traverser::pre_traverse(cpp2::impl::in binexpr) -> void + { + auto terms {CPP2_UFCS(get_terms)(binexpr)}; + if (cpp2::cpp2_default.is_active() && !(!(CPP2_UFCS(empty)(terms))) ) { cpp2::cpp2_default.report_violation(""); } + + // If this has only one term, it's not an actual compare, + // it's holding a lower grammar production so go traverse that + if (CPP2_UFCS(ssize)(terms) == 1) { + pre_traverse(CPP2_UFCS(get_term)(CPP2_UFCS(front)(cpp2::move(terms)))); + } + + // Else we're at an actual binary expression with a rhs + else { + traverse(binexpr); + } + } + +#line 3140 "reflect.h2" + auto simple_traverser::traverse(cpp2::impl::in binexpr) -> void + { + auto terms {CPP2_UFCS(get_terms)(binexpr)}; + + for ( + auto const& term : cpp2::move(terms) ) + { + traverse(CPP2_UFCS(get_term)(term)); + } + } + +#line 3151 "reflect.h2" + auto simple_traverser::pre_traverse(cpp2::impl::in binexpr) -> void + { + auto terms {CPP2_UFCS(get_terms)(binexpr)}; + if (cpp2::cpp2_default.is_active() && !(!(CPP2_UFCS(empty)(terms))) ) { cpp2::cpp2_default.report_violation(""); } + + // If this has only one term, it's not an actual shift, + // it's holding a lower grammar production so go traverse that + if (CPP2_UFCS(ssize)(terms) == 1) { + pre_traverse(CPP2_UFCS(get_term)(CPP2_UFCS(front)(cpp2::move(terms)))); + } + + // Else we're at an actual binary expression with a rhs + else { + traverse(binexpr); + } + } + +#line 3168 "reflect.h2" + auto simple_traverser::traverse(cpp2::impl::in binexpr) -> void + { + auto terms {CPP2_UFCS(get_terms)(binexpr)}; + + for ( + auto const& term : cpp2::move(terms) ) + { + traverse(CPP2_UFCS(get_term)(term)); + } + } + +#line 3179 "reflect.h2" + auto simple_traverser::pre_traverse(cpp2::impl::in binexpr) -> void + { + auto terms {CPP2_UFCS(get_terms)(binexpr)}; + if (cpp2::cpp2_default.is_active() && !(!(CPP2_UFCS(empty)(terms))) ) { cpp2::cpp2_default.report_violation(""); } + + // If this has only one term, it's not an actual additive, + // it's holding a lower grammar production so go traverse that + if (CPP2_UFCS(ssize)(terms) == 1) { + pre_traverse(CPP2_UFCS(get_term)(CPP2_UFCS(front)(cpp2::move(terms)))); + } + + // Else we're at an actual binary expression with a rhs + else { + traverse(binexpr); + } + } + +#line 3196 "reflect.h2" + auto simple_traverser::traverse(cpp2::impl::in binexpr) -> void + { + auto terms {CPP2_UFCS(get_terms)(binexpr)}; + + for ( + auto const& term : cpp2::move(terms) ) + { + traverse(CPP2_UFCS(get_term)(term)); + } + } + +#line 3208 "reflect.h2" + auto simple_traverser::pre_traverse(cpp2::impl::in binexpr) -> void + { + auto terms {CPP2_UFCS(get_terms)(binexpr)}; + if (cpp2::cpp2_default.is_active() && !(!(CPP2_UFCS(empty)(terms))) ) { cpp2::cpp2_default.report_violation(""); } + + // If this has only one term, it's not an actual multiplicative, + // it's holding a lower grammar production so go traverse that + if (CPP2_UFCS(ssize)(terms) == 1) { + pre_traverse(CPP2_UFCS(get_term)(CPP2_UFCS(front)(cpp2::move(terms)))); + } + + // Else we're at an actual binary expression with a rhs + else { + traverse(binexpr); + } + } + +#line 3225 "reflect.h2" + auto simple_traverser::traverse(cpp2::impl::in binexpr) -> void + { + auto terms {CPP2_UFCS(get_terms)(binexpr)}; + + for ( + auto const& term : cpp2::move(terms) ) + { + traverse(CPP2_UFCS(get_term)(term)); + } + } + +#line 3236 "reflect.h2" + auto simple_traverser::pre_traverse(cpp2::impl::in isas) -> void + { + auto terms {CPP2_UFCS(get_terms)(isas)}; + + // If this has no additional terms, it's not an actual is-as, + // it's holding a lower grammar production so go traverse that + if (CPP2_UFCS(empty)(cpp2::move(terms))) { + pre_traverse(CPP2_UFCS(get_expression)(isas)); + } + + // Else we're at an actual is-as expression with a rhs + else { + traverse(isas); + } + } + +#line 3252 "reflect.h2" + auto simple_traverser::traverse(cpp2::impl::in isas) -> void + { + auto terms {CPP2_UFCS(get_terms)(isas)}; + + pre_traverse(CPP2_UFCS(get_expression)(isas)); + + for ( auto const& term : cpp2::move(terms) ) { + traverse(CPP2_UFCS(get_expr)(term)); + } + } + +#line 3263 "reflect.h2" + auto simple_traverser::traverse(cpp2::impl::in exprs) -> void + { + for ( auto const& expr : CPP2_UFCS(get_expressions)(exprs) ) { + traverse(expr); + } + } + +#line 3270 "reflect.h2" + auto simple_traverser::pre_traverse(cpp2::impl::in prefix) -> void + { + auto ops {CPP2_UFCS(get_ops)(prefix)}; + + // If this has no additional ops, it's not a naked prefix expr, + // it's holding a lower grammar production so go traverse that + if (CPP2_UFCS(empty)(cpp2::move(ops))) { + pre_traverse(CPP2_UFCS(get_postfix_expression)(prefix)); + } + + // Else we're at an actual prefix expression with ops + else { + traverse(prefix); + } + } + +#line 3286 "reflect.h2" + auto simple_traverser::traverse(cpp2::impl::in prefix) -> void + { + pre_traverse(CPP2_UFCS(get_postfix_expression)(prefix)); + } + +#line 3291 "reflect.h2" + auto simple_traverser::pre_traverse(cpp2::impl::in postfix) -> void + { + auto terms {CPP2_UFCS(get_terms)(postfix)}; + + // If this has no additional terms, it's not a naked postfix expr, + // it's holding a lower grammar production so go traverse that + if (CPP2_UFCS(empty)(cpp2::move(terms))) { + traverse(CPP2_UFCS(get_primary_expression)(postfix)); + } + + // Else we're at an actual postfix expression with ops + else { + traverse(postfix); + } + } + +#line 3307 "reflect.h2" + auto simple_traverser::traverse(cpp2::impl::in postfix) -> void + { + auto terms {CPP2_UFCS(get_terms)(postfix)}; + + traverse(CPP2_UFCS(get_primary_expression)(postfix)); + + for ( auto const& term : cpp2::move(terms) ) { + if (CPP2_UFCS(is_id_expression)(term)) { + traverse(CPP2_UFCS(get_id_expression)(term)); + } + else {if (CPP2_UFCS(is_expression_list)(term)) { + traverse(CPP2_UFCS(get_expression_list)(term)); + } + else {if (CPP2_UFCS(is_expression)(term)) { + traverse(CPP2_UFCS(get_expression)(term)); + }}} + } + } + +#line 3326 "reflect.h2" + auto simple_traverser::traverse(cpp2::impl::in uid) -> void + { + static_cast(uid); + } + +#line 3332 "reflect.h2" + auto simple_traverser::traverse(cpp2::impl::in qid) -> void + { + for ( + auto const& term : CPP2_UFCS(get_terms)(qid) ) + { + traverse(CPP2_UFCS(get_unqualified)(term)); + } + } + +#line 3342 "reflect.h2" + auto simple_traverser::traverse(cpp2::impl::in tid) -> void + { + if (CPP2_UFCS(is_postfix_expression)(tid)) { + traverse(CPP2_UFCS(as_postfix_expression)(tid)); + } + else {if (CPP2_UFCS(is_qualified_id)(tid)) { + traverse(CPP2_UFCS(as_qualified_id)(tid)); + } + else {if (CPP2_UFCS(is_unqualified_id)(tid)) { + traverse(CPP2_UFCS(as_unqualified_id)(tid)); + } + else { + // Regular type_id + }}} + } + +#line 3359 "reflect.h2" + auto simple_traverser::traverse(cpp2::impl::in primary) -> void + { + if (CPP2_UFCS(is_identifier)(primary)) { + // Regular identifier + } + else {if (CPP2_UFCS(is_expression_list)(primary)) { + traverse(CPP2_UFCS(as_expression_list)(primary)); + } + else {if (CPP2_UFCS(is_literal)(primary)) { + // Regular literal + } + else {if (CPP2_UFCS(is_declaration)(primary)) { + // TODO: traverse(primary.as_declaration()); + } + else { + // Regular primary + }}}} + } + +#line 3379 "reflect.h2" + auto simple_traverser::traverse(cpp2::impl::in idexpr) -> void + { + if (CPP2_UFCS(is_identifier)(idexpr)) { + // Regular id + } + else {if (CPP2_UFCS(is_qualified)(idexpr)) { + traverse(CPP2_UFCS(as_qualified)(idexpr)); + } + else {if (CPP2_UFCS(is_unqualified)(idexpr)) { + traverse(CPP2_UFCS(as_unqualified)(idexpr)); + } + else { + // Regular id expr + }}} + } + +#line 3397 "reflect.h2" +//----------------------------------------------------------------------- +// +// sample_traverser serves two purposes: +// +// - infrastructure for writing reflection API test cases +// +// - a sample for how code can use the reflection API, notably +// for reflecting on function bodies (statements, expressions) +// + +#line 3407 "reflect.h2" +auto sample_traverser(cpp2::impl::in decl, cpp2::impl::in indent) -> void +{ + sample_print("Declaration: " + cpp2::to_string(CPP2_UFCS(name)(decl)) + "", indent); + + if (CPP2_UFCS(is_function)(decl)) { + sample_traverser(CPP2_UFCS(as_function)(decl), indent + 1); + } + + if (CPP2_UFCS(is_object)(decl)) { + sample_traverser(CPP2_UFCS(as_object)(decl), indent + 1); + } + + if (CPP2_UFCS(is_type)(decl)) { + sample_traverser(CPP2_UFCS(as_type)(decl), indent + 1); + } + + // ... + // ... extend as desired to namespace, alias, etc. + // ... +} + +#line 3429 "reflect.h2" +auto sample_traverser(cpp2::impl::in f, cpp2::impl::in indent) -> void +{ + sample_print("Function: " + cpp2::to_string(CPP2_UFCS(name)(f)) + "", indent + 1); + + auto parameters {CPP2_UFCS(get_parameters)(f)}; + if (!(CPP2_UFCS(empty)(parameters))) { + sample_print("Parameters:", indent + 2); + for ( auto const& param : cpp2::move(parameters) ) { + sample_traverser(param, indent + 3); + } + } + + auto returns {CPP2_UFCS(get_returns)(f)}; + if (!(CPP2_UFCS(empty)(returns))) { + sample_print("Returns:", indent + 2); + for ( auto const& param : cpp2::move(returns) ) { + sample_traverser(param, indent + 3); + } + } + + sample_print("Body:", indent + 2); + if (!(CPP2_UFCS(has_compound_body)(f))) { + sample_traverser(CPP2_UFCS(get_body)(f), indent + 3); + } + else { + sample_traverser(CPP2_UFCS(get_compound_body)(f), indent + 3); + } +} + +#line 3459 "reflect.h2" +auto sample_traverser(cpp2::impl::in o, cpp2::impl::in indent) -> void +{ + sample_print("Object: name " + cpp2::to_string(CPP2_UFCS(name)(o)) + ", type " + cpp2::to_string(CPP2_UFCS(type)(o)) + "", indent); + if (CPP2_UFCS(has_initializer)(o)) { + sample_print("Initializer:", indent + 1); + sample_traverser(CPP2_UFCS(get_initializer)(o), indent + 2); + } +} + +#line 3469 "reflect.h2" +auto sample_traverser(cpp2::impl::in t, cpp2::impl::in indent) -> void +{ + sample_print("Type: " + cpp2::to_string(CPP2_UFCS(name)(t)) + "", indent); + + if (CPP2_UFCS(parent_is_nonglobal_namespace)(t)) + { + auto ns {CPP2_UFCS(as_nonglobal_namespace)(CPP2_UFCS(get_parent)(t))}; + sample_print("is a member of namespace " + cpp2::to_string(CPP2_UFCS(name)(ns)) + " which contains the following names:", indent + 1); + for ( auto const& m : CPP2_UFCS(get_members)(ns) ) { + sample_print(CPP2_UFCS(name)(m), indent + 2); + } + CPP2_UFCS(add_member)(ns, "add_1: (x) = x+1;"); + static_cast(cpp2::move(ns)); + } + + for ( auto const& m : CPP2_UFCS(get_members)(t) ) { + sample_traverser(m, indent + 1); + } +} + +#line 3490 "reflect.h2" +auto sample_traverser(cpp2::impl::in t, cpp2::impl::in indent) -> void +{ + sample_print("parameter:", indent); + + auto pass {CPP2_UFCS(get_passing_style)(t)}; + if (pass == passing_style::in) { sample_print("passing style: in", indent + 1);} + if (pass == passing_style::in_ref) { sample_print("passing style: in_ref", indent + 1);} + if (pass == passing_style::copy) { sample_print("passing style: copy", indent + 1);} + if (pass == passing_style::inout) { sample_print("passing style: inout", indent + 1);} + if (pass == passing_style::out) { sample_print("passing style: out", indent + 1);} + if (pass == passing_style::move) { sample_print("passing style: move", indent + 1);} + if (pass == passing_style::forward) { sample_print("passing style: forward", indent + 1);} + if (cpp2::move(pass) == passing_style::forward_ref) {sample_print("passing style: forward_ref", indent + 1); } + + sample_print("declaration:", indent + 1); + sample_traverser(CPP2_UFCS(get_declaration)(t), indent + 2); +} + +#line 3509 "reflect.h2" +auto sample_traverser(cpp2::impl::in stmt, cpp2::impl::in indent) -> void +{ + auto params {CPP2_UFCS(get_parameters)(stmt)}; + if (!(CPP2_UFCS(empty)(params))) { + sample_print("statement parameters: ", indent); + for ( auto const& param : cpp2::move(params) ) { + sample_traverser(param, indent + 1); + } + } + + if (CPP2_UFCS(is_expression_statement)(stmt)) { + sample_traverser(CPP2_UFCS(get_expression)(CPP2_UFCS(as_expression_statement)(stmt)), indent); + } + + if (CPP2_UFCS(is_compound_statement)(stmt)) { + sample_traverser(CPP2_UFCS(as_compound_statement)(stmt), indent); + } + + if (CPP2_UFCS(is_selection_statement)(stmt)) + { + auto sel {CPP2_UFCS(as_selection_statement)(stmt)}; + sample_print("" + cpp2::to_string(CPP2_UFCS(get_identifier)(sel)) + " statement", indent); + + sample_print("condition:", indent + 1); + sample_traverser(CPP2_UFCS(get_expression)(sel), indent + 2); + + sample_print("true branch:", indent + 1); + sample_traverser(CPP2_UFCS(get_true_branch)(sel), indent + 2); + + if (CPP2_UFCS(has_false_branch)(sel)) { + sample_print("false branch:", indent + 1); + sample_traverser(CPP2_UFCS(get_false_branch)(cpp2::move(sel)), indent + 2); + } + } + + if (CPP2_UFCS(is_declaration)(stmt)) { + sample_traverser(CPP2_UFCS(as_declaration)(stmt), indent + 1); + } + + if (CPP2_UFCS(is_return_statement)(stmt)) { + sample_traverser(CPP2_UFCS(as_return_statement)(stmt), indent + 1); + } + + if (CPP2_UFCS(is_iteration_statement)(stmt)) { + sample_traverser(CPP2_UFCS(as_iteration_statement)(stmt), indent + 1); + } + + // TODO: + // using + // contract + // inspect + // jump +} + +#line 3564 "reflect.h2" +auto sample_traverser(cpp2::impl::in stmt, cpp2::impl::in indent) -> void +{ + auto stmts {CPP2_UFCS(get_statements)(stmt)}; + + if (CPP2_UFCS(empty)(stmts)) { + sample_print("compound statement (empty)", indent); + return ; + } + + // Else + sample_print("compound statement", indent); + for ( auto const& stmt2 : cpp2::move(stmts) ) { + sample_traverser(stmt2, indent + 1); + } +} + +#line 3581 "reflect.h2" +auto sample_traverser(cpp2::impl::in stmt, cpp2::impl::in indent) -> void +{ + sample_print("return statement", indent); + if (CPP2_UFCS(has_expression)(stmt)) { + sample_print("expression", indent + 1); + sample_traverser(CPP2_UFCS(get_expression)(stmt), indent + 2); + } +} + +#line 3591 "reflect.h2" +auto sample_traverser(cpp2::impl::in stmt, cpp2::impl::in indent) -> void +{ + if (CPP2_UFCS(is_do)(stmt) || CPP2_UFCS(is_while)(stmt)) { + if (CPP2_UFCS(is_do)(stmt)) { + sample_print("do loop:", indent); + } + else { + sample_print("while loop:", indent); + } + sample_print("condition:", indent + 1); + sample_traverser(CPP2_UFCS(get_do_while_condition)(stmt), indent + 2); + sample_print("body:", indent + 1); + sample_traverser(CPP2_UFCS(get_do_while_body)(stmt), indent + 2); + } + else { + if (cpp2::cpp2_default.is_active() && !(CPP2_UFCS(is_for)(stmt)) ) { cpp2::cpp2_default.report_violation(""); } + sample_print("for loop:", indent); + sample_print("range:", indent + 1); + sample_traverser(CPP2_UFCS(get_for_range)(stmt), indent + 2); + sample_print("parameter:", indent + 1); + sample_traverser(CPP2_UFCS(get_for_parameter)(stmt), indent + 2); + sample_print("body:", indent + 1); + sample_traverser(CPP2_UFCS(get_for_body)(stmt), indent + 2); + } + + if (CPP2_UFCS(has_next)(stmt)) { + sample_print("next expression:", indent + 1); + sample_traverser(CPP2_UFCS(get_next_expression)(stmt), indent + 2); + } +} + +#line 3623 "reflect.h2" +auto sample_traverser(cpp2::impl::in expr, cpp2::impl::in indent) -> void +{ + // An expression has other shortcuts to query deeper properties, + // but let's just traverse all the nested grammar elements to + // show how that traversal works + + // The expression's basic payload is just an assignment expression + // today - this can change when we add try-expressions + if (CPP2_UFCS(is_assignment_expression)(expr)) { + sample_traverser(CPP2_UFCS(as_assignment_expression)(expr), indent); + } +} + +#line 3637 "reflect.h2" +auto sample_traverser(cpp2::impl::in binexpr, cpp2::impl::in indent) -> void +{ + auto terms {CPP2_UFCS(get_terms)(binexpr)}; + if (cpp2::cpp2_default.is_active() && !(!(CPP2_UFCS(empty)(terms))) ) { cpp2::cpp2_default.report_violation(""); } + + // If this has only one term, it's not an actual assignment, + // it's holding a lower grammar production so go traverse that + if (CPP2_UFCS(ssize)(terms) == 1) { + sample_traverser(CPP2_UFCS(get_term)(CPP2_UFCS(front)(cpp2::move(terms))), indent); + } + + // Else we're at an actual binary expression with a rhs + else { + sample_print("assignment", indent); +{ +auto first{true}; + +#line 3653 "reflect.h2" + for ( + auto const& term : cpp2::move(terms) ) + { + if (!(first)) { + sample_print("op: " + cpp2::to_string(CPP2_UFCS(get_op)(term)) + "", indent + 1); + } + first = false; + sample_print("term:", indent + 1); + sample_traverser(CPP2_UFCS(get_term)(term), indent + 2); + } +} +#line 3663 "reflect.h2" + } +} + +#line 3667 "reflect.h2" +auto sample_traverser(cpp2::impl::in binexpr, cpp2::impl::in indent) -> void +{ + auto terms {CPP2_UFCS(get_terms)(binexpr)}; + if (cpp2::cpp2_default.is_active() && !(!(CPP2_UFCS(empty)(terms))) ) { cpp2::cpp2_default.report_violation(""); } + + // If this has only one term, it's not an actual logical-or, + // it's holding a lower grammar production so go traverse that + if (CPP2_UFCS(ssize)(terms) == 1) { + sample_traverser(CPP2_UFCS(get_term)(CPP2_UFCS(front)(cpp2::move(terms))), indent); + } + + // Else we're at an actual binary expression with a rhs + else { + sample_print("logical-or", indent); +{ +auto first{true}; + +#line 3683 "reflect.h2" + for ( + auto const& term : cpp2::move(terms) ) + { + if (!(first)) { + sample_print("op: " + cpp2::to_string(CPP2_UFCS(get_op)(term)) + "", indent + 1); + } + first = false; + sample_print("term:", indent + 1); + sample_traverser(CPP2_UFCS(get_term)(term), indent + 2); + } +} +#line 3693 "reflect.h2" + } +} + +#line 3697 "reflect.h2" +auto sample_traverser(cpp2::impl::in binexpr, cpp2::impl::in indent) -> void +{ + auto terms {CPP2_UFCS(get_terms)(binexpr)}; + if (cpp2::cpp2_default.is_active() && !(!(CPP2_UFCS(empty)(terms))) ) { cpp2::cpp2_default.report_violation(""); } + + // If this has only one term, it's not an actual logical-and, + // it's holding a lower grammar production so go traverse that + if (CPP2_UFCS(ssize)(terms) == 1) { + sample_traverser(CPP2_UFCS(get_term)(CPP2_UFCS(front)(cpp2::move(terms))), indent); + } + + // Else we're at an actual binary expression with a rhs + else { + sample_print("logical-and", indent); +{ +auto first{true}; + +#line 3713 "reflect.h2" + for ( + auto const& term : cpp2::move(terms) ) + { + if (!(first)) { + sample_print("op: " + cpp2::to_string(CPP2_UFCS(get_op)(term)) + "", indent + 1); + } + first = false; + sample_print("term:", indent + 1); + sample_traverser(CPP2_UFCS(get_term)(term), indent + 2); + } +} +#line 3723 "reflect.h2" + } +} + +#line 3727 "reflect.h2" +auto sample_traverser(cpp2::impl::in binexpr, cpp2::impl::in indent) -> void +{ + auto terms {CPP2_UFCS(get_terms)(binexpr)}; + if (cpp2::cpp2_default.is_active() && !(!(CPP2_UFCS(empty)(terms))) ) { cpp2::cpp2_default.report_violation(""); } + + // If this has only one term, it's not an actual bit-or, + // it's holding a lower grammar production so go traverse that + if (CPP2_UFCS(ssize)(terms) == 1) { + sample_traverser(CPP2_UFCS(get_term)(CPP2_UFCS(front)(cpp2::move(terms))), indent); + } + + // Else we're at an actual binary expression with a rhs + else { + sample_print("bit-or", indent); +{ +auto first{true}; + +#line 3743 "reflect.h2" + for ( + auto const& term : cpp2::move(terms) ) + { + if (!(first)) { + sample_print("op: " + cpp2::to_string(CPP2_UFCS(get_op)(term)) + "", indent + 1); + } + first = false; + sample_print("term:", indent + 1); + sample_traverser(CPP2_UFCS(get_term)(term), indent + 2); + } +} +#line 3753 "reflect.h2" + } +} + +#line 3757 "reflect.h2" +auto sample_traverser(cpp2::impl::in binexpr, cpp2::impl::in indent) -> void +{ + auto terms {CPP2_UFCS(get_terms)(binexpr)}; + if (cpp2::cpp2_default.is_active() && !(!(CPP2_UFCS(empty)(terms))) ) { cpp2::cpp2_default.report_violation(""); } + + // If this has only one term, it's not an actual bit-xor, + // it's holding a lower grammar production so go traverse that + if (CPP2_UFCS(ssize)(terms) == 1) { + sample_traverser(CPP2_UFCS(get_term)(CPP2_UFCS(front)(cpp2::move(terms))), indent); + } + + // Else we're at an actual binary expression with a rhs + else { + sample_print("bit-xor", indent); +{ +auto first{true}; + +#line 3773 "reflect.h2" + for ( + auto const& term : cpp2::move(terms) ) + { + if (!(first)) { + sample_print("op: " + cpp2::to_string(CPP2_UFCS(get_op)(term)) + "", indent + 1); + } + first = false; + sample_print("term:", indent + 1); + sample_traverser(CPP2_UFCS(get_term)(term), indent + 2); + } +} +#line 3783 "reflect.h2" + } +} + +#line 3787 "reflect.h2" +auto sample_traverser(cpp2::impl::in binexpr, cpp2::impl::in indent) -> void +{ + auto terms {CPP2_UFCS(get_terms)(binexpr)}; + if (cpp2::cpp2_default.is_active() && !(!(CPP2_UFCS(empty)(terms))) ) { cpp2::cpp2_default.report_violation(""); } + + // If this has only one term, it's not an actual bit-and, + // it's holding a lower grammar production so go traverse that + if (CPP2_UFCS(ssize)(terms) == 1) { + sample_traverser(CPP2_UFCS(get_term)(CPP2_UFCS(front)(cpp2::move(terms))), indent); + } + + // Else we're at an actual binary expression with a rhs + else { + sample_print("bit-and", indent); +{ +auto first{true}; + +#line 3803 "reflect.h2" + for ( + auto const& term : cpp2::move(terms) ) + { + if (!(first)) { + sample_print("op: " + cpp2::to_string(CPP2_UFCS(get_op)(term)) + "", indent + 1); + } + first = false; + sample_print("term:", indent + 1); + sample_traverser(CPP2_UFCS(get_term)(term), indent + 2); + } +} +#line 3813 "reflect.h2" + } +} + +#line 3817 "reflect.h2" +auto sample_traverser(cpp2::impl::in binexpr, cpp2::impl::in indent) -> void +{ + auto terms {CPP2_UFCS(get_terms)(binexpr)}; + if (cpp2::cpp2_default.is_active() && !(!(CPP2_UFCS(empty)(terms))) ) { cpp2::cpp2_default.report_violation(""); } + + // If this has only one term, it's not an actual equality, + // it's holding a lower grammar production so go traverse that + if (CPP2_UFCS(ssize)(terms) == 1) { + sample_traverser(CPP2_UFCS(get_term)(CPP2_UFCS(front)(cpp2::move(terms))), indent); + } + + // Else we're at an actual binary expression with a rhs + else { + sample_print("equality", indent); +{ +auto first{true}; + +#line 3833 "reflect.h2" + for ( + auto const& term : cpp2::move(terms) ) + { + if (!(first)) { + sample_print("op: " + cpp2::to_string(CPP2_UFCS(get_op)(term)) + "", indent + 1); + } + first = false; + sample_print("term:", indent + 1); + sample_traverser(CPP2_UFCS(get_term)(term), indent + 2); + } +} +#line 3843 "reflect.h2" + } +} + +#line 3847 "reflect.h2" +auto sample_traverser(cpp2::impl::in binexpr, cpp2::impl::in indent) -> void +{ + auto terms {CPP2_UFCS(get_terms)(binexpr)}; + if (cpp2::cpp2_default.is_active() && !(!(CPP2_UFCS(empty)(terms))) ) { cpp2::cpp2_default.report_violation(""); } + + // If this has only one term, it's not an actual relational, + // it's holding a lower grammar production so go traverse that + if (CPP2_UFCS(ssize)(terms) == 1) { + sample_traverser(CPP2_UFCS(get_term)(CPP2_UFCS(front)(cpp2::move(terms))), indent); + } + + // Else we're at an actual binary expression with a rhs + else { + sample_print("relational", indent); +{ +auto first{true}; + +#line 3863 "reflect.h2" + for ( + auto const& term : cpp2::move(terms) ) + { + if (!(first)) { + sample_print("op: " + cpp2::to_string(CPP2_UFCS(get_op)(term)) + "", indent + 1); + } + first = false; + sample_print("term:", indent + 1); + sample_traverser(CPP2_UFCS(get_term)(term), indent + 2); + } +} +#line 3873 "reflect.h2" + } +} + +#line 3877 "reflect.h2" +auto sample_traverser(cpp2::impl::in binexpr, cpp2::impl::in indent) -> void +{ + auto terms {CPP2_UFCS(get_terms)(binexpr)}; + if (cpp2::cpp2_default.is_active() && !(!(CPP2_UFCS(empty)(terms))) ) { cpp2::cpp2_default.report_violation(""); } + + // If this has only one term, it's not an actual compare, + // it's holding a lower grammar production so go traverse that + if (CPP2_UFCS(ssize)(terms) == 1) { + sample_traverser(CPP2_UFCS(get_term)(CPP2_UFCS(front)(cpp2::move(terms))), indent); + } + + // Else we're at an actual binary expression with a rhs + else { + sample_print("compare", indent); +{ +auto first{true}; + +#line 3893 "reflect.h2" + for ( + auto const& term : cpp2::move(terms) ) + { + if (!(first)) { + sample_print("op: " + cpp2::to_string(CPP2_UFCS(get_op)(term)) + "", indent + 1); + } + first = false; + sample_print("term:", indent + 1); + sample_traverser(CPP2_UFCS(get_term)(term), indent + 2); + } +} +#line 3903 "reflect.h2" + } +} + +#line 3907 "reflect.h2" +auto sample_traverser(cpp2::impl::in binexpr, cpp2::impl::in indent) -> void +{ + auto terms {CPP2_UFCS(get_terms)(binexpr)}; + if (cpp2::cpp2_default.is_active() && !(!(CPP2_UFCS(empty)(terms))) ) { cpp2::cpp2_default.report_violation(""); } + + // If this has only one term, it's not an actual shift, + // it's holding a lower grammar production so go traverse that + if (CPP2_UFCS(ssize)(terms) == 1) { + sample_traverser(CPP2_UFCS(get_term)(CPP2_UFCS(front)(cpp2::move(terms))), indent); + } + + // Else we're at an actual binary expression with a rhs + else { + sample_print("shift", indent); +{ +auto first{true}; + +#line 3923 "reflect.h2" + for ( + auto const& term : cpp2::move(terms) ) + { + if (!(first)) { + sample_print("op: " + cpp2::to_string(CPP2_UFCS(get_op)(term)) + "", indent + 1); + } + first = false; + sample_print("term:", indent + 1); + sample_traverser(CPP2_UFCS(get_term)(term), indent + 2); + } +} +#line 3933 "reflect.h2" + } +} + +#line 3937 "reflect.h2" +auto sample_traverser(cpp2::impl::in binexpr, cpp2::impl::in indent) -> void +{ + auto terms {CPP2_UFCS(get_terms)(binexpr)}; + if (cpp2::cpp2_default.is_active() && !(!(CPP2_UFCS(empty)(terms))) ) { cpp2::cpp2_default.report_violation(""); } + + // If this has only one term, it's not an actual additive, + // it's holding a lower grammar production so go traverse that + if (CPP2_UFCS(ssize)(terms) == 1) { + sample_traverser(CPP2_UFCS(get_term)(CPP2_UFCS(front)(cpp2::move(terms))), indent); + } + + // Else we're at an actual binary expression with a rhs + else { + sample_print("additive", indent); +{ +auto first{true}; + +#line 3953 "reflect.h2" + for ( + auto const& term : cpp2::move(terms) ) + { + if (!(first)) { + sample_print("op: " + cpp2::to_string(CPP2_UFCS(get_op)(term)) + "", indent + 1); + } + first = false; + sample_print("term:", indent + 1); + sample_traverser(CPP2_UFCS(get_term)(term), indent + 2); + } +} +#line 3963 "reflect.h2" + } +} + +#line 3967 "reflect.h2" +auto sample_traverser(cpp2::impl::in binexpr, cpp2::impl::in indent) -> void +{ + auto terms {CPP2_UFCS(get_terms)(binexpr)}; + if (cpp2::cpp2_default.is_active() && !(!(CPP2_UFCS(empty)(terms))) ) { cpp2::cpp2_default.report_violation(""); } + + // If this has only one term, it's not an actual multiplicative, + // it's holding a lower grammar production so go traverse that + if (CPP2_UFCS(ssize)(terms) == 1) { + sample_traverser(CPP2_UFCS(get_term)(CPP2_UFCS(front)(cpp2::move(terms))), indent); + } + + // Else we're at an actual binary expression with a rhs + else { + sample_print("multiplicative", indent); +{ +auto first{true}; + +#line 3983 "reflect.h2" + for ( + auto const& term : cpp2::move(terms) ) + { + if (!(first)) { + sample_print("op: " + cpp2::to_string(CPP2_UFCS(get_op)(term)) + "", indent + 1); + } + first = false; + sample_print("term:", indent + 1); + sample_traverser(CPP2_UFCS(get_term)(term), indent + 2); + } +} +#line 3993 "reflect.h2" + } +} + +#line 3997 "reflect.h2" +auto sample_traverser(cpp2::impl::in isas, cpp2::impl::in indent) -> void +{ + auto terms {CPP2_UFCS(get_terms)(isas)}; + + // If this has no additional terms, it's not an actual is-as, + // it's holding a lower grammar production so go traverse that + if (CPP2_UFCS(empty)(terms)) { + sample_traverser(CPP2_UFCS(get_expression)(isas), indent); + } + + // Else we're at an actual is-as expression with a rhs + else { + sample_print("is-as expression", indent); + + sample_print("expression", indent + 1); + sample_traverser(CPP2_UFCS(get_expression)(isas), indent + 2); + + for ( auto const& term : cpp2::move(terms) ) { + sample_print("op: " + cpp2::to_string(CPP2_UFCS(get_op)(term)) + "", indent + 1); + sample_print("term:", indent + 1); + sample_traverser(CPP2_UFCS(get_expr)(term), indent + 2); + } + } +} + +#line 4023 "reflect.h2" +auto sample_traverser(cpp2::impl::in exprs, cpp2::impl::in indent) -> void +{ + if (CPP2_UFCS(is_empty)(exprs)) { + sample_print("()", indent); + } + else { + sample_print("(", indent); + for ( auto const& expr : CPP2_UFCS(get_expressions)(exprs) ) { + sample_traverser(expr, indent + 1); + } + sample_print(")", indent); + } +} + +#line 4038 "reflect.h2" +auto sample_traverser(cpp2::impl::in prefix, cpp2::impl::in indent) -> void +{ + auto ops {CPP2_UFCS(get_ops)(prefix)}; + + // If this has no additional ops, it's not a naked prefix expr, + // it's holding a lower grammar production so go traverse that + if (CPP2_UFCS(empty)(ops)) { + sample_traverser(CPP2_UFCS(get_postfix_expression)(prefix), indent); + } + + // Else we're at an actual prefix expression with ops + else { + sample_print("prefix expression", indent); + + for ( auto const& op : cpp2::move(ops) ) { + sample_print("op: " + cpp2::to_string(op) + "", indent + 1); + } + + sample_print("expression", indent + 1); + sample_traverser(CPP2_UFCS(get_postfix_expression)(prefix), indent + 2); + } +} + +#line 4062 "reflect.h2" +auto sample_traverser(cpp2::impl::in postfix, cpp2::impl::in indent) -> void +{ + auto terms {CPP2_UFCS(get_terms)(postfix)}; + + // If this has no additional terms, it's not a naked postfix expr, + // it's holding a lower grammar production so go traverse that + if (CPP2_UFCS(empty)(terms)) { + sample_traverser(CPP2_UFCS(get_primary_expression)(postfix), indent); + } + + // Else we're at an actual postfix expression with ops + else { + sample_print("postfix expression", indent); + + sample_print("expression", indent + 1); + sample_traverser(CPP2_UFCS(get_primary_expression)(postfix), indent + 2); + + for ( auto const& term : cpp2::move(terms) ) { + sample_print("op: " + cpp2::to_string(CPP2_UFCS(get_op)(term)) + "", indent + 1); + if (CPP2_UFCS(is_id_expression)(term)) { + sample_traverser(CPP2_UFCS(get_id_expression)(term), indent + 1); + } + else {if (CPP2_UFCS(is_expression_list)(term)) { + sample_traverser(CPP2_UFCS(get_expression_list)(term), indent + 1); + } + else {if (CPP2_UFCS(is_expression)(term)) { + sample_traverser(CPP2_UFCS(get_expression)(term), indent + 1); + }}} + } + } +} + +#line 4095 "reflect.h2" +auto sample_traverser(cpp2::impl::in uid, cpp2::impl::in indent) -> void +{ + if (CPP2_UFCS(is_identifier)(uid)) { + sample_print(CPP2_UFCS(get_identifier)(uid), indent); + } + else { + sample_print(CPP2_UFCS(to_string)(uid), indent + 1); + } +} + +#line 4106 "reflect.h2" +auto sample_traverser(cpp2::impl::in qid, cpp2::impl::in indent) -> void +{ +{ +auto first{true}; + +#line 4109 "reflect.h2" + for ( + auto const& term : CPP2_UFCS(get_terms)(qid) ) + { + if (!(first)) { + sample_print("op: " + cpp2::to_string(CPP2_UFCS(get_op)(term)) + "", indent + 1); + } + first = false; + sample_print("unqualified:", indent + 1); + sample_traverser(CPP2_UFCS(get_unqualified)(term), indent + 2); + } +} +#line 4119 "reflect.h2" +} + +#line 4122 "reflect.h2" +auto sample_traverser(cpp2::impl::in tid, cpp2::impl::in indent) -> void +{ + if (CPP2_UFCS(is_postfix_expression)(tid)) { + sample_traverser(CPP2_UFCS(as_postfix_expression)(tid), indent); + } + else {if (CPP2_UFCS(is_qualified_id)(tid)) { + sample_traverser(CPP2_UFCS(as_qualified_id)(tid), indent); + } + else {if (CPP2_UFCS(is_unqualified_id)(tid)) { + sample_traverser(CPP2_UFCS(as_unqualified_id)(tid), indent); + } + else { + sample_print(CPP2_UFCS(to_string)(tid), indent); + }}} +} + +#line 4139 "reflect.h2" +auto sample_traverser(cpp2::impl::in primary, cpp2::impl::in indent) -> void +{ + if (CPP2_UFCS(is_identifier)(primary)) { + sample_print(CPP2_UFCS(as_identifier)(primary), indent + 1); + } + else {if (CPP2_UFCS(is_expression_list)(primary)) { + sample_traverser(CPP2_UFCS(as_expression_list)(primary), indent + 1); + } + else {if (CPP2_UFCS(is_literal)(primary)) { + sample_print(CPP2_UFCS(as_literal)(primary), indent + 1); + } + else {if (CPP2_UFCS(is_declaration)(primary)) { + sample_traverser(CPP2_UFCS(as_declaration)(primary), indent + 1); + } + else { + sample_print(CPP2_UFCS(to_string)(primary), indent + 1); + }}}} +} + +#line 4159 "reflect.h2" +auto sample_traverser(cpp2::impl::in idexpr, cpp2::impl::in indent) -> void +{ + if (CPP2_UFCS(is_identifier)(idexpr)) { + sample_print(CPP2_UFCS(as_identifier)(idexpr), indent + 1); + } + else {if (CPP2_UFCS(is_qualified)(idexpr)) { + sample_traverser(CPP2_UFCS(as_qualified)(idexpr), indent + 1); + } + else {if (CPP2_UFCS(is_unqualified)(idexpr)) { + sample_traverser(CPP2_UFCS(as_unqualified)(idexpr), indent + 1); + } + else { + sample_print(CPP2_UFCS(to_string)(idexpr), indent + 1); + }}} +} + +#line 4176 "reflect.h2" +//----------------------------------------------------------------------- +// +// autodiff +// + +#line 4193 "reflect.h2" + autodiff_special_func::autodiff_special_func(cpp2::impl::in name_, cpp2::impl::in n_args_, cpp2::impl::in is_member_, cpp2::impl::in code_primal_, cpp2::impl::in code_fwd_, + cpp2::impl::in code_rws_, cpp2::impl::in code_primal_higher_order_, cpp2::impl::in code_fwd_higher_order_, + cpp2::impl::in code_rws_higher_order_) + : name{ name_ } + , n_args{ n_args_ } + , is_member{ is_member_ } + , code_primal{ code_primal_ } + , code_fwd{ code_fwd_ } + , code_rws{ code_rws_ } + , code_primal_higher_order{ code_primal_higher_order_ } + , code_fwd_higher_order{ code_fwd_higher_order_ } + , code_rws_higher_order{ code_rws_higher_order_ }{ + +#line 4207 "reflect.h2" + if (CPP2_UFCS(empty)(code_primal_higher_order)) { + code_primal_higher_order = code_primal; + } + if (CPP2_UFCS(empty)(code_fwd_higher_order)) { + code_fwd_higher_order = code_fwd; + } + if (CPP2_UFCS(empty)(code_rws_higher_order)) { + code_rws_higher_order = code_rws; + } + } + +#line 4218 "reflect.h2" + autodiff_special_func::autodiff_special_func(autodiff_special_func const& that) + : name{ that.name } + , n_args{ that.n_args } + , is_member{ that.is_member } + , code_primal{ that.code_primal } + , code_fwd{ that.code_fwd } + , code_rws{ that.code_rws } + , code_primal_higher_order{ that.code_primal_higher_order } + , code_fwd_higher_order{ that.code_fwd_higher_order } + , code_rws_higher_order{ that.code_rws_higher_order }{} +#line 4218 "reflect.h2" + auto autodiff_special_func::operator=(autodiff_special_func const& that) -> autodiff_special_func& { + name = that.name; + n_args = that.n_args; + is_member = that.is_member; + code_primal = that.code_primal; + code_fwd = that.code_fwd; + code_rws = that.code_rws; + code_primal_higher_order = that.code_primal_higher_order; + code_fwd_higher_order = that.code_fwd_higher_order; + code_rws_higher_order = that.code_rws_higher_order; + return *this; } +#line 4218 "reflect.h2" + autodiff_special_func::autodiff_special_func(autodiff_special_func&& that) noexcept + : name{ std::move(that).name } + , n_args{ std::move(that).n_args } + , is_member{ std::move(that).is_member } + , code_primal{ std::move(that).code_primal } + , code_fwd{ std::move(that).code_fwd } + , code_rws{ std::move(that).code_rws } + , code_primal_higher_order{ std::move(that).code_primal_higher_order } + , code_fwd_higher_order{ std::move(that).code_fwd_higher_order } + , code_rws_higher_order{ std::move(that).code_rws_higher_order }{} +#line 4218 "reflect.h2" + auto autodiff_special_func::operator=(autodiff_special_func&& that) noexcept -> autodiff_special_func& { + name = std::move(that).name; + n_args = std::move(that).n_args; + is_member = std::move(that).is_member; + code_primal = std::move(that).code_primal; + code_fwd = std::move(that).code_fwd; + code_rws = std::move(that).code_rws; + code_primal_higher_order = std::move(that).code_primal_higher_order; + code_fwd_higher_order = std::move(that).code_fwd_higher_order; + code_rws_higher_order = std::move(that).code_rws_higher_order; + return *this; }// Default copy. + +#line 4220 "reflect.h2" + [[nodiscard]] auto autodiff_special_func::is_match(cpp2::impl::in o) const& -> bool{ + return name == o.name && n_args == o.n_args && is_member == o.is_member; + } + +#line 4227 "reflect.h2" + // TODO: Maybe use variant here. + +#line 4231 "reflect.h2" + autodiff_declared_variable::autodiff_declared_variable(){} + +#line 4233 "reflect.h2" + autodiff_declared_variable::autodiff_declared_variable(cpp2::impl::in name_, cpp2::impl::in decl_, cpp2::impl::in is_active_, cpp2::impl::in is_member_) + : name{ name_ } + , decl{ decl_ } + , is_active{ is_active_ } + , is_member{ is_member_ }{ + +#line 4238 "reflect.h2" + } + +#line 4240 "reflect.h2" + autodiff_declared_variable::autodiff_declared_variable(autodiff_declared_variable const& that) + : name{ that.name } + , decl{ that.decl } + , is_active{ that.is_active } + , is_member{ that.is_member }{} +#line 4240 "reflect.h2" + auto autodiff_declared_variable::operator=(autodiff_declared_variable const& that) -> autodiff_declared_variable& { + name = that.name; + decl = that.decl; + is_active = that.is_active; + is_member = that.is_member; + return *this; } +#line 4240 "reflect.h2" + autodiff_declared_variable::autodiff_declared_variable(autodiff_declared_variable&& that) noexcept + : name{ std::move(that).name } + , decl{ std::move(that).decl } + , is_active{ std::move(that).is_active } + , is_member{ std::move(that).is_member }{} +#line 4240 "reflect.h2" + auto autodiff_declared_variable::operator=(autodiff_declared_variable&& that) noexcept -> autodiff_declared_variable& { + name = std::move(that).name; + decl = std::move(that).decl; + is_active = std::move(that).is_active; + is_member = std::move(that).is_member; + return *this; } + +#line 4244 "reflect.h2" + // namespace + type name + +#line 4252 "reflect.h2" + autodiff_declaration_stack_item::autodiff_declaration_stack_item(cpp2::impl::in full_name_, cpp2::impl::in decl_) + : full_name{ full_name_ } + , decl{ decl_ }{ + +#line 4255 "reflect.h2" + } + +#line 4257 "reflect.h2" + [[nodiscard]] auto autodiff_declaration_stack_item::lookup_declaration(cpp2::impl::in decl_name) const& -> lookup_declaration_ret{ + std::vector r {}; +#line 4258 "reflect.h2" + for ( auto const& cur : CPP2_UFCS(get_members)(decl) ) { + if (CPP2_UFCS(has_name)(cur) && decl_name == CPP2_UFCS(name)(cur)) { + CPP2_UFCS(push_back)(r, cur); + + // Do not break for overloads. <3 + } + }return r; + } + +#line 4267 "reflect.h2" + [[nodiscard]] auto autodiff_declaration_stack_item::lookup_variable_declaration(cpp2::impl::in decl_name) const& -> lookup_variable_declaration_ret{ + bool found {false}; + autodiff_declared_variable r {}; +{ +auto cur_context{CPP2_UFCS(rbegin)(declared_variables_stack)}; + // Note: Not using "for std::ranges::views::reverse(...)" because + // that does not work correctly in Clang 12 + older libstdc++ + +#line 4271 "reflect.h2" + for( ; cur_context != CPP2_UFCS(rend)(declared_variables_stack); + ++cur_context ) + { + for ( auto const& cur : *cpp2::impl::assert_not_null(cur_context) ) { + if (cur.name == decl_name) { + found = true; + r = cur; + return { std::move(found), std::move(r) }; + } + } + } +} +#line 4272 "reflect.h2" + return { std::move(found), std::move(r) }; + +#line 4282 "reflect.h2" + } + + autodiff_declaration_stack_item::autodiff_declaration_stack_item(autodiff_declaration_stack_item const& that) + : full_name{ that.full_name } + , decl{ that.decl } + , diff_request{ that.diff_request } + , diff_done{ that.diff_done } + , declared_variables_stack{ that.declared_variables_stack }{} +autodiff_declaration_stack_item::autodiff_declaration_stack_item(autodiff_declaration_stack_item&& that) noexcept + : full_name{ std::move(that).full_name } + , decl{ std::move(that).decl } + , diff_request{ std::move(that).diff_request } + , diff_done{ std::move(that).diff_done } + , declared_variables_stack{ std::move(that).declared_variables_stack }{} + +#line 4290 "reflect.h2" + // Code in special function is replaced. Placeholders are: + // _o_ : name of object for member functions. + // _o_ : name of derivative object for member functions. + // _a1_ : First argument value + // _ad1_: First derivative argument value + // _a2_ : Second argument value + // _ad2_: Second derivative argument value + + /* is_member = */ + +#line 4307 "reflect.h2" + /* is_member = */ + +#line 4315 "reflect.h2" + /* is_member = */ + +#line 4323 "reflect.h2" + /* is_member = */ + +#line 4331 "reflect.h2" + /* is_member = */ + +#line 4342 "reflect.h2" + // Members depending on order + +#line 4349 "reflect.h2" + autodiff_context::autodiff_context(){} +#line 4350 "reflect.h2" + autodiff_context::autodiff_context(cpp2::impl::in order_, cpp2::impl::in reverse_) + : order{ order_ } + , reverse{ reverse_ }{ + +#line 4354 "reflect.h2" + if (1 != order) { + if (reverse) { + fwd_ad_type = "cpp2::taylor"; + rws_ad_type = "cpp2::taylor"; + } + else { + fwd_ad_type = "cpp2::taylor"; + } + } + + } + +#line 4366 "reflect.h2" + auto autodiff_context::add_variable_declaration(cpp2::impl::in name, cpp2::impl::in type, cpp2::impl::in is_active, cpp2::impl::in is_member) & -> void{ + CPP2_UFCS(push_back)(CPP2_UFCS(back)(CPP2_UFCS(back)(declaration_stack).declared_variables_stack), autodiff_declared_variable(name, type, is_active, is_member)); + } + +#line 4370 "reflect.h2" + [[nodiscard]] auto autodiff_context::is_variable_active(cpp2::impl::in name) & -> bool{ + return lookup_variable_declaration(name).is_active; + } + +#line 4374 "reflect.h2" + auto autodiff_context::create_namespace_stack(cpp2::impl::in t) & -> void{ + if (CPP2_UFCS(parent_is_nonglobal_namespace)(t)) { + create_namespace_stack(CPP2_UFCS(as_nonglobal_namespace)(CPP2_UFCS(get_parent)(t))); + } + else {if (CPP2_UFCS(parent_is_type)(t)) { + create_namespace_stack(CPP2_UFCS(as_type)(CPP2_UFCS(get_parent)(t))); + }} + + std::string full_name {"::"}; + if (!(CPP2_UFCS(empty)(declaration_stack))) { + full_name = CPP2_UFCS(back)(declaration_stack).full_name + "::"; + } + full_name += CPP2_UFCS(name)(t); + + static_cast(CPP2_UFCS(push_back)(declaration_stack, autodiff_declaration_stack_item(cpp2::move(full_name), t))); + } + +#line 4391 "reflect.h2" + [[nodiscard]] auto autodiff_context::is_forward() const& -> decltype(auto) { return !(reverse) || (reverse && order != 1); } +#line 4392 "reflect.h2" + [[nodiscard]] auto autodiff_context::is_reverse() const& -> decltype(auto) { return reverse; } +#line 4393 "reflect.h2" + [[nodiscard]] auto autodiff_context::is_taylor() const& -> decltype(auto) { return order != 1; } + +#line 4395 "reflect.h2" + [[nodiscard]] auto autodiff_context::gen_temporary() & -> std::string{ + temporary_count += 1; + return "temp_" + cpp2::to_string(temporary_count) + ""; + } + +#line 4400 "reflect.h2" + [[nodiscard]] auto autodiff_context::is_type_active(cpp2::impl::in type) & -> bool{ + auto decls {lookup_type_declaration(type)}; + auto r {false}; + + if (!(CPP2_UFCS(empty)(decls))) { + if (cpp2::cpp2_default.is_active() && !(CPP2_UFCS(ssize)(decls) == 1) ) { cpp2::cpp2_default.report_violation(""); } + autodiff_activity_check ada {&(*this)}; + CPP2_UFCS(pre_traverse)(ada, CPP2_ASSERT_IN_BOUNDS_LITERAL(cpp2::move(decls), 0)); + r = cpp2::move(ada).active; + } + + // TODO: Add template activity lookup. + + if (!(r)) { + // Declaration lookup did not yield an activity: Apply some heuristics. + r = CPP2_UFCS(contains)(type, "double"); + } + + return r; + } -#line 743 "reflect.h2" -auto ordered_impl( - meta::type_declaration& t, - cpp2::impl::in ordering// must be "strong_ordering" etc. -) -> void +#line 4421 "reflect.h2" + [[nodiscard]] auto autodiff_context::get_fwd_ad_type(cpp2::impl::in type) & -> std::string{ + auto type_d {type}; + + if ("double" != type) { + auto type_decls {lookup_type_declaration(type)}; + if (!(CPP2_UFCS(empty)(type_decls))) { + // We found a cpp2 type declaration, mark it for differentiation. + add_for_differentiation(CPP2_ASSERT_IN_BOUNDS_LITERAL(cpp2::move(type_decls), 0)); + + // Add the AD suffix to the type + type_d += fwd_suffix; + } + } + + // Replace with AD type for the AD order. + return string_util::replace_all(cpp2::move(type_d), "double", fwd_ad_type); + } + +#line 4439 "reflect.h2" + [[nodiscard]] auto autodiff_context::get_rws_ad_type(cpp2::impl::in type) & -> std::string{ + auto type_d {type}; + + if ("double" != type) { + auto type_decls {lookup_type_declaration(type)}; + if (!(CPP2_UFCS(empty)(type_decls))) { + // We found a cpp2 type declaration, mark it for differentiation. + add_for_differentiation(CPP2_ASSERT_IN_BOUNDS_LITERAL(cpp2::move(type_decls), 0)); + + // Add the AD suffix to the type + type_d += rws_suffix; + } + } + + // Replace with AD type for the AD order. + return string_util::replace_all(cpp2::move(type_d), "double", rws_ad_type); + } + +#line 4457 "reflect.h2" + [[nodiscard]] auto autodiff_context::get_reverse_passing_style(cpp2::impl::in p) const& -> passing_style{ + // TODO: inspect does not work here: error: error: no matching function for call to ‘is(const cpp2::passing_style&)’ + // return inspect p -> passing_style { + // is passing_style::in = passing_style::inout; + // is passing_style::in_ref = passing_style::inout; + // is passing_style::copy = passing_style::inout; + // is passing_style::inout = passing_style::inout; + // is passing_style::out = passing_style::inout; + // is passing_style::move = passing_style::inout; + // is passing_style::forward = passing_style::inout; + // is passing_style::forward_ref = passing_style::inout; + // is _ = passing_style::inout; + // }; + if (p == passing_style::in) { return passing_style::inout; } + if (p == passing_style::in_ref) { return passing_style::inout; } + if (p == passing_style::copy) { return passing_style::inout; } + if (p == passing_style::inout) { return passing_style::inout; } + if (p == passing_style::out) { return passing_style::inout; } + if (p == passing_style::move) { return passing_style::inout; } + if (p == passing_style::forward) { return passing_style::inout; } + if (p == passing_style::forward_ref) { return passing_style::inout; } + +#line 4480 "reflect.h2" + CPP2_UFCS(error)(CPP2_UFCS(back)(declaration_stack).decl, "AD: Do not know how to handle passing style:" + cpp2::to_string(p) + ""); + + return passing_style::inout; + } + +#line 4485 "reflect.h2" + [[nodiscard]] auto autodiff_context::lookup_declaration(cpp2::impl::in decl_name) & -> lookup_declaration_ret{ + std::vector r {}; { - auto has_spaceship {false}; +auto cur{CPP2_UFCS(rbegin)(declaration_stack)}; + // Note: Not using "for std::ranges::views::reverse(...)" because + // that does not work correctly in Clang 12 + older libstdc++ - for ( auto& mf : CPP2_UFCS(get_member_functions)(t) ) - { - if (CPP2_UFCS(has_name)(mf, "operator<=>")) { - has_spaceship = true; - auto return_name {CPP2_UFCS(unnamed_return_type)(mf)}; - if (CPP2_UFCS(find)(return_name, ordering) == return_name.npos) - { - CPP2_UFCS(error)(mf, "operator<=> must return std::" + cpp2::impl::as_(ordering)); +#line 4489 "reflect.h2" + for( ; cur != CPP2_UFCS(rend)(declaration_stack); + ++cur ) + { + std::string cur_full_name {(*cpp2::impl::assert_not_null(cur)).full_name + "::" + decl_name}; + auto ele {CPP2_UFCS(find)(declaration_map, cur_full_name)}; + if (ele == CPP2_UFCS(end)(declaration_map)) { + ele = CPP2_UFCS(insert_or_assign)(declaration_map, cpp2::move(cur_full_name), CPP2_UFCS(lookup_declaration)((*cpp2::impl::assert_not_null(cur)), decl_name)).first; + } + + if (!(CPP2_UFCS(empty)((*cpp2::impl::assert_not_null(ele)).second))) { + // A simple assignment or emplace_back did not work. It tired to use move copy operators. + for ( auto const& cp : (*cpp2::impl::assert_not_null(cpp2::move(ele))).second ) { + CPP2_UFCS(push_back)(r, cp); + } + //r = ele*.second; + break; + // TODO: For overload resolution we may want to continue here and just add everything for all parent namespaces. + } + } +} + +#line 4509 "reflect.h2" + return r; + } + +#line 4512 "reflect.h2" + [[nodiscard]] auto autodiff_context::lookup_variable_declaration(cpp2::impl::in name) & -> autodiff_declared_variable{ + if (name == "_") { + return autodiff_declared_variable(name, "_", false, false); + } +{ +auto cur_context{CPP2_UFCS(rbegin)(declaration_stack)}; + + // Note: Not using "for std::ranges::views::reverse(...)" because + // that does not work correctly in Clang 12 + older libstdc++ + +#line 4520 "reflect.h2" + for( ; cur_context != CPP2_UFCS(rend)(declaration_stack); + ++cur_context ) + { + auto r {CPP2_UFCS(lookup_variable_declaration)((*cpp2::impl::assert_not_null(cur_context)), name)}; + if (r.found) { + return cpp2::move(r).r; } } +} + +#line 4529 "reflect.h2" + CPP2_UFCS(error)(CPP2_UFCS(back)(declaration_stack).decl, "AD: Could not find declaration of variable with name `" + cpp2::to_string(name) + "`."); + + return autodiff_declared_variable(); } - if (!(cpp2::move(has_spaceship))) { - CPP2_UFCS(add_member)(t, "operator<=>: (this, that) -> std::" + (cpp2::impl::as_(ordering)) + ";"); +#line 4534 "reflect.h2" + [[nodiscard]] auto autodiff_context::lookup_function_declaration(cpp2::impl::in decl_name) & -> lookup_function_declaration_ret{ + std::vector r {}; +#line 4535 "reflect.h2" + auto r_all {lookup_declaration(decl_name)}; + + for ( auto const& cur : cpp2::move(r_all) ) { + if (CPP2_UFCS(is_function)(cur)) { + CPP2_UFCS(push_back)(r, CPP2_UFCS(as_function)(cur)); + } + }return r; + } + +#line 4544 "reflect.h2" + [[nodiscard]] auto autodiff_context::lookup_member_function_declaration(cpp2::impl::in obj_type, cpp2::impl::in decl_name) & -> lookup_member_function_declaration_ret{ + std::vector r {}; +#line 4545 "reflect.h2" + for ( auto const& cur : CPP2_UFCS(get_members)(obj_type) ) { + if (CPP2_UFCS(is_function)(cur) && CPP2_UFCS(has_name)(cur) && decl_name == CPP2_UFCS(name)(cur)) { + CPP2_UFCS(push_back)(r, CPP2_UFCS(as_function)(cur)); + + // Do not break for overloads. <3 + } + }return r; + } + +#line 4554 "reflect.h2" + [[nodiscard]] auto autodiff_context::lookup_type_declaration(cpp2::impl::in decl_name) & -> lookup_type_declaration_ret{ + std::vector r {}; +#line 4555 "reflect.h2" + auto r_all {lookup_declaration(decl_name)}; + + for ( auto const& cur : cpp2::move(r_all) ) { + if (CPP2_UFCS(is_type)(cur)) { + CPP2_UFCS(push_back)(r, CPP2_UFCS(as_type)(cur)); + } + }return r; + } + +#line 4564 "reflect.h2" + [[nodiscard]] auto autodiff_context::lookup_special_function_handling(cpp2::impl::in func_name, cpp2::impl::in n_args, cpp2::impl::in is_member) const& -> lookup_special_function_handling_ret{ + cpp2::impl::deferred_init m; + cpp2::impl::deferred_init code_primal; + cpp2::impl::deferred_init code_fwd; + cpp2::impl::deferred_init code_rws; +#line 4565 "reflect.h2" + autodiff_special_func lookup {func_name, n_args, is_member}; + + m.construct(false); + code_primal.construct(""); + code_fwd.construct(""); + code_rws.construct(""); + for ( auto const& func : special_funcs ) { + if (CPP2_UFCS(is_match)(func, lookup)) { + m.value() = true; + if (is_taylor()) { + code_primal.value() = func.code_primal_higher_order; + code_fwd.value() = func.code_fwd_higher_order; + code_rws.value() = func.code_rws_higher_order; + } + else { + code_primal.value() = func.code_primal; + code_fwd.value() = func.code_fwd; + code_rws.value() = func.code_rws; + } + return { std::move(m.value()), std::move(code_primal.value()), std::move(code_fwd.value()), std::move(code_rws.value()) }; + } + }return { std::move(m.value()), std::move(code_primal.value()), std::move(code_fwd.value()), std::move(code_rws.value()) }; + } + +#line 4589 "reflect.h2" + auto autodiff_context::add_as_differentiated(cpp2::impl::in t) & -> void{ + auto top {&CPP2_UFCS(back)(declaration_stack)}; + + if (cpp2::cpp2_default.is_active() && !(CPP2_UFCS(is_same)(CPP2_UFCS(get_parent)(t), (*cpp2::impl::assert_not_null(top)).decl)) ) { cpp2::cpp2_default.report_violation(""); } + + CPP2_UFCS(push_back)((*cpp2::impl::assert_not_null(cpp2::move(top))).diff_done, t); } + +#line 4597 "reflect.h2" + auto autodiff_context::add_for_differentiation(cpp2::impl::in t) & -> void{ + auto t_parent {CPP2_UFCS(get_parent)(t)}; + + auto found {false}; +{ +auto cur{CPP2_UFCS(rbegin)(declaration_stack)}; + + // Note: Not using "for std::ranges::views::reverse(...)" because + // that does not work correctly in Clang 12 + older libstdc++ + +#line 4605 "reflect.h2" + for( ; cur != CPP2_UFCS(rend)(declaration_stack); + ++cur ) + { + if (CPP2_UFCS(is_same)(t_parent, (*cpp2::impl::assert_not_null(cur)).decl)) { + if (!(is_in_list(t, (*cpp2::impl::assert_not_null(cur)).diff_request))) { + CPP2_UFCS(push_back)((*cpp2::impl::assert_not_null(cur)).diff_request, t); + } + + found = true; + break; + } + } } -//----------------------------------------------------------------------- -// ordered - a totally ordered type -// -// Note: the ordering that should be encouraged as default gets the nice name -// -#line 772 "reflect.h2" -auto ordered(meta::type_declaration& t) -> void +#line 4618 "reflect.h2" + if (!(cpp2::move(found))) { + CPP2_UFCS(error)(t, "AD: Could not find parent type/namespace for: " + cpp2::to_string(t) + ""); + } + } + +#line 4623 "reflect.h2" + [[nodiscard]] auto autodiff_context::is_in_list(cpp2::impl::in v, cpp2::impl::in> list) -> bool{ + for ( auto const& cur : list ) { + if (CPP2_UFCS(is_same)(cur, v)) { + return true; + } + } + + return false; + } + +#line 4633 "reflect.h2" + auto autodiff_context::enter_function() & -> void{ + temporary_count = 0; + CPP2_UFCS(push_back)(CPP2_UFCS(back)(declaration_stack).declared_variables_stack, std::vector()); + } + +#line 4638 "reflect.h2" + auto autodiff_context::leave_function() & -> void{ + CPP2_UFCS(pop_back)(CPP2_UFCS(back)(declaration_stack).declared_variables_stack); + } + +#line 4642 "reflect.h2" + auto autodiff_context::push_stack(cpp2::impl::in decl) & -> void{ + std::string full_name {""}; + + if (!(CPP2_UFCS(empty)(declaration_stack))) { + full_name += CPP2_UFCS(back)(declaration_stack).full_name; + } + + full_name += "::"; + full_name += CPP2_UFCS(name)(decl); + + CPP2_UFCS(push_back)(declaration_stack, autodiff_declaration_stack_item(cpp2::move(full_name), decl)); + } + +#line 4655 "reflect.h2" + auto autodiff_context::pop_stack() & -> void{ + if (cpp2::cpp2_default.is_active() && !(!(CPP2_UFCS(empty)(declaration_stack))) ) { cpp2::cpp2_default.report_violation(""); } + + auto top {&CPP2_UFCS(back)(declaration_stack)}; + autodiff_declaration_handler ad {&(*this), (*cpp2::impl::assert_not_null(top)).decl}; + + for ( auto const& cur : (*cpp2::impl::assert_not_null(top)).diff_request ) { + if (!(is_in_list(cur, (*cpp2::impl::assert_not_null(top)).diff_done))) { + CPP2_UFCS(pre_traverse)(ad, cur); + } + } + + CPP2_UFCS(pop_back)(declaration_stack); + } + +#line 4670 "reflect.h2" + auto autodiff_context::finish() & -> void{ + while( !(CPP2_UFCS(empty)(declaration_stack)) ) { + pop_stack(); + } + } + + //TODO: Remove when autodiff_diff_code is updated +#line 4677 "reflect.h2" + [[nodiscard]] auto autodiff_context::get_self() & -> autodiff_context*{ + return &(*this); + } + +#line 4690 "reflect.h2" + autodiff_diff_code::autodiff_diff_code(cpp2::impl::in ctx_) + : ctx{ ctx_ }{ + +#line 4692 "reflect.h2" + } +#line 4690 "reflect.h2" + auto autodiff_diff_code::operator=(cpp2::impl::in ctx_) -> autodiff_diff_code& { + ctx = ctx_; + fwd = ""; + rws_primal = ""; + rws_backprop = ""; + return *this; + +#line 4692 "reflect.h2" + } +#line 4693 "reflect.h2" + autodiff_diff_code::autodiff_diff_code(autodiff_diff_code const& that) + : ctx{ that.ctx } + , fwd{ that.fwd } + , rws_primal{ that.rws_primal } + , rws_backprop{ that.rws_backprop }{} +#line 4693 "reflect.h2" + auto autodiff_diff_code::operator=(autodiff_diff_code const& that) -> autodiff_diff_code& { + ctx = that.ctx; + fwd = that.fwd; + rws_primal = that.rws_primal; + rws_backprop = that.rws_backprop; + return *this; } +#line 4693 "reflect.h2" + autodiff_diff_code::autodiff_diff_code(autodiff_diff_code&& that) noexcept + : ctx{ std::move(that).ctx } + , fwd{ std::move(that).fwd } + , rws_primal{ std::move(that).rws_primal } + , rws_backprop{ std::move(that).rws_backprop }{} +#line 4693 "reflect.h2" + auto autodiff_diff_code::operator=(autodiff_diff_code&& that) noexcept -> autodiff_diff_code& { + ctx = std::move(that).ctx; + fwd = std::move(that).fwd; + rws_primal = std::move(that).rws_primal; + rws_backprop = std::move(that).rws_backprop; + return *this; } + +#line 4695 "reflect.h2" + auto autodiff_diff_code::add_forward(cpp2::impl::in v) & -> void{if (CPP2_UFCS(is_forward)((*cpp2::impl::assert_not_null(ctx)))) {fwd += v;}} +#line 4696 "reflect.h2" + auto autodiff_diff_code::add_reverse_primal(cpp2::impl::in v) & -> void{if (CPP2_UFCS(is_reverse)((*cpp2::impl::assert_not_null(ctx)))) {rws_primal += v;}} +#line 4697 "reflect.h2" + auto autodiff_diff_code::add_reverse_backprop(cpp2::impl::in v) & -> void{if (CPP2_UFCS(is_reverse)((*cpp2::impl::assert_not_null(ctx)))) {rws_backprop = v + rws_backprop; }} + +#line 4699 "reflect.h2" + auto autodiff_diff_code::reset() & -> void{ + fwd = ""; + rws_primal = ""; + rws_backprop = ""; + } + + // Temporary: TODO: remove when everything has been adapted to primal, fwd, rws pushes. +#line 4706 "reflect.h2" + auto autodiff_diff_code::operator=(cpp2::impl::in v) -> autodiff_diff_code& { + ctx = CPP2_UFCS_NONLOCAL(get_self)((*cpp2::impl::assert_not_null(ctx))); + fwd = v; + rws_primal = ""; + rws_backprop = ""; + return *this; + +#line 4709 "reflect.h2" + } + + // Temporary: TODO: remove when everything has been adapted to primal, fwd, rws pushes. +#line 4712 "reflect.h2" + auto autodiff_diff_code::operator+=(cpp2::impl::in v) & -> void{ + fwd += v; + } + + // Temporary: TODO: remove when everything has been adapted to primal, fwd, rws pushes. +#line 4717 "reflect.h2" + auto autodiff_diff_code::operator+=(cpp2::impl::in v) & -> void{ + fwd += v.fwd; + } + + // Temporary: TODO: remove when everything has been adapted to primal, fwd, rws pushes. +#line 4722 "reflect.h2" + [[nodiscard]] auto autodiff_diff_code::empty() const& -> bool{ + return CPP2_UFCS(empty)(fwd); + } + +#line 4727 "reflect.h2" +// // Temporary: TODO: remove when everything has been adapted to primal, fwd, rws pushes. +// to_string: (v: autodiff_diff_code) -> std::string = { +// return v.fwd; +// } + +#line 4738 "reflect.h2" + autodiff_activity_check::autodiff_activity_check(cpp2::impl::in ctx_) + : simple_traverser{ } + , ctx{ ctx_ }{ + +#line 4740 "reflect.h2" + } + +#line 4742 "reflect.h2" + auto autodiff_activity_check::traverse(cpp2::impl::in t) -> void{ + for ( + auto const& m : CPP2_UFCS(get_members)(t) ) + { + if (CPP2_UFCS(is_object)(m) || CPP2_UFCS(is_member_object)(m)) { + pre_traverse(m); + } + + // TODO: Maybe also add functions. + } + } + +#line 4754 "reflect.h2" + auto autodiff_activity_check::traverse(cpp2::impl::in o) -> void{ + + auto type {o.type()}; + + if ("_" == type) { + if (CPP2_UFCS(has_initializer)(o)) { + pre_traverse(CPP2_UFCS(get_initializer)(o)); + } + else { + // Assume active + active = true; + } + } + else { + active |= CPP2_UFCS(is_type_active)((*cpp2::impl::assert_not_null(ctx)), cpp2::move(type)); + } + } + +#line 4772 "reflect.h2" + auto autodiff_activity_check::traverse(cpp2::impl::in primary) -> void + { + if (CPP2_UFCS(is_identifier)(primary)) { + active |= CPP2_UFCS(is_variable_active)((*cpp2::impl::assert_not_null(ctx)), CPP2_UFCS(to_string)(primary)); + } + else {if (CPP2_UFCS(is_expression_list)(primary)) { + for ( auto const& cur : CPP2_UFCS(get_expressions)(CPP2_UFCS(as_expression_list)(primary)) ) { + pre_traverse(cur); + } + } + else {if (CPP2_UFCS(is_literal)(primary)) { + // TODO: Improve check + if (CPP2_UFCS(contains)(CPP2_UFCS(to_string)(primary), ".")) { + active = true; + } + } + else {if (CPP2_UFCS(is_declaration)(primary)) { + pre_traverse(CPP2_UFCS(as_declaration)(primary)); + } + else { + CPP2_UFCS(error)(primary, "AD: Unknown primary expression kind: " + cpp2::to_string(CPP2_UFCS(to_string)(primary)) + ""); + }}}} + } + +#line 4796 "reflect.h2" + auto autodiff_activity_check::traverse(cpp2::impl::in postfix) -> void + { + auto terms {CPP2_UFCS(get_terms)(postfix)}; + + auto is_func {false}; { - ordered_impl(t, "strong_ordering"); +auto i{0}; + +#line 4803 "reflect.h2" + for ( auto const& term : terms ) { do { + if (CPP2_UFCS(get_op)(term) == ".") { + continue; + } + if (CPP2_UFCS(get_op)(term) == "(" && i + 1 == CPP2_UFCS(ssize)(terms)) {// Function operator has to be the last + is_func = true; + continue; + } + else { + CPP2_UFCS(error)(postfix, "AD: Unknown operator for postfix expression. op: " + cpp2::to_string(CPP2_UFCS(get_op)(term)) + " expr: " + cpp2::to_string(postfix) + ""); + } + } while (false); i += 1; } } -//----------------------------------------------------------------------- -// weakly_ordered - a weakly ordered type -// -#line 780 "reflect.h2" -auto weakly_ordered(meta::type_declaration& t) -> void + // TODO: Really check for members +#line 4817 "reflect.h2" + if (!(is_func) || CPP2_UFCS(ssize)(terms) != 1) { + active |= CPP2_UFCS(is_variable_active)((*cpp2::impl::assert_not_null(ctx)), CPP2_UFCS(to_string)(CPP2_UFCS(get_primary_expression)(postfix))); + } + + if (cpp2::move(is_func)) { + // Check arguments of function + for ( auto const& cur : CPP2_UFCS(get_expressions)(CPP2_UFCS(get_expression_list)(CPP2_UFCS(back)(cpp2::move(terms)))) ) { + pre_traverse(cur); + } + } + } + +#line 4835 "reflect.h2" + autodiff_handler_base::autodiff_handler_base(cpp2::impl::in ctx_) + : ctx{ ctx_ } + , diff{ ctx }{ + +#line 4838 "reflect.h2" + } +#line 4835 "reflect.h2" + auto autodiff_handler_base::operator=(cpp2::impl::in ctx_) -> autodiff_handler_base& { + ctx = ctx_; + diff = ctx; + return *this; + +#line 4838 "reflect.h2" + } + + // Temporary: TODO: remove when everything has been adapted to primal, fwd, rws pushes. +#line 4841 "reflect.h2" + auto autodiff_handler_base::append(autodiff_handler_base const& o) & -> void{ + diff.fwd += o.diff.fwd; + diff.rws_primal += o.diff.rws_primal; + diff.rws_backprop = o.diff.rws_backprop + diff.rws_backprop; + } + +#line 4858 "reflect.h2" + autodiff_expression_handler::autodiff_expression_handler(cpp2::impl::in ctx_) + : simple_traverser{ } + , autodiff_handler_base{ ctx_ }{ + +#line 4860 "reflect.h2" + } + +#line 4862 "reflect.h2" + [[nodiscard]] auto autodiff_expression_handler::add_suffix_if_not_wildcard(cpp2::impl::in lhs, cpp2::impl::in suffix) const& -> std::string{ + if ("_" == lhs) { + return lhs; + } + else { + return lhs + suffix; + } + } + +#line 4871 "reflect.h2" + [[nodiscard]] auto autodiff_expression_handler::prepare_backprop(cpp2::impl::in rhs_b, cpp2::impl::in lhs, cpp2::impl::in lhs_d, cpp2::impl::in lhs_b) const& -> std::string{ + auto r {rhs_b}; + r = string_util::replace_all(r, "_r_", lhs); + r = string_util::replace_all(r, "_rd_", lhs_d); + r = string_util::replace_all(r, "_rb_", lhs_b); + + return r; + } +#line 4879 "reflect.h2" + [[nodiscard]] auto autodiff_expression_handler::prepare_backprop(cpp2::impl::in rhs_b, cpp2::impl::in lhs) const& -> std::string { return prepare_backprop(rhs_b, lhs, lhs + (*cpp2::impl::assert_not_null(ctx)).fwd_suffix, lhs + (*cpp2::impl::assert_not_null(ctx)).rws_suffix); } + +#line 4881 "reflect.h2" + auto autodiff_expression_handler::gen_assignment(cpp2::impl::in lhs, cpp2::impl::in lhs_d, cpp2::impl::in lhs_b, cpp2::impl::in rhs, cpp2::impl::in rhs_d, cpp2::impl::in rhs_b) & -> void{ + CPP2_UFCS(add_forward)(diff, "" + cpp2::to_string(lhs_d) + " = " + cpp2::to_string(rhs_d) + ";\n"); + CPP2_UFCS(add_forward)(diff, "" + cpp2::to_string(lhs) + " = " + cpp2::to_string(rhs) + ";\n"); + + if (CPP2_UFCS(is_taylor)((*cpp2::impl::assert_not_null(ctx)))) { + CPP2_UFCS(add_reverse_primal)(diff, "" + cpp2::to_string(lhs_d) + " = " + cpp2::to_string(rhs_d) + ";\n"); + } + CPP2_UFCS(add_reverse_primal)(diff, "" + cpp2::to_string(lhs) + " = " + cpp2::to_string(rhs) + ";\n"); + CPP2_UFCS(add_reverse_backprop)(diff, "" + cpp2::to_string(lhs_b) + " = 0.0;\n"); + CPP2_UFCS(add_reverse_backprop)(diff, prepare_backprop(rhs_b, lhs, lhs_d, lhs_b)); + } +#line 4892 "reflect.h2" + [[nodiscard]] auto autodiff_expression_handler::gen_assignment(cpp2::impl::in lhs, cpp2::impl::in lhs_d, cpp2::impl::in lhs_b) & -> decltype(auto) { + return gen_assignment(lhs, lhs_d, lhs_b, primal_expr, fwd_expr, rws_expr); } +#line 4894 "reflect.h2" + [[nodiscard]] auto autodiff_expression_handler::gen_assignment(cpp2::impl::in lhs) & -> decltype(auto) { + return gen_assignment(lhs, add_suffix_if_not_wildcard(lhs, (*cpp2::impl::assert_not_null(ctx)).fwd_suffix), add_suffix_if_not_wildcard(lhs, (*cpp2::impl::assert_not_null(ctx)).rws_suffix), primal_expr, fwd_expr, rws_expr); } + +#line 4898 "reflect.h2" + auto autodiff_expression_handler::gen_declaration(cpp2::impl::in lhs, cpp2::impl::in lhs_d, cpp2::impl::in lhs_b, cpp2::impl::in rhs, cpp2::impl::in rhs_d, cpp2::impl::in rhs_b, cpp2::impl::in type, cpp2::impl::in type_d, cpp2::impl::in type_b) & -> void{ + CPP2_UFCS(add_forward)(diff, "" + cpp2::to_string(lhs_d) + ": " + cpp2::to_string(type_d) + " = " + cpp2::to_string(rhs_d) + ";\n"); + CPP2_UFCS(add_forward)(diff, "" + cpp2::to_string(lhs) + " : " + cpp2::to_string(type) + " = " + cpp2::to_string(rhs) + ";\n"); + + if (CPP2_UFCS(is_taylor)((*cpp2::impl::assert_not_null(ctx)))) { + CPP2_UFCS(add_reverse_primal)(diff, "" + cpp2::to_string(lhs_d) + ": " + cpp2::to_string(type_d) + " = " + cpp2::to_string(rhs_d) + ";\n"); + } + CPP2_UFCS(add_reverse_primal)(diff, "" + cpp2::to_string(lhs_b) + " : " + cpp2::to_string(type_b) + " = 0.0;\n"); + CPP2_UFCS(add_reverse_primal)(diff, "" + cpp2::to_string(lhs) + " : " + cpp2::to_string(type) + " = " + cpp2::to_string(rhs) + ";\n"); + CPP2_UFCS(add_reverse_backprop)(diff, "" + cpp2::to_string(lhs_b) + " = 0.0;\n"); + CPP2_UFCS(add_reverse_backprop)(diff, prepare_backprop(rhs_b, lhs, lhs_d, lhs_b)); + } +#line 4910 "reflect.h2" + [[nodiscard]] auto autodiff_expression_handler::gen_declaration(cpp2::impl::in lhs, cpp2::impl::in lhs_d, cpp2::impl::in lhs_b, cpp2::impl::in rhs, cpp2::impl::in rhs_d, cpp2::impl::in rhs_b, cpp2::impl::in type) & -> decltype(auto) { + return gen_declaration(lhs, lhs_d, lhs_b, rhs, rhs_d, rhs_b, type, CPP2_UFCS(get_fwd_ad_type)((*cpp2::impl::assert_not_null(ctx)), type), CPP2_UFCS(get_rws_ad_type)((*cpp2::impl::assert_not_null(ctx)), type)); } +#line 4912 "reflect.h2" + [[nodiscard]] auto autodiff_expression_handler::gen_declaration(cpp2::impl::in lhs, cpp2::impl::in lhs_d, cpp2::impl::in lhs_b, cpp2::impl::in type) & -> decltype(auto) { + return gen_declaration(lhs, lhs_d, lhs_b, primal_expr, fwd_expr, rws_expr, type); } +#line 4914 "reflect.h2" + [[nodiscard]] auto autodiff_expression_handler::gen_declaration(cpp2::impl::in lhs, cpp2::impl::in type) & -> decltype(auto) { + return gen_declaration(lhs, lhs + (*cpp2::impl::assert_not_null(ctx)).fwd_suffix, lhs + (*cpp2::impl::assert_not_null(ctx)).rws_suffix, type); } + + autodiff_expression_handler::primal_fwd_rws_name::primal_fwd_rws_name(auto const& primal_, auto const& fwd_, auto const& rws_, auto const& active_) + : primal{ primal_ } + , fwd{ fwd_ } + , rws{ rws_ } + , active{ active_ }{} +autodiff_expression_handler::primal_fwd_rws_name::primal_fwd_rws_name(){} + +#line 4926 "reflect.h2" + [[nodiscard]] auto autodiff_expression_handler::handle_expression_list(cpp2::impl::in list) & -> std::vector{ + std::vector args {}; + for ( auto const& expr : CPP2_UFCS(get_expressions)(list) ) { + CPP2_UFCS(push_back)(args, handle_expression_term(expr)); + } + + return args; + } + +#line 4935 "reflect.h2" + [[nodiscard]] auto autodiff_expression_handler::handle_expression_term(auto const& term) & -> primal_fwd_rws_name{ + if (CPP2_UFCS(is_identifier)(term)) { + auto primal {CPP2_UFCS(to_string)(term)}; + auto fwd {primal + (*cpp2::impl::assert_not_null(ctx)).fwd_suffix}; + auto rws {primal + (*cpp2::impl::assert_not_null(ctx)).rws_suffix}; + + auto decl {CPP2_UFCS(lookup_variable_declaration)((*cpp2::impl::assert_not_null(ctx)), primal)}; + if (decl.is_member) { + fwd = "this" + cpp2::to_string((*cpp2::impl::assert_not_null(ctx)).fwd_suffix) + "." + fwd; + rws = "this" + cpp2::to_string((*cpp2::impl::assert_not_null(ctx)).rws_suffix) + "." + rws; + } + + if (cpp2::move(decl).is_active) { + return { cpp2::move(primal), cpp2::move(fwd), cpp2::move(rws), true }; + } + else { + return { cpp2::move(primal), "", "", false }; + } + + } + else {if (CPP2_UFCS(is_expression_list)(term)) { + auto exprs {term.as_expression_list().get_expressions()}; + if (CPP2_UFCS(ssize)(exprs) != 1) { + CPP2_UFCS(error)(term, "Can not handle multiple expressions. (term.to_string())"); + return { "error", "", "", false }; + } + auto expr {CPP2_ASSERT_IN_BOUNDS_LITERAL(cpp2::move(exprs), 0)}; + auto bin_expr {expr.as_assignment_expression()}; + + if (CPP2_UFCS(terms_size)(bin_expr) != 0) { + CPP2_UFCS(error)(term, "Can not handle assign expr inside of expression. " + cpp2::to_string(CPP2_UFCS(to_string)(cpp2::move(expr))) + ""); + return { "error", "", "", false }; + } + + return handle_expression_term(CPP2_UFCS(get_term)(CPP2_UFCS(front)(CPP2_UFCS(get_terms)(cpp2::move(bin_expr))))); + } + else { + // Nothing special. A regular expression. + auto expr {term}; + + autodiff_activity_check ada {ctx}; + CPP2_UFCS(pre_traverse)(ada, expr); + + if (cpp2::move(ada).active) { + + autodiff_expression_handler ad {ctx}; + ad.pre_traverse(cpp2::move(expr)); + auto t {CPP2_UFCS(gen_temporary)((*cpp2::impl::assert_not_null(ctx)))}; + CPP2_UFCS(gen_declaration)(ad, t, "double");// TODO: get type of expression + append(cpp2::move(ad)); + + primal_fwd_rws_name r {t, t + (*cpp2::impl::assert_not_null(ctx)).fwd_suffix, t + (*cpp2::impl::assert_not_null(ctx)).rws_suffix, true}; // TODO: Check why on return (t, t + ctx*.fwd_suffix) the primal is initialized empty. Probably because of the move(t) + static_cast(cpp2::move(t)); + return r; + } + else { + return { CPP2_UFCS(to_string)(cpp2::move(expr)), "", "", false }; + } + }} + } + +#line 4996 "reflect.h2" + auto autodiff_expression_handler::handle_function_call(cpp2::impl::in postfix, cpp2::impl::in has_return) & -> void{ + auto terms {CPP2_UFCS(get_terms)(postfix)}; + + auto is_func {true}; { - ordered_impl(t, "weak_ordering"); +auto i{0}; + +#line 5002 "reflect.h2" + for ( auto const& term : terms ) { do { + if (CPP2_UFCS(get_op)(term) == ".") { + continue; + } + if (CPP2_UFCS(get_op)(term) == "(" && i + 1 == CPP2_UFCS(ssize)(terms)) {// Function operator has to be the last + continue; + } + + is_func = false; + } while (false); i += 1; } +} + + // Check for function call, everything else is not handled. +#line 5014 "reflect.h2" + if (!((cpp2::move(is_func)))) { + CPP2_UFCS(error)(postfix, "AD: Postfix expressions are only handled for function calls, or member function calls. Do not know how to handle: " + cpp2::to_string(CPP2_UFCS(to_string)(postfix)) + ""); + return ; + } + + std::string object {""}; + std::string object_d {""}; + std::string object_b {""}; + std::string function_name {""}; + std::vector args {}; + + auto primary {CPP2_UFCS(get_primary_expression)(postfix)}; + + if (1 != CPP2_UFCS(ssize)(terms)) { + object = CPP2_UFCS(to_string)(primary); + object_d = CPP2_UFCS(to_string)(primary) + (*cpp2::impl::assert_not_null(ctx)).fwd_suffix; + object_b = CPP2_UFCS(to_string)(cpp2::move(primary)) + (*cpp2::impl::assert_not_null(ctx)).rws_suffix; + } + else { + function_name = CPP2_UFCS(to_string)(cpp2::move(primary)); + } +{ +auto i{0}; + +#line 5037 "reflect.h2" + for ( auto const& term : terms ) { do { + if (CPP2_UFCS(get_op)(term) == ".") { + if (cpp2::cpp2_default.is_active() && !(CPP2_UFCS(is_id_expression)(term)) ) { cpp2::cpp2_default.report_violation(""); } + auto name {CPP2_UFCS(to_string)(CPP2_UFCS(get_id_expression)(term))}; + + if (i + 2 == CPP2_UFCS(ssize)(terms)) {// Second last term is function name, last term is function argument list + function_name = cpp2::move(name); + } + else { + object += "." + name; + object_d += "." + cpp2::move(name) + (*cpp2::impl::assert_not_null(ctx)).fwd_suffix; + } + } + else {if (CPP2_UFCS(get_op)(term) == "(") { + if (cpp2::cpp2_default.is_active() && !(CPP2_UFCS(is_expression_list)(term)) ) { cpp2::cpp2_default.report_violation(""); } + + args = handle_expression_list(CPP2_UFCS(get_expression_list)(term)); + } + else { + CPP2_UFCS(error)(postfix, "AD: Do not know how to handle postfix term: " + cpp2::to_string(CPP2_UFCS(to_string)(term)) + ""); + }} + } while (false); i += 1; } } -//----------------------------------------------------------------------- -// partially_ordered - a partially ordered type -// -#line 788 "reflect.h2" -auto partially_ordered(meta::type_declaration& t) -> void -{ - ordered_impl(t, "partial_ordering"); -} +#line 5060 "reflect.h2" + if (handle_special_function(object, object_d, object_b, function_name, args)) { + return ; + } + + if (CPP2_UFCS(contains)(object, ".")) { + CPP2_UFCS(error)(postfix, "AD: can not handle nested member function calls: " + cpp2::to_string(CPP2_UFCS(to_string)(postfix)) + ""); + return ; + } + + std::string call_primal {""}; + std::string call_fwd {""}; + std::string call_rws {""}; + + // All arguments have now been handled. Form the function call + std::string ret_temp {""}; + if (has_return) { + ret_temp = CPP2_UFCS(gen_temporary)((*cpp2::impl::assert_not_null(ctx))); + call_fwd += "" + cpp2::to_string(ret_temp) + " := "; + } + + // TODO: This is untested for functions with no return value. Requires handling of out and inout parameters in functions. + if (!(CPP2_UFCS(empty)(object))) {// Prepend object call + call_primal += "" + cpp2::to_string(object) + "."; + call_fwd += "" + cpp2::to_string(object) + "."; + call_rws += "" + cpp2::to_string(object) + "."; + } + call_primal += "" + cpp2::to_string(function_name) + "("; + call_fwd += "" + cpp2::to_string(function_name) + cpp2::to_string((*cpp2::impl::assert_not_null(ctx)).fwd_suffix) + "("; + call_rws += "" + cpp2::to_string(function_name) + cpp2::to_string((*cpp2::impl::assert_not_null(ctx)).rws_suffix) + "("; + if (!(CPP2_UFCS(empty)(object))) {// Add this_d argument. + call_fwd += "" + cpp2::to_string(cpp2::move(object_d)) + ", "; + call_rws += "" + cpp2::to_string(cpp2::move(object_b)) + ", "; + } + for ( auto const& arg : cpp2::move(args) ) { + // TODO: Add taylor reverse handling. + call_primal += "" + cpp2::to_string(arg.primal) + ", "; + call_fwd += "" + cpp2::to_string(arg.primal) + ", "; + call_rws += "" + cpp2::to_string(arg.primal) + ", "; + if (arg.active) { + call_fwd += "" + cpp2::to_string(arg.fwd) + ", "; + call_rws += "" + cpp2::to_string(arg.rws) + ", "; + } + } + + if (has_return) { + std::vector functions {}; + if (!(CPP2_UFCS(empty)(object))) { + auto obj_decl {CPP2_UFCS(lookup_variable_declaration)((*cpp2::impl::assert_not_null(ctx)), object)}; + auto obj_decl_types {CPP2_UFCS(lookup_type_declaration)((*cpp2::impl::assert_not_null(ctx)), obj_decl.decl)}; + + if (CPP2_UFCS(empty)(obj_decl_types)) { + CPP2_UFCS(error)(postfix, "AD: Could not find type declaration for `" + cpp2::to_string(cpp2::move(object)) + " with type " + cpp2::to_string(cpp2::move(obj_decl).decl) + "`.\n" + " If cpp2 object: this is an alpha limitation, please declare it befor the current declaration.\n" + " If cpp function: please add a special handling for this member function."); + return ; + } + functions = CPP2_UFCS(lookup_member_function_declaration)((*cpp2::impl::assert_not_null(ctx)), CPP2_ASSERT_IN_BOUNDS_LITERAL(obj_decl_types, 0), cpp2::move(function_name)); + + CPP2_UFCS(add_for_differentiation)((*cpp2::impl::assert_not_null(ctx)), CPP2_ASSERT_IN_BOUNDS_LITERAL(cpp2::move(obj_decl_types), 0));// TODO: Add more fine grained differentiation. + } + else { + functions = CPP2_UFCS(lookup_function_declaration)((*cpp2::impl::assert_not_null(ctx)), function_name); + if (CPP2_UFCS(ssize)(functions) == 0) { + CPP2_UFCS(error)(postfix, "AD: Could not find function declaration for `" + cpp2::to_string(cpp2::move(function_name)) + "`.\n" + " If cpp2 function: this is an alpha limitation, please declare it befor the current declaration.\n" + " If cpp function: please add a special handling for this function."); + return ; + } + else {if (CPP2_UFCS(ssize)(functions) != 1) { + CPP2_UFCS(error)(postfix, "AD: No handling for overload resultion is currently implemented."); + return ; + }} + + CPP2_UFCS(add_for_differentiation)((*cpp2::impl::assert_not_null(ctx)), CPP2_ASSERT_IN_BOUNDS_LITERAL(functions, 0)); + } + + std::string ret_name {"r"}; // Default for regular return. + auto returns {CPP2_UFCS(get_returns)(CPP2_ASSERT_IN_BOUNDS_LITERAL(cpp2::move(functions), 0))}; + if (!(CPP2_UFCS(empty)(returns))) { + if (CPP2_UFCS(ssize)(returns) != 1) { + CPP2_UFCS(error)(postfix, "AD: Expecting single return."); + } + + for ( auto const& cur : cpp2::move(returns) ) { + ret_name = CPP2_UFCS(name)(CPP2_UFCS(get_declaration)(cur)); + } + } -#line 794 "reflect.h2" -//----------------------------------------------------------------------- -// -// "A value is ... a regular type. It must have all public -// default construction, copy/move construction/assignment, -// and destruction, all of which are generated by default -// if not user-written; and it must not have any protected -// or virtual functions (including the destructor)." -// -// -- P0707R4, section 3 -// -//----------------------------------------------------------------------- -// -// copyable -// -// A type with (copy and move) x (construction and assignment) -// -#line 810 "reflect.h2" -auto copyable(meta::type_declaration& t) -> void -{ - // If the user explicitly wrote any of the copy/move functions, - // they must also have written the most general one - we can't - // assume we can safely generate it for them since they've opted - // into customized semantics - auto smfs {CPP2_UFCS(query_declared_value_set_functions)(t)}; - if ( !(smfs.out_this_in_that) - && ( - smfs.out_this_move_that - || smfs.inout_this_in_that - || smfs.inout_this_move_that)) + std::string ret_name_d {ret_name + (*cpp2::impl::assert_not_null(ctx)).fwd_suffix}; + std::string ret_name_b {cpp2::move(ret_name) + (*cpp2::impl::assert_not_null(ctx)).rws_suffix}; - { - CPP2_UFCS(error)(t, - "this type is partially copyable/movable - when you provide " - "any of the more-specific operator= signatures, you must also provide " - "the one with the general signature (out this, that); alternatively, " - "consider removing all the operator= functions and let them all be " - "generated for you with default memberwise semantics" - ); - } - else {if (!(cpp2::move(smfs).out_this_in_that)) { - CPP2_UFCS(add_member)(t, "operator=: (out this, that) = { }"); - }} -} + call_rws += "_rb_, "; -//----------------------------------------------------------------------- -// -// hashable -// -// A memberwise hashable type -// -#line 843 "reflect.h2" -auto hashable(meta::type_declaration& t) -> void -{ - CPP2_UFCS(require)(t, !(CPP2_UFCS(empty)(CPP2_UFCS(get_member_objects)(t))), - "a hashable type must have at least one data member"); + call_primal += ")"; + call_fwd += ");\n"; + call_rws += ");\n"; - std::string hash {" hash: (this) -> size_t = {\n" - " ret: size_t = 0;"}; + CPP2_UFCS(add_forward)(diff, cpp2::move(call_fwd)); - for ( - auto const& o : CPP2_UFCS(get_member_objects)(t) ) - { - cpp2::impl::deferred_init o_hash; - if (CPP2_UFCS(name)(o) == "this") { - o_hash.construct("" + cpp2::to_string(CPP2_UFCS(type)(o)) + "::hash()"); + primal_expr = cpp2::move(call_primal); + fwd_expr = "" + cpp2::to_string(cpp2::move(ret_temp)) + "." + cpp2::to_string(cpp2::move(ret_name_d)) + ""; + rws_expr = "_ = " + cpp2::to_string(cpp2::move(call_rws)) + ""; } else { - o_hash.construct("std::hash<" + cpp2::to_string(CPP2_UFCS(type)(o)) + ">()(" + cpp2::to_string(CPP2_UFCS(name)(o)) + ")"); + call_primal += ");\n"; + call_fwd += ");\n"; + call_rws += ");\n"; + + CPP2_UFCS(add_forward)(diff, cpp2::move(call_fwd)); + CPP2_UFCS(add_reverse_primal)(diff, cpp2::move(call_primal)); + CPP2_UFCS(add_reverse_backprop)(diff, cpp2::move(call_rws)); } - hash += "\n cpp2::hash_combine( ret, " + cpp2::to_string(cpp2::move(o_hash.value())) + " );"; + // TODO: Add function to list of functions/objects for differentiation for the no return case. } - CPP2_UFCS(add_member)(t, cpp2::move(hash) + "\n return ret;\n }"); -} +#line 5176 "reflect.h2" + [[nodiscard]] auto autodiff_expression_handler::handle_special_function(cpp2::impl::in object, cpp2::impl::in object_d, cpp2::impl::in object_b, cpp2::impl::in function_name, cpp2::impl::in> args) & -> bool{ -#line 869 "reflect.h2" -//----------------------------------------------------------------------- -// -// basic_value -// -// A regular type: copyable, plus has public default construction -// and no protected or virtual functions -// -#line 876 "reflect.h2" -auto basic_value(meta::type_declaration& t) -> void + auto r {CPP2_UFCS(lookup_special_function_handling)((*cpp2::impl::assert_not_null(ctx)), function_name, cpp2::unchecked_narrow(CPP2_UFCS(ssize)(args)), !(CPP2_UFCS(empty)(object)))}; + + if (!(r.m)) { + return false; // No match + } + + // Have a match, do the replacement + std::string code_primal {r.code_primal}; + std::string code_fwd {r.code_fwd}; + std::string code_rws {cpp2::move(r).code_rws}; + + if (!(CPP2_UFCS(empty)(object))) { + code_primal = string_util::replace_all(code_primal, "_o_", object); + code_primal = string_util::replace_all(code_primal, "_od_", object_d); + + code_fwd = string_util::replace_all(code_fwd, "_o_", object); + code_fwd = string_util::replace_all(code_fwd, "_od_", object_d); + + code_rws = string_util::replace_all(code_fwd, "_o_", object); + code_rws = string_util::replace_all(code_rws, "_od_", object_d); + code_rws = string_util::replace_all(code_fwd, "_ob_", object_b); + } { - CPP2_UFCS(copyable)(t); +auto i{1}; - auto has_default_ctor {false}; - for ( auto& mf : CPP2_UFCS(get_member_functions)(t) ) { - has_default_ctor |= CPP2_UFCS(is_default_constructor)(mf); - CPP2_UFCS(require)(mf, !(CPP2_UFCS(is_protected)(mf)) && !(CPP2_UFCS(is_virtual)(mf)), - "a value type may not have a protected or virtual function"); - CPP2_UFCS(require)(mf, !(CPP2_UFCS(is_destructor)(mf)) || CPP2_UFCS(is_public)(mf) || CPP2_UFCS(is_default_access)(mf), - "a value type may not have a non-public destructor"); +#line 5202 "reflect.h2" + for ( auto const& arg : args ) { + code_primal = string_util::replace_all(code_primal, "_a" + cpp2::to_string(i) + "_", arg.primal); + code_primal = string_util::replace_all(code_primal, "_ad" + cpp2::to_string(i) + "_", arg.fwd); + + code_fwd = string_util::replace_all(code_fwd, "_a" + cpp2::to_string(i) + "_", arg.primal); + code_fwd = string_util::replace_all(code_fwd, "_ad" + cpp2::to_string(i) + "_", arg.fwd); + + code_rws = string_util::replace_all(code_rws, "_a" + cpp2::to_string(i) + "_", arg.primal); + code_rws = string_util::replace_all(code_rws, "_ad" + cpp2::to_string(i) + "_", arg.fwd); + code_rws = string_util::replace_all(code_rws, "_ab" + cpp2::to_string(i) + "_", arg.rws); + } +} + +#line 5214 "reflect.h2" + primal_expr = cpp2::move(code_primal); + fwd_expr = cpp2::move(code_fwd); + rws_expr = cpp2::move(code_rws); + + return true; } - if (!(cpp2::move(has_default_ctor))) { - CPP2_UFCS(add_member)(t, "operator=: (out this) = { }"); +#line 5221 "reflect.h2" + auto autodiff_expression_handler::traverse(cpp2::impl::in expr) -> void{ + base::traverse(expr); } -} -//----------------------------------------------------------------------- -// -// "A 'value' is a totally ordered basic_value..." -// -// -- P0707R4, section 3 -// -// value - a value type that is totally ordered -// -// Note: the ordering that should be encouraged as default gets the nice name -// -#line 904 "reflect.h2" -auto value(meta::type_declaration& t) -> void -{ - CPP2_UFCS(ordered)(t); - CPP2_UFCS(basic_value)(t); -} +#line 5225 "reflect.h2" + auto autodiff_expression_handler::traverse(cpp2::impl::in binexpr) -> void{ + CPP2_UFCS(error)(binexpr, "AD: Assign expressions are not yet handled."); + } -#line 910 "reflect.h2" -auto weakly_ordered_value(meta::type_declaration& t) -> void -{ - CPP2_UFCS(weakly_ordered)(t); - CPP2_UFCS(basic_value)(t); -} +#line 5229 "reflect.h2" + auto autodiff_expression_handler::traverse(cpp2::impl::in binexpr) -> void{ + CPP2_UFCS(error)(binexpr, "AD: Logical or expressions are not yet handled."); + } -#line 916 "reflect.h2" -auto partially_ordered_value(meta::type_declaration& t) -> void -{ - CPP2_UFCS(partially_ordered)(t); - CPP2_UFCS(basic_value)(t); -} +#line 5233 "reflect.h2" + auto autodiff_expression_handler::traverse(cpp2::impl::in binexpr) -> void{ + CPP2_UFCS(error)(binexpr, "AD: Logical and expressions are not yet handled."); + } -#line 923 "reflect.h2" -//----------------------------------------------------------------------- -// -// C.20: If you can avoid defining default operations, do -// -// ##### Reason -// -// It's the simplest and gives the cleanest semantics. -// -// ... -// -// This is known as "the rule of zero". -// -// -- C++ Core Guidelines -// C.20: If you can avoid defining any default operations, do -// -// -//----------------------------------------------------------------------- -// -// cpp1_rule_of_zero -// -// a type without declared copy/move/destructor functions -// -#line 945 "reflect.h2" -auto cpp1_rule_of_zero(meta::type_declaration& t) -> void -{ - for ( auto& mf : CPP2_UFCS(get_member_functions)(t) ) - { - CPP2_UFCS(require)(t, !(CPP2_UFCS(is_constructor_with_that)(mf)) - && !(CPP2_UFCS(is_assignment_with_that)(mf)) - && !(CPP2_UFCS(is_destructor)(mf)), - "the rule of zero requires no copy/move/destructor functions"); +#line 5237 "reflect.h2" + auto autodiff_expression_handler::traverse(cpp2::impl::in binexpr) -> void{ + CPP2_UFCS(error)(binexpr, "AD: Bit or expressions are not yet handled."); } - CPP2_UFCS(disable_member_function_generation)(t); -} -//----------------------------------------------------------------------- -// -// "By definition, a `struct` is a `class` in which members -// are by default `public`; that is, -// -// struct s { ... -// -// is simply shorthand for -// -// class s { public: ... -// -// ... Which style you use depends on circumstances and taste. -// I usually prefer to use `struct` for classes that have all -// data `public`." -// -// -- Stroustrup (The C++ Programming Language, 3rd ed., p. 234) -// -//----------------------------------------------------------------------- -// -// struct -// -// a type with only public bases, objects, and functions, -// no virtual functions, and no user-defined constructors -// (i.e., no invariants) or assignment or destructors. -// -// For GCC 10 compatibility, optionally allow passing struct -// that generates a memberwise constructor with a generic deduced -// parameters instead of concrete forwarding parameters (mainly used -// for cppfront internal use, so cppfront builds under GCC 10) -// -#line 987 "reflect.h2" -auto cpp2_struct(meta::type_declaration& t) -> void -{ - std::string ctor_params {}; - std::string ctor_inits {}; +#line 5241 "reflect.h2" + auto autodiff_expression_handler::traverse(cpp2::impl::in binexpr) -> void{ + CPP2_UFCS(error)(binexpr, "AD: Bit xor expressions are not yet handled."); + } - auto found_member_without_initializer {false}; +#line 5245 "reflect.h2" + auto autodiff_expression_handler::traverse(cpp2::impl::in binexpr) -> void{ + CPP2_UFCS(error)(binexpr, "AD: Bit and expressions are not yet handled."); + } - for ( auto& m : CPP2_UFCS(get_members)(t) ) - { - CPP2_UFCS(require)(m, CPP2_UFCS(make_public)(m), - "all struct members must be public"); - if (CPP2_UFCS(is_function)(m)) { - auto mf {CPP2_UFCS(as_function)(m)}; - CPP2_UFCS(require)(t, !(CPP2_UFCS(is_virtual)(mf)), - "a struct may not have a virtual function"); - CPP2_UFCS(require)(t, !(CPP2_UFCS(has_name)(cpp2::move(mf), "operator=")), - "a struct may not have a user-defined operator="); +#line 5249 "reflect.h2" + auto autodiff_expression_handler::traverse(cpp2::impl::in binexpr) -> void{ + CPP2_UFCS(error)(binexpr, "AD: Equality or expressions are not yet handled."); + } + +#line 5253 "reflect.h2" + auto autodiff_expression_handler::traverse(cpp2::impl::in binexpr) -> void{ + CPP2_UFCS(error)(binexpr, "AD: Relational expressions are not yet handled."); + } + +#line 5257 "reflect.h2" + auto autodiff_expression_handler::traverse(cpp2::impl::in binexpr) -> void{ + CPP2_UFCS(error)(binexpr, "AD: Compare or expressions are not yet handled."); + } + +#line 5261 "reflect.h2" + auto autodiff_expression_handler::traverse(cpp2::impl::in binexpr) -> void{ + CPP2_UFCS(error)(binexpr, "AD: Shift or expressions are not yet handled."); + } + +#line 5265 "reflect.h2" + auto autodiff_expression_handler::traverse(cpp2::impl::in binexpr) -> void{ + auto terms {CPP2_UFCS(get_terms)(binexpr)}; + + auto first {true}; + auto first_fwd {true}; + std::string op {"+"}; + std::string fwd {""}; + std::string rws {""}; + std::string primal {""}; + for ( auto const& term : cpp2::move(terms) ) { + if (!(first)) { + op = CPP2_UFCS(to_string)(CPP2_UFCS(get_op)(term)); + primal += " " + cpp2::to_string(op) + " "; + } + + auto var {handle_expression_term(CPP2_UFCS(get_term)(term))}; + if (var.active) { + if (first_fwd) { + if (op == "-") {// Special handling for first fwd termn with minus + fwd += "-" + cpp2::to_string(var.fwd) + ""; + } + else { // Special handling for first fwd term with plus + fwd += var.fwd; + } + } + else { + fwd += "" + cpp2::to_string(op) + " " + cpp2::to_string(var.fwd) + ""; + } + rws += "" + cpp2::to_string(var.rws) + " " + cpp2::to_string(op) + "= _rb_;\n"; + + first_fwd = false; + } + primal += cpp2::move(var).primal; + + first = false; } - else {if (CPP2_UFCS(is_object)(m)) { - auto mo {CPP2_UFCS(as_object)(m)}; - if (CPP2_UFCS(name)(mo) != "this") { - if (CPP2_UFCS(get_argument)(t, 0) == "noforward") { - ctor_params += "" + cpp2::to_string(CPP2_UFCS(name)(mo)) + "_, "; + + primal_expr = cpp2::move(primal); + fwd_expr = cpp2::move(fwd); + rws_expr = cpp2::move(rws); + } + +#line 5307 "reflect.h2" + auto autodiff_expression_handler::traverse(cpp2::impl::in binexpr) -> void{ + auto terms {CPP2_UFCS(get_terms)(binexpr)}; + + auto var_a {handle_expression_term(CPP2_UFCS(get_term)(CPP2_ASSERT_IN_BOUNDS_LITERAL(terms, 0)))}; + + int i {1}; + for( ; cpp2::impl::cmp_less(i,CPP2_UFCS(ssize)(terms)); i += 1 ) { + auto var_b {handle_expression_term(CPP2_UFCS(get_term)(CPP2_ASSERT_IN_BOUNDS(terms, i)))}; + + auto op {CPP2_UFCS(to_string)(CPP2_UFCS(get_op)(CPP2_ASSERT_IN_BOUNDS(terms, i)))}; + + std::string fwd {""}; + std::string rws {""}; + std::string primal {""}; + + if ("*" == op) { + if (CPP2_UFCS(is_taylor)((*cpp2::impl::assert_not_null(ctx)))) { + // TODO: Add taylor overloads + fwd = "" + cpp2::to_string(var_a.fwd) + "..mul(" + cpp2::to_string(var_b.fwd) + ", " + cpp2::to_string(var_a.primal) + ", " + cpp2::to_string(var_b.primal) + ")"; + if (var_a.active) { + //fwd += "(var_b.primal)$ * (var_a.fwd)$"; + rws += "" + cpp2::to_string(var_a.rws) + " += " + cpp2::to_string(var_b.fwd) + "..mul(_rb_, " + cpp2::to_string(var_b.primal) + ", _r_);\n"; + } + if (var_b.active) { + //if !fwd.empty() { fwd += " + "; } + //fwd += "(var_a.primal)$ * (var_b.fwd)$"; + rws += "" + cpp2::to_string(var_b.rws) + " += " + cpp2::to_string(var_a.fwd) + "..mul(_rb_, " + cpp2::to_string(var_a.primal) + ", _r_);\n"; + } + } + else { + if (var_a.active) { + fwd += "" + cpp2::to_string(var_b.primal) + " * " + cpp2::to_string(var_a.fwd) + ""; + rws += "" + cpp2::to_string(var_a.rws) + " += " + cpp2::to_string(var_b.primal) + " * _rb_;\n"; + } + if (var_b.active) { + if (!(CPP2_UFCS(empty)(fwd))) {fwd += " + "; } + fwd += "" + cpp2::to_string(var_a.primal) + " * " + cpp2::to_string(var_b.fwd) + ""; + rws += "" + cpp2::to_string(var_b.rws) + " += " + cpp2::to_string(var_a.primal) + " * _rb_;\n"; + } + } + primal = "" + cpp2::to_string(var_a.primal) + " * " + cpp2::to_string(var_b.primal) + ""; + } + else {if ("/" == op) { + if (CPP2_UFCS(is_taylor)((*cpp2::impl::assert_not_null(ctx)))) { + // TODO: Add taylor overloads + fwd = "" + cpp2::to_string(var_a.fwd) + ".div(" + cpp2::to_string(var_b.fwd) + ", " + cpp2::to_string(var_a.primal) + ", " + cpp2::to_string(var_b.primal) + ")"; + if (var_a.active) { + rws += "" + cpp2::to_string(var_a.rws) + " += _rb_.div(" + cpp2::to_string(var_b.fwd) + ", _r_, " + cpp2::to_string(var_b.primal) + ");\n"; + } + if (var_b.active) { + rws += "" + cpp2::to_string(var_b.rws) + " -= " + cpp2::to_string(var_a.fwd) + ".mul(_rb_, " + cpp2::to_string(var_a.primal) + ", _r_).div(" + cpp2::to_string(var_b.fwd) + ".mul(" + cpp2::to_string(var_b.fwd) + ", " + cpp2::to_string(var_b.primal) + ", " + cpp2::to_string(var_b.primal) + "), " + cpp2::to_string(var_a.primal) + " * _r_, " + cpp2::to_string(var_b.primal) + " * " + cpp2::to_string(var_b.primal) + ");\n"; + } } else { - ctor_params += "forward " + cpp2::to_string(CPP2_UFCS(name)(mo)) + "_ : " + cpp2::to_string(CPP2_UFCS(type)(mo)) + ", "; + if (var_a.active) { + fwd += "" + cpp2::to_string(var_a.fwd) + " / " + cpp2::to_string(var_b.primal) + ""; + rws = "" + cpp2::to_string(var_a.rws) + " += _rb_ / " + cpp2::to_string(var_b.primal) + ";\n"; + } + if (var_b.active) { + if (!(CPP2_UFCS(empty)(fwd))) {fwd += " + "; } + fwd += "-" + cpp2::to_string(var_a.primal) + " * " + cpp2::to_string(var_b.fwd) + " / (" + cpp2::to_string(var_b.primal) + " * " + cpp2::to_string(var_b.primal) + ")"; + rws += "" + cpp2::to_string(var_b.rws) + " -= " + cpp2::to_string(var_a.primal) + " * _rb_ / (" + cpp2::to_string(var_b.primal) + " * " + cpp2::to_string(var_b.primal) + ");\n"; + } } - ctor_inits += "" + cpp2::to_string(CPP2_UFCS(name)(mo)) + " = " + cpp2::to_string(CPP2_UFCS(name)(mo)) + "_; "; + primal = "" + cpp2::to_string(var_a.primal) + " / " + cpp2::to_string(var_b.primal) + ""; } else { - ctor_inits += "" + cpp2::to_string(CPP2_UFCS(type)(mo)) + " = (" + cpp2::to_string(CPP2_UFCS(initializer)(mo)) + "); "; + CPP2_UFCS(error)(binexpr, "unkown multiplicative operator '" + cpp2::to_string(cpp2::move(op)) + "'"); + }} + +#line 5378 "reflect.h2" + if (i + 1 == CPP2_UFCS(ssize)(terms)) { + primal_expr = cpp2::move(primal); + fwd_expr = cpp2::move(fwd); + rws_expr = cpp2::move(rws); } - found_member_without_initializer |= !(CPP2_UFCS(has_initializer)(cpp2::move(mo))); - }} + else { + // Temporary + var_a.primal = CPP2_UFCS(gen_temporary)((*cpp2::impl::assert_not_null(ctx))); + var_a.fwd = var_a.primal + (*cpp2::impl::assert_not_null(ctx)).fwd_suffix; + var_a.rws = var_a.primal + (*cpp2::impl::assert_not_null(ctx)).rws_suffix; + var_a.active = var_a.active | cpp2::move(var_b).active; + gen_declaration(var_a.primal, var_a.fwd, var_a.rws, primal, cpp2::move(fwd), cpp2::move(rws), "", "", ""); + } + } } - CPP2_UFCS(cpp1_rule_of_zero)(t); - // If we found any data members - if (!(CPP2_UFCS(empty)(ctor_params))) +#line 5394 "reflect.h2" + auto autodiff_expression_handler::traverse(cpp2::impl::in isas) -> void{ + CPP2_UFCS(error)(isas, "AD: Is as expressions are not yet handled."); + } + +#line 5398 "reflect.h2" + auto autodiff_expression_handler::traverse(cpp2::impl::in prefix) -> void { - // Then to enable construction from corresponding values - // requires a constructor... an exception to the rule of zero - CPP2_UFCS(add_member)(t, " operator=: (implicit out this, " + cpp2::to_string(cpp2::move(ctor_params)) + ") = { " + cpp2::to_string(cpp2::move(ctor_inits)) + " }"); + auto ops {CPP2_UFCS(get_ops)(prefix)}; - // And if all members had initializers, we need a default constructor - if (!(cpp2::move(found_member_without_initializer))) { - CPP2_UFCS(add_member)(t, " operator=: (implicit out this) = { }"); + if (CPP2_UFCS(ssize)(ops) != 1) { + CPP2_UFCS(error)(prefix, "AD: Can only handle one prefix operation. Expression is: " + cpp2::to_string(CPP2_UFCS(to_string)(prefix)) + ""); } + + autodiff_expression_handler ad {ctx}; + CPP2_UFCS(pre_traverse)(ad, CPP2_UFCS(get_postfix_expression)(prefix)); + append(ad); + + primal_expr = CPP2_ASSERT_IN_BOUNDS_LITERAL(ops, 0) + ad.primal_expr; + fwd_expr = CPP2_ASSERT_IN_BOUNDS_LITERAL(cpp2::move(ops), 0) + cpp2::move(ad).fwd_expr; } + +#line 5414 "reflect.h2" + auto autodiff_expression_handler::traverse(cpp2::impl::in postfix) -> void + { + auto terms {CPP2_UFCS(get_terms)(postfix)}; + + auto is_func {false}; +{ +auto i{0}; + +#line 5421 "reflect.h2" + for ( auto const& term : terms ) { do { + if (CPP2_UFCS(get_op)(term) == ".") { + continue; + } + if (CPP2_UFCS(get_op)(term) == "(" && i + 1 == CPP2_UFCS(ssize)(terms)) {// Function operator has to be the last + is_func = true; + continue; + } + else { + CPP2_UFCS(error)(postfix, "AD: Unknown operator for postfix expression. op: " + cpp2::to_string(CPP2_UFCS(get_op)(term)) + " expr: " + cpp2::to_string(postfix) + ""); + } + } while (false); i += 1; } } -value_member_info::value_member_info(auto const& name_, auto const& type_, auto const& value_) - : name{ name_ } - , type{ type_ } - , value{ value_ }{} +#line 5434 "reflect.h2" + if (cpp2::move(is_func)) { + handle_function_call(postfix, true); + } + else { + // Member access -#line 1039 "reflect.h2" -//----------------------------------------------------------------------- -// -// "C enumerations constitute a curiously half-baked concept. ... -// the cleanest way out was to deem each enumeration a separate type." -// -// -- Stroustrup (The Design and Evolution of C++, 11.7) -// -// "An enumeration is a distinct type ... with named constants" -// -// -- ISO C++ Standard -// -//----------------------------------------------------------------------- -// -// basic_enum -// -// a type together with named constants that are its possible values -// + auto primary {CPP2_UFCS(get_primary_expression)(postfix)}; + std::string obj_access {CPP2_UFCS(to_string)(cpp2::move(primary))}; + std::string obj_access_d {obj_access + (*cpp2::impl::assert_not_null(ctx)).fwd_suffix}; -#line 1062 "reflect.h2" -auto basic_enum( - meta::type_declaration& t, - auto const& nextval, - cpp2::impl::in bitwise - ) -> void -{ - std::vector enumerators {}; - cpp2::i64 min_value {}; - cpp2::i64 max_value {}; - cpp2::impl::deferred_init underlying_type; + for ( auto const& term : cpp2::move(terms) ) { + obj_access += CPP2_UFCS(get_op)(term) + CPP2_UFCS(to_string)(CPP2_UFCS(get_id_expression)(term)); + obj_access_d += CPP2_UFCS(get_op)(term) + CPP2_UFCS(to_string)(CPP2_UFCS(get_id_expression)(term)) + (*cpp2::impl::assert_not_null(ctx)).fwd_suffix; + } - CPP2_UFCS(reserve_names)(t, "operator=", "operator<=>"); - if (bitwise) { - CPP2_UFCS(reserve_names)(t, "has", "set", "clear", "to_string", "get_raw_value", "none"); + primal_expr = cpp2::move(obj_access); + fwd_expr = cpp2::move(obj_access_d); + } } - // 1. Gather: The names of all the user-written members, and find/compute the type +#line 5454 "reflect.h2" + auto autodiff_expression_handler::traverse(cpp2::impl::in primary) -> void + { + if (CPP2_UFCS(is_identifier)(primary)) { + primal_expr = CPP2_UFCS(to_string)(primary); + fwd_expr = add_suffix_if_not_wildcard(primal_expr, (*cpp2::impl::assert_not_null(ctx)).fwd_suffix); + rws_expr = add_suffix_if_not_wildcard(primal_expr, (*cpp2::impl::assert_not_null(ctx)).rws_suffix); + + auto decl {CPP2_UFCS(lookup_variable_declaration)((*cpp2::impl::assert_not_null(ctx)), primal_expr)}; + if (cpp2::move(decl).is_member) { + fwd_expr = "this" + cpp2::to_string((*cpp2::impl::assert_not_null(ctx)).fwd_suffix) + "." + fwd_expr; + rws_expr = "this" + cpp2::to_string((*cpp2::impl::assert_not_null(ctx)).rws_suffix) + "." + rws_expr; + } + } + else {if (CPP2_UFCS(is_expression_list)(primary)) { + if (CPP2_UFCS(is_empty)(CPP2_UFCS(as_expression_list)(primary))) { + primal_expr = "()"; + fwd_expr = "()"; + rws_expr = "()"; // TODO: Check for reverse + } + else { + CPP2_UFCS(error)(primary, "AD: Do not know how to handle non empty expression list inside of primary_expression: " + cpp2::to_string(CPP2_UFCS(to_string)(primary)) + ""); + } + } + else {if (CPP2_UFCS(is_literal)(primary)) { + primal_expr = CPP2_UFCS(to_string)(primary); + fwd_expr = "()"; + rws_expr = "()"; // TODO: Check for reverse + } + else {if (CPP2_UFCS(is_declaration)(primary)) { + CPP2_UFCS(error)(primary, "AD: Do not know how to handle declaration inside of primary_expression: " + cpp2::to_string(CPP2_UFCS(to_string)(primary)) + ""); + } + else { + CPP2_UFCS(error)(primary, "AD: Unknown primary expression kind: " + cpp2::to_string(CPP2_UFCS(to_string)(primary)) + ""); + }}}} + } - underlying_type.construct(CPP2_UFCS(get_argument)(t, 0));// use the first template argument, if there was one +#line 5504 "reflect.h2" + autodiff_stmt_handler::autodiff_stmt_handler(cpp2::impl::in ctx_, cpp2::impl::in mf_) + : simple_traverser{ } + , autodiff_handler_base{ ctx_ } + , mf{ mf_ }{ - auto found_non_numeric {false}; -{ -std::string value{"-1"}; +#line 5507 "reflect.h2" + } -#line 1085 "reflect.h2" - for ( - auto const& m : CPP2_UFCS(get_members)(t) ) - if ( CPP2_UFCS(is_member_object)(m)) - { - CPP2_UFCS(require)(m, CPP2_UFCS(is_public)(m) || CPP2_UFCS(is_default_access)(m), - "an enumerator cannot be protected or private"); +#line 5509 "reflect.h2" + [[nodiscard]] auto autodiff_stmt_handler::handle_stmt_parameters(cpp2::impl::in> params) & -> autodiff_diff_code{ + autodiff_diff_code r {ctx}; + if (CPP2_UFCS(empty)(params)) { + return r; + } - auto mo {CPP2_UFCS(as_object)(m)}; - if (!(CPP2_UFCS(has_wildcard_type)(mo))) { - CPP2_UFCS(error)(mo, - "an explicit underlying type should be specified as a compile-time argument " - "to the metafunction - try 'enum' or 'flag_enum'" - ); + for ( auto const& param : params ) { + std::string name {CPP2_UFCS(name)(CPP2_UFCS(get_declaration)(param))}; + std::string type {CPP2_UFCS(type)(CPP2_UFCS(get_declaration)(param))}; + + auto fwd_pass_style {to_string_view(CPP2_UFCS(get_passing_style)(param))}; + + autodiff_activity_check ada {ctx}; + CPP2_UFCS(pre_traverse)(ada, param); + + std::string init {""}; + std::string init_d {""}; + // TODO: Add handling for reverse expressions + + if (CPP2_UFCS(has_initializer)(CPP2_UFCS(get_declaration)(param))) { + autodiff_expression_handler ad {ctx}; + CPP2_UFCS(pre_traverse)(ad, CPP2_UFCS(get_initializer)(CPP2_UFCS(get_declaration)(param))); + init = " = " + cpp2::to_string(ad.primal_expr) + ""; + + if (ada.active) { + init_d = " = " + cpp2::to_string(cpp2::move(ad).fwd_expr) + ""; + } + } + +#line 5539 "reflect.h2" + CPP2_UFCS(add_forward)(r, "" + cpp2::to_string(fwd_pass_style) + " " + cpp2::to_string(name) + " : " + cpp2::to_string(type) + cpp2::to_string(init) + ", "); + CPP2_UFCS(add_reverse_primal)(r, "" + cpp2::to_string(fwd_pass_style) + " " + cpp2::to_string(name) + " : " + cpp2::to_string(type) + cpp2::to_string(cpp2::move(init)) + ", "); + if (ada.active) { + CPP2_UFCS(add_forward)(r, "" + cpp2::to_string(cpp2::move(fwd_pass_style)) + " " + cpp2::to_string(name) + cpp2::to_string((*cpp2::impl::assert_not_null(ctx)).fwd_suffix) + " : " + cpp2::to_string(CPP2_UFCS(get_fwd_ad_type)((*cpp2::impl::assert_not_null(ctx)), type)) + cpp2::to_string(cpp2::move(init_d)) + ", "); + } + + CPP2_UFCS(add_variable_declaration)((*cpp2::impl::assert_not_null(ctx)), cpp2::move(name), cpp2::move(type), cpp2::move(ada).active); } - auto init {CPP2_UFCS(initializer)(mo)}; + return r; + } - auto is_default_or_numeric {is_empty_or_a_decimal_number(init)}; - found_non_numeric |= !(CPP2_UFCS(empty)(init)) && !(is_default_or_numeric); - CPP2_UFCS(require)(m, !(cpp2::move(is_default_or_numeric)) || !(found_non_numeric) || CPP2_UFCS(has_name)(mo, "none"), - "" + cpp2::to_string(CPP2_UFCS(name)(mo)) + ": enumerators with non-numeric values must come after all default and numeric values"); +#line 5551 "reflect.h2" + auto autodiff_stmt_handler::traverse(cpp2::impl::in decl) -> void{ + base::traverse(decl); + } - nextval(value, cpp2::move(init)); +#line 5556 "reflect.h2" + auto autodiff_stmt_handler::traverse(cpp2::impl::in f) -> void{ + CPP2_UFCS(error)(f, "AD: Do not know how to handle function_declaration: " + cpp2::to_string(CPP2_UFCS(to_string)(f)) + ""); + } - auto v {std::strtoll(&CPP2_ASSERT_IN_BOUNDS_LITERAL(value, 0), nullptr, 10)}; // for non-numeric values we'll just get 0 which is okay for now - if (cpp2::impl::cmp_less(v,min_value)) { - min_value = v; +#line 5561 "reflect.h2" + auto autodiff_stmt_handler::traverse(cpp2::impl::in o) -> void{ + std::string lhs {CPP2_UFCS(name)(o)}; + auto type {o.type()}; + + auto active {false}; + if ("_" != type) { + active = CPP2_UFCS(is_type_active)((*cpp2::impl::assert_not_null(ctx)), type); } - if (cpp2::impl::cmp_greater(v,max_value)) { - max_value = cpp2::move(v); + else { + if (cpp2::cpp2_default.is_active() && !(CPP2_UFCS(has_initializer)(o)) ) { cpp2::cpp2_default.report_violation(""); } + + autodiff_activity_check ada {ctx}; + CPP2_UFCS(pre_traverse)(ada, CPP2_UFCS(get_initializer)(o)); + active = cpp2::move(ada).active; } - // Adding local variable 'e' to work around a Clang warning - value_member_info e {cpp2::impl::as_(CPP2_UFCS(name)(mo)), "", value}; - CPP2_UFCS(push_back)(enumerators, cpp2::move(e)); + if (active) { - CPP2_UFCS(mark_for_removal_from_enclosing_type)(mo); - static_cast(cpp2::move(mo)); + auto fwd_ad_type {CPP2_UFCS(get_fwd_ad_type)((*cpp2::impl::assert_not_null(ctx)), type)}; + auto rws_ad_type {CPP2_UFCS(get_rws_ad_type)((*cpp2::impl::assert_not_null(ctx)), type)}; + + std::string prim_init {""}; + std::string fwd_init {""}; + std::string rws_init {""}; + + if (CPP2_UFCS(has_initializer)(o)) { + autodiff_expression_handler ad {ctx}; + CPP2_UFCS(pre_traverse)(ad, CPP2_UFCS(get_initializer)(o)); + append(ad); + + prim_init = " = " + ad.primal_expr; + fwd_init = " = " + ad.fwd_expr; + rws_init = " = ()"; // TODO: Proper initialization. + + if (ad.rws_expr != "()") { + CPP2_UFCS(add_reverse_backprop)(diff, CPP2_UFCS(prepare_backprop)(ad, ad.rws_expr, lhs)); + } + + if (type == "_" && cpp2::move(ad).fwd_expr == "()") { + // Special handling for auto initialization from a literal. + fwd_init = " = " + CPP2_UFCS(get_fwd_ad_type)((*cpp2::impl::assert_not_null(ctx)), "double") + "()"; + } + } + + CPP2_UFCS(add_forward)(diff, "" + cpp2::to_string(lhs) + cpp2::to_string((*cpp2::impl::assert_not_null(ctx)).fwd_suffix) + " : " + cpp2::to_string(cpp2::move(fwd_ad_type)) + cpp2::to_string(cpp2::move(fwd_init)) + ";\n"); + CPP2_UFCS(add_forward)(diff, "" + cpp2::to_string(lhs) + " : " + cpp2::to_string(type) + cpp2::to_string(prim_init) + ";\n"); + + CPP2_UFCS(add_reverse_primal)(diff, "" + cpp2::to_string(lhs) + cpp2::to_string((*cpp2::impl::assert_not_null(ctx)).rws_suffix) + " : " + cpp2::to_string(cpp2::move(rws_ad_type)) + cpp2::to_string(cpp2::move(rws_init)) + ";\n"); + CPP2_UFCS(add_reverse_primal)(diff, "" + cpp2::to_string(lhs) + " : " + cpp2::to_string(type) + cpp2::to_string(cpp2::move(prim_init)) + ";\n"); + } + else { + diff += "" + cpp2::to_string(lhs) + ": " + cpp2::to_string(type) + ""; + if (CPP2_UFCS(has_initializer)(o)) { + diff += " = " + cpp2::to_string(CPP2_UFCS(to_string)(CPP2_UFCS(get_initializer)(o))) + ""; + } + diff += ";\n"; + } + + CPP2_UFCS(add_variable_declaration)((*cpp2::impl::assert_not_null(ctx)), cpp2::move(lhs), cpp2::move(type), cpp2::move(active)); } -} -#line 1125 "reflect.h2" - if ((CPP2_UFCS(empty)(enumerators))) { - CPP2_UFCS(error)(t, "an enumeration must contain at least one enumerator value"); - return ; +#line 5623 "reflect.h2" + auto autodiff_stmt_handler::traverse(cpp2::impl::in t) -> void{ + CPP2_UFCS(error)(t, "AD: Do not know how to handle type_declaration: " + cpp2::to_string(CPP2_UFCS(to_string)(t)) + ""); } - // Compute the default underlying type, if it wasn't explicitly specified - if (underlying_type.value() == "") - { - CPP2_UFCS(require)(t, !(cpp2::move(found_non_numeric)), - "if you write an enumerator with a non-numeric-literal value, " - "you must specify the enumeration's underlying type" - ); +#line 5628 "reflect.h2" + auto autodiff_stmt_handler::traverse(cpp2::impl::in t) -> void{ + CPP2_UFCS(error)(t, "AD: Do not know how to handle parameter_declaration: " + cpp2::to_string(CPP2_UFCS(to_string)(t)) + ""); + } - if (!(bitwise)) { - if (cpp2::impl::cmp_greater_eq(min_value,std::numeric_limits::min()) && cpp2::impl::cmp_less_eq(max_value,std::numeric_limits::max())) { - underlying_type.value() = "i8"; +#line 5633 "reflect.h2" + auto autodiff_stmt_handler::traverse(cpp2::impl::in stmt) -> void{ + // TODO: Remove this hack when statements like compound_statement can access their root statement. + last_params = CPP2_UFCS(get_parameters)(stmt); + base::traverse(stmt); + } + +#line 5640 "reflect.h2" + auto autodiff_stmt_handler::traverse(cpp2::impl::in stmt) -> void{ + autodiff_stmt_handler ad {ctx, mf}; + autodiff_stmt_handler ad_push_pop {ctx, mf}; + ad_push_pop.overwrite_push_pop = true; + + CPP2_UFCS(add_forward)(diff, "{\n"); + CPP2_UFCS(add_reverse_primal)(diff, "{\n"); + CPP2_UFCS(add_reverse_backprop)(diff, "}\n"); + + for ( auto const& cur : CPP2_UFCS(get_statements)(stmt) ) { + CPP2_UFCS(pre_traverse)(ad, cur); + CPP2_UFCS(pre_traverse)(ad_push_pop, cur); + } + + for ( auto const& cur : ad.overwritten ) { + auto r {CPP2_UFCS(lookup_variable_declaration)((*cpp2::impl::assert_not_null(ctx)), cur)}; + CPP2_UFCS(add_reverse_primal)(diff, "cpp2::ad_stack::push<" + cpp2::to_string(cpp2::move(r).decl) + ">(" + cpp2::to_string(cur) + ");"); + } + + CPP2_UFCS(add_forward)(diff, ad.diff.fwd); + CPP2_UFCS(add_reverse_primal)(diff, ad.diff.rws_primal); + CPP2_UFCS(add_reverse_backprop)(diff, ad_push_pop.diff.rws_backprop); + CPP2_UFCS(add_reverse_backprop)(diff, cpp2::move(ad_push_pop).diff.rws_primal); + + for ( auto const& cur : cpp2::move(ad).overwritten ) { + auto r {CPP2_UFCS(lookup_variable_declaration)((*cpp2::impl::assert_not_null(ctx)), cur)}; + CPP2_UFCS(add_reverse_backprop)(diff, "" + cpp2::to_string(cur) + " = cpp2::ad_stack::pop<" + cpp2::to_string(cpp2::move(r).decl) + ">();"); + } + + CPP2_UFCS(add_forward)(diff, "}\n"); + CPP2_UFCS(add_reverse_primal)(diff, "}\n"); + CPP2_UFCS(add_reverse_backprop)(diff, "{\n"); + } + +#line 5675 "reflect.h2" + auto autodiff_stmt_handler::traverse(cpp2::impl::in stmt) -> void{ + if (CPP2_UFCS(has_expression)(stmt)) { + // Return with expression. + // TODO: Remove assumptions + // - Return expression is always active. (Look this up in mf or so.) + // - Return was converted to a two parameter return with the name r. + autodiff_expression_handler ad {ctx}; + ad.pre_traverse(CPP2_UFCS(get_expression)(stmt)); + CPP2_UFCS(gen_assignment)(ad, "r"); + append(cpp2::move(ad)); + } + else { + diff += "return;\n"; + } + } + +#line 5691 "reflect.h2" + [[nodiscard]] auto autodiff_stmt_handler::reverse_next(cpp2::impl::in expr) const& -> std::string{ + if (CPP2_UFCS(contains)(expr, "+=")) { + return string_util::replace_all(expr, "+=", "-="); + } + else {if (CPP2_UFCS(contains)(expr, "-=")) { + return string_util::replace_all(expr, "-=", "+="); + }} + + CPP2_UFCS(error)(mf, "AD: Do not know how to reverse: " + cpp2::to_string(expr) + ""); + + return "Error"; + + } + +#line 5706 "reflect.h2" + auto autodiff_stmt_handler::traverse(cpp2::impl::in stmt) -> void{ + auto diff_params {handle_stmt_parameters(last_params)}; + + if (CPP2_UFCS(is_reverse)((*cpp2::impl::assert_not_null(ctx))) && (CPP2_UFCS(is_while)(stmt) || CPP2_UFCS(is_do)(stmt))) { + CPP2_UFCS(error)(stmt, "AD: Alpha limitiation now reverse mode for while or do while."); + } + + if (CPP2_UFCS(is_while)(stmt)) { + if (!(CPP2_UFCS(empty)(last_params))) { + CPP2_UFCS(add_forward)(diff, "(" + cpp2::move(diff_params).fwd + ")"); } - else {if (cpp2::impl::cmp_greater_eq(min_value,std::numeric_limits::min()) && cpp2::impl::cmp_less_eq(max_value,std::numeric_limits::max())) { - underlying_type.value() = "i16"; + // TODO: Assumption is here that nothing is in the condition + diff += "while " + cpp2::to_string(CPP2_UFCS(to_string)(CPP2_UFCS(get_do_while_condition)(stmt))) + " "; + if (CPP2_UFCS(has_next)(stmt)) { + // TODO: Assumption is here that nothing is in the next expression + diff += "next " + cpp2::to_string(CPP2_UFCS(to_string)(CPP2_UFCS(get_next_expression)(stmt))) + " "; } - else {if (cpp2::impl::cmp_greater_eq(min_value,std::numeric_limits::min()) && cpp2::impl::cmp_less_eq(max_value,std::numeric_limits::max())) { - underlying_type.value() = "i32"; + + pre_traverse(CPP2_UFCS(get_do_while_body)(stmt)); + } + else {if (CPP2_UFCS(is_do)(stmt)) { + if (!(CPP2_UFCS(empty)(last_params))) { + CPP2_UFCS(add_forward)(diff, "(" + cpp2::move(diff_params).fwd + ")"); } - else {if (cpp2::impl::cmp_greater_eq(cpp2::move(min_value),std::numeric_limits::min()) && cpp2::impl::cmp_less_eq(cpp2::move(max_value),std::numeric_limits::max())) { - underlying_type.value() = "i64"; + + // TODO: Assumption is here that nothing is in the condition + diff += "do "; + pre_traverse(CPP2_UFCS(get_do_while_body)(stmt)); + + if (CPP2_UFCS(has_next)(stmt)) { + // TODO: Assumption is here that nothing is in the next expression + diff += "next " + cpp2::to_string(CPP2_UFCS(to_string)(CPP2_UFCS(get_next_expression)(stmt))) + " "; } - else { - CPP2_UFCS(error)(t, - "values are outside the range representable by the " - "largest supported underlying signed type (i64)" - ); - }}}} + diff += "while " + cpp2::to_string(CPP2_UFCS(to_string)(CPP2_UFCS(get_do_while_condition)(stmt))) + ";"; } else { - auto umax {cpp2::move(max_value) * cpp2::impl::as_()}; - if (cpp2::impl::cmp_less_eq(umax,std::numeric_limits::max())) { - underlying_type.value() = "u8"; + if (cpp2::cpp2_default.is_active() && !(CPP2_UFCS(is_for)(stmt)) ) { cpp2::cpp2_default.report_violation(""); } + // No zip view available in cpp 20 do a piggy back for range + + // TODO: Assumption that this is just an id expression. + auto range {CPP2_UFCS(to_string)(CPP2_UFCS(get_for_range)(stmt))}; + + auto param {CPP2_UFCS(get_for_parameter)(stmt)}; + auto param_style {to_string_view(CPP2_UFCS(get_passing_style)(param))}; + auto param_decl {CPP2_UFCS(get_declaration)(cpp2::move(param))}; + + std::string rws {"("}; + std::string rws_restore {""}; + CPP2_UFCS(add_forward)(diff, "(");// Open statment parameter scope. If the loop has parameters, they are alrady handled and the brace is left open. + CPP2_UFCS(add_reverse_primal)(diff, "{\n"); + if (!(CPP2_UFCS(empty)(last_params))) { + for ( auto const& cur : last_params ) { + if (CPP2_UFCS(has_initializer)(CPP2_UFCS(get_declaration)(cur))) { + // TODO: Handle no type and no initializer. Handle passing style. + CPP2_UFCS(add_reverse_primal)(diff, "" + cpp2::to_string(CPP2_UFCS(name)(CPP2_UFCS(get_declaration)(cur))) + ": " + cpp2::to_string(CPP2_UFCS(type)(CPP2_UFCS(get_declaration)(cur))) + " = " + cpp2::to_string(CPP2_UFCS(to_string)(CPP2_UFCS(get_initializer)(CPP2_UFCS(get_declaration)(cur)))) + ";\n"); + rws_restore += "cpp2::ad_stack::push<" + cpp2::to_string(CPP2_UFCS(type)(CPP2_UFCS(get_declaration)(cur))) + ">(" + cpp2::to_string(CPP2_UFCS(name)(CPP2_UFCS(get_declaration)(cur))) + ");\n"; + rws += "" + cpp2::to_string(to_string_view(CPP2_UFCS(get_passing_style)(cur))) + " " + cpp2::to_string(CPP2_UFCS(name)(CPP2_UFCS(get_declaration)(cur))) + ": " + cpp2::to_string(CPP2_UFCS(type)(CPP2_UFCS(get_declaration)(cur))) + " = cpp2::ad_stack::pop<" + cpp2::to_string(CPP2_UFCS(type)(CPP2_UFCS(get_declaration)(cur))) + ">(), "; + } + } + CPP2_UFCS(add_forward)(diff, cpp2::move(diff_params).fwd); } - else {if (cpp2::impl::cmp_less_eq(umax,std::numeric_limits::max())) { - underlying_type.value() = "u16"; + CPP2_UFCS(add_forward)(diff, "copy " + cpp2::to_string(CPP2_UFCS(name)(param_decl)) + cpp2::to_string((*cpp2::impl::assert_not_null(ctx)).fwd_suffix) + "_iter := " + cpp2::to_string(range) + cpp2::to_string((*cpp2::impl::assert_not_null(ctx)).fwd_suffix) + ".begin())\n"); + CPP2_UFCS(add_forward)(diff, "for " + cpp2::to_string(range) + " next ("); + + rws += "copy " + cpp2::to_string(CPP2_UFCS(name)(param_decl)) + cpp2::to_string((*cpp2::impl::assert_not_null(ctx)).rws_suffix) + "_iter := " + cpp2::to_string(range) + cpp2::to_string((*cpp2::impl::assert_not_null(ctx)).rws_suffix) + ".rbegin())\n"; + rws += "for std::ranges::reverse_view(" + cpp2::to_string(range) + ") next ("; + CPP2_UFCS(add_reverse_primal)(diff, "for " + cpp2::to_string(cpp2::move(range)) + " next ("); + if (CPP2_UFCS(has_next)(stmt)) { + // TODO: Assumption is here that nothing is in the next expression + CPP2_UFCS(add_forward)(diff, "" + cpp2::to_string(CPP2_UFCS(to_string)(CPP2_UFCS(get_next_expression)(stmt))) + ", "); + CPP2_UFCS(add_reverse_primal)(diff, "" + cpp2::to_string(CPP2_UFCS(to_string)(CPP2_UFCS(get_next_expression)(stmt))) + ", "); + rws += "" + cpp2::to_string(reverse_next(CPP2_UFCS(to_string)(CPP2_UFCS(get_next_expression)(stmt)))) + ", "; } - else {if (cpp2::impl::cmp_less_eq(cpp2::move(umax),std::numeric_limits::max())) { - underlying_type.value() = "u32"; + CPP2_UFCS(add_forward)(diff, "" + cpp2::to_string(CPP2_UFCS(name)(param_decl)) + cpp2::to_string((*cpp2::impl::assert_not_null(ctx)).fwd_suffix) + "_iter++"); + CPP2_UFCS(add_forward)(diff, ") do (" + cpp2::to_string(param_style) + " " + cpp2::to_string(CPP2_UFCS(name)(param_decl)) + ": " + cpp2::to_string(CPP2_UFCS(type)(param_decl)) + ") {\n"); + rws += "" + cpp2::to_string(CPP2_UFCS(name)(param_decl)) + cpp2::to_string((*cpp2::impl::assert_not_null(ctx)).rws_suffix) + "_iter++"; + rws += ") do (" + cpp2::to_string(param_style) + " " + cpp2::to_string(CPP2_UFCS(name)(param_decl)) + ": " + cpp2::to_string(CPP2_UFCS(type)(param_decl)) + ") {\n"; + rws += "(inout " + cpp2::to_string(CPP2_UFCS(name)(param_decl)) + cpp2::to_string((*cpp2::impl::assert_not_null(ctx)).rws_suffix) + " := " + cpp2::to_string(CPP2_UFCS(name)(param_decl)) + cpp2::to_string((*cpp2::impl::assert_not_null(ctx)).rws_suffix) + "_iter*)\n"; + + CPP2_UFCS(add_reverse_primal)(diff, ") do (" + cpp2::to_string(param_style) + " " + cpp2::to_string(CPP2_UFCS(name)(param_decl)) + ": " + cpp2::to_string(CPP2_UFCS(type)(param_decl)) + ")"); + CPP2_UFCS(add_forward)(diff, "(" + cpp2::to_string(cpp2::move(param_style)) + " " + cpp2::to_string(CPP2_UFCS(name)(param_decl)) + cpp2::to_string((*cpp2::impl::assert_not_null(ctx)).fwd_suffix) + ": " + cpp2::to_string(CPP2_UFCS(type)(param_decl)) + " = " + cpp2::to_string(CPP2_UFCS(name)(param_decl)) + cpp2::to_string((*cpp2::impl::assert_not_null(ctx)).fwd_suffix) + "_iter*)"); + + CPP2_UFCS(add_variable_declaration)((*cpp2::impl::assert_not_null(ctx)), "" + cpp2::to_string(CPP2_UFCS(name)(param_decl)) + "", "" + cpp2::to_string(CPP2_UFCS(type)(param_decl)) + "", true);// TODO: Handle loop/compound context variable declarations. + CPP2_UFCS(add_reverse_backprop)(diff, "}\n"); + + pre_traverse(CPP2_UFCS(get_for_body)(stmt)); + CPP2_UFCS(add_forward)(diff, "}\n"); + + if (CPP2_UFCS(has_next)(stmt)) { + CPP2_UFCS(add_reverse_primal)(diff, "" + cpp2::to_string(reverse_next(CPP2_UFCS(to_string)(CPP2_UFCS(get_next_expression)(stmt)))) + ";\n"); + } + CPP2_UFCS(add_reverse_primal)(diff, cpp2::move(rws_restore)); + CPP2_UFCS(add_reverse_primal)(diff, "}\n"); + CPP2_UFCS(add_reverse_backprop)(diff, cpp2::move(rws)); + }} + } + +#line 5804 "reflect.h2" + auto autodiff_stmt_handler::traverse(cpp2::impl::in stmt) -> void{ + // TODO: Currently assuming that nothing bad happens in the condition + diff += "if " + cpp2::to_string(CPP2_UFCS(to_string)(CPP2_UFCS(get_expression)(stmt))) + ""; + pre_traverse(CPP2_UFCS(get_true_branch)(stmt)); + + if (CPP2_UFCS(has_false_branch)(stmt)) { + diff += "else "; + pre_traverse(CPP2_UFCS(get_false_branch)(stmt)); + } + } + +#line 5815 "reflect.h2" + auto autodiff_stmt_handler::traverse(cpp2::impl::in expr) -> void{ + base::traverse(expr); + } + +#line 5819 "reflect.h2" + auto autodiff_stmt_handler::traverse(cpp2::impl::in binexpr) -> void{ + autodiff_activity_check ada {ctx}; + CPP2_UFCS(pre_traverse)(ada, CPP2_UFCS(get_lhs_postfix_expression)(binexpr)); + if ("_" == CPP2_UFCS(to_string)(CPP2_UFCS(get_lhs_postfix_expression)(binexpr))) { + CPP2_UFCS(pre_traverse)(ada, CPP2_UFCS(get_term)(CPP2_ASSERT_IN_BOUNDS_LITERAL(CPP2_UFCS(get_terms)(binexpr), 1))); + } + + if (cpp2::move(ada).active) { + autodiff_expression_handler h_lhs {ctx}; + CPP2_UFCS(pre_traverse)(h_lhs, CPP2_UFCS(get_lhs_postfix_expression)(binexpr)); + + // Cpp2 doesn't allow chained assignment, so rhs must be a single logical_or_expression + auto assignment_terms {CPP2_UFCS(get_terms)(binexpr)}; + + autodiff_expression_handler h {ctx}; + CPP2_UFCS(pre_traverse)(h, CPP2_UFCS(get_term)(CPP2_ASSERT_IN_BOUNDS_LITERAL(cpp2::move(assignment_terms), 1))); + + auto is_overwrite {CPP2_UFCS(contains)(h.primal_expr, h_lhs.primal_expr)}; + if (overwrite_push_pop && is_overwrite) { + auto r {CPP2_UFCS(lookup_variable_declaration)((*cpp2::impl::assert_not_null(ctx)), h_lhs.primal_expr)}; + CPP2_UFCS(add_reverse_primal)(diff, "cpp2::ad_stack::push<" + cpp2::to_string(cpp2::move(r).decl) + ">(" + cpp2::to_string(h_lhs.primal_expr) + ");"); + } + + if (is_overwrite && CPP2_UFCS(is_reverse)((*cpp2::impl::assert_not_null(ctx)))) { + auto t_b {CPP2_UFCS(gen_temporary)((*cpp2::impl::assert_not_null(ctx))) + (*cpp2::impl::assert_not_null(ctx)).rws_suffix}; + CPP2_UFCS(gen_assignment)(h, h_lhs.primal_expr, h_lhs.fwd_expr, t_b); + append(cpp2::move(h)); + CPP2_UFCS(add_reverse_backprop)(diff, "" + cpp2::to_string(h_lhs.rws_expr) + " = 0.0;\n"); + CPP2_UFCS(add_reverse_backprop)(diff, "" + cpp2::to_string(cpp2::move(t_b)) + " := " + cpp2::to_string(h_lhs.rws_expr) + ";\n"); } else { - underlying_type.value() = "u64"; - }}} + CPP2_UFCS(gen_assignment)(h, h_lhs.primal_expr, h_lhs.fwd_expr, h_lhs.rws_expr); + append(cpp2::move(h)); + } + + if (overwrite_push_pop && is_overwrite) { + auto r {CPP2_UFCS(lookup_variable_declaration)((*cpp2::impl::assert_not_null(ctx)), h_lhs.primal_expr)}; + CPP2_UFCS(add_reverse_backprop)(diff, "" + cpp2::to_string(h_lhs.primal_expr) + " = cpp2::ad_stack::pop<" + cpp2::to_string(cpp2::move(r).decl) + ">();"); + } + + // Simple overwrite check + if (cpp2::move(is_overwrite)) { + CPP2_UFCS(push_back)(overwritten, cpp2::move(h_lhs).primal_expr); + } + } + else { + CPP2_UFCS(add_forward)(diff, CPP2_UFCS(to_string)(binexpr) + ";\n"); + CPP2_UFCS(add_reverse_primal)(diff, CPP2_UFCS(to_string)(binexpr) + ";\n"); } } -#line 1176 "reflect.h2" - // 2. Replace: Erase the contents and replace with modified contents - // - // Note that most values and functions are declared as '==' compile-time values, i.e. Cpp1 'constexpr' +#line 5870 "reflect.h2" + auto autodiff_stmt_handler::traverse(cpp2::impl::in binexpr) -> void{ + CPP2_UFCS(error)(binexpr, "AD: Logical or expressions are not yet handled as standalone statements."); + } + +#line 5874 "reflect.h2" + auto autodiff_stmt_handler::traverse(cpp2::impl::in binexpr) -> void{ + CPP2_UFCS(error)(binexpr, "AD: Logical and expressions are not yet handled as standalone statements."); + } + +#line 5878 "reflect.h2" + auto autodiff_stmt_handler::traverse(cpp2::impl::in binexpr) -> void{ + CPP2_UFCS(error)(binexpr, "AD: Bit or expressions are not yet handled as standalone statements."); + } - CPP2_UFCS(remove_marked_members)(t); +#line 5882 "reflect.h2" + auto autodiff_stmt_handler::traverse(cpp2::impl::in binexpr) -> void{ + CPP2_UFCS(error)(binexpr, "AD: Bit xor expressions are not yet handled as standalone statements."); + } - // Generate the 'none' value if appropriate, and use that or - // else the first enumerator as the default-constructed value - auto default_value {CPP2_ASSERT_IN_BOUNDS_LITERAL(enumerators, 0).name}; - if (bitwise) { - default_value = "none"; - value_member_info e {"none", "", "0"}; - CPP2_UFCS(push_back)(enumerators, cpp2::move(e)); +#line 5886 "reflect.h2" + auto autodiff_stmt_handler::traverse(cpp2::impl::in binexpr) -> void{ + CPP2_UFCS(error)(binexpr, "AD: Bit and expressions are not yet handled as standalone statements."); } - // Generate all the private implementation - CPP2_UFCS(add_member)(t, " _value : " + cpp2::to_string(underlying_type.value()) + ";"); - CPP2_UFCS(add_member)(t, " private operator= : (implicit out this, _val: i64) == " - "_value = cpp2::unchecked_narrow<" + cpp2::to_string(underlying_type.value()) + ">(_val);"); +#line 5890 "reflect.h2" + auto autodiff_stmt_handler::traverse(cpp2::impl::in binexpr) -> void{ + CPP2_UFCS(error)(binexpr, "AD: Equality or expressions are not yet handled as standalone statements."); + } - // Generate the bitwise operations - if (bitwise) { - CPP2_UFCS(add_member)(t, " operator|=: ( inout this, that ) == _value |= that._value;"); - CPP2_UFCS(add_member)(t, " operator&=: ( inout this, that ) == _value &= that._value;"); - CPP2_UFCS(add_member)(t, " operator^=: ( inout this, that ) == _value ^= that._value;"); - CPP2_UFCS(add_member)(t, " operator| : ( this, that ) -> " + cpp2::to_string(CPP2_UFCS(name)(t)) + " == _value | that._value;"); - CPP2_UFCS(add_member)(t, " operator& : ( this, that ) -> " + cpp2::to_string(CPP2_UFCS(name)(t)) + " == _value & that._value;"); - CPP2_UFCS(add_member)(t, " operator^ : ( this, that ) -> " + cpp2::to_string(CPP2_UFCS(name)(t)) + " == _value ^ that._value;"); - CPP2_UFCS(add_member)(t, " has : ( this, that ) -> bool == _value & that._value;"); - CPP2_UFCS(add_member)(t, " set : ( inout this, that ) == { _value |= that._value; }"); - CPP2_UFCS(add_member)(t, " clear : ( inout this, that ) == { _value &= that._value~; }"); +#line 5894 "reflect.h2" + auto autodiff_stmt_handler::traverse(cpp2::impl::in binexpr) -> void{ + CPP2_UFCS(error)(binexpr, "AD: Relational expressions are not yet handled as standalone statements."); } - // Add the enumerators - for ( auto const& e : enumerators ) { - CPP2_UFCS(add_member)(t, " " + cpp2::to_string(e.name) + " : " + cpp2::to_string(CPP2_UFCS(name)(t)) + " == " + cpp2::to_string(e.value) + ";"); +#line 5898 "reflect.h2" + auto autodiff_stmt_handler::traverse(cpp2::impl::in binexpr) -> void{ + CPP2_UFCS(error)(binexpr, "AD: Compare or expressions are not yet handled as standalone statements."); } - // Generate the common functions - CPP2_UFCS(add_member)(t, " get_raw_value : (this) -> " + cpp2::to_string(cpp2::move(underlying_type.value())) + " == _value;"); - CPP2_UFCS(add_member)(t, " operator= : (out this) == { _value = " + cpp2::to_string(default_value) + "._value; }"); - CPP2_UFCS(add_member)(t, " operator= : (out this, that) == { }"); - CPP2_UFCS(add_member)(t, " operator<=> : (this, that) -> std::strong_ordering;"); -{ -std::string to_string_impl{" to_string_impl: (this, prefix: std::string_view"}; +#line 5902 "reflect.h2" + auto autodiff_stmt_handler::traverse(cpp2::impl::in binexpr) -> void{ + CPP2_UFCS(error)(binexpr, "AD: Shift or expressions are not yet handled as standalone statements."); + } - // Provide 'to_string' and 'to_code' functions to print enumerator - // name(s) as human-readable strings or as code expressions +#line 5906 "reflect.h2" + auto autodiff_stmt_handler::traverse(cpp2::impl::in binexpr) -> void{ + CPP2_UFCS(error)(binexpr, "AD: Additive expressions are not yet handled as standalone statements."); + } -#line 1223 "reflect.h2" +#line 5910 "reflect.h2" + auto autodiff_stmt_handler::traverse(cpp2::impl::in binexpr) -> void{ + CPP2_UFCS(error)(binexpr, "AD: Multiplicative expressions are not yet handled as standalone statements."); + } + +#line 5914 "reflect.h2" + auto autodiff_stmt_handler::traverse(cpp2::impl::in isas) -> void{ + CPP2_UFCS(error)(isas, "AD: Is as expressions are not yet handled as standalone statements."); + } + +#line 5918 "reflect.h2" + auto autodiff_stmt_handler::traverse(cpp2::impl::in prefix) -> void { - if (bitwise) { - to_string_impl += ", separator: std::string_view ) -> std::string = { \n" - " ret : std::string = \"(\";\n" - " sep : std::string = ();\n" - " if this == none { return \"(none)\"; }\n"; - } - else { - to_string_impl += ") -> std::string = { \n"; - } + CPP2_UFCS(error)(prefix, "AD: Prefix expressions are not yet handled as standalone statements."); + } - to_string_impl += " pref := cpp2::to_string(prefix);\n"; +#line 5923 "reflect.h2" + auto autodiff_stmt_handler::traverse(cpp2::impl::in postfix) -> void + { + auto terms {CPP2_UFCS(get_terms)(postfix)}; - for ( - auto const& e : enumerators ) { - if (e.name != "_") {// ignore unnamed values - if (bitwise) { - if (e.name != "none") { - to_string_impl += " if (this & " + cpp2::to_string(e.name) + ") == " + cpp2::to_string(e.name) + " { " - "ret += sep + pref + \"" + cpp2::to_string(e.name) + "\"; sep = separator; " - "}\n"; - } - } - else { - to_string_impl += " if this == " + cpp2::to_string(e.name) + " { return pref + \"" + cpp2::to_string(e.name) + "\"; }\n"; - } + auto is_func {false}; +{ +auto i{0}; + +#line 5930 "reflect.h2" + for ( auto const& term : terms ) { do { + if (CPP2_UFCS(get_op)(term) == ".") { + continue; } - } + if (CPP2_UFCS(get_op)(term) == "(" && i + 1 == CPP2_UFCS(ssize)(terms)) {// Function operator has to be the last + is_func = true; + continue; + }else { + CPP2_UFCS(error)(postfix, "AD: Unknown operator for standalone postfix expression. op: " + cpp2::to_string(CPP2_UFCS(get_op)(term)) + " expr: " + cpp2::to_string(postfix) + ""); + } + } while (false); i += 1; } +} - if (bitwise) { - to_string_impl += " return ret+\")\";\n}\n"; - } - else { - to_string_impl += " return \"invalid " + cpp2::to_string(CPP2_UFCS(name)(t)) + " value\";\n}\n"; + // Check for function call, everything else is not handled. +#line 5943 "reflect.h2" + if (!((cpp2::move(is_func)))) { + CPP2_UFCS(error)(postfix, "AD: Postfix expressions are only handled for function calls, or member function calls. Do not know how to handle: " + cpp2::to_string(CPP2_UFCS(to_string)(postfix)) + ""); + return ; } - CPP2_UFCS(add_member)(t, cpp2::move(to_string_impl)); + autodiff_expression_handler ad {ctx}; + CPP2_UFCS(handle_function_call)(ad, postfix, false); + ad.diff += ad.fwd_expr + "\n"; + ad.diff += ad.primal_expr + "\n"; + append(cpp2::move(ad)); } -} -#line 1262 "reflect.h2" - if (bitwise) { - CPP2_UFCS(add_member)(t, " to_string: (this) -> std::string = to_string_impl( \"\", \", \" );"); - CPP2_UFCS(add_member)(t, " to_code : (this) -> std::string = to_string_impl( \"" + cpp2::to_string(CPP2_UFCS(name)(t)) + "::\", \" | \" );"); +#line 5955 "reflect.h2" + auto autodiff_stmt_handler::traverse(cpp2::impl::in primary) -> void + { + CPP2_UFCS(error)(primary, "AD: Primary expressions are not yet handled as standalone statements."); } - else { - CPP2_UFCS(add_member)(t, " to_string: (this) -> std::string = to_string_impl( \"\" );"); - CPP2_UFCS(add_member)(t, " to_code : (this) -> std::string = to_string_impl( \"" + cpp2::to_string(CPP2_UFCS(name)(t)) + "::\" );"); + +#line 5972 "reflect.h2" + autodiff_declaration_handler::autodiff_declaration_handler(cpp2::impl::in ctx_, cpp2::impl::in decl_) + : simple_traverser{ } + , autodiff_handler_base{ ctx_ } + , decl{ decl_ }{ + +#line 5975 "reflect.h2" } -{ -std::string from_string{" from_string: (s: std::string_view) -> " + cpp2::to_string(CPP2_UFCS(name)(t)) + " = { \n"}; - // Provide a 'from_string' function to parse strings into enumerators +#line 5977 "reflect.h2" + auto autodiff_declaration_handler::traverse(cpp2::impl::in decl_) -> void{ + base::traverse(decl_); + } -#line 1273 "reflect.h2" - { - std::string_view prefix {""}; - std::string_view combine_op {"return"}; +#line 5982 "reflect.h2" + auto autodiff_declaration_handler::traverse(cpp2::impl::in f) -> void{ + CPP2_UFCS(enter_function)((*cpp2::impl::assert_not_null(ctx))); - // For flags, accept a list that we break apart and then |= together - if (bitwise) - { - prefix = "flag_"; - combine_op = "ret |="; + // TODO: Add activity for member functions - from_string += " ret := none;\n" - " outer: do {\n" - " for cpp2::string_util::split_string_list(s) do (x) {\n"; - } - // Otherwise, accept just a single string - else { - from_string += " x := s;\n"; - } -{ -std::string_view else_{""}; + CPP2_UFCS(add_forward)(diff, " " + cpp2::to_string(CPP2_UFCS(name)(f)) + cpp2::to_string((*cpp2::impl::assert_not_null(ctx)).fwd_suffix) + ": ("); + CPP2_UFCS(add_reverse_primal)(diff, " " + cpp2::to_string(CPP2_UFCS(name)(f)) + cpp2::to_string((*cpp2::impl::assert_not_null(ctx)).rws_suffix) + ": ("); -#line 1293 "reflect.h2" - for ( - auto const& e : cpp2::move(enumerators) ) { - from_string += " " + cpp2::to_string(else_) + "if \"" + cpp2::to_string(e.name) + "\" == x { " + cpp2::to_string(combine_op) + " " + cpp2::to_string(e.name) + "; }\n"; - else_ = "else "; - } -} + // 1. Generate the modified signature + // a) Parameters -#line 1299 "reflect.h2" - if (bitwise) { - from_string += " else { break outer; }\n" - " }\n" - " return ret;\n" - " } while false;\n"; - } + for ( auto const& param : CPP2_UFCS(get_parameters)(f) ) { + std::string name {CPP2_UFCS(name)(CPP2_UFCS(get_declaration)(param))}; - from_string += " cpp2::type_safety.report_violation( (\"can't convert string '\" + cpp2::to_string(s) + \"' to " + cpp2::to_string(cpp2::move(prefix)) + "enum of type " + cpp2::to_string(CPP2_UFCS(name)(t)) + "\").c_str() );\n" - " return " + cpp2::to_string(cpp2::move(default_value)) + ";\n" - " }\n\n"; + auto fwd_pass_style {to_string_view(CPP2_UFCS(get_passing_style)(param))}; + auto rws_pass_style {to_string_view(CPP2_UFCS(get_reverse_passing_style)((*cpp2::impl::assert_not_null(ctx)), CPP2_UFCS(get_passing_style)(param)))}; - CPP2_UFCS(add_member)(t, cpp2::move(from_string)); - } -} + if ("this" == name) { + auto fwd_ad_type {CPP2_UFCS(get_fwd_ad_type)((*cpp2::impl::assert_not_null(ctx)), std::string(CPP2_UFCS(name)(decl)))}; + auto rws_ad_type {CPP2_UFCS(get_rws_ad_type)((*cpp2::impl::assert_not_null(ctx)), std::string(CPP2_UFCS(name)(decl)))}; -#line 1313 "reflect.h2" - CPP2_UFCS(add_member)(t, " from_code: (s: std::string_view) -> " + cpp2::to_string(CPP2_UFCS(name)(t)) + " = { str: std::string = s; return from_string( cpp2::string_util::replace_all(str, \"" + cpp2::to_string(CPP2_UFCS(name)(t)) + "::\", \"\" ) ); }"); -} + CPP2_UFCS(add_forward)(diff, "" + cpp2::to_string(fwd_pass_style) + " " + cpp2::to_string(name) + ", "); + CPP2_UFCS(add_forward)(diff, "" + cpp2::to_string(fwd_pass_style) + " " + cpp2::to_string(name) + cpp2::to_string((*cpp2::impl::assert_not_null(ctx)).fwd_suffix) + ": " + cpp2::to_string(fwd_ad_type) + ", "); -#line 1317 "reflect.h2" -//----------------------------------------------------------------------- -// -// "An enum[...] is a totally ordered value type that stores a -// value of its enumerators's type, and otherwise has only public -// member variables of its enumerator's type, all of which are -// naturally scoped because they are members of a type." -// -// -- P0707R4, section 3 -// -#line 1326 "reflect.h2" -auto cpp2_enum(meta::type_declaration& t) -> void -{ - // Let basic_enum do its thing, with an incrementing value generator - CPP2_UFCS(basic_enum)(t, - [](std::string& value, cpp2::impl::in specified_value) -> void{ - if (!(CPP2_UFCS(empty)(specified_value))) { - value = specified_value; - }else { - auto v {std::strtoll(&CPP2_ASSERT_IN_BOUNDS_LITERAL(value, 0), nullptr, 10)}; - value = cpp2::impl::as_((cpp2::move(v) + 1)); + CPP2_UFCS(add_reverse_primal)(diff, "" + cpp2::to_string(fwd_pass_style) + " " + cpp2::to_string(name) + ", "); + if (CPP2_UFCS(is_taylor)((*cpp2::impl::assert_not_null(ctx)))) {// Add forward type for higher order + CPP2_UFCS(add_reverse_primal)(diff, "" + cpp2::to_string(cpp2::move(fwd_pass_style)) + " " + cpp2::to_string(name) + cpp2::to_string((*cpp2::impl::assert_not_null(ctx)).fwd_suffix) + ": " + cpp2::to_string(cpp2::move(fwd_ad_type)) + ", "); + } + CPP2_UFCS(add_reverse_primal)(diff, "" + cpp2::to_string(cpp2::move(rws_pass_style)) + " " + cpp2::to_string(cpp2::move(name)) + cpp2::to_string((*cpp2::impl::assert_not_null(ctx)).rws_suffix) + ": " + cpp2::to_string(cpp2::move(rws_ad_type)) + ", "); } - }, - false // disable bitwise operations - ); -} + else { + auto type {CPP2_UFCS(get_declaration)(param).type()}; -#line 1343 "reflect.h2" -//----------------------------------------------------------------------- -// -// "flag_enum expresses an enumeration that stores values -// corresponding to bitwise-or'd enumerators. The enumerators must -// be powers of two, and are automatically generated [...] A none -// value is provided [...] Operators | and & are provided to -// combine and extract values." -// -// -- P0707R4, section 3 -// -#line 1353 "reflect.h2" -auto flag_enum(meta::type_declaration& t) -> void -{ - // Let basic_enum do its thing, with a power-of-two value generator - CPP2_UFCS(basic_enum)(t, - [](std::string& value, cpp2::impl::in specified_value) -> void{ - if (!(CPP2_UFCS(empty)(specified_value))) { - value = specified_value; - }else { - auto v {std::strtoll(&CPP2_ASSERT_IN_BOUNDS_LITERAL(value, 0), nullptr, 10)}; - if (cpp2::impl::cmp_less(v,1)) { - value = "1"; + autodiff_activity_check ada {ctx}; + CPP2_UFCS(pre_traverse)(ada, param); + + if (ada.active) { + CPP2_UFCS(add_forward)(diff, "" + cpp2::to_string(fwd_pass_style) + " " + cpp2::to_string(name) + " : " + cpp2::to_string(type) + ", "); + CPP2_UFCS(add_forward)(diff, "" + cpp2::to_string(fwd_pass_style) + " " + cpp2::to_string(name) + cpp2::to_string((*cpp2::impl::assert_not_null(ctx)).fwd_suffix) + " : " + cpp2::to_string(CPP2_UFCS(get_fwd_ad_type)((*cpp2::impl::assert_not_null(ctx)), type)) + ", "); + + CPP2_UFCS(add_reverse_primal)(diff, "" + cpp2::to_string(fwd_pass_style) + " " + cpp2::to_string(name) + " : " + cpp2::to_string(type) + ", "); + if (CPP2_UFCS(is_taylor)((*cpp2::impl::assert_not_null(ctx)))) { + CPP2_UFCS(add_reverse_primal)(diff, "" + cpp2::to_string(cpp2::move(fwd_pass_style)) + " " + cpp2::to_string(name) + cpp2::to_string((*cpp2::impl::assert_not_null(ctx)).fwd_suffix) + " : " + cpp2::to_string(CPP2_UFCS(get_fwd_ad_type)((*cpp2::impl::assert_not_null(ctx)), type)) + ", "); + } + CPP2_UFCS(add_reverse_primal)(diff, "" + cpp2::to_string(cpp2::move(rws_pass_style)) + " " + cpp2::to_string(name) + cpp2::to_string((*cpp2::impl::assert_not_null(ctx)).rws_suffix) + " : " + cpp2::to_string(CPP2_UFCS(get_rws_ad_type)((*cpp2::impl::assert_not_null(ctx)), type)) + ", "); } else { - value = cpp2::impl::as_((cpp2::move(v) * 2)); + CPP2_UFCS(add_forward)(diff, "" + cpp2::to_string(fwd_pass_style) + " " + cpp2::to_string(name) + " : " + cpp2::to_string(type) + ", "); + CPP2_UFCS(add_reverse_primal)(diff, "" + cpp2::to_string(cpp2::move(fwd_pass_style)) + " " + cpp2::to_string(name) + " : " + cpp2::to_string(type) + ", "); } + + CPP2_UFCS(add_variable_declaration)((*cpp2::impl::assert_not_null(ctx)), cpp2::move(name), cpp2::move(type), cpp2::move(ada).active); } - }, - true // enable bitwise operations - ); -} + } -#line 1375 "reflect.h2" -//----------------------------------------------------------------------- -// -// "As with void*, programmers should know that unions [...] are -// inherently dangerous, should be avoided wherever possible, -// and should be handled with special care when actually needed." -// -// -- Stroustrup (The Design and Evolution of C++, 14.3.4.1) -// -// "C++17 needs a type-safe union... The implications of the -// consensus `variant` design are well understood and have been -// explored over several LEWG discussions, over a thousand emails, -// a joint LEWG/EWG session, and not to mention 12 years of -// experience with Boost and other libraries." -// -// -- Axel Naumann, in P0088 (wg21.link/p0088), -// the adopted proposal for C++17 std::variant -// -//----------------------------------------------------------------------- -// -// union -// -// a type that contains exactly one of a fixed set of values at a time -// + // b) Add arguments for returns that become inputs -#line 1399 "reflect.h2" -auto cpp2_union(meta::type_declaration& t) -> void -{ - std::vector alternatives {}; -{ -auto value{0}; + if (CPP2_UFCS(has_non_void_return_type)(f) && CPP2_UFCS(empty)(CPP2_UFCS(get_returns)(f))) {// TODO: has_non_void_return_type is true for return lists: (r: double) bug/feature? + // TODO: check if name "r" is available. (Also needs inspection of functions at call sides.) + if (CPP2_UFCS(has_deduced_return_type)(f)) { + // TODO: Take care of initialization order error. + CPP2_UFCS(add_reverse_primal)(diff, "inout r" + cpp2::to_string((*cpp2::impl::assert_not_null(ctx)).rws_suffix) + ", "); + } + else { + CPP2_UFCS(add_reverse_primal)(diff, "inout r" + cpp2::to_string((*cpp2::impl::assert_not_null(ctx)).rws_suffix) + ": " + cpp2::to_string(CPP2_UFCS(get_rws_ad_type)((*cpp2::impl::assert_not_null(ctx)), CPP2_UFCS(get_unnamed_return_type)(f))) + ", "); + } + } + else { + for ( auto const& param : CPP2_UFCS(get_returns)(f) ) { + auto name {CPP2_UFCS(get_declaration)(param).name()}; + auto type {CPP2_UFCS(get_declaration)(param).type()}; - // 1. Gather: All the user-written members, and find/compute the max size + auto rws_pass_style {to_string_view(CPP2_UFCS(get_reverse_passing_style)((*cpp2::impl::assert_not_null(ctx)), CPP2_UFCS(get_passing_style)(param)))}; + CPP2_UFCS(add_reverse_primal)(diff, "" + cpp2::to_string(cpp2::move(rws_pass_style)) + " " + cpp2::to_string(cpp2::move(name)) + cpp2::to_string((*cpp2::impl::assert_not_null(ctx)).rws_suffix) + " : " + cpp2::to_string(CPP2_UFCS(get_rws_ad_type)((*cpp2::impl::assert_not_null(ctx)), cpp2::move(type))) + " , "); + } + } -#line 1406 "reflect.h2" - for ( + CPP2_UFCS(add_forward)(diff, ") -> ("); + CPP2_UFCS(add_reverse_primal)(diff, ") -> ("); - auto const& m : CPP2_UFCS(get_members)(t) ) { do - if ( CPP2_UFCS(is_member_object)(m)) - { - CPP2_UFCS(require)(m, CPP2_UFCS(is_public)(m) || CPP2_UFCS(is_default_access)(m), - "a union alternative cannot be protected or private" - ); + // c) Returns - CPP2_UFCS(require)(m, !(CPP2_UFCS(starts_with)(CPP2_UFCS(name)(m), "is_")) - && !(CPP2_UFCS(starts_with)(CPP2_UFCS(name)(m), "set_")), - "a union alternative's name cannot start with 'is_' or 'set_' - that could cause " - "user confusion with the 'is_alternative' and 'set_alternative' generated functions" - ); + if (CPP2_UFCS(has_non_void_return_type)(f) && CPP2_UFCS(empty)(CPP2_UFCS(get_returns)(f))) {// TODO: has_non_void_return_type is true for return lists: (r: double) bug/feature? + // TODO: check if name "r" is available. (Also needs inspection of functions at call sides.) + if (CPP2_UFCS(has_deduced_return_type)(f)) { + // TODO: Take care of initialization order error. + CPP2_UFCS(add_forward)(diff, "r, r" + cpp2::to_string((*cpp2::impl::assert_not_null(ctx)).fwd_suffix) + ", "); + CPP2_UFCS(add_reverse_primal)(diff, "r, "); + if (CPP2_UFCS(is_taylor)((*cpp2::impl::assert_not_null(ctx)))) { + CPP2_UFCS(add_reverse_primal)(diff, "r" + cpp2::to_string((*cpp2::impl::assert_not_null(ctx)).fwd_suffix) + ","); + } + } + else { + CPP2_UFCS(add_forward)(diff, "r: " + cpp2::to_string(CPP2_UFCS(get_unnamed_return_type)(f)) + " = (), r" + cpp2::to_string((*cpp2::impl::assert_not_null(ctx)).fwd_suffix) + ": " + cpp2::to_string(CPP2_UFCS(get_fwd_ad_type)((*cpp2::impl::assert_not_null(ctx)), CPP2_UFCS(get_unnamed_return_type)(f))) + " = (), "); + CPP2_UFCS(add_reverse_primal)(diff, "r: " + cpp2::to_string(CPP2_UFCS(get_unnamed_return_type)(f)) + " = (), "); + if (CPP2_UFCS(is_taylor)((*cpp2::impl::assert_not_null(ctx)))) { + CPP2_UFCS(add_reverse_primal)(diff, "r" + cpp2::to_string((*cpp2::impl::assert_not_null(ctx)).fwd_suffix) + ": " + cpp2::to_string(CPP2_UFCS(get_fwd_ad_type)((*cpp2::impl::assert_not_null(ctx)), CPP2_UFCS(get_unnamed_return_type)(f))) + " = (), "); + } + } + } + else { + for ( auto const& param : CPP2_UFCS(get_returns)(f) ) { + auto name {CPP2_UFCS(get_declaration)(param).name()}; + auto type {CPP2_UFCS(get_declaration)(param).type()}; + + auto fwd_pass_style {to_string_view(CPP2_UFCS(get_passing_style)(param))}; + //rws_pass_style := to_string_view(ctx*.get_reverse_passing_style(param.get_passing_style())); + CPP2_UFCS(add_forward)(diff, "" + cpp2::to_string(fwd_pass_style) + " " + cpp2::to_string(name) + " : " + cpp2::to_string(CPP2_UFCS(type)(CPP2_UFCS(get_declaration)(param))) + " = 0.0, "); + CPP2_UFCS(add_forward)(diff, "" + cpp2::to_string(fwd_pass_style) + " " + cpp2::to_string(name) + cpp2::to_string((*cpp2::impl::assert_not_null(ctx)).fwd_suffix) + " : " + cpp2::to_string(CPP2_UFCS(get_fwd_ad_type)((*cpp2::impl::assert_not_null(ctx)), type)) + " = 0.0, "); + + CPP2_UFCS(add_reverse_primal)(diff, "" + cpp2::to_string(fwd_pass_style) + " " + cpp2::to_string(name) + " : " + cpp2::to_string(CPP2_UFCS(type)(CPP2_UFCS(get_declaration)(param))) + " = 0.0, "); + if (CPP2_UFCS(is_taylor)((*cpp2::impl::assert_not_null(ctx)))) { + CPP2_UFCS(add_reverse_primal)(diff, "" + cpp2::to_string(cpp2::move(fwd_pass_style)) + " " + cpp2::to_string(name) + cpp2::to_string((*cpp2::impl::assert_not_null(ctx)).fwd_suffix) + " : " + cpp2::to_string(CPP2_UFCS(get_fwd_ad_type)((*cpp2::impl::assert_not_null(ctx)), type)) + " = 0.0, "); + } + + CPP2_UFCS(add_variable_declaration)((*cpp2::impl::assert_not_null(ctx)), "" + cpp2::to_string(cpp2::move(name)) + "", "" + cpp2::to_string(cpp2::move(type)) + "", true);// TODO_a: Add acitivty check + } + } + + CPP2_UFCS(add_forward)(diff, ") = {"); + CPP2_UFCS(add_reverse_primal)(diff, ") = {"); + + // Generate the body + + if (!(CPP2_UFCS(has_compound_body)(f))) { + CPP2_UFCS(error)(f, "temporary alpha limitation: a differentiable function must have a {}-enclosed body"); + return ; + } - auto mo {CPP2_UFCS(as_object)(m)}; - CPP2_UFCS(require)(mo, CPP2_UFCS(empty)(CPP2_UFCS(initializer)(mo)), - "a union alternative cannot have an initializer" - ); +#line 6112 "reflect.h2" + autodiff_stmt_handler ad_impl {&*cpp2::impl::assert_not_null(ctx), f}; - // Adding local variable 'e' to work around a Clang warning - value_member_info e {cpp2::impl::as_(CPP2_UFCS(name)(mo)), CPP2_UFCS(type)(mo), cpp2::impl::as_(value)}; - CPP2_UFCS(push_back)(alternatives, cpp2::move(e)); +#line 6115 "reflect.h2" + for ( auto const& stmt : CPP2_UFCS(get_statements)(CPP2_UFCS(get_compound_body)(f)) ) + { + ad_impl.pre_traverse(stmt); + } + CPP2_UFCS(add_forward)(diff, ad_impl.diff.fwd); + CPP2_UFCS(add_reverse_primal)(diff, ad_impl.diff.rws_primal); + CPP2_UFCS(add_reverse_primal)(diff, cpp2::move(ad_impl).diff.rws_backprop); - CPP2_UFCS(mark_for_removal_from_enclosing_type)(mo); - static_cast(cpp2::move(mo)); - } while (false); ++value; } -} + CPP2_UFCS(add_forward)(diff, "}"); + CPP2_UFCS(add_reverse_primal)(diff, "}"); -#line 1434 "reflect.h2" - std::string discriminator_type {}; - if (cpp2::impl::cmp_less(CPP2_UFCS(ssize)(alternatives),std::numeric_limits::max())) { - discriminator_type = "i8"; - } - else {if (cpp2::impl::cmp_less(CPP2_UFCS(ssize)(alternatives),std::numeric_limits::max())) { - discriminator_type = "i16"; - } - else {if (cpp2::impl::cmp_less(CPP2_UFCS(ssize)(alternatives),std::numeric_limits::max())) { - discriminator_type = "i32"; - } - else { - discriminator_type = "i64"; - }}} + CPP2_UFCS(leave_function)((*cpp2::impl::assert_not_null(ctx))); -#line 1449 "reflect.h2" - // 2. Replace: Erase the contents and replace with modified contents + if (CPP2_UFCS(is_forward)((*cpp2::impl::assert_not_null(ctx)))) { + CPP2_UFCS(add_member)(decl, diff.fwd); + } + if (CPP2_UFCS(is_reverse)((*cpp2::impl::assert_not_null(ctx)))) { + CPP2_UFCS(add_member)(decl, diff.rws_primal); + } + CPP2_UFCS(reset)(diff); - CPP2_UFCS(remove_marked_members)(t); -{ -std::string storage{" _storage: cpp2::aligned_storage o) -> void{ + std::string ad_name {"" + cpp2::to_string(CPP2_UFCS(name)(o)) + cpp2::to_string((*cpp2::impl::assert_not_null(ctx)).fwd_suffix) + ""}; + std::string fwd_ad_type {CPP2_UFCS(get_fwd_ad_type)((*cpp2::impl::assert_not_null(ctx)), CPP2_UFCS(type)(o))}; + std::string ad_init {""}; -#line 1455 "reflect.h2" - { - for ( - auto const& e : alternatives ) { - storage += "sizeof(" + cpp2::to_string(e.type) + "), "; + if (CPP2_UFCS(has_initializer)(o)) { + autodiff_expression_handler ad {ctx}; + CPP2_UFCS(pre_traverse)(ad, CPP2_UFCS(get_initializer)(o)); + + if (cpp2::cpp2_default.is_active() && !(CPP2_UFCS(empty)(ad.diff)) ) { cpp2::cpp2_default.report_violation(""); } + ad_init = " = " + cpp2::move(ad).fwd_expr; } - storage += "), cpp2::max( "; + diff = "" + cpp2::to_string(cpp2::move(ad_name)) + " : " + cpp2::to_string(cpp2::move(fwd_ad_type)) + cpp2::to_string(cpp2::move(ad_init)) + ";"; - for ( - auto const& e : alternatives ) { - storage += "alignof(" + cpp2::to_string(e.type) + "), "; + if (is_type_context) { + + diff_ad_type += "public " + cpp2::to_string(diff.fwd) + "\n"; + } + else { + CPP2_UFCS(add_member)(decl, diff.fwd); } + diff = ""; - storage += " )> = ();\n"; - CPP2_UFCS(add_member)(t, cpp2::move(storage)); + CPP2_UFCS(add_variable_declaration)((*cpp2::impl::assert_not_null(ctx)), "" + cpp2::to_string(CPP2_UFCS(name)(o)) + "", "" + cpp2::to_string(CPP2_UFCS(type)(o)) + "", true, true);// TODO_a: Add acitivty check } -} - // Provide discriminator -#line 1473 "reflect.h2" - CPP2_UFCS(add_member)(t, " _discriminator: " + cpp2::to_string(cpp2::move(discriminator_type)) + " = -1;\n"); +#line 6168 "reflect.h2" + auto autodiff_declaration_handler::traverse(cpp2::impl::in t) -> void{ + CPP2_UFCS(push_stack)((*cpp2::impl::assert_not_null(ctx)), t); + autodiff_declaration_handler ad {ctx, t}; + ad.is_type_context = true; - // Add the alternatives: is_alternative, get_alternative, and set_alternative - for ( - auto const& a : alternatives ) - { - CPP2_UFCS(add_member)(t, " is_" + cpp2::to_string(a.name) + ": (this) -> bool = _discriminator == " + cpp2::to_string(a.value) + ";\n"); + for ( + auto const& m : CPP2_UFCS(get_members)(t) ) + { + CPP2_UFCS(pre_traverse)(ad, m); + } - CPP2_UFCS(add_member)(t, " " + cpp2::to_string(a.name) + ": (this) -> forward " + cpp2::to_string(a.type) + " pre(is_" + cpp2::to_string(a.name) + "()) = " - "reinterpret_cast<* const " + cpp2::to_string(a.type) + ">(_storage&)*;\n" - ); + CPP2_UFCS(pop_stack)((*cpp2::impl::assert_not_null(ctx))); - CPP2_UFCS(add_member)(t, " " + cpp2::to_string(a.name) + ": (inout this) -> forward " + cpp2::to_string(a.type) + " pre(is_" + cpp2::to_string(a.name) + "()) = " - "reinterpret_cast<*" + cpp2::to_string(a.type) + ">(_storage&)*;\n" - ); + if (!(CPP2_UFCS(empty)(ad.diff_ad_type))) { + diff = "" + cpp2::to_string(CPP2_UFCS(name)(t)) + cpp2::to_string((*cpp2::impl::assert_not_null(ctx)).fwd_suffix) + " : type = {\n"; + diff += "" + cpp2::to_string(cpp2::move(ad).diff_ad_type) + ""; + diff += "}"; - CPP2_UFCS(add_member)(t, " set_" + cpp2::to_string(a.name) + ": (inout this, _value: " + cpp2::to_string(a.type) + ") = { " - "if !is_" + cpp2::to_string(a.name) + "() { _destroy(); std::construct_at( reinterpret_cast<*" + cpp2::to_string(a.type) + ">(_storage&), _value); } " - "else { reinterpret_cast<*" + cpp2::to_string(a.type) + ">(_storage&)* = _value; } " - "_discriminator = " + cpp2::to_string(a.value) + "; " - "}\n" - ); + CPP2_UFCS(add_member)(decl, diff.fwd); + diff = ""; + } + } - CPP2_UFCS(add_member)(t, " set_" + cpp2::to_string(a.name) + ": (inout this, forward _args...: _) = { " - "if !is_" + cpp2::to_string(a.name) + "() { _destroy(); std::construct_at( reinterpret_cast<*" + cpp2::to_string(a.type) + ">(_storage&), _args...); } " - " else { reinterpret_cast<*" + cpp2::to_string(a.type) + ">(_storage&)* = :" + cpp2::to_string(a.type) + " = (_args...); } " - "_discriminator = " + cpp2::to_string(a.value) + "; " - "}\n" - ); +#line 6192 "reflect.h2" + auto autodiff_declaration_handler::traverse(cpp2::impl::in t) -> void{ + CPP2_UFCS(error)(t, "AD: Do not know how to handle parameter_declaration: " + cpp2::to_string(CPP2_UFCS(to_string)(t)) + ""); + } + +#line 6197 "reflect.h2" + auto autodiff_declaration_handler::traverse(cpp2::impl::in stmt) -> void{ + CPP2_UFCS(error)(stmt, "AD: Do not know how to handle statement in declaration context: " + cpp2::to_string(CPP2_UFCS(to_string)(stmt)) + ""); } + +#line 6203 "reflect.h2" +auto autodiff(meta::type_declaration& t) -> void { -std::string destroy{" private _destroy: (inout this) = {\n"}; - // Add destroy + std::string_view constexpr suffix_token{ "suffix=" }; + std::string_view constexpr rws_suffix_token{ "rws_suffix=" }; + std::string_view constexpr order_token{ "order=" }; + std::string_view constexpr reverse_token{ "reverse" }; -#line 1506 "reflect.h2" - { - for ( - auto const& a : alternatives ) { - destroy += " if _discriminator == " + cpp2::to_string(a.value) + " { std::destroy_at( reinterpret_cast<*" + cpp2::to_string(a.type) + ">(_storage&) ); }\n"; + auto args {CPP2_UFCS(get_arguments)(t)}; + + std::string suffix {"_d"}; + std::string rws_suffix {"_b"}; + int order {1}; + bool reverse {false}; + for ( auto const& arg_str : cpp2::move(args) ) { + if (CPP2_UFCS(starts_with)(arg_str, "\"") && CPP2_UFCS(ends_with)(arg_str, "\"")) { + auto arg {CPP2_UFCS(substr)(arg_str, 1, CPP2_UFCS(ssize)(arg_str) - 2)}; + + if (CPP2_UFCS(starts_with)(arg, suffix_token)) { + suffix = CPP2_UFCS(substr)(cpp2::move(arg), CPP2_UFCS(size)(suffix_token)); + continue; + } + else {if (CPP2_UFCS(starts_with)(arg, rws_suffix_token)) { + suffix = CPP2_UFCS(substr)(cpp2::move(arg), CPP2_UFCS(size)(rws_suffix_token)); + continue; + } + else {if (CPP2_UFCS(starts_with)(arg, order_token)) { + if (!(string_util::string_to_int(CPP2_UFCS(substr)(arg, CPP2_UFCS(size)(order_token)), order))) { + CPP2_UFCS(error)(t, "AD: Could not parse derivative order: " + cpp2::to_string(CPP2_UFCS(substr)(cpp2::move(arg), CPP2_UFCS(size)(order_token))) + ""); + return ; + } + continue; + } + else {if (cpp2::move(arg) == reverse_token) { + reverse = true; + continue; + }}}} } - destroy += " _discriminator = -1;\n" - " }\n"; - CPP2_UFCS(add_member)(t, cpp2::move(destroy)); + CPP2_UFCS(error)(t, "AD: Unknown argument: " + cpp2::to_string(arg_str) + ""); + return ; } -} - // Add the destructor -#line 1518 "reflect.h2" - CPP2_UFCS(add_member)(t, " operator=: (move this) = { _destroy(); _ = this; }"); + if (reverse) { + std::cout << "AD: Warning - reverse mode differentiation is very experimental\n"; + } - // Add default constructor - CPP2_UFCS(add_member)(t, " operator=: (out this) = { }"); -{ -std::string value_set{""}; + autodiff_context ad_ctx {order, reverse}; + ad_ctx.fwd_suffix = cpp2::move(suffix); + ad_ctx.rws_suffix = cpp2::move(rws_suffix); - // Add copy/move construction and assignment + if (CPP2_UFCS(parent_is_nonglobal_namespace)(t)) { + auto p {CPP2_UFCS(as_nonglobal_namespace)(CPP2_UFCS(get_parent)(t))}; + CPP2_UFCS(create_namespace_stack)(ad_ctx, p); + autodiff_declaration_handler ad {&ad_ctx, cpp2::move(p)}; + CPP2_UFCS(pre_traverse)(cpp2::move(ad), t); + + } + else {if (CPP2_UFCS(parent_is_type)(t)) { + auto p {CPP2_UFCS(as_type)(CPP2_UFCS(get_parent)(t))}; + CPP2_UFCS(create_namespace_stack)(ad_ctx, p); + autodiff_declaration_handler ad {&ad_ctx, cpp2::move(p)}; + CPP2_UFCS(pre_traverse)(cpp2::move(ad), t); + } + else { + // TODO: Remove when global namespace is available. + // Traverse without parent context + CPP2_UFCS(push_stack)(ad_ctx, t); + autodiff_declaration_handler ad {&ad_ctx, t}; -#line 1525 "reflect.h2" - { for ( - auto const& a : cpp2::move(alternatives) ) { - value_set += " if that.is_" + cpp2::to_string(a.name) + "() { set_" + cpp2::to_string(a.name) + "( that." + cpp2::to_string(a.name) + "() ); }\n"; + auto const& m : CPP2_UFCS(get_members)(t) ) + if ( CPP2_UFCS(is_function)(m)) + { + CPP2_UFCS(pre_traverse)(ad, m); } - value_set += " }\n"; + CPP2_UFCS(pop_stack)(ad_ctx); + }} - CPP2_UFCS(add_member)(t, " operator=: (out this, that) = {\n" - " _storage = ();\n" - " _discriminator = -1;\n" - + value_set - ); - CPP2_UFCS(add_member)(t, " operator=: (inout this, that) = {\n" - " _storage = _;\n" - " _discriminator = _;\n" - + cpp2::move(value_set) - ); + if (1 != cpp2::move(order)) { + CPP2_UFCS(add_runtime_support_include)(t, "cpp2taylor.h"); + } + if (cpp2::move(reverse)) { + CPP2_UFCS(add_runtime_support_include)(t, "cpp2ad_stack.h"); } -} -#line 1543 "reflect.h2" -} -#line 1546 "reflect.h2" -//----------------------------------------------------------------------- -// -// print - output a pretty-printed visualization of t -// -#line 1550 "reflect.h2" -auto print(cpp2::impl::in t) -> void -{ - std::cout << CPP2_UFCS(print)(t) << "\n"; + CPP2_UFCS(finish)(ad_ctx); + + static_cast(cpp2::move(ad_ctx)); } @@ -3214,12 +10376,12 @@ std::string sep {}; if ((*this) == none) {return "(none)"; } auto pref {cpp2::to_string(prefix)}; -if (((*this) & case_insensitive) == case_insensitive) {ret += sep + pref + "case_insensitive";sep = separator;} -if (((*this) & multiple_lines) == multiple_lines) {ret += sep + pref + "multiple_lines";sep = separator;} -if (((*this) & single_line) == single_line) {ret += sep + pref + "single_line";sep = separator;} -if (((*this) & no_group_captures) == no_group_captures) {ret += sep + pref + "no_group_captures";sep = separator;} -if (((*this) & perl_code_syntax) == perl_code_syntax) {ret += sep + pref + "perl_code_syntax";sep = separator;} -if (((*this) & perl_code_syntax_in_classes) == perl_code_syntax_in_classes) {ret += sep + cpp2::move(pref) + "perl_code_syntax_in_classes";sep = separator;} +if (((*this) & expression_flags::case_insensitive) == expression_flags::case_insensitive) {ret += sep + pref + "case_insensitive";sep = separator;} +if (((*this) & expression_flags::multiple_lines) == expression_flags::multiple_lines) {ret += sep + pref + "multiple_lines";sep = separator;} +if (((*this) & expression_flags::single_line) == expression_flags::single_line) {ret += sep + pref + "single_line";sep = separator;} +if (((*this) & expression_flags::no_group_captures) == expression_flags::no_group_captures) {ret += sep + pref + "no_group_captures";sep = separator;} +if (((*this) & expression_flags::perl_code_syntax) == expression_flags::perl_code_syntax) {ret += sep + pref + "perl_code_syntax";sep = separator;} +if (((*this) & expression_flags::perl_code_syntax_in_classes) == expression_flags::perl_code_syntax_in_classes) {ret += sep + cpp2::move(pref) + "perl_code_syntax_in_classes";sep = separator;} return cpp2::move(ret) + ")"; } @@ -3230,13 +10392,13 @@ return cpp2::move(ret) + ")"; auto ret {none}; do {{ for ( auto const& x : cpp2::string_util::split_string_list(s) ) { -if ("case_insensitive" == x) {ret |= case_insensitive;} -else {if ("multiple_lines" == x) {ret |= multiple_lines;} -else {if ("single_line" == x) {ret |= single_line;} -else {if ("no_group_captures" == x) {ret |= no_group_captures;} -else {if ("perl_code_syntax" == x) {ret |= perl_code_syntax;} -else {if ("perl_code_syntax_in_classes" == x) {ret |= perl_code_syntax_in_classes;} -else {if ("none" == x) {ret |= none;} +if ("case_insensitive" == x) {ret |= expression_flags::case_insensitive;} +else {if ("multiple_lines" == x) {ret |= expression_flags::multiple_lines;} +else {if ("single_line" == x) {ret |= expression_flags::single_line;} +else {if ("no_group_captures" == x) {ret |= expression_flags::no_group_captures;} +else {if ("perl_code_syntax" == x) {ret |= expression_flags::perl_code_syntax;} +else {if ("perl_code_syntax_in_classes" == x) {ret |= expression_flags::perl_code_syntax_in_classes;} +else {if ("none" == x) {ret |= expression_flags::none;} else {goto BREAK_outer;} #line 1 "reflect.h2" }}}}}} @@ -3248,13 +10410,13 @@ return ret; false ); CPP2_UFCS(report_violation)(cpp2::type_safety, CPP2_UFCS(c_str)(("can't convert string '" + cpp2::to_string(s) + "' to flag_enum of type expression_flags"))); -return none; +return expression_flags::none; } [[nodiscard]] auto expression_flags::from_code(cpp2::impl::in s) -> expression_flags{ std::string str {s}; return from_string(cpp2::string_util::replace_all(cpp2::move(str), "expression_flags::", "")); } -#line 1556 "reflect.h2" +#line 6295 "reflect.h2" //----------------------------------------------------------------------- // // regex - creates regular expressions from members @@ -3270,11 +10432,11 @@ std::string str {s}; return from_string(cpp2::string_util::replace_all(cpp2::mov // ``` // -#line 1572 "reflect.h2" +#line 6311 "reflect.h2" // Possible modifiers for a regular expression. // -#line 1576 "reflect.h2" +#line 6315 "reflect.h2" // mod: i // mod: m // mod: s @@ -3282,106 +10444,116 @@ std::string str {s}; return from_string(cpp2::string_util::replace_all(cpp2::mov // mod: x // mod: xx -#line 1585 "reflect.h2" +#line 6324 "reflect.h2" // Tokens for regular expressions. // // Basic class for a regex token. // -#line 1594 "reflect.h2" +#line 6333 "reflect.h2" regex_token::regex_token(cpp2::impl::in str) : string_rep{ str }{ -#line 1596 "reflect.h2" +#line 6335 "reflect.h2" } -#line 1598 "reflect.h2" +#line 6337 "reflect.h2" regex_token::regex_token() : string_rep{ "" }{ -#line 1600 "reflect.h2" +#line 6339 "reflect.h2" } //parse: (inout ctx: parse_context) -> token_ptr; // Generate the matching code. + // Create a reverse token for look behind expressions. -#line 1605 "reflect.h2" +#line 6345 "reflect.h2" auto regex_token::add_groups([[maybe_unused]] std::set& unnamed_param_2) const -> void{}// Adds all group indices to the set. -#line 1606 "reflect.h2" +#line 6346 "reflect.h2" [[nodiscard]] auto regex_token::to_string() const& -> std::string{return string_rep; }// Create a string representation. -#line 1607 "reflect.h2" +#line 6347 "reflect.h2" auto regex_token::set_string(cpp2::impl::in s) & -> void{string_rep = s; } regex_token::~regex_token() noexcept{}// Set the string representation. -#line 1622 "reflect.h2" +#line 6362 "reflect.h2" regex_token_check::regex_token_check(cpp2::impl::in str, cpp2::impl::in check_) : regex_token{ str } , check{ check_ }{ -#line 1625 "reflect.h2" +#line 6365 "reflect.h2" } -#line 1627 "reflect.h2" +#line 6367 "reflect.h2" auto regex_token_check::generate_code(generation_context& ctx) const -> void{ ctx.add_check(check + "(" + ctx.match_parameters() + ")"); } +#line 6371 "reflect.h2" + [[nodiscard]] auto regex_token_check::reverse() const -> token_ptr { return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, CPP2_UFCS(to_string)((*this)), (*this).check); } + regex_token_check::~regex_token_check() noexcept{} -#line 1641 "reflect.h2" +#line 6383 "reflect.h2" regex_token_code::regex_token_code(cpp2::impl::in str, cpp2::impl::in code_) : regex_token{ str } , code{ code_ }{ -#line 1644 "reflect.h2" +#line 6386 "reflect.h2" } -#line 1646 "reflect.h2" +#line 6388 "reflect.h2" auto regex_token_code::generate_code(generation_context& ctx) const -> void{ ctx.add(code); } +#line 6392 "reflect.h2" + [[nodiscard]] auto regex_token_code::reverse() const -> token_ptr { return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, CPP2_UFCS(to_string)((*this)), (*this).code); } + regex_token_code::~regex_token_code() noexcept{} -#line 1658 "reflect.h2" +#line 6402 "reflect.h2" regex_token_empty::regex_token_empty(cpp2::impl::in str) : regex_token{ str }{ -#line 1660 "reflect.h2" +#line 6404 "reflect.h2" } -#line 1662 "reflect.h2" +#line 6406 "reflect.h2" auto regex_token_empty::generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void{ // Nothing. } +#line 6410 "reflect.h2" + [[nodiscard]] auto regex_token_empty::reverse() const -> token_ptr { return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, CPP2_UFCS(to_string)((*this))); } + regex_token_empty::~regex_token_empty() noexcept{} -#line 1676 "reflect.h2" +#line 6422 "reflect.h2" regex_token_list::regex_token_list(cpp2::impl::in t) : regex_token{ gen_string(t) } , tokens{ t }{ -#line 1679 "reflect.h2" +#line 6425 "reflect.h2" } -#line 1681 "reflect.h2" +#line 6427 "reflect.h2" auto regex_token_list::generate_code(generation_context& ctx) const -> void{ for ( auto const& token : tokens ) { (*cpp2::impl::assert_not_null(token)).generate_code(ctx); } } -#line 1687 "reflect.h2" +#line 6433 "reflect.h2" auto regex_token_list::add_groups(std::set& groups) const -> void{ for ( auto const& token : tokens ) { (*cpp2::impl::assert_not_null(token)).add_groups(groups); } } -#line 1693 "reflect.h2" +#line 6439 "reflect.h2" [[nodiscard]] auto regex_token_list::gen_string(cpp2::impl::in vec) -> std::string{ std::string r {""}; for ( auto const& token : vec ) { @@ -3390,9 +10562,23 @@ std::string str {s}; return from_string(cpp2::string_util::replace_all(cpp2::mov return r; } +#line 6447 "reflect.h2" + [[nodiscard]] auto regex_token_list::reverse() const -> token_ptr{ + int s {cpp2::unchecked_narrow(tokens.size())}; + + token_vec reverse_vec {}; + reverse_vec.resize(s); + + int i {0}; + for( ; cpp2::impl::cmp_less(i,CPP2_UFCS(ssize)(tokens)); (i += 1) ) { + CPP2_ASSERT_IN_BOUNDS(reverse_vec, s - 1 - i) = CPP2_UFCS(reverse)((*cpp2::impl::assert_not_null(CPP2_ASSERT_IN_BOUNDS(tokens, i)))); + } + return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(reverse_vec)); + } + regex_token_list::~regex_token_list() noexcept{} -#line 1716 "reflect.h2" +#line 6475 "reflect.h2" auto parse_context_group_state::next_alternative() & -> void{ token_vec new_list {}; std::swap(new_list, cur_match_list); @@ -3400,14 +10586,14 @@ std::string str {s}; return from_string(cpp2::string_util::replace_all(cpp2::mov static_cast(alternate_match_lists.insert(alternate_match_lists.end(), CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(new_list)))); } -#line 1724 "reflect.h2" +#line 6483 "reflect.h2" auto parse_context_group_state::swap(parse_context_group_state& t) & -> void{// NOLINT(performance-noexcept-swap) std::swap(cur_match_list, t.cur_match_list); std::swap(alternate_match_lists, t.alternate_match_lists); std::swap(modifiers, t.modifiers); } -#line 1731 "reflect.h2" +#line 6490 "reflect.h2" [[nodiscard]] auto parse_context_group_state::get_as_token() & -> token_ptr{ if (alternate_match_lists.empty()) { post_process_list(cur_match_list); @@ -3419,15 +10605,15 @@ std::string str {s}; return from_string(cpp2::string_util::replace_all(cpp2::mov } } -#line 1743 "reflect.h2" +#line 6502 "reflect.h2" auto parse_context_group_state::add(cpp2::impl::in token) & -> void{ cur_match_list.push_back(token); } -#line 1748 "reflect.h2" +#line 6507 "reflect.h2" [[nodiscard]] auto parse_context_group_state::empty() const& -> bool { return cur_match_list.empty(); } -#line 1752 "reflect.h2" +#line 6511 "reflect.h2" auto parse_context_group_state::post_process_list(token_vec& list) -> void{ // Merge all characters auto merge_pos {list.begin()}; @@ -3448,7 +10634,7 @@ std::string str {s}; return from_string(cpp2::string_util::replace_all(cpp2::mov , modifiers{ modifiers_ }{} parse_context_group_state::parse_context_group_state(){} -#line 1778 "reflect.h2" +#line 6537 "reflect.h2" [[nodiscard]] auto parse_context_branch_reset_state::next() & -> int{ auto g {cur_group}; cur_group += 1; @@ -3457,20 +10643,20 @@ parse_context_group_state::parse_context_group_state(){} return g; } -#line 1787 "reflect.h2" +#line 6546 "reflect.h2" auto parse_context_branch_reset_state::set_next(cpp2::impl::in g) & -> void{ cur_group = g; max_group = max(max_group, g); } -#line 1793 "reflect.h2" +#line 6552 "reflect.h2" auto parse_context_branch_reset_state::next_alternative() & -> void{ if (is_active) { cur_group = from; } } -#line 1800 "reflect.h2" +#line 6559 "reflect.h2" auto parse_context_branch_reset_state::set_active_reset(cpp2::impl::in restart) & -> void{ is_active = true; cur_group = restart; @@ -3485,16 +10671,16 @@ parse_context_group_state::parse_context_group_state(){} , from{ from_ }{} parse_context_branch_reset_state::parse_context_branch_reset_state(){} -#line 1828 "reflect.h2" +#line 6589 "reflect.h2" parse_context::parse_context(cpp2::impl::in r, auto const& e) : regex{ r } , root{ CPP2_UFCS_TEMPLATE_NONLOCAL(cpp2_new)(cpp2::shared, "") } , error_out{ e }{ -#line 1832 "reflect.h2" +#line 6593 "reflect.h2" } -#line 1838 "reflect.h2" +#line 6599 "reflect.h2" [[nodiscard]] auto parse_context::start_group() & -> parse_context_group_state { parse_context_group_state old_state {}; @@ -3504,7 +10690,7 @@ parse_context_branch_reset_state::parse_context_branch_reset_state(){} return old_state; } -#line 1848 "reflect.h2" +#line 6609 "reflect.h2" [[nodiscard]] auto parse_context::end_group(cpp2::impl::in old_state) & -> token_ptr { auto inner {cur_group_state.get_as_token()}; @@ -3512,17 +10698,17 @@ parse_context_branch_reset_state::parse_context_branch_reset_state(){} return inner; } -#line 1855 "reflect.h2" +#line 6616 "reflect.h2" [[nodiscard]] auto parse_context::get_modifiers() const& -> expression_flags{ return cur_group_state.modifiers; } -#line 1859 "reflect.h2" +#line 6620 "reflect.h2" auto parse_context::set_modifiers(cpp2::impl::in mod) & -> void{ cur_group_state.modifiers = mod; } -#line 1866 "reflect.h2" +#line 6627 "reflect.h2" [[nodiscard]] auto parse_context::branch_reset_new_state() & -> parse_context_branch_reset_state { parse_context_branch_reset_state old_state {}; @@ -3532,7 +10718,7 @@ parse_context_branch_reset_state::parse_context_branch_reset_state(){} return old_state; } -#line 1875 "reflect.h2" +#line 6636 "reflect.h2" auto parse_context::branch_reset_restore_state(cpp2::impl::in old_state) & -> void { auto max_group {cur_branch_reset_state.max_group}; @@ -3540,24 +10726,24 @@ parse_context_branch_reset_state::parse_context_branch_reset_state(){} cur_branch_reset_state.set_next(cpp2::move(max_group)); } -#line 1882 "reflect.h2" +#line 6643 "reflect.h2" auto parse_context::next_alternative() & -> void { cur_group_state.next_alternative(); cur_branch_reset_state.next_alternative(); } -#line 1890 "reflect.h2" +#line 6651 "reflect.h2" auto parse_context::add_token(cpp2::impl::in token) & -> void{ cur_group_state.add(token); } -#line 1894 "reflect.h2" +#line 6655 "reflect.h2" [[nodiscard]] auto parse_context::has_token() const& -> bool{ return !(cur_group_state.empty()); } -#line 1898 "reflect.h2" +#line 6659 "reflect.h2" [[nodiscard]] auto parse_context::pop_token() & -> token_ptr { token_ptr r {nullptr}; @@ -3569,22 +10755,22 @@ parse_context_branch_reset_state::parse_context_branch_reset_state(){} return r; } -#line 1909 "reflect.h2" +#line 6670 "reflect.h2" [[nodiscard]] auto parse_context::get_as_token() & -> token_ptr{ return root; } -#line 1915 "reflect.h2" +#line 6676 "reflect.h2" [[nodiscard]] auto parse_context::get_cur_group() const& -> int{ return cur_branch_reset_state.cur_group; } -#line 1919 "reflect.h2" +#line 6680 "reflect.h2" [[nodiscard]] auto parse_context::next_group() & -> int{ return cur_branch_reset_state.next(); } -#line 1923 "reflect.h2" +#line 6684 "reflect.h2" auto parse_context::set_named_group(cpp2::impl::in name, cpp2::impl::in id) & -> void { if (!(named_groups.contains(name))) {// Redefinition of group name is not an error. The left most one is retained. @@ -3592,7 +10778,7 @@ parse_context_branch_reset_state::parse_context_branch_reset_state(){} } } -#line 1930 "reflect.h2" +#line 6691 "reflect.h2" [[nodiscard]] auto parse_context::get_named_group(cpp2::impl::in name) const& -> int { auto iter {named_groups.find(name)}; @@ -3604,10 +10790,10 @@ parse_context_branch_reset_state::parse_context_branch_reset_state(){} } } -#line 1943 "reflect.h2" +#line 6704 "reflect.h2" [[nodiscard]] auto parse_context::current() const& -> char{return CPP2_ASSERT_IN_BOUNDS(regex, pos); } -#line 1946 "reflect.h2" +#line 6707 "reflect.h2" [[nodiscard]] auto parse_context::get_next_position(cpp2::impl::in in_class, cpp2::impl::in no_skip) const& -> size_t { auto perl_syntax {false}; @@ -3647,7 +10833,7 @@ parse_context_branch_reset_state::parse_context_branch_reset_state(){} return cur; } -#line 1986 "reflect.h2" +#line 6747 "reflect.h2" [[nodiscard]] auto parse_context::next_impl(cpp2::impl::in in_class, cpp2::impl::in no_skip) & -> bool { pos = get_next_position(in_class, no_skip); @@ -3659,14 +10845,14 @@ parse_context_branch_reset_state::parse_context_branch_reset_state(){} } } -#line 1997 "reflect.h2" +#line 6758 "reflect.h2" [[nodiscard]] auto parse_context::next() & -> decltype(auto) { return next_impl(false, false); } -#line 1998 "reflect.h2" +#line 6759 "reflect.h2" [[nodiscard]] auto parse_context::next_in_class() & -> decltype(auto) { return next_impl(true, false); } -#line 1999 "reflect.h2" +#line 6760 "reflect.h2" [[nodiscard]] auto parse_context::next_no_skip() & -> decltype(auto) { return next_impl(false, true); } -#line 2001 "reflect.h2" +#line 6762 "reflect.h2" [[nodiscard]] auto parse_context::next_n(cpp2::impl::in n) & -> bool{ auto r {true}; auto cur {0}; @@ -3676,10 +10862,10 @@ parse_context_branch_reset_state::parse_context_branch_reset_state(){} return r; } -#line 2010 "reflect.h2" +#line 6771 "reflect.h2" [[nodiscard]] auto parse_context::has_next() const& -> bool{return cpp2::impl::cmp_less(pos,regex.size()); } -#line 2012 "reflect.h2" +#line 6773 "reflect.h2" [[nodiscard]] auto parse_context::grab_until_impl(cpp2::impl::in e, cpp2::impl::out r, cpp2::impl::in any) & -> bool { auto end {pos}; // NOLINT(clang-analyzer-deadcode.DeadStores) @@ -3701,14 +10887,14 @@ parse_context_branch_reset_state::parse_context_branch_reset_state(){} } } -#line 2033 "reflect.h2" +#line 6794 "reflect.h2" [[nodiscard]] auto parse_context::grab_until(cpp2::impl::in e, cpp2::impl::out r) & -> decltype(auto) { return grab_until_impl(e, cpp2::impl::out(&r), false); } -#line 2034 "reflect.h2" +#line 6795 "reflect.h2" [[nodiscard]] auto parse_context::grab_until(cpp2::impl::in e, cpp2::impl::out r) & -> decltype(auto) { return grab_until_impl(std::string(1, e), cpp2::impl::out(&r), false); } -#line 2035 "reflect.h2" +#line 6796 "reflect.h2" [[nodiscard]] auto parse_context::grab_until_one_of(cpp2::impl::in e, cpp2::impl::out r) & -> decltype(auto) { return grab_until_impl(e, cpp2::impl::out(&r), true); } -#line 2037 "reflect.h2" +#line 6798 "reflect.h2" [[nodiscard]] auto parse_context::grab_n(cpp2::impl::in n, cpp2::impl::out r) & -> bool { if (cpp2::impl::cmp_less_eq(pos + cpp2::impl::as_(n),regex.size())) { @@ -3722,7 +10908,7 @@ parse_context_branch_reset_state::parse_context_branch_reset_state(){} } } -#line 2050 "reflect.h2" +#line 6811 "reflect.h2" [[nodiscard]] auto parse_context::grab_number() & -> std::string { auto start {pos}; @@ -3744,7 +10930,7 @@ parse_context_branch_reset_state::parse_context_branch_reset_state(){} return cpp2::move(r.value()); } -#line 2071 "reflect.h2" +#line 6832 "reflect.h2" [[nodiscard]] auto parse_context::peek_impl(cpp2::impl::in in_class) const& -> char{ auto next_pos {get_next_position(in_class, false)}; if (cpp2::impl::cmp_less(next_pos,regex.size())) { @@ -3755,12 +10941,12 @@ parse_context_branch_reset_state::parse_context_branch_reset_state(){} } } -#line 2081 "reflect.h2" +#line 6842 "reflect.h2" [[nodiscard]] auto parse_context::peek() const& -> decltype(auto) { return peek_impl(false); } -#line 2082 "reflect.h2" +#line 6843 "reflect.h2" [[nodiscard]] auto parse_context::peek_in_class() const& -> decltype(auto) { return peek_impl(true); } -#line 2087 "reflect.h2" +#line 6848 "reflect.h2" [[nodiscard]] auto parse_context::parser_group_modifiers(cpp2::impl::in change_str, expression_flags& parser_modifiers) & -> bool { auto is_negative {false}; @@ -3815,7 +11001,7 @@ parse_context_branch_reset_state::parse_context_branch_reset_state(){} return true; } -#line 2141 "reflect.h2" +#line 6902 "reflect.h2" [[nodiscard]] auto parse_context::parse_until(cpp2::impl::in term) & -> bool{ token_ptr cur_token {}; @@ -3839,6 +11025,7 @@ parse_context_branch_reset_state::parse_context_branch_reset_state(){} if (!(cur_token) && valid()) {cur_token = octal_token_parse((*this)); } if (!(cur_token) && valid()) {cur_token = range_token::parse((*this)); } if (!(cur_token) && valid()) {cur_token = special_range_token::parse((*this)); } + if (!(cur_token) && valid()) {cur_token = start_match_parse((*this)); } if (!(cur_token) && valid()) {cur_token = word_boundary_token_parse((*this)); } // Everything else is matched as it is. @@ -3854,7 +11041,7 @@ parse_context_branch_reset_state::parse_context_branch_reset_state(){} return true; } -#line 2179 "reflect.h2" +#line 6941 "reflect.h2" [[nodiscard]] auto parse_context::parse(cpp2::impl::in modifiers) & -> bool { @@ -3870,21 +11057,21 @@ parse_context_branch_reset_state::parse_context_branch_reset_state(){} return r; } -#line 2196 "reflect.h2" +#line 6958 "reflect.h2" [[nodiscard]] auto parse_context::get_pos() const& -> decltype(auto) { return pos; } -#line 2197 "reflect.h2" +#line 6959 "reflect.h2" [[nodiscard]] auto parse_context::get_range(cpp2::impl::in start, cpp2::impl::in end) const& -> decltype(auto) { return std::string(regex.substr(start, end - start + 1)); } -#line 2198 "reflect.h2" +#line 6960 "reflect.h2" [[nodiscard]] auto parse_context::valid() const& -> bool{return has_next() && !(has_error); } -#line 2200 "reflect.h2" +#line 6962 "reflect.h2" [[nodiscard]] auto parse_context::error(cpp2::impl::in err) & -> token_ptr{ has_error = true; error_out("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(err) + ""); return nullptr; } -#line 2215 "reflect.h2" +#line 6977 "reflect.h2" auto generation_function_context::add_tabs(cpp2::impl::in c) & -> void{ int i {0}; for( ; cpp2::impl::cmp_less(i,c); i += 1 ) { @@ -3892,7 +11079,7 @@ parse_context_branch_reset_state::parse_context_branch_reset_state(){} } } -#line 2222 "reflect.h2" +#line 6984 "reflect.h2" auto generation_function_context::remove_tabs(cpp2::impl::in c) & -> void{ tabs = tabs.substr(0, (cpp2::impl::as_(c)) * 2); } @@ -3902,22 +11089,22 @@ parse_context_branch_reset_state::parse_context_branch_reset_state(){} , tabs{ tabs_ }{} generation_function_context::generation_function_context(){} -#line 2240 "reflect.h2" +#line 7002 "reflect.h2" [[nodiscard]] auto generation_context::match_parameters() const& -> std::string{return "r.pos, ctx"; } -#line 2245 "reflect.h2" +#line 7007 "reflect.h2" auto generation_context::add(cpp2::impl::in s) & -> void{ auto cur {get_current()}; (*cpp2::impl::assert_not_null(cur)).code += "" + cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + cpp2::to_string(s) + "\n"; } -#line 2251 "reflect.h2" +#line 7013 "reflect.h2" auto generation_context::add_check(cpp2::impl::in check) & -> void{ auto cur {get_current()}; (*cpp2::impl::assert_not_null(cur)).code += "" + cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + "if !cpp2::regex::" + cpp2::to_string(check) + " { r.matched = false; break; }\n"; } -#line 2257 "reflect.h2" +#line 7019 "reflect.h2" auto generation_context::add_statefull(cpp2::impl::in next_func, cpp2::impl::in check) & -> void { end_func_statefull(check); @@ -3926,19 +11113,19 @@ generation_function_context::generation_function_context(){} start_func_named(cpp2::move(name)); } -#line 2265 "reflect.h2" +#line 7027 "reflect.h2" auto generation_context::start_func_named(cpp2::impl::in name) & -> void { auto cur {new_context()}; (*cpp2::impl::assert_not_null(cur)).code += "" + cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + cpp2::to_string(name) + ": @struct type = {\n"; - (*cpp2::impl::assert_not_null(cur)).code += "" + cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + " operator(): (this, cur: Iter, inout ctx: context, other) -> cpp2::regex::match_return = {\n"; + (*cpp2::impl::assert_not_null(cur)).code += "" + cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + " operator(): (this, cur: Iter, forward ctx, other) -> cpp2::regex::match_return = {\n"; (*cpp2::impl::assert_not_null(cur)).code += "" + cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + " r := ctx..pass(cur);\n"; (*cpp2::impl::assert_not_null(cur)).code += "" + cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + " do {\n"; (*cpp2::impl::assert_not_null(cpp2::move(cur))).add_tabs(3); } -#line 2276 "reflect.h2" +#line 7038 "reflect.h2" [[nodiscard]] auto generation_context::start_func() & -> std::string { auto name {gen_func_name()}; @@ -3946,7 +11133,7 @@ generation_function_context::generation_function_context(){} return cpp2::move(name) + "()"; } -#line 2283 "reflect.h2" +#line 7045 "reflect.h2" auto generation_context::end_func_statefull(cpp2::impl::in s) & -> void { auto cur {get_current()}; @@ -3959,6 +11146,7 @@ generation_function_context::generation_function_context(){} (*cpp2::impl::assert_not_null(cur)).code += "" + cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + " else {\n"; (*cpp2::impl::assert_not_null(cur)).code += "" + cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + " r.pos = ctx.end;\n"; (*cpp2::impl::assert_not_null(cur)).code += "" + cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + " }\n"; + (*cpp2::impl::assert_not_null(cur)).code += "" + cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + " _ = ctx;\n"; (*cpp2::impl::assert_not_null(cur)).code += "" + cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + " return r;\n"; (*cpp2::impl::assert_not_null(cur)).code += "" + cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + " }\n"; (*cpp2::impl::assert_not_null(cur)).code += "" + cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + "}\n"; @@ -3966,7 +11154,7 @@ generation_function_context::generation_function_context(){} finish_context(); } -#line 2303 "reflect.h2" +#line 7066 "reflect.h2" [[nodiscard]] auto generation_context::generate_func(cpp2::impl::in token) & -> std::string { auto name {start_func()}; @@ -3976,7 +11164,7 @@ generation_function_context::generation_function_context(){} return name; } -#line 2313 "reflect.h2" +#line 7076 "reflect.h2" [[nodiscard]] auto generation_context::generate_reset(cpp2::impl::in> groups) & -> std::string { if (groups.empty()) { @@ -3999,33 +11187,33 @@ generation_function_context::generation_function_context(){} return cpp2::move(name) + "()"; } -#line 2337 "reflect.h2" +#line 7100 "reflect.h2" [[nodiscard]] auto generation_context::gen_func_name() & -> std::string{ auto cur_id {matcher_func}; matcher_func += 1; return "func_" + cpp2::to_string(cpp2::move(cur_id)) + ""; } -#line 2343 "reflect.h2" +#line 7106 "reflect.h2" [[nodiscard]] auto generation_context::next_func_name() & -> std::string{ return gen_func_name() + "()"; } -#line 2347 "reflect.h2" +#line 7110 "reflect.h2" [[nodiscard]] auto generation_context::gen_reset_func_name() & -> std::string{ auto cur_id {reset_func}; reset_func += 1; return "reset_" + cpp2::to_string(cpp2::move(cur_id)) + ""; } -#line 2353 "reflect.h2" +#line 7116 "reflect.h2" [[nodiscard]] auto generation_context::gen_temp() & -> std::string{ auto cur_id {temp_name}; temp_name += 1; return "tmp_" + cpp2::to_string(cpp2::move(cur_id)) + ""; } -#line 2361 "reflect.h2" +#line 7124 "reflect.h2" [[nodiscard]] auto generation_context::new_context() & -> generation_function_context*{ gen_stack.push_back(generation_function_context()); auto cur {get_current()}; @@ -4034,7 +11222,7 @@ generation_function_context::generation_function_context(){} return cur; } -#line 2369 "reflect.h2" +#line 7132 "reflect.h2" auto generation_context::finish_context() & -> void{ auto cur {get_current()}; auto base {get_base()}; @@ -4043,22 +11231,22 @@ generation_function_context::generation_function_context(){} gen_stack.pop_back(); } -#line 2379 "reflect.h2" +#line 7142 "reflect.h2" [[nodiscard]] auto generation_context::get_current() & -> generation_function_context*{ return &gen_stack.back(); } -#line 2383 "reflect.h2" +#line 7146 "reflect.h2" [[nodiscard]] auto generation_context::get_base() & -> generation_function_context*{ return &CPP2_ASSERT_IN_BOUNDS_LITERAL(gen_stack, 0); } -#line 2387 "reflect.h2" +#line 7150 "reflect.h2" [[nodiscard]] auto generation_context::get_entry_func() const& -> std::string{ return entry_func; } -#line 2391 "reflect.h2" +#line 7154 "reflect.h2" [[nodiscard]] auto generation_context::create_named_group_lookup(cpp2::impl::in> named_groups) const& -> std::string { std::string res {"get_named_group_index: (name) -> int = {\n"}; @@ -4082,18 +11270,18 @@ generation_function_context::generation_function_context(){} return res; } -#line 2416 "reflect.h2" +#line 7179 "reflect.h2" [[nodiscard]] auto generation_context::run(cpp2::impl::in token) & -> std::string{ entry_func = generate_func(token); return (*cpp2::impl::assert_not_null(get_base())).code; } -#line 2431 "reflect.h2" +#line 7194 "reflect.h2" alternative_token::alternative_token() : regex_token_empty{ "" }{} -#line 2433 "reflect.h2" +#line 7196 "reflect.h2" [[nodiscard]] auto alternative_token::parse(parse_context& ctx) -> token_ptr{ if (ctx.current() != '|') {return nullptr; } @@ -4104,15 +11292,15 @@ generation_function_context::generation_function_context(){} alternative_token::~alternative_token() noexcept{} -#line 2448 "reflect.h2" +#line 7211 "reflect.h2" alternative_token_gen::alternative_token_gen(cpp2::impl::in a) : regex_token{ gen_string(a) } , alternatives{ a }{ -#line 2451 "reflect.h2" +#line 7214 "reflect.h2" } -#line 2453 "reflect.h2" +#line 7216 "reflect.h2" auto alternative_token_gen::generate_code(generation_context& ctx) const -> void { std::string functions {""}; @@ -4130,7 +11318,7 @@ generation_function_context::generation_function_context(){} ctx.add_statefull(next_name, "cpp2::regex::alternative_token_matcher::match(" + cpp2::to_string(ctx.match_parameters()) + ", other, " + cpp2::to_string(next_name) + " " + cpp2::to_string(cpp2::move(functions)) + ")"); } -#line 2470 "reflect.h2" +#line 7233 "reflect.h2" auto alternative_token_gen::add_groups(std::set& groups) const -> void { for ( auto const& cur : alternatives ) { @@ -4138,7 +11326,7 @@ generation_function_context::generation_function_context(){} } } -#line 2477 "reflect.h2" +#line 7240 "reflect.h2" [[nodiscard]] auto alternative_token_gen::gen_string(cpp2::impl::in a) -> std::string { std::string r {""}; @@ -4152,16 +11340,30 @@ generation_function_context::generation_function_context(){} return r; } +#line 7253 "reflect.h2" + [[nodiscard]] auto alternative_token_gen::reverse() const -> token_ptr{ + int s {cpp2::unchecked_narrow(alternatives.size())}; + + token_vec reverse_vec {}; + reverse_vec.resize(s); + + int i {0}; + for( ; cpp2::impl::cmp_less(i,s); (i += 1) ) { + CPP2_ASSERT_IN_BOUNDS(reverse_vec, i) = CPP2_UFCS(reverse)((*cpp2::impl::assert_not_null(CPP2_ASSERT_IN_BOUNDS(alternatives, i))));// We only reverse the alternatives, not the order in which they are checked. + } + return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(reverse_vec)); + } + alternative_token_gen::~alternative_token_gen() noexcept{} -#line 2498 "reflect.h2" +#line 7274 "reflect.h2" any_token::any_token(cpp2::impl::in single_line) : regex_token_check{ ".", "any_token_matcher" }{ -#line 2500 "reflect.h2" +#line 7276 "reflect.h2" } -#line 2502 "reflect.h2" +#line 7278 "reflect.h2" [[nodiscard]] auto any_token::parse(parse_context& ctx) -> token_ptr{ if ('.' != ctx.current()) {return nullptr; } @@ -4170,21 +11372,58 @@ generation_function_context::generation_function_context(){} any_token::~any_token() noexcept{} -#line 2519 "reflect.h2" +#line 7293 "reflect.h2" + atomic_group_token::atomic_group_token() + : regex_token{ "" }{} + +#line 7295 "reflect.h2" + [[nodiscard]] auto atomic_group_token::reverse() const -> token_ptr{ + auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; + (*cpp2::impl::assert_not_null(r)).inner_token = CPP2_UFCS(reverse)((*cpp2::impl::assert_not_null(inner_token))); + + return r; + } + +#line 7302 "reflect.h2" + auto atomic_group_token::generate_code(generation_context& ctx) const -> void + { + auto inner_name {ctx.generate_func(inner_token)}; + + auto next_name {ctx.next_func_name()}; + ctx.add_statefull(next_name, "cpp2::regex::atomic_group_matcher(" + cpp2::to_string(ctx.match_parameters()) + ", " + cpp2::to_string(cpp2::move(inner_name)) + ", other, " + cpp2::to_string(next_name) + ")"); + } + +#line 7310 "reflect.h2" + auto atomic_group_token::add_groups(std::set& groups) const -> void{ + (*cpp2::impl::assert_not_null(inner_token)).add_groups(groups); + } + + atomic_group_token::~atomic_group_token() noexcept{} + +#line 7324 "reflect.h2" char_token::char_token(cpp2::impl::in t, cpp2::impl::in ignore_case_) : regex_token{ std::string(1, t) } , token{ t } , ignore_case{ ignore_case_ }{ -#line 2523 "reflect.h2" +#line 7328 "reflect.h2" } -#line 2525 "reflect.h2" +#line 7330 "reflect.h2" + char_token::char_token(cpp2::impl::in t, cpp2::impl::in ignore_case_) + : regex_token{ t } + , token{ t } + , ignore_case{ ignore_case_ }{ + +#line 7334 "reflect.h2" + } + +#line 7336 "reflect.h2" [[nodiscard]] auto char_token::parse(parse_context& ctx) -> token_ptr{ return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ctx.current(), ctx.get_modifiers().has(expression_flags::case_insensitive)); } -#line 2529 "reflect.h2" +#line 7340 "reflect.h2" auto char_token::generate_code(generation_context& ctx) const -> void { if (ignore_case) { @@ -4193,14 +11432,14 @@ generation_function_context::generation_function_context(){} { size_t i{0}; -#line 2535 "reflect.h2" +#line 7346 "reflect.h2" for( ; cpp2::impl::cmp_less(i,token.size()); i += 1 ) { CPP2_ASSERT_IN_BOUNDS(lower, i) = string_util::safe_tolower(CPP2_ASSERT_IN_BOUNDS(token, i)); CPP2_ASSERT_IN_BOUNDS(upper, i) = string_util::safe_toupper(CPP2_ASSERT_IN_BOUNDS(token, i)); } } -#line 2540 "reflect.h2" +#line 7351 "reflect.h2" if (upper != lower) { gen_case_insensitive(cpp2::move(lower), cpp2::move(upper), ctx); } @@ -4213,7 +11452,7 @@ size_t i{0}; } } -#line 2552 "reflect.h2" +#line 7363 "reflect.h2" auto char_token::gen_case_insensitive(cpp2::impl::in lower, cpp2::impl::in upper, generation_context& ctx) const& -> void { std::string name {"str_" + cpp2::to_string(ctx.gen_temp()) + ""}; @@ -4235,7 +11474,7 @@ size_t i{0}; ctx.add("else { break; }"); } -#line 2573 "reflect.h2" +#line 7384 "reflect.h2" auto char_token::gen_case_sensitive(generation_context& ctx) const& -> void { std::string name {"str_" + cpp2::to_string(ctx.gen_temp()) + ""}; @@ -4254,7 +11493,7 @@ size_t i{0}; ctx.add("else { break; }"); } -#line 2591 "reflect.h2" +#line 7402 "reflect.h2" [[nodiscard]] auto char_token::add_escapes(std::string str) const& -> std::string { str = string_util::replace_all(str, "\\", "\\\\"); @@ -4270,7 +11509,14 @@ size_t i{0}; return cpp2::move(str); } -#line 2606 "reflect.h2" +#line 7417 "reflect.h2" + [[nodiscard]] auto char_token::reverse() const -> token_ptr{ + std::string reverse_str {token}; + std::reverse(reverse_str.begin(), reverse_str.end()); + return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(reverse_str), ignore_case); + } + +#line 7423 "reflect.h2" auto char_token::append(char_token const& that) & -> void{ (*this).token += that.token; (*this).string_rep += that.string_rep; @@ -4278,19 +11524,19 @@ size_t i{0}; char_token::~char_token() noexcept{} -#line 2623 "reflect.h2" +#line 7440 "reflect.h2" class_token::class_token(cpp2::impl::in negate_, cpp2::impl::in case_insensitive_, cpp2::impl::in class_str_, cpp2::impl::in str) : regex_token{ str } , negate{ negate_ } , case_insensitive{ case_insensitive_ } , class_str{ class_str_ } -#line 2624 "reflect.h2" +#line 7441 "reflect.h2" { -#line 2629 "reflect.h2" +#line 7446 "reflect.h2" } -#line 2632 "reflect.h2" +#line 7449 "reflect.h2" [[nodiscard]] auto class_token::parse(parse_context& ctx) -> token_ptr { if (ctx.current() != '[') {return nullptr; } @@ -4416,13 +11662,23 @@ size_t i{0}; ); } -#line 2757 "reflect.h2" +#line 7574 "reflect.h2" + [[nodiscard]] auto class_token::reverse() const -> token_ptr{ + return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, + negate, + case_insensitive, + class_str, + to_string() + ); + } + +#line 7583 "reflect.h2" auto class_token::generate_code(generation_context& ctx) const -> void { ctx.add_check("class_token_matcher::match(" + cpp2::to_string(ctx.match_parameters()) + ")"); } -#line 2762 "reflect.h2" +#line 7588 "reflect.h2" [[nodiscard]] auto class_token::create_matcher(cpp2::impl::in name, cpp2::impl::in template_arguments) -> std::string { auto sep {", "}; @@ -4433,12 +11689,12 @@ size_t i{0}; class_token::~class_token() noexcept{} -#line 2774 "reflect.h2" +#line 7600 "reflect.h2" [[nodiscard]] auto escape_token_parse(parse_context& ctx) -> token_ptr { if (ctx.current() != '\\') {return nullptr; } -#line 2779 "reflect.h2" +#line 7605 "reflect.h2" if (std::string::npos == std::string("afenrt^.[]()*{}?+|\\").find(ctx.peek())) { return nullptr; } @@ -4472,7 +11728,7 @@ size_t i{0}; } -#line 2815 "reflect.h2" +#line 7641 "reflect.h2" [[nodiscard]] auto global_group_reset_token_parse(parse_context& ctx) -> token_ptr { if (!((ctx.current() == '\\' && ctx.peek() == 'K'))) {return nullptr; } @@ -4481,18 +11737,19 @@ size_t i{0}; return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "\\K", "ctx..set_group_start(0, r.pos);"); } -#line 2837 "reflect.h2" - group_ref_token::group_ref_token(cpp2::impl::in id_, cpp2::impl::in case_insensitive_, cpp2::impl::in str) +#line 7664 "reflect.h2" + group_ref_token::group_ref_token(cpp2::impl::in id_, cpp2::impl::in case_insensitive_, cpp2::impl::in reverse_, cpp2::impl::in str) : regex_token{ str } , id{ id_ } , case_insensitive{ case_insensitive_ } -#line 2838 "reflect.h2" + , reverse_eval{ reverse_ } +#line 7665 "reflect.h2" { -#line 2842 "reflect.h2" +#line 7670 "reflect.h2" } -#line 2844 "reflect.h2" +#line 7672 "reflect.h2" [[nodiscard]] auto group_ref_token::parse(parse_context& ctx) -> token_ptr { if (ctx.current() != '\\') {return nullptr; } @@ -4591,32 +11848,56 @@ size_t i{0}; if (-1 == group_id) {return ctx.error("Group names does not exist. (Name is: " + cpp2::to_string(cpp2::move(group)) + ")"); } } - return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(group_id), ctx.get_modifiers().has(expression_flags::case_insensitive), cpp2::move(str)); + return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(group_id), ctx.get_modifiers().has(expression_flags::case_insensitive), false, cpp2::move(str)); + } + +#line 7773 "reflect.h2" + [[nodiscard]] auto group_ref_token::reverse() const -> token_ptr{ + return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, id, case_insensitive, !(reverse_eval), to_string()); } -#line 2945 "reflect.h2" +#line 7777 "reflect.h2" auto group_ref_token::generate_code(generation_context& ctx) const -> void{ - ctx.add_check("group_ref_token_matcher(" + cpp2::to_string(ctx.match_parameters()) + ")"); + ctx.add_check("group_ref_token_matcher(" + cpp2::to_string(ctx.match_parameters()) + ")"); } group_ref_token::~group_ref_token() noexcept{} -#line 2968 "reflect.h2" - [[nodiscard]] auto group_token::parse_lookahead(parse_context& ctx, cpp2::impl::in syntax, cpp2::impl::in positive) -> token_ptr +#line 7801 "reflect.h2" + [[nodiscard]] auto group_token::parse_lookahead_lookbehind(parse_context& ctx, cpp2::impl::in syntax, cpp2::impl::in lookahead, cpp2::impl::in positive) -> token_ptr { static_cast(ctx.next());// Skip last token defining the syntax - auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, positive)}; + auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, lookahead, positive)}; auto old_state {ctx.start_group()}; - if (!(ctx.parse_until(')'))) {return ctx.error("Lookahead without a closing bracket."); } + if (!(ctx.parse_until(')'))) {return ctx.error("Group without a closing bracket."); } (*cpp2::impl::assert_not_null(r)).inner = ctx.end_group(cpp2::move(old_state)); (*cpp2::impl::assert_not_null(r)).set_string("(" + cpp2::to_string(syntax) + cpp2::to_string((*cpp2::impl::assert_not_null((*cpp2::impl::assert_not_null(r)).inner)).to_string()) + ")"); + if (!(lookahead)) { + (*cpp2::impl::assert_not_null(r)).inner = (*cpp2::impl::assert_not_null((*cpp2::impl::assert_not_null(r)).inner)).reverse(); + } + + return r; + } + +#line 7819 "reflect.h2" + [[nodiscard]] auto group_token::parse_atomic_pattern(parse_context& ctx, cpp2::impl::in syntax) -> token_ptr + { + static_cast(ctx.next());// Skip last token defining the syntax + + auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; + + auto old_state {ctx.start_group()}; + if (!(ctx.parse_until(')'))) {return ctx.error("Group without a closing bracket."); } + (*cpp2::impl::assert_not_null(r)).inner_token = ctx.end_group(cpp2::move(old_state)); + (*cpp2::impl::assert_not_null(r)).set_string("(" + cpp2::to_string(syntax) + cpp2::to_string((*cpp2::impl::assert_not_null((*cpp2::impl::assert_not_null(r)).inner_token)).to_string()) + ")"); + return r; } -#line 2982 "reflect.h2" +#line 7833 "reflect.h2" [[nodiscard]] auto group_token::parse(parse_context& ctx) -> token_ptr { if (ctx.current() != '(') {return nullptr; } @@ -4636,7 +11917,14 @@ size_t i{0}; // Special group if (!(ctx.next_no_skip())) {return ctx.error("Missing character after group opening."); } - if (ctx.current() == '<' || ctx.current() == '\'') + if ( CPP2_UFCS(current)(ctx) == '<' && (CPP2_UFCS(peek)(ctx) == '=' || CPP2_UFCS(peek)(ctx) == '!')) + { + // Lookbehind + static_cast(CPP2_UFCS(next)(ctx));// Skip the '<' + + return parse_lookahead_lookbehind(ctx, "?<" + cpp2::to_string(ctx.current()) + "", false, ctx.current() == '='); + } + else {if (ctx.current() == '<' || ctx.current() == '\'') { // Named group auto end_char {ctx.current()}; @@ -4687,7 +11975,13 @@ size_t i{0}; } else {if (ctx.current() == '=' || ctx.current() == '!') { - return parse_lookahead(ctx, "?" + cpp2::to_string(ctx.current()) + "", ctx.current() == '='); + // Lookahead + return parse_lookahead_lookbehind(ctx, "?" + cpp2::to_string(ctx.current()) + "", true, ctx.current() == '='); + } + else {if (ctx.current() == '>') + { + // Atomic pattern + return parse_atomic_pattern(ctx, "?" + cpp2::to_string(ctx.current()) + ""); } else { @@ -4704,7 +11998,7 @@ size_t i{0}; else { if (!(ctx.next())) { return ctx. error("Missing ending bracket for group."); }/* skip ':' */ } - }}}} + }}}}}} } else {if (ctx.current() == '*') { @@ -4714,14 +12008,23 @@ size_t i{0}; if (!(ctx.grab_until(':', cpp2::impl::out(&name)))) {return ctx.error("Missing colon for named pattern."); } if (name == "pla" || name == "positive_lookahead") { - return parse_lookahead(ctx, "*" + cpp2::to_string(cpp2::move(name)) + ":", true); + return parse_lookahead_lookbehind(ctx, "*" + cpp2::to_string(cpp2::move(name)) + ":", true, true); } else {if (name == "nla" || name == "negative_lookahead") { - return parse_lookahead(ctx, "*" + cpp2::to_string(cpp2::move(name)) + ":", false); + return parse_lookahead_lookbehind(ctx, "*" + cpp2::to_string(cpp2::move(name)) + ":", true, false); + } + else {if (name == "plb" || name == "positive_lookbehind") { + return parse_lookahead_lookbehind(ctx, "*" + cpp2::to_string(cpp2::move(name)) + ":", false, true); + } + else {if (name == "nlb" || name == "negative_lookbehind") { + return parse_lookahead_lookbehind(ctx, "*" + cpp2::to_string(cpp2::move(name)) + ":", false, false); + } + else {if (name == "atomic") { + return parse_atomic_pattern(ctx, "*" + cpp2::to_string(cpp2::move(name)) + ":"); } else { return ctx.error("Unknown named group pattern: '" + cpp2::to_string(cpp2::move(name)) + "'"); - }} + }}}}} }} if (cpp2::move(has_pattern)) @@ -4754,7 +12057,16 @@ size_t i{0}; } } -#line 3119 "reflect.h2" +#line 7992 "reflect.h2" + [[nodiscard]] auto group_token::reverse() const -> token_ptr{ + auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; + (*cpp2::impl::assert_not_null(r)).number = number; + (*cpp2::impl::assert_not_null(r)).reverse_eval = !(reverse_eval); + (*cpp2::impl::assert_not_null(r)).inner = CPP2_UFCS(reverse)((*cpp2::impl::assert_not_null(inner))); + return r; + } + +#line 8000 "reflect.h2" [[nodiscard]] auto group_token::gen_string(cpp2::impl::in name, cpp2::impl::in name_brackets, cpp2::impl::in has_modifier, cpp2::impl::in modifiers, cpp2::impl::in inner_) -> std::string { std::string start {"("}; @@ -4773,16 +12085,27 @@ size_t i{0}; return cpp2::move(start) + (*cpp2::impl::assert_not_null(inner_)).to_string() + ")"; } -#line 3137 "reflect.h2" +#line 8018 "reflect.h2" auto group_token::generate_code(generation_context& ctx) const -> void { if (-1 != number) { - ctx.add("ctx..set_group_start(" + cpp2::to_string(number) + ", r.pos);"); + if (reverse_eval) { + ctx.add("ctx..set_group_end(" + cpp2::to_string(number) + ", r.pos);"); + } + else { + ctx.add("ctx..set_group_start(" + cpp2::to_string(number) + ", r.pos);"); + } } (*cpp2::impl::assert_not_null(inner)).generate_code(ctx); if (-1 != number) { - ctx.add("ctx..set_group_end(" + cpp2::to_string(number) + ", r.pos);"); + if (reverse_eval) { + ctx.add("ctx..set_group_start(" + cpp2::to_string(number) + ", r.pos);"); + } + else { + ctx.add("ctx..set_group_end(" + cpp2::to_string(number) + ", r.pos);"); + } + auto tmp_name {ctx.gen_temp()}; ctx.add("" + cpp2::to_string(tmp_name) + "_func := :() = {"); ctx.add(" if !r&$*.matched {"); @@ -4794,7 +12117,7 @@ size_t i{0}; } } -#line 3157 "reflect.h2" +#line 8049 "reflect.h2" auto group_token::add_groups(std::set& groups) const -> void { (*cpp2::impl::assert_not_null(inner)).add_groups(groups); @@ -4805,7 +12128,7 @@ size_t i{0}; group_token::~group_token() noexcept{} -#line 3169 "reflect.h2" +#line 8061 "reflect.h2" [[nodiscard]] auto hexadecimal_token_parse(parse_context& ctx) -> token_ptr { if (!((ctx.current() == '\\' && ctx.peek() == 'x'))) {return nullptr; } @@ -4844,7 +12167,7 @@ size_t i{0}; return r; } -#line 3210 "reflect.h2" +#line 8102 "reflect.h2" [[nodiscard]] auto line_end_token_parse(parse_context& ctx) -> token_ptr { if (ctx.current() == '$' || (ctx.current() == '\\' && ctx.peek() == '$')) { @@ -4862,7 +12185,7 @@ size_t i{0}; }} } -#line 3230 "reflect.h2" +#line 8122 "reflect.h2" [[nodiscard]] auto line_start_token_parse(parse_context& ctx) -> token_ptr { if (ctx.current() != '^' && !((ctx.current() == '\\' && ctx.peek() == 'A'))) {return nullptr; } @@ -4876,29 +12199,43 @@ size_t i{0}; } } -#line 3255 "reflect.h2" - lookahead_token::lookahead_token(cpp2::impl::in positive_) +#line 8148 "reflect.h2" + lookahead_lookbehind_token::lookahead_lookbehind_token(cpp2::impl::in lookahead_, cpp2::impl::in positive_) : regex_token{ "" } + , lookahead{ lookahead_ } , positive{ positive_ }{ -#line 3257 "reflect.h2" +#line 8151 "reflect.h2" } -#line 3259 "reflect.h2" - auto lookahead_token::generate_code(generation_context& ctx) const -> void{ +#line 8153 "reflect.h2" + auto lookahead_lookbehind_token::generate_code(generation_context& ctx) const -> void{ auto inner_name {ctx.generate_func(inner)}; - ctx.add_check("lookahead_token_matcher(" + cpp2::to_string(ctx.match_parameters()) + ", " + cpp2::to_string(cpp2::move(inner_name)) + ")"); + if (lookahead) { + ctx.add_check("lookahead_token_matcher(" + cpp2::to_string(ctx.match_parameters()) + ", " + cpp2::to_string(cpp2::move(inner_name)) + ")"); + } + else { + ctx.add_check("lookbehind_token_matcher(" + cpp2::to_string(ctx.match_parameters()) + ", " + cpp2::to_string(cpp2::move(inner_name)) + ")"); + } + } + +#line 8164 "reflect.h2" + [[nodiscard]] auto lookahead_lookbehind_token::reverse() const -> token_ptr{ + auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, lookahead, positive)}; + (*cpp2::impl::assert_not_null(r)).inner = inner;// We do not reverse here. Nested lookahead and lookbehind stay as they are. + + return r; } -#line 3265 "reflect.h2" - auto lookahead_token::add_groups(std::set& groups) const -> void{ +#line 8171 "reflect.h2" + auto lookahead_lookbehind_token::add_groups(std::set& groups) const -> void{ (*cpp2::impl::assert_not_null(inner)).add_groups(groups); } - lookahead_token::~lookahead_token() noexcept{} + lookahead_lookbehind_token::~lookahead_lookbehind_token() noexcept{} -#line 3273 "reflect.h2" +#line 8179 "reflect.h2" [[nodiscard]] auto named_class_token_parse(parse_context& ctx) -> token_ptr { if (ctx.current() != '\\') {return nullptr; } @@ -4924,7 +12261,7 @@ size_t i{0}; return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "\\" + cpp2::to_string(ctx.current()) + "", "" + cpp2::to_string(cpp2::move(name)) + "::match"); } -#line 3301 "reflect.h2" +#line 8207 "reflect.h2" [[nodiscard]] auto octal_token_parse(parse_context& ctx) -> token_ptr { if (!((ctx.current() == '\\' && ctx.peek() == 'o'))) {return nullptr; } @@ -4950,11 +12287,11 @@ size_t i{0}; return r; } -#line 3338 "reflect.h2" +#line 8244 "reflect.h2" range_token::range_token() : regex_token{ "" }{} -#line 3340 "reflect.h2" +#line 8246 "reflect.h2" [[nodiscard]] auto range_token::parse(parse_context& ctx) -> token_ptr { auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; @@ -5028,7 +12365,7 @@ size_t i{0}; return nullptr; } -#line 3413 "reflect.h2" +#line 8319 "reflect.h2" auto range_token::parse_modifier(parse_context& ctx) & -> void { if (ctx.peek() == '?') { @@ -5041,7 +12378,7 @@ size_t i{0}; }} } -#line 3425 "reflect.h2" +#line 8331 "reflect.h2" [[nodiscard]] auto range_token::gen_mod_string() const& -> std::string { if (kind == range_flags::not_greedy) { @@ -5055,7 +12392,7 @@ size_t i{0}; }} } -#line 3438 "reflect.h2" +#line 8344 "reflect.h2" [[nodiscard]] auto range_token::gen_range_string() const& -> std::string { std::string r {""}; @@ -5075,7 +12412,18 @@ size_t i{0}; return r; } -#line 3457 "reflect.h2" +#line 8363 "reflect.h2" + [[nodiscard]] auto range_token::reverse() const -> token_ptr{ + auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; + (*cpp2::impl::assert_not_null(r)).min_count = min_count; + (*cpp2::impl::assert_not_null(r)).max_count = max_count; + (*cpp2::impl::assert_not_null(r)).kind = kind; + (*cpp2::impl::assert_not_null(r)).inner_token = CPP2_UFCS(reverse)((*cpp2::impl::assert_not_null(inner_token))); + + return r; + } + +#line 8373 "reflect.h2" auto range_token::generate_code(generation_context& ctx) const -> void { auto inner_name {ctx.generate_func(inner_token)}; @@ -5087,14 +12435,14 @@ size_t i{0}; ctx.add_statefull(next_name, "cpp2::regex::range_token_matcher::match(" + cpp2::to_string(ctx.match_parameters()) + ", " + cpp2::to_string(cpp2::move(inner_name)) + ", " + cpp2::to_string(cpp2::move(reset_name)) + ", other, " + cpp2::to_string(next_name) + ")"); } -#line 3468 "reflect.h2" +#line 8384 "reflect.h2" auto range_token::add_groups(std::set& groups) const -> void{ (*cpp2::impl::assert_not_null(inner_token)).add_groups(groups); } range_token::~range_token() noexcept{} -#line 3481 "reflect.h2" +#line 8396 "reflect.h2" [[nodiscard]] auto special_range_token::parse(parse_context& ctx) -> token_ptr { auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; @@ -5118,7 +12466,7 @@ size_t i{0}; if (!(ctx.has_token())) {return ctx.error("'" + cpp2::to_string(ctx.current()) + "' without previous element."); } -#line 3505 "reflect.h2" +#line 8420 "reflect.h2" (*cpp2::impl::assert_not_null(r)).parse_modifier(ctx); (*cpp2::impl::assert_not_null(r)).inner_token = ctx.pop_token(); @@ -5128,7 +12476,23 @@ size_t i{0}; special_range_token::~special_range_token() noexcept{} -#line 3518 "reflect.h2" +#line 8432 "reflect.h2" +[[nodiscard]] auto start_match_parse(parse_context& ctx) -> token_ptr +{ + if (ctx.current() != '\\') {return nullptr; } + + if (ctx.peek() == 'G') { + if (0 != ctx.get_pos()) {return ctx.error("\\G is only supported at the first position in the regex."); } + static_cast(ctx.next()); + ctx.is_start_match = true; + return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "\\G"); + } + else { + return nullptr; + } +} + +#line 8452 "reflect.h2" [[nodiscard]] auto word_boundary_token_parse(parse_context& ctx) -> token_ptr { if (ctx.current() != '\\') {return nullptr; } @@ -5146,15 +12510,15 @@ size_t i{0}; }} } -#line 3554 "reflect.h2" +#line 8488 "reflect.h2" template regex_generator::regex_generator(cpp2::impl::in r, Error_out const& e) : regex{ r } , error_out{ e }{ -#line 3557 "reflect.h2" +#line 8491 "reflect.h2" } -#line 3559 "reflect.h2" +#line 8493 "reflect.h2" template [[nodiscard]] auto regex_generator::parse() & -> std::string { // Extract modifiers and adapt regex. @@ -5166,12 +12530,11 @@ size_t i{0}; } source += "{\n"; - source += " wrap: type = {\n"; // TODO: Remove wrapper when template template parameters are available. - source += " context: type == cpp2::regex::match_context;"; + source += " context: type == cpp2::regex::match_context;"; generation_context gen_ctx {}; source += gen_ctx.run(parse_ctx.get_as_token()); - source += " entry: (cur: Iter, inout ctx: context) -> cpp2::regex::match_return = {\n"; + source += " entry: (cur: Iter, inout ctx: context) -> cpp2::regex::match_return = {\n"; source += " ctx..set_group_start(0, cur);\n"; source += " r := " + cpp2::to_string(gen_ctx.get_entry_func()) + "(cur, ctx, cpp2::regex::true_end_func());\n"; source += " if r.matched { ctx..set_group_end(0, r.pos); }\n"; @@ -5179,10 +12542,11 @@ size_t i{0}; source += " }\n"; source += cpp2::move(gen_ctx).create_named_group_lookup(parse_ctx.named_groups); - source += "}\n"; + source += " is_start_match: () -> bool == " + cpp2::to_string(parse_ctx.is_start_match) + ";"; auto string {(*cpp2::impl::assert_not_null(parse_ctx.get_as_token())).to_string()}; source += " to_string: () -> std::string = { return R\"(" + cpp2::to_string(modifier_escape) + cpp2::to_string(cpp2::move(string)) + cpp2::to_string(modifier_escape) + cpp2::to_string(modifier) + ")\"; }\n"; + source += "}\n"; static_cast(cpp2::move(parse_ctx)); @@ -5190,7 +12554,7 @@ size_t i{0}; return source; } -#line 3594 "reflect.h2" +#line 8528 "reflect.h2" template auto regex_generator::extract_modifiers() & -> void { if (regex.find_first_of("'/") == 0) { @@ -5206,7 +12570,7 @@ size_t i{0}; } } -#line 3610 "reflect.h2" +#line 8544 "reflect.h2" template [[nodiscard]] auto generate_regex(cpp2::impl::in regex, Err const& err) -> std::string { regex_generator parser {regex, err}; @@ -5215,7 +12579,7 @@ template [[nodiscard]] auto generate_regex(cpp2::impl::in void { auto has_default {false}; @@ -5262,15 +12626,15 @@ auto regex_gen(meta::type_declaration& t) -> void auto regular_expression {generate_regex(expr.second, [_0 = t](auto const& message) mutable -> decltype(auto) { return CPP2_UFCS(error)(_0, message); })}; if (!(regular_expression.empty())) { - CPP2_UFCS(add_member)(t, "public " + cpp2::to_string(expr.first) + "_matcher: type = " + cpp2::to_string(cpp2::move(regular_expression)) + ""); - CPP2_UFCS(add_member)(t, "public " + cpp2::to_string(expr.first) + ": cpp2::regex::regular_expression = ();"); + CPP2_UFCS(add_member)(t, "public " + cpp2::to_string(expr.first) + "_matcher: type = " + cpp2::to_string(cpp2::move(regular_expression)) + ""); + CPP2_UFCS(add_member)(t, "public " + cpp2::to_string(expr.first) + ": cpp2::regex::regular_expression> = ();\n"); } } CPP2_UFCS(add_runtime_support_include)(t, "cpp2regex.h"); } -#line 3679 "reflect.h2" +#line 8613 "reflect.h2" [[nodiscard]] auto apply_metafunctions( declaration_node& n, type_declaration& rtype, @@ -5331,6 +12695,9 @@ auto regex_gen(meta::type_declaration& t) -> void else {if (name == "copyable") { copyable(rtype); } + else {if (name == "copy_constructible") { + copy_constructible(rtype); + } else {if (name == "hashable") { hashable(rtype); } @@ -5361,28 +12728,50 @@ auto regex_gen(meta::type_declaration& t) -> void else {if (name == "union") { cpp2_union(rtype); } + else {if (name == "encapsulated") { + encapsulated(rtype); + } + else {if (name == "noncopyable") { + noncopyable(rtype); + } + else {if (name == "singleton") { + singleton(rtype); + } else {if (name == "print") { print(rtype); } + else {if (name == "noisy") { + noisy(rtype); + } + else {if (name == "python") { + python(rtype); + } + else {if (name == "javascript") { + javascript(rtype); + } + else {if (name == "autodiff") { + autodiff(rtype); + } else {if (name == "regex") { regex_gen(rtype); } + else {if (name == "sample_traverser") { + sample_traverser(rtype); + } else { error("unrecognized metafunction name: " + cpp2::move(name)); error( - "(temporary alpha limitation) currently the supported names are: " - "interface, polymorphic_base, ordered, weakly_ordered, partially_ordered, " - "copyable, basic_value, value, weakly_ordered_value, partially_ordered_value, " - "struct, enum, flag_enum, union, cpp1_rule_of_zero, regex, print" + "the current supported names are listed at " + "https://hsutter.github.io/cppfront/cpp2/metafunctions/#built-in-metafunctions" ); return false; - }}}}}}}}}}}}}}}}}} + }}}}}}}}}}}}}}}}}}}}}}}}}}} } return true; } -#line 3791 "reflect.h2" +#line 8750 "reflect.h2" } } diff --git a/source/reflect.h2 b/source/reflect.h2 index 734fa728a..2e27ed682 100644 --- a/source/reflect.h2 +++ b/source/reflect.h2 @@ -1,14 +1,9 @@ -// Copyright (c) Herb Sutter -// SPDX-License-Identifier: CC-BY-NC-ND-4.0 - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. +// Copyright 2022-2026 Herb Sutter +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +// Part of the Cppfront Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://github.com/hsutter/cppfront/blob/main/LICENSE for license information. //=========================================================================== @@ -31,12 +26,15 @@ meta: namespace = { //----------------------------------------------------------------------- // -compiler_services: @polymorphic_base @copyable type = +compiler_services: @polymorphic_base @copy_constructible type = { // Common data members // errors : *std::vector; includes : *std::set; + extra_cpp1 : *std::vector; + extra_build : *std::vector; + file_name : std::string; errors_original_size : int; generated_tokens : *stable_vector; parser : cpp2::parser; @@ -50,18 +48,26 @@ compiler_services: @polymorphic_base @copyable type = out this, errors_ : *std::vector, includes_ : *std::set, + extra_cpp1_ : *std::vector, + extra_build_ : *std::vector, + filename : std::string, generated_tokens_: *stable_vector ) = { errors = errors_; includes = includes_; + extra_cpp1 = extra_cpp1_; + extra_build = extra_build_; + file_name = filename; errors_original_size = cpp2::unchecked_narrow(std::ssize(errors*)); generated_tokens = generated_tokens_; - parser = (errors*, includes*); + parser = (errors*, includes*, extra_cpp1*, extra_build*, file_name); } // Common API // + filename: (this) -> std::string_view = file_name; + set_metafunction_name: (inout this, name: std::string_view, args: std::vector) = { metafunction_name = name; metafunction_args = args; @@ -133,12 +139,24 @@ compiler_services: @polymorphic_base @copyable type = tokens*.get_map().begin()*.second, generated_tokens* ); - if !ret { + if !(ret as bool) { error( "parse failed - the source string is not a valid statement:\n(original_source)$"); } } - add_runtime_support_include: (inout this, s: std::string_view) = _=includes*.emplace( s ); + add_runtime_support_include: (inout this, s: std::string_view, angles: bool = false) = { + inc: std::string = s; + if angles { + inc = "<" + inc + ">"; + } + else { + inc = "\"" + inc + "\""; + } + _=includes*.emplace( inc ); + } + + add_extra_cpp1_code : (inout this, s: std::string) = extra_cpp1 *.push_back( s ); + add_extra_build_step: (inout this, s: std::string) = extra_build*.push_back( s+"\n" ); position: (virtual this) -> source_position @@ -184,41 +202,37 @@ compiler_services: @polymorphic_base @copyable type = } -/* //----------------------------------------------------------------------- // -// Type IDs +// All reflection types are wrappers around a pointer to node // //----------------------------------------------------------------------- // -// All type_ids are wrappers around a pointer to node -// -type_id: @polymorphic_base @copyable type = +reflection_base: @polymorphic_base @copy_constructible type = { this: compiler_services = (); - n: *type_id_node; + protected n: *T; protected operator=: ( out this, - n_: *type_id_node, + n_: *T, s : compiler_services ) = { compiler_services = s; n = n_; - assert( n, "a meta::type_id must point to a valid type_id_node, not null" ); + assert( n, "a meta:: reflection must point to a valid node, not null" ); } - is_wildcard : (this) -> bool = n*.is_wildcard(); - is_pointer_qualified: (this) -> bool = n*.is_pointer_qualified(); - template_args_count : (this) -> int = n*.template_arguments().ssize(); - to_string : (this) -> std::string = n*.to_string(); - position: (override this) -> source_position = n*.position(); + + print: (this) -> std::string = n*.pretty_print_visualize(0); + + is_same: (this, o: reflection_base) -> bool = n == o.n; // Test pointers + is_same: (this, _: reflection_base) -> bool = false; // Different types => false } -*/ //----------------------------------------------------------------------- @@ -228,37 +242,12 @@ type_id: @polymorphic_base @copyable type = //----------------------------------------------------------------------- // -// All declarations are wrappers around a pointer to node -// -declaration_base: @polymorphic_base @copyable type = -{ - this: compiler_services = (); - - protected n: *declaration_node; - - protected operator=: ( - out this, - n_: *declaration_node, - s : compiler_services - ) - = { - compiler_services = s; - n = n_; - assert( n, "a meta::declaration must point to a valid declaration_node, not null" ); - } - - position: (override this) -> source_position = n*.position(); - - print: (this) -> std::string = n*.pretty_print_visualize(0); -} - - //----------------------------------------------------------------------- // All declarations // -declaration: @polymorphic_base @copyable type = +declaration: @polymorphic_base @copy_constructible type = { - this: declaration_base = (); + this: reflection_base = (); operator=: ( out this, @@ -266,7 +255,7 @@ declaration: @polymorphic_base @copyable type = s : compiler_services ) = { - declaration_base = (n_, s); + reflection_base = (n_, s); } is_public : (this) -> bool = n*.is_public(); @@ -292,6 +281,8 @@ declaration: @polymorphic_base @copyable type = has_initializer: (this) -> bool = n*.has_initializer(); + get_initializer: (this) -> statement = (n*.initializer.get(), this); + is_global : (this) -> bool = n*.is_global(); is_function : (this) -> bool = n*.is_function(); is_object : (this) -> bool = n*.is_object(); @@ -307,18 +298,19 @@ declaration: @polymorphic_base @copyable type = is_function_expression : (this) -> bool = n*.is_function_expression(); - as_function : (this) -> function_declaration = function_declaration(n, this); - as_object : (this) -> object_declaration = object_declaration(n, this); - as_type : (this) -> type_declaration = type_declaration(n, this); - as_alias : (this) -> alias_declaration = alias_declaration(n, this); + as_function : (this) -> function_declaration = (n, this); + as_object : (this) -> object_declaration = (n, this); + as_type : (this) -> type_declaration = (n, this); + as_nonglobal_namespace: (this) -> namespace_declaration = (n, this); + as_alias : (this) -> alias_declaration = (n, this); - get_parent : (this) -> declaration = declaration(n*.parent_declaration, this); + get_parent : (this) -> declaration = declaration(n*.parent_declaration, this); - parent_is_function : (this) -> bool = n*.parent_is_function(); - parent_is_object : (this) -> bool = n*.parent_is_object(); - parent_is_type : (this) -> bool = n*.parent_is_type(); - parent_is_namespace : (this) -> bool = n*.parent_is_namespace(); - parent_is_alias : (this) -> bool = n*.parent_is_alias(); + parent_is_function : (this) -> bool = n*.parent_is_function(); + parent_is_object : (this) -> bool = n*.parent_is_object(); + parent_is_type : (this) -> bool = n*.parent_is_type(); + parent_is_nonglobal_namespace: (this) -> bool = n*.parent_is_nonglobal_namespace(); + parent_is_alias : (this) -> bool = n*.parent_is_alias(); parent_is_type_alias : (this) -> bool = n*.parent_is_type_alias(); parent_is_namespace_alias : (this) -> bool = n*.parent_is_namespace_alias(); @@ -338,7 +330,7 @@ declaration: @polymorphic_base @copyable type = //----------------------------------------------------------------------- // Function declarations // -function_declaration: @copyable type = +function_declaration: @copy_constructible type = { this: declaration = (); @@ -354,6 +346,8 @@ function_declaration: @copyable type = index_of_parameter_named : (this, s: std::string_view) -> int = n*.index_of_parameter_named(s); has_parameter_named : (this, s: std::string_view) -> bool = n*.has_parameter_named(s); + has_return_named : (this, s: std::string_view) -> bool = n*.has_return_named(s); + has_parameter_or_return_named: (this, s: std::string_view) -> bool = n*.has_parameter_or_return_named(s); has_in_parameter_named : (this, s: std::string_view) -> bool = n*.has_in_parameter_named(s); has_in_ref_parameter_named : (this, s: std::string_view) -> bool = n*.has_in_ref_parameter_named(s); has_copy_parameter_named : (this, s: std::string_view) -> bool = n*.has_copy_parameter_named(s); @@ -388,20 +382,37 @@ function_declaration: @copyable type = has_bool_return_type : (this) -> bool = n*.has_bool_return_type(); has_non_void_return_type : (this) -> bool = n*.has_non_void_return_type(); - unnamed_return_type : (this) -> std::string = n*.unnamed_return_type_to_string(); + has_compound_body : (this) -> bool = n*.is_function_with_compound_body(); + + get_body : (this) -> statement = (n*.get_function_body(), this); + get_compound_body : (this) -> compound_statement = (n*.get_function_compound_body(), this); + get_unnamed_return_type : (this) -> std::string = n*.unnamed_return_type_to_string(); + get_signature : (this) -> std::string = n*.signature_to_string(); + + is_binary_comparison_function: (this) -> bool = n*.is_binary_comparison_function(); get_parameters: (this) - -> std::vector + -> std::vector = { - ret: std::vector = (); + ret: std::vector = (); for n*.get_function_parameters() do (param) { - _ = ret.emplace_back( param*.declaration*&, this ); + _ = ret.emplace_back( param, this ); } return ret; } - is_binary_comparison_function: (this) -> bool = n*.is_binary_comparison_function(); + get_returns: (this) + -> std::vector + = { + ret: std::vector = (); + for n*.get_function_returns() do (param) { + _ = ret.emplace_back( param, this ); + } + return ret; + } + // Modifying operations + // default_to_virtual : (inout this) = _ = n*.make_function_virtual(); make_virtual : (inout this) -> bool = n*.make_function_virtual(); @@ -410,11 +421,6 @@ function_declaration: @copyable type = pre (!has_initializer(), "cannot add an initializer to a function that already has one") pre (parent_is_type(), "cannot add an initializer to a function that isn't in a type scope") = { - //require( !has_initializer(), - // "cannot add an initializer to a function that already has one"); - //require( parent_is_type(), - // "cannot add an initializer to a function that isn't in a type scope"); - stmt := parse_statement(source); if !(stmt as bool) { error( "cannot add an initializer that is not a valid statement"); @@ -429,7 +435,7 @@ function_declaration: @copyable type = //----------------------------------------------------------------------- // Object declarations // -object_declaration: @copyable type = +object_declaration: @copy_constructible type = { this: declaration = (); @@ -463,9 +469,9 @@ object_declaration: @copyable type = //----------------------------------------------------------------------- -// Type declarations +// Type and namespace declarations // -type_declaration: @copyable type = +type_or_namespace_declaration: @copy_constructible type = { this: declaration = (); @@ -476,7 +482,7 @@ type_declaration: @copyable type = ) = { declaration = (n_, s); - assert( n*.is_type() ); + assert( n*.is_type() || n*.is_namespace() ); } reserve_names: (this, name: std::string_view, forward etc...) = @@ -493,15 +499,11 @@ type_declaration: @copyable type = } } - is_polymorphic: (this) -> bool = n*.is_polymorphic(); - is_final : (this) -> bool = n*.is_type_final(); - make_final : (inout this) -> bool = n*.make_type_final(); - get_member_functions: (this) -> std::vector = { ret: std::vector = (); - for n*.get_type_scope_declarations(declaration_node::functions) + for n*.get_nested_declarations(declaration_node::functions) do (d) { _ = ret.emplace_back( d, this ); } @@ -512,7 +514,7 @@ type_declaration: @copyable type = -> std::vector = { ret: std::vector = (); - for n*.get_type_scope_declarations(declaration_node::functions) + for n*.get_nested_declarations(declaration_node::functions) do (d) if !d*.has_initializer() && !d*.is_virtual_function() @@ -527,7 +529,7 @@ type_declaration: @copyable type = -> std::vector = { ret: std::vector = (); - for n*.get_type_scope_declarations(declaration_node::objects) do (d) { + for n*.get_nested_declarations(declaration_node::objects) do (d) { _ = ret.emplace_back( d, this ); } return ret; @@ -537,7 +539,7 @@ type_declaration: @copyable type = -> std::vector = { ret: std::vector = (); - for n*.get_type_scope_declarations(declaration_node::types) do (d) { + for n*.get_nested_declarations(declaration_node::types) do (d) { _ = ret.emplace_back( d, this ); } return ret; @@ -547,7 +549,7 @@ type_declaration: @copyable type = -> std::vector = { ret: std::vector = (); - for n*.get_type_scope_declarations(declaration_node::aliases) do (d) { + for n*.get_nested_declarations(declaration_node::aliases) do (d) { _ = ret.emplace_back( d, this ); } return ret; @@ -557,12 +559,48 @@ type_declaration: @copyable type = -> std::vector = { ret: std::vector = (); - for n*.get_type_scope_declarations(declaration_node::all) do (d) { + for n*.get_nested_declarations(declaration_node::all) do (d) { _ = ret.emplace_back( d, this ); } return ret; } + add_member: (inout this, source: std::string_view) + = { + decl := parse_statement(source); + if !(decl as bool) { + error("the provided source string is not a valid statement"); + return; + } + if !decl*.is_declaration() { + error("cannot add a member that is not a declaration"); + } + + require( n*.add_type_or_namespace_member(move decl), + std::string("unexpected error while attempting to add member:\n") + source ); + } +} + + +type_declaration: @copy_constructible type = +{ + this: type_or_namespace_declaration = (); + + operator=: ( + out this, + n_: *declaration_node, + s : compiler_services + ) = + { + type_or_namespace_declaration = (n_, s); + assert( n*.is_type() ); + } + + + is_polymorphic: (this) -> bool = n*.is_polymorphic(); + is_final : (this) -> bool = n*.is_type_final(); + make_final : (inout this) -> bool = n*.make_type_final(); + query_declared_value_set_functions: (this) -> ( out_this_in_that : bool, @@ -579,31 +617,35 @@ type_declaration: @copyable type = // NOLINT(performance-move-const-arg) } - add_member: (inout this, source: std::string_view) - = { - decl := parse_statement(source); - if !(decl as bool) { - error("the provided source string is not a valid statement"); - return; - } - if !decl*.is_declaration() { - error("cannot add a member that is not a declaration"); - } - require( n*.add_type_member(move decl), - std::string("unexpected error while attempting to add member:\n") + source ); - } + disable_member_function_generation: (inout this) = n*.type_disable_member_function_generation(); + disable_ref_qualifier_generation : (inout this) = n*.type_disable_ref_qualifier_generation(); + // At some point we may want to allow this also for namespaces, but for now only types remove_marked_members: (inout this) = n*.type_remove_marked_members(); remove_all_members : (inout this) = n*.type_remove_all_members(); +} - disable_member_function_generation: (inout this) = n*.type_disable_member_function_generation(); + +namespace_declaration: @copy_constructible type = +{ + this: type_or_namespace_declaration = (); + + operator=: ( + out this, + n_: *declaration_node, + s : compiler_services + ) = + { + type_or_namespace_declaration = (n_, s); + assert( n*.is_namespace() ); + } } //----------------------------------------------------------------------- // Alias declarations // -alias_declaration: @copyable type = +alias_declaration: @copy_constructible type = { this: declaration = (); @@ -620,936 +662,5633 @@ alias_declaration: @copyable type = //----------------------------------------------------------------------- +// Parameter declarations // -// Metafunctions - these are hardwired for now until we get to the -// step of writing a Cpp2 interpreter to run inside the compiler +parameter_declaration: @copy_constructible type = +{ + this: reflection_base = (); + + operator=: ( + out this, + n_: *parameter_declaration_node, + s : compiler_services + ) + = { + reflection_base = (n_, s); + } + + get_declaration : (this) -> object_declaration = (n*.declaration.get(), this); + get_passing_style: (this) -> passing_style = n*.pass; + + is_implicit: (this) -> bool = n*.mod == parameter_declaration_node::modifier::implicit ; + is_virtual : (this) -> bool = n*.mod == parameter_declaration_node::modifier::virtual_ ; + is_override: (this) -> bool = n*.mod == parameter_declaration_node::modifier::override_; + is_final : (this) -> bool = n*.mod == parameter_declaration_node::modifier::final_ ; +} + + +//----------------------------------------------------------------------- +// +// Expressions // //----------------------------------------------------------------------- // //----------------------------------------------------------------------- -// Some common metafunction helpers (metafunctions are just functions, -// so they can be factored as usual) -// -add_virtual_destructor: (inout t: meta::type_declaration) = +// Binary expressions +// +multiplicative_expression : type == binary_expression< "multiplicative" , is_as_expression_node >; +additive_expression : type == binary_expression< "additive" , multiplicative_expression_node >; +shift_expression : type == binary_expression< "shift" , additive_expression_node >; +compare_expression : type == binary_expression< "compare" , shift_expression_node >; +relational_expression : type == binary_expression< "relational" , compare_expression_node >; +equality_expression : type == binary_expression< "equality" , relational_expression_node >; +bit_and_expression : type == binary_expression< "bit-and" , equality_expression_node >; +bit_xor_expression : type == binary_expression< "bit-xor" , bit_and_expression_node >; +bit_or_expression : type == binary_expression< "bit-or" , bit_xor_expression_node >; +logical_and_expression : type == binary_expression< "logical-and" , bit_or_expression_node >; +logical_or_expression : type == binary_expression< "logical-or" , logical_and_expression_node >; +assignment_expression : type == binary_expression< "assignment" , logical_or_expression_node >; + +binary_expression: @copy_constructible type = { - t.add_member( "operator=: (virtual move this) = { }"); + this: reflection_base> = (); + + operator=: ( + out this, + n_: *binary_expression_node, + s : compiler_services + ) + = { + reflection_base> = (n_, s); + } + + is_fold_expression : (this) -> bool = this.n*.is_fold_expression (); + lhs_is_id_expression : (this) -> bool = this.n*.lhs_is_id_expression (); + is_standalone_expression: (this) -> bool = this.n*.is_standalone_expression(); + terms_size : (this) -> int = this.n*.terms_size (); + is_identifier : (this) -> bool = this.n*.is_identifier (); + is_id_expression : (this) -> bool = this.n*.is_id_expression (); + is_unqualified_id : (this) -> bool = this.n*.is_unqualified_id (); + is_expression_list : (this) -> bool = this.n*.is_expression_list (); + is_literal : (this) -> bool = this.n*.is_literal (); + + term_t: @copyable type = { + op: std::string; + term: T; + + operator=: (out this, forward o, forward ptr, forward cs) = { op = o; term = (ptr, cs); } + + get_op: (this) -> std::string = op; + get_term: (this) -> T = term; + } + + get_terms: (this) -> _ = { + if constexpr std::is_same_v { + ret: std::vector> = (); + _ = ret.emplace_back( "", this.n*.expr.get(), this ); + for this.n*.terms do (t) { _ = ret.emplace_back( t.op*, t.expr.get(), this ); } + return ret; + } + if constexpr std::is_same_v { + ret: std::vector> = (); + _ = ret.emplace_back( "", this.n*.expr.get(), this ); + for this.n*.terms do (t) { _ = ret.emplace_back( t.op*, t.expr.get(), this ); } + return ret; + } + if constexpr std::is_same_v { + ret: std::vector> = (); + _ = ret.emplace_back( "", this.n*.expr.get(), this ); + for this.n*.terms do (t) { _ = ret.emplace_back( t.op*, t.expr.get(), this ); } + return ret; + } + if constexpr std::is_same_v { + ret: std::vector> = (); + _ = ret.emplace_back( "", this.n*.expr.get(), this ); + for this.n*.terms do (t) { _ = ret.emplace_back( t.op*, t.expr.get(), this ); } + return ret; + } + if constexpr std::is_same_v { + ret: std::vector> = (); + _ = ret.emplace_back( "", this.n*.expr.get(), this ); + for this.n*.terms do (t) { _ = ret.emplace_back( t.op*, t.expr.get(), this ); } + return ret; + } + if constexpr std::is_same_v { + ret: std::vector> = (); + _ = ret.emplace_back( "", this.n*.expr.get(), this ); + for this.n*.terms do (t) { _ = ret.emplace_back( t.op*, t.expr.get(), this ); } + return ret; + } + if constexpr std::is_same_v { + ret: std::vector> = (); + _ = ret.emplace_back( "", this.n*.expr.get(), this ); + for this.n*.terms do (t) { _ = ret.emplace_back( t.op*, t.expr.get(), this ); } + return ret; + } + if constexpr std::is_same_v { + ret: std::vector> = (); + _ = ret.emplace_back( "", this.n*.expr.get(), this ); + for this.n*.terms do (t) { _ = ret.emplace_back( t.op*, t.expr.get(), this ); } + return ret; + } + if constexpr std::is_same_v { + ret: std::vector> = (); + _ = ret.emplace_back( "", this.n*.expr.get(), this ); + for this.n*.terms do (t) { _ = ret.emplace_back( t.op*, t.expr.get(), this ); } + return ret; + } + if constexpr std::is_same_v { + ret: std::vector> = (); + _ = ret.emplace_back( "", this.n*.expr.get(), this ); + for this.n*.terms do (t) { _ = ret.emplace_back( t.op*, t.expr.get(), this ); } + return ret; + } + if constexpr std::is_same_v { + ret: std::vector> = (); + _ = ret.emplace_back( "", this.n*.expr.get(), this ); + for this.n*.terms do (t) { _ = ret.emplace_back( t.op*, t.expr.get(), this ); } + return ret; + } + if constexpr std::is_same_v { + ret: std::vector> = (); + _ = ret.emplace_back( "", this.n*.expr.get(), this ); + for this.n*.terms do (t) { _ = ret.emplace_back( t.op*, t.expr.get(), this ); } + return ret; + } + } + + as_expression_list: (this) -> expression_list = (this.n*.get_expression_list(), this); + as_literal : (this) -> std::string = this.n*.get_literal()*.to_string(); + + // Get the postfix-expression, if that's the entire expression (not actually binary) + get_if_only_a_postfix_expression: (this) -> postfix_expression = (this.n*.get_if_only_a_postfix_expression_node(), this); + // Get left-hand postfix-expression + get_lhs_postfix_expression : (this) -> postfix_expression = (this.n*.get_postfix_expression_node() , this); + // Get first right-hand postfix-expression, if there is one + get_second_postfix_expression : (this) -> postfix_expression = (this.n*.get_second_postfix_expression_node() , this); + + is_result_a_temporary_variable : (this) -> bool = this.n*.is_result_a_temporary_variable(); + + to_string: (this) -> std::string = this.n*.to_string(); } //----------------------------------------------------------------------- +// Expression list // -// "... an abstract base class defines an interface ..." -// -// -- Stroustrup (The Design and Evolution of C++, 12.3.1) -// -//----------------------------------------------------------------------- -// -// interface -// -// an abstract base class having only pure virtual functions -// -interface: (inout t: meta::type_declaration) = +expression_list: @copy_constructible type = { - has_dtor := false; + this: reflection_base = (); - for t.get_members() do (inout m) - { - m.require( !m.is_object(), - "interfaces may not contain data objects"); - if m.is_function() { - mf := m.as_function(); - mf.require( !mf.is_copy_or_move(), - "interfaces may not copy or move; consider a virtual clone() instead"); - mf.require( !mf.has_initializer(), - "interface functions must not have a function body; remove the '=' initializer"); - mf.require( mf.make_public(), - "interface functions must be public"); - mf.default_to_virtual(); - has_dtor |= mf.is_destructor(); - } + operator=: ( + out this, + n_: *expression_list_node, + s : compiler_services + ) + = { + reflection_base = (n_, s); } - if !has_dtor { - t.add_virtual_destructor(); + is_empty : (this) -> bool = n*.is_empty (); + is_fold_expression: (this) -> bool = n*.is_fold_expression(); + + get_expressions: (this) + -> std::vector + = { + ret: std::vector = (); + for n*.get_expressions() do (expr) { + _ = ret.emplace_back(expression(expr.expr.get(), this)); + } + return ret; } + + to_string: (this) -> std::string = n*.to_string(); } //----------------------------------------------------------------------- +// Prefix expressions // -// "C.35: A base class destructor should be either public and -// virtual, or protected and non-virtual." -// -// "[C.43] ... a base class should not be copyable, and so does not -// necessarily need a default constructor." -// -// -- Stroustrup, Sutter, et al. (C++ Core Guidelines) -// -//----------------------------------------------------------------------- -// -// polymorphic_base -// -// A pure polymorphic base type that is not copyable, and whose -// destructor is either public and virtual or protected and nonvirtual. -// -// Unlike an interface, it can have nonpublic and nonvirtual functions. -// -polymorphic_base: (inout t: meta::type_declaration) = +prefix_expression: @polymorphic_base @copy_constructible type = { - has_dtor := false; + this: reflection_base = (); - for t.get_member_functions() do (inout mf) - { - if mf.is_default_access() { - mf.default_to_public(); - } - mf.require( !mf.is_copy_or_move(), - "polymorphic base types may not copy or move; consider a virtual clone() instead"); - if mf.is_destructor() { - has_dtor = true; - mf.require( ((mf.is_public() || mf.is_default_access()) && mf.is_virtual()) - || (mf.is_protected() && !mf.is_virtual()), - "a polymorphic base type destructor must be public and virtual, or protected and nonvirtual"); - } + operator=: ( + out this, + n_: *prefix_expression_node, + s : compiler_services + ) + = { + reflection_base = (n_, s); } - if !has_dtor { - t.add_virtual_destructor(); + get_ops: (this) -> std::vector = { + ret: std::vector = (); + for n*.ops do (op) { + _ = ret.emplace_back(op*.to_string()); + } + return ret; } + + get_postfix_expression: (this) -> postfix_expression = (this.n*.expr.get(), this); + + is_fold_expression : (this) -> bool = n*.is_fold_expression (); + is_identifier : (this) -> bool = n*.is_identifier (); + is_id_expression : (this) -> bool = n*.is_id_expression (); + is_unqualified_id : (this) -> bool = n*.is_unqualified_id (); + is_expression_list : (this) -> bool = n*.is_expression_list (); + is_literal : (this) -> bool = n*.is_literal (); + is_result_a_temporary_variable: (this) -> bool = n*.is_result_a_temporary_variable(); + + as_expression_list: (this) -> expression_list = (this.n*.get_expression_list(), this); + as_literal : (this) -> std::string = n*.get_literal()*.to_string(); + as_identifier : (this) -> std::string = n*.get_identifier()*.to_string(); + + to_string: (this) -> std::string = this.n*.to_string(); } //----------------------------------------------------------------------- +// Postfix expressions // -// "... A totally ordered type ... requires operator<=> that -// returns std::strong_ordering. If the function is not -// user-written, a lexicographical memberwise implementation -// is generated by default..." -// -// -- P0707R4, section 3 -// -// Note: This feature derived from Cpp2 was already adopted -// into Standard C++ via paper P0515, so most of the -// heavy lifting is done by the Cpp1 C++20/23 compiler, -// including the memberwise default semantics -// (In contrast, cppfront has to do the work itself for -// default memberwise semantics for operator= assignment -// as those aren't yet part of Standard C++) -// -//----------------------------------------------------------------------- -// - -ordered_impl: ( - inout t: meta::type_declaration, - ordering: std::string_view // must be "strong_ordering" etc. -) = +postfix_expression: @copy_constructible type = { - has_spaceship := false; + this: reflection_base = (); - for t.get_member_functions() do (inout mf) - { - if mf.has_name("operator<=>") { - has_spaceship = true; - return_name := mf.unnamed_return_type(); - if return_name.find(ordering) == return_name.npos - { - mf.error( "operator<=> must return std::" + ordering as std::string ); - } - } + operator=: ( + out this, + n_: *postfix_expression_node, + s : compiler_services + ) + = { + reflection_base = (n_, s); } - if !has_spaceship { - t.add_member( "operator<=>: (this, that) -> std::" + (ordering as std::string) + ";" ); + get_primary_expression: (this) -> primary_expression = (this.n*.expr.get(), this); + + term_t: @copy_constructible type = { + private term_: * const postfix_expression_node::term; + private cs_ : * const compiler_services; + + operator=: (out this, forward term, forward cs) = { term_ = term; cs_ = cs; } + + get_op : (this) -> std::string_view = term_*.op*.as_string_view(); + + // If op is More is contained in the Notes + // + // . id_expression member selection + // [ ( expression_list subscript or function call + // ... expression fold expression + + is_id_expression : (this) -> bool = term_*.id_expr .get() != nullptr; + is_expression_list : (this) -> bool = term_*.expr_list.get() != nullptr; + is_expression : (this) -> bool = term_*.last_expr.get() != nullptr; + + get_id_expression : (this) -> id_expression = (term_*.id_expr .get(), cs_*); + get_expression_list: (this) -> expression_list = (term_*.expr_list.get(), cs_*); + get_expression : (this) -> expression = (term_*.last_expr.get(), cs_*); + } + + get_terms: (this) -> _ = { + ret: std::vector = (); + for this.n*.ops do (t) { _ = ret.emplace_back( t&, this& ); } + return ret; + } + + is_fold_expression: (this) -> bool = n*.is_fold_expression(); + is_identifier : (this) -> bool = n*.is_identifier (); + is_id_expression : (this) -> bool = n*.is_id_expression (); + is_unqualified_id : (this) -> bool = n*.is_unqualified_id (); + is_expression_list: (this) -> bool = n*.is_expression_list(); + is_literal : (this) -> bool = n*.is_literal (); + + as_identifier : (this) -> std::string = n*.get_identifier()*.to_string(); + as_expression_list: (this) -> expression_list = (this.n*.get_expression_list(), this); + as_literal : (this) -> std::string = n*.get_literal()*.to_string(); + + get_first_token_ignoring_this: (this) -> std::string_view = { + ptok := n*.get_first_token_ignoring_this(); + if ptok { return ptok*; } + return ""; } + + starts_with_function_call_with_num_parameters: (this, num: int) -> bool = n*.starts_with_function_call_with_n_parameters(num); + is_result_a_temporary_variable : (this) -> bool = n*.is_result_a_temporary_variable (); + + to_string: (this) -> std::string = n*.to_string(); } + //----------------------------------------------------------------------- -// ordered - a totally ordered type -// -// Note: the ordering that should be encouraged as default gets the nice name +// Template arguments // -ordered: (inout t: meta::type_declaration) = +template_arg: @copy_constructible type = { - ordered_impl( t, "strong_ordering" ); + this: reflection_base = (); + + operator=: ( + out this, + n_: *template_argument, + s : compiler_services + ) + = { + reflection_base = (n_, s); + } + + is_expression: (this) -> bool = n*.is_expression(); + is_type_id : (this) -> bool = n*.is_type_id (); + + as_expression: (this) -> expression = (this.n*.get_expression(), this); + as_type_id : (this) -> type_id = (this.n*.get_type_id(), this); + + to_string: (this) -> std::string = n*.to_string(); } + //----------------------------------------------------------------------- -// weakly_ordered - a weakly ordered type +// Unqualified IDs // -weakly_ordered: (inout t: meta::type_declaration) = +unqualified_id: @copy_constructible type = { - ordered_impl( t, "weak_ordering" ); + this: reflection_base = (); + + operator=: ( + out this, + n_: *unqualified_id_node, + s : compiler_services + ) + = { + reflection_base = (n_, s); + } + + is_identifier : (this) -> bool = n*.is_identifier(); + + get_identifier: (this) -> std::string = n*.get_identifier()*.to_string(); + + //get_template_args: (this) -> std::vector = { + // ret: std::vector = (); + // for this.n*.template_arguments() do (t) { _ = ret.emplace_back( t&, this ); } + // return ret; + //} + + as_token : (this) -> std::string = n*.get_token()*.to_string(); + + to_string: (this) -> std::string = n*.to_string(); } + //----------------------------------------------------------------------- -// partially_ordered - a partially ordered type +// Qualified IDs // -partially_ordered: (inout t: meta::type_declaration) = +qualified_id: @copy_constructible type = { - ordered_impl( t, "partial_ordering" ); + this: reflection_base = (); + + operator=: ( + out this, + n_: *qualified_id_node, + s : compiler_services + ) + = { + reflection_base = (n_, s); + } + + term_t: @copy_constructible type = { + op: std::string; + unqualified: unqualified_id; + + operator=: (out this, forward o, forward ptr, forward cs) = { op = o; unqualified = (ptr, cs); } + + get_op: (this) -> std::string = op; + get_unqualified: (this) -> unqualified_id = unqualified; + } + + get_terms: (this) -> _ = { + ret: std::vector = (); + for this.n*.ids do (t) { _ = ret.emplace_back( t.scope_op*, t.id.get(), this ); } + return ret; + } + + //get_template_args: (this) -> std::vector = { + // ret: std::vector = (); + // for this.n*.template_arguments() do (t) { _ = ret.emplace_back( t&, this ); } + // return ret; + //} + + as_token : (this) -> std::string = n*.get_token()*.to_string(); + + to_string: (this) -> std::string = n*.to_string(); } //----------------------------------------------------------------------- +// Type IDs // -// "A value is ... a regular type. It must have all public -// default construction, copy/move construction/assignment, -// and destruction, all of which are generated by default -// if not user-written; and it must not have any protected -// or virtual functions (including the destructor)." -// -// -- P0707R4, section 3 -// +type_id: @copy_constructible type = +{ + this: reflection_base = (); + + operator=: ( + out this, + n_: *type_id_node, + s : compiler_services + ) + = { + reflection_base = (n_, s); + } + + //get_template_args: (this) -> std::vector = { + // ret: std::vector = (); + // for this.n*.template_arguments() do (t) { _ = ret.emplace_back( t&, this ); } + // return ret; + //} + + is_postfix_expression: (this) -> bool = this.n*.is_postfix_expression(); + is_qualified_id : (this) -> bool = this.n*.is_qualified_id (); + is_unqualified_id : (this) -> bool = this.n*.is_unqualified_id (); + is_function_typeid : (this) -> bool = this.n*.is_function_typeid (); + is_keyword : (this) -> bool = this.n*.is_keyword (); + is_wildcard : (this) -> bool = this.n*.is_wildcard (); + is_pointer_qualified : (this) -> bool = this.n*.is_pointer_qualified (); + is_concept : (this) -> bool = this.n*.is_concept (); + + as_postfix_expression: (this) -> postfix_expression = (n*.get_postfix_expression(), this); + as_qualified_id : (this) -> qualified_id = (n*.get_qualified_id(), this); + as_unqualified_id : (this) -> unqualified_id = (n*.get_unqualified_id(), this); + // TODO + //as_function_typeid : (this) -> function_typeid = (n*.get_function_typeid(), this); + as_keyword : (this) -> std::string = n*.get_keyword()*.to_string(); + as_token : (this) -> std::string = n*.get_token()*.to_string(); + + to_string: (this) -> std::string = n*.to_string(); +} + + //----------------------------------------------------------------------- +// Primary expressions // -// copyable -// -// A type with (copy and move) x (construction and assignment) -// -copyable: (inout t: meta::type_declaration) = +primary_expression: @copy_constructible type = { - // If the user explicitly wrote any of the copy/move functions, - // they must also have written the most general one - we can't - // assume we can safely generate it for them since they've opted - // into customized semantics - smfs := t.query_declared_value_set_functions(); - if !smfs.out_this_in_that - && ( - smfs.out_this_move_that - || smfs.inout_this_in_that - || smfs.inout_this_move_that - ) - { - t.error( - "this type is partially copyable/movable - when you provide " - "any of the more-specific operator= signatures, you must also provide " - "the one with the general signature (out this, that); alternatively, " - "consider removing all the operator= functions and let them all be " - "generated for you with default memberwise semantics" - ); - } - else if !smfs.out_this_in_that { - t.add_member( "operator=: (out this, that) = { }"); + this: reflection_base = (); + + operator=: ( + out this, + n_: *primary_expression_node, + s : compiler_services + ) + = { + reflection_base = (n_, s); } + + //get_template_args: (this) -> std::vector = { + // ret: std::vector = (); + // for this.n*.template_arguments() do (t) { _ = ret.emplace_back( t&, this ); } + // return ret; + //} + + is_fold_expression: (this) -> bool = n*.is_fold_expression(); + is_identifier : (this) -> bool = n*.is_identifier (); + is_id_expression : (this) -> bool = n*.is_id_expression (); + is_unqualified_id : (this) -> bool = n*.is_unqualified_id (); + is_expression_list: (this) -> bool = n*.is_expression_list(); + is_literal : (this) -> bool = n*.is_literal (); + is_declaration : (this) -> bool = n*.is_declaration (); + + as_identifier : (this) -> std::string = n*.get_identifier()*.to_string(); + as_expression_list: (this) -> expression_list = (this.n*.get_expression_list(), this); + as_literal : (this) -> std::string = n*.get_literal()*.to_string(); + as_declaration : (this) -> declaration = (this.n*.get_declaration(), this); + + to_string: (this) -> std::string = n*.to_string(); } + //----------------------------------------------------------------------- +// ID expression // -// hashable -// -// A memberwise hashable type +id_expression: @polymorphic_base @copy_constructible type = +{ + this: reflection_base = (); + + operator=: ( + out this, + n_: *id_expression_node, + s : compiler_services + ) + = { + reflection_base = (n_, s); + } + + //get_template_args: (this) -> std::vector = { + // ret: std::vector = (); + // for this.n*.template_arguments() do (t) { _ = ret.emplace_back( t&, this ); } + // return ret; + //} + + is_fold_expression: (this) -> bool = n*.is_fold_expression (); + is_empty : (this) -> bool = n*.is_empty (); + is_identifier : (this) -> bool = n*.is_identifier (); + is_qualified : (this) -> bool = n*.is_qualified (); + is_unqualified : (this) -> bool = n*.is_unqualified (); + + as_identifier : (this) -> std::string = n*.get_identifier()*.to_string(); + as_qualified : (this) -> qualified_id = (n*.get_qualified_id(), this); + as_unqualified : (this) -> unqualified_id = (n*.get_unqualified_id(), this); + + to_string: (this) -> std::string = n*.to_string(); +} + + +//----------------------------------------------------------------------- +// General expression // -hashable: (inout t: meta::type_declaration) = +expression: @polymorphic_base @copy_constructible type = { - t.require( !t.get_member_objects().empty(), - "a hashable type must have at least one data member"); + this: reflection_base = (); - hash: std::string = " hash: (this) -> size_t = {\n" - " ret: size_t = 0;"; + operator=: ( + out this, + n_: *expression_node, + s : compiler_services + ) + = { + reflection_base = (n_, s); + } - for t.get_member_objects() - do (o) - { - o_hash: std::string; - if o.name() == "this" { - o_hash = "(o.type())$::hash()"; - } - else { - o_hash = "std::hash<(o.type())$>()((o.name())$)"; - } + is_fold_expression : (this) -> bool = n*.is_fold_expression (); + is_standalone_expression: (this) -> bool = n*.is_standalone_expression(); + subexpression_count : (this) -> int = n*.subexpression_count (); + is_identifier : (this) -> bool = n*.is_identifier (); + is_id_expression : (this) -> bool = n*.is_id_expression (); + is_unqualified_id : (this) -> bool = n*.is_unqualified_id (); + is_expression_list : (this) -> bool = n*.is_expression_list (); + is_empty_expression_list: (this) -> bool = n*.is_empty_expression_list(); + is_literal : (this) -> bool = n*.is_literal (); + is_assignment_expression: (this) -> bool = n*.is_assignment_expression(); - hash += "\n cpp2::hash_combine( ret, (o_hash)$ );"; + is_simple_assignment : (this) -> bool = { + ret := n*.get_lhs_rhs_if_simple_assignment(); + return ret.lhs && ret.rhs; } - t.add_member(hash + "\n return ret;\n }"); + get_lhs_rhs_if_simple_assignment: (this) + -> ( + lhs: postfix_expression, + rhs: logical_or_expression + ) + = { + ret := n*.get_lhs_rhs_if_simple_assignment(); + lhs = (ret.lhs, this); + rhs = (ret.rhs, this); + } + + as_assignment_expression: (this) -> assignment_expression = (n*.get_assignment_expression(), this); + as_expression_list : (this) -> expression_list = (n*.get_expression_list(), this); + as_literal : (this) -> std::string = n*.get_literal()*.to_string(); + + to_string: (this) -> std::string = n*.to_string(); } //----------------------------------------------------------------------- +// is_as_expression // -// basic_value -// -// A regular type: copyable, plus has public default construction -// and no protected or virtual functions -// -basic_value: (inout t: meta::type_declaration) = +is_as_expression: @polymorphic_base @copy_constructible type = { - t.copyable(); + this: reflection_base = (); - has_default_ctor := false; - for t.get_member_functions() do (inout mf) { - has_default_ctor |= mf.is_default_constructor(); - mf.require( !mf.is_protected() && !mf.is_virtual(), - "a value type may not have a protected or virtual function"); - mf.require( !mf.is_destructor() || mf.is_public() || mf.is_default_access(), - "a value type may not have a non-public destructor"); + operator=: ( + out this, + n_: *is_as_expression_node, + s : compiler_services + ) + = { + reflection_base = (n_, s); } - if !has_default_ctor { - t.add_member( "operator=: (out this) = { }"); + term_t: @copy_constructible type = { + op: std::string; + expr: expression; + + operator=: (out this, forward o, forward ptr, forward cs) = { op = o; expr = (ptr, cs); } + + get_op: (this) -> std::string = op; + get_expr: (this) -> expression = expr; + } + + get_expression: (this) -> prefix_expression = (n*.expr.get(), this); + + get_terms: (this) -> _ = { + ret: std::vector = (); + for this.n*.ops do (t) { _ = ret.emplace_back( t.op*, t.expr.get(), this ); } + return ret; + } + + is_fold_expression: (this) -> bool = this.n*.is_fold_expression(); + is_identifier : (this) -> bool = this.n*.is_identifier (); + is_id_expression : (this) -> bool = this.n*.is_id_expression (); + is_unqualified_id : (this) -> bool = this.n*.is_unqualified_id (); + is_expression_list: (this) -> bool = this.n*.is_expression_list(); + is_literal : (this) -> bool = this.n*.is_literal (); + + as_expression_list: (this) -> expression_list = (this.n*.get_expression_list(), this); + as_literal : (this) -> std::string = n*.get_literal()*.to_string(); + + get_identifier : (this) -> std::string_view = { + ptok := this.n*.get_identifier(); + if ptok { return ptok*; } + return ""; } + + to_string: (this) -> std::string = this.n*.to_string(); } + //----------------------------------------------------------------------- +// +// Statements // -// "A 'value' is a totally ordered basic_value..." -// -// -- P0707R4, section 3 -// -// value - a value type that is totally ordered +//----------------------------------------------------------------------- // -// Note: the ordering that should be encouraged as default gets the nice name + +//----------------------------------------------------------------------- +// General statement // -value: (inout t: meta::type_declaration) = +statement: @polymorphic_base @copy_constructible type = { - t.ordered(); - t.basic_value(); -} + this: reflection_base = (); -weakly_ordered_value: (inout t: meta::type_declaration) = -{ - t.weakly_ordered(); - t.basic_value(); + operator=: ( + out this, + n_: *statement_node, + s : compiler_services + ) + = { + reflection_base = (n_, s); + } + + get_parameters: (this) + -> std::vector + = { + ret: std::vector = (); + for n*.get_parameters() do (param) { + _ = ret.emplace_back( param, this ); + } + return ret; + } + + is_expression_statement : (this) -> bool = n*.is_expression(); + is_compound_statement : (this) -> bool = n*.is_compound(); + is_selection_statement : (this) -> bool = n*.is_selection(); + is_declaration : (this) -> bool = n*.is_declaration(); + is_return_statement : (this) -> bool = n*.is_return(); + is_iteration_statement : (this) -> bool = n*.is_iteration(); + is_using_statement : (this) -> bool = n*.is_using(); + is_contract : (this) -> bool = n*.is_contract(); + is_inspect_expression : (this) -> bool = n*.is_inspect(); + is_jump_statement : (this) -> bool = n*.is_jump(); + + as_expression_statement : (this) -> expression_statement = (n*.get_if(), this); + as_compound_statement : (this) -> compound_statement = (n*.get_if(), this); + as_selection_statement : (this) -> selection_statement = selection_statement (n*.get_if(), this); + as_declaration : (this) -> declaration = declaration(n*.get_if(), this); + as_return_statement : (this) -> return_statement = return_statement (n*.get_if(), this); + as_iteration_statement : (this) -> iteration_statement = iteration_statement (n*.get_if(), this); + //as_using_statement : (this) -> using_statement = using_statement (n*.get_if(), this); + //as_contract : (this) -> contract = contract (n*.get_if(), this); + //as_inspect_expression : (this) -> inspect_expression = inspect_expression (n*.get_if(), this); + //as_jump_statement : (this) -> jump_statement = jump_statement (n*.get_if(), this); + + to_string: (this) -> std::string = n*.to_string(); } -partially_ordered_value: (inout t: meta::type_declaration) = + +//----------------------------------------------------------------------- +// Expression statements +// +expression_statement: @copy_constructible type = { - t.partially_ordered(); - t.basic_value(); + this: reflection_base = (); + + operator=: ( + out this, + n_: *expression_statement_node, + s : compiler_services + ) + = { + reflection_base = (n_, s); + } + + get_expression: (this) -> expression = (n*.expr.get(), this); + + to_string : (this) -> std::string = n*.to_string(); } //----------------------------------------------------------------------- +// Compound statements // -// C.20: If you can avoid defining default operations, do -// -// ##### Reason -// -// It's the simplest and gives the cleanest semantics. -// -// ... -// -// This is known as "the rule of zero". -// -// -- C++ Core Guidelines -// C.20: If you can avoid defining any default operations, do -// -// +compound_statement: @copy_constructible type = +{ + this: reflection_base = (); + + operator=: ( + out this, + n_: *compound_statement_node, + s : compiler_services + ) + = { + reflection_base = (n_, s); + } + + get_statements: (this) + -> std::vector + = { + ret: std::vector = (); + for n*.get_statements() do (stmt) { + _ = ret.emplace_back( stmt, this ); + } + return ret; + } + + add_statement: (inout this, source: std::string_view, before_position: int = 0) + = { + stmt := parse_statement(source); + if !(stmt as bool) { + error("the provided source string is not a valid statement"); + return; + } + require( n*.add_statement(move stmt, before_position), + std::string("unexpected error while attempting to add statement:\n") + source ); + } +} + + //----------------------------------------------------------------------- +// Selection statements // -// cpp1_rule_of_zero +selection_statement: @copy_constructible type = +{ + this: reflection_base = (); + + operator=: ( + out this, + n_: *selection_statement_node, + s : compiler_services + ) + = { + reflection_base = (n_, s); + } + + has_false_branch_in_source_code: (this) -> bool = n*.has_false_branch_in_source_code(); + has_false_branch : (this) -> bool = n*.has_false_branch(); + + get_identifier : (this) -> std::string_view = n*.get_identifier()*.as_string_view(); + get_expression : (this) -> logical_or_expression = (n*.get_expression (), this); + get_true_branch : (this) -> compound_statement = (n*.get_true_branch (), this); + get_false_branch: (this) -> compound_statement = (n*.get_false_branch(), this); +} + + +//----------------------------------------------------------------------- +// Return statements // -// a type without declared copy/move/destructor functions +return_statement: @copy_constructible type = +{ + this: reflection_base = (); + + operator=: ( + out this, + n_: *return_statement_node, + s : compiler_services + ) + = { + reflection_base = (n_, s); + } + + has_expression: (this) -> bool = n*.has_expression(); + + get_expression: (this) -> expression = (n*.get_expression(), this); +} + + +//----------------------------------------------------------------------- +// Iteration statements - for, do, while // -cpp1_rule_of_zero: (inout t: meta::type_declaration) = +iteration_statement: @copy_constructible type = { - for t.get_member_functions() do (inout mf) - { - t.require( !mf.is_constructor_with_that() - && !mf.is_assignment_with_that() - && !mf.is_destructor(), - "the rule of zero requires no copy/move/destructor functions"); + this: reflection_base = (); + + operator=: ( + out this, + n_: *iteration_statement_node, + s : compiler_services + ) + = { + reflection_base = (n_, s); } - t.disable_member_function_generation(); + + is_do : (this) -> bool = n*.is_do (); + is_while: (this) -> bool = n*.is_while(); + is_for : (this) -> bool = n*.is_for (); + has_next: (this) -> bool = n*.has_next(); + + get_label : (this) -> std::string = n*.get_label().to_string(); + get_next_expression : (this) -> assignment_expression = (n*.get_next_expression(), this); + get_do_while_condition: (this) -> logical_or_expression = (n*.get_do_while_condition(), this); + get_do_while_body : (this) -> compound_statement = (n*.get_do_while_body(), this); + get_for_range : (this) -> expression = (n*.get_for_range(), this); + get_for_parameter : (this) -> parameter_declaration = (n*.get_for_parameter(), this); + get_for_body : (this) -> statement = (n*.get_for_body(), this); } + //----------------------------------------------------------------------- // -// "By definition, a `struct` is a `class` in which members -// are by default `public`; that is, +// Metafunctions - these are hardwired for now until we get to the +// step of writing a Cpp2 interpreter to run inside the compiler // -// struct s { ... +//----------------------------------------------------------------------- // -// is simply shorthand for + +//----------------------------------------------------------------------- +// Some common metafunction helpers (metafunctions are just functions, +// so they can be factored as usual) // -// class s { public: ... +add_virtual_destructor: (inout t: meta::type_declaration) = +{ + t.add_member( "operator=: (virtual move this) = { }"); +} + + +//----------------------------------------------------------------------- // -// ... Which style you use depends on circumstances and taste. -// I usually prefer to use `struct` for classes that have all -// data `public`." +// "... an abstract base class defines an interface ..." // -// -- Stroustrup (The C++ Programming Language, 3rd ed., p. 234) +// -- Stroustrup (The Design and Evolution of C++, 12.3.1) // //----------------------------------------------------------------------- // -// struct +// interface // -// a type with only public bases, objects, and functions, -// no virtual functions, and no user-defined constructors -// (i.e., no invariants) or assignment or destructors. -// -// For GCC 10 compatibility, optionally allow passing struct -// that generates a memberwise constructor with a generic deduced -// parameters instead of concrete forwarding parameters (mainly used -// for cppfront internal use, so cppfront builds under GCC 10) +// an abstract base class having only pure virtual named functions, +// a public default constructor, a public virtual destructor, and +// protected copy/move operations // -struct: (inout t: meta::type_declaration) = +interface: (inout t: meta::type_declaration) = { - ctor_params: std::string = (); - ctor_inits : std::string = (); - - found_member_without_initializer: = false; + has_dtor := false; for t.get_members() do (inout m) { - m.require( m.make_public(), - "all struct members must be public"); + m.require( !m.is_object(), + "interfaces may not contain data objects"); if m.is_function() { mf := m.as_function(); - t.require( !mf.is_virtual(), - "a struct may not have a virtual function"); - t.require( !mf.has_name("operator="), - "a struct may not have a user-defined operator="); - } - else if m.is_object() { - mo: = m.as_object(); - if mo.name() != "this" { - if t.get_argument(0) == "noforward" { - ctor_params += "(mo.name())$_, "; - } - else { - ctor_params += "forward (mo.name())$_ : (mo.type())$, "; - } - ctor_inits += "(mo.name())$ = (mo.name())$_; "; - } - else { - ctor_inits += "(mo.type())$ = ((mo.initializer())$); "; - } - found_member_without_initializer |= !mo.has_initializer(); + mf.require( !mf.is_copy_or_move(), + "interfaces may not copy or move; consider a virtual clone() instead"); + mf.require( !mf.has_initializer(), + "interface functions must not have a function body; remove the '=' initializer"); + mf.require( mf.make_public(), + "interface functions must be public"); + mf.default_to_virtual(); + has_dtor |= mf.is_destructor(); } } - t.cpp1_rule_of_zero(); - // If we found any data members - if !ctor_params.empty() - { - // Then to enable construction from corresponding values - // requires a constructor... an exception to the rule of zero - t.add_member(" operator=: (implicit out this, (ctor_params)$) = { (ctor_inits)$ }"); + // Add public default constructor + protected copy/move operations + t.add_member( "operator=: (out this) = { }"); + t.add_member( "protected operator=: (out this, that) = { }"); - // And if all members had initializers, we need a default constructor - if !found_member_without_initializer { - t.add_member(" operator=: (implicit out this) = { }"); - } + // Add public virtual destructor + if !has_dtor { + t.add_virtual_destructor(); } } //----------------------------------------------------------------------- // -// "C enumerations constitute a curiously half-baked concept. ... -// the cleanest way out was to deem each enumeration a separate type." -// -// -- Stroustrup (The Design and Evolution of C++, 11.7) -// -// "An enumeration is a distinct type ... with named constants" +// "C.35: A base class destructor should be either public and +// virtual, or protected and non-virtual." // -// -- ISO C++ Standard +// -- Stroustrup, Sutter, et al. (C++ Core Guidelines) // //----------------------------------------------------------------------- // -// basic_enum +// polymorphic_base // -// a type together with named constants that are its possible values +// A polymorphic base type whose destructor is either public and virtual +// or else protected and nonvirtual. // -value_member_info: @struct type = { - name : std::string; - type : std::string; - value : std::string; -} +// Unlike an interface, it can have nonpublic and nonvirtual functions. +// +polymorphic_base: (inout t: meta::type_declaration) = +{ + has_dtor := false; -basic_enum: ( - inout t : meta::type_declaration, - nextval , - bitwise : bool - ) -= { - enumerators : std::vector = (); - min_value : i64 = (); - max_value : i64 = (); - underlying_type : std::string; + for t.get_member_functions() do (inout mf) + { + if mf.is_default_access() { + mf.default_to_public(); + } + mf.require( !mf.is_copy_or_move(), + "polymorphic base types may not copy or move; consider a virtual clone() instead"); + if mf.is_destructor() { + has_dtor = true; + mf.require( ((mf.is_public() || mf.is_default_access()) && mf.is_virtual()) + || (mf.is_protected() && !mf.is_virtual()), + "a polymorphic base type destructor must be public and virtual, or protected and nonvirtual"); + } + } - t.reserve_names( "operator=", "operator<=>" ); - if bitwise { - t.reserve_names( "has", "set", "clear", "to_string", "get_raw_value", "none" ); + if !has_dtor { + t.add_virtual_destructor(); } +} - // 1. Gather: The names of all the user-written members, and find/compute the type - underlying_type = t.get_argument(0); // use the first template argument, if there was one +//----------------------------------------------------------------------- +// +// "... A totally ordered type ... requires operator<=> that +// returns std::strong_ordering. If the function is not +// user-written, a lexicographical memberwise implementation +// is generated by default..." +// +// -- P0707R4, section 3 +// +// Note: This feature derived from Cpp2 was already adopted +// into Standard C++ via paper P0515, so most of the +// heavy lifting is done by the Cpp1 C++20/23 compiler, +// including the memberwise default semantics +// (In contrast, cppfront has to do the work itself for +// default memberwise semantics for operator= assignment +// as those aren't yet part of Standard C++) +// +//----------------------------------------------------------------------- +// - found_non_numeric := false; +ordered_impl: ( + inout t: meta::type_declaration, + ordering: std::string_view // must be "strong_ordering" etc. +) = +{ + has_spaceship := false; - (copy value: std::string = "-1") - for t.get_members() - do (m) - if m.is_member_object() + for t.get_member_functions() do (inout mf) { - m.require( m.is_public() || m.is_default_access(), - "an enumerator cannot be protected or private"); + if mf.has_name("operator<=>") { + has_spaceship = true; + return_name := mf.get_unnamed_return_type(); + if return_name.find(ordering) == return_name.npos + { + mf.error( "operator<=> must return std::" + ordering as std::string ); + } + } + } + + if !has_spaceship { + t.add_member( "operator<=>: (this, that) -> std::" + (ordering as std::string) + ";" ); + } +} + +//----------------------------------------------------------------------- +// ordered - a totally ordered type +// +// Note: the ordering that should be encouraged as default gets the nice name +// +ordered: (inout t: meta::type_declaration) = +{ + ordered_impl( t, "strong_ordering" ); +} + +//----------------------------------------------------------------------- +// weakly_ordered - a weakly ordered type +// +weakly_ordered: (inout t: meta::type_declaration) = +{ + ordered_impl( t, "weak_ordering" ); +} + +//----------------------------------------------------------------------- +// partially_ordered - a partially ordered type +// +partially_ordered: (inout t: meta::type_declaration) = +{ + ordered_impl( t, "partial_ordering" ); +} + + +//----------------------------------------------------------------------- +// +// "A value is ... a regular type. It must have all public +// default construction, copy/move construction/assignment, +// and destruction, all of which are generated by default +// if not user-written; and it must not have any protected +// or virtual functions (including the destructor)." +// +// -- P0707R4, section 3 +// +//----------------------------------------------------------------------- +// +// copyable +// +// A type with (copy and move) x (construction and assignment) +// +copyable: (inout t: meta::type_declaration) = +{ + // If the user explicitly wrote any of the copy/move functions, + // they must also have written the most general one - we can't + // assume we can safely generate it for them since they've opted + // into customized semantics + smfs := t.query_declared_value_set_functions(); + if !smfs.out_this_in_that + && ( + smfs.out_this_move_that + || smfs.inout_this_in_that + || smfs.inout_this_move_that + ) + { + t.error( + "this type is partially copyable/movable - when you provide " + "any of the more-specific operator= signatures, you must also provide " + "the one with the general signature (out this, that); alternatively, " + "consider removing all the operator= functions and let them all be " + "generated for you with default memberwise semantics" + ); + } + else if !smfs.out_this_in_that { + t.add_member( "operator=: (out this, that) = { }"); + } +} + + +// copy_constructible +// +// A type with (copy and move) construction +// +copy_constructible: (inout t: meta::type_declaration) = +{ + // If the user explicitly wrote any of the copy/move constructors, + // they must also have written the most general one - we can't + // assume we can safely generate it for them since they've opted + // into customized semantics + smfs := t.query_declared_value_set_functions(); + if !smfs.out_this_in_that + && smfs.out_this_move_that + { + t.error( + "this type is partially copy/move constructible - when you provide " + "the (out this, move that) operator= signature, you must also provide " + "the one with the general signature (out this, that)" + ); + } + else if + !smfs.out_this_in_that + && !smfs.out_this_move_that + { + t.add_member( "operator=: (out this, that) = { }"); + t.add_member( "operator=: (out this, move that) = { }"); + } +} + + +//----------------------------------------------------------------------- +// +// hashable +// +// A memberwise hashable type +// +hashable: (inout t: meta::type_declaration) = +{ + t.require( !t.get_member_objects().empty(), + "a hashable type must have at least one data member"); + + hash: std::string = " hash: (this) -> size_t = {\n" + " ret: size_t = 0;"; + + for t.get_member_objects() + do (o) + { + o_hash: std::string; + if o.name() == "this" { + o_hash = "(o.type())$::hash()"; + } + else { + o_hash = "std::hash<(o.type())$>()((o.name())$)"; + } + + hash += "\n cpp2::hash_combine( ret, (o_hash)$ );"; + } + + t.add_member(hash + "\n return ret;\n }"); +} + + +//----------------------------------------------------------------------- +// +// basic_value +// +// A regular type: copyable, plus has public default construction +// and no protected or virtual functions +// +basic_value: (inout t: meta::type_declaration) = +{ + t.copyable(); + + has_default_ctor := false; + for t.get_member_functions() do (inout mf) { + has_default_ctor |= mf.is_default_constructor(); + mf.require( !mf.is_protected() && !mf.is_virtual(), + "a value type may not have a protected or virtual function"); + mf.require( !mf.is_destructor() || mf.is_public() || mf.is_default_access(), + "a value type may not have a non-public destructor"); + } + + if !has_default_ctor { + t.add_member( "operator=: (out this) = { }"); + } +} + +//----------------------------------------------------------------------- +// +// "A 'value' is a totally ordered basic_value..." +// +// -- P0707R4, section 3 +// +// value - a value type that is totally ordered +// +// Note: the ordering that should be encouraged as default gets the nice name +// +value: (inout t: meta::type_declaration) = +{ + t.ordered(); + t.basic_value(); +} + +weakly_ordered_value: (inout t: meta::type_declaration) = +{ + t.weakly_ordered(); + t.basic_value(); +} + +partially_ordered_value: (inout t: meta::type_declaration) = +{ + t.partially_ordered(); + t.basic_value(); +} + + +//----------------------------------------------------------------------- +// +// C.20: If you can avoid defining default operations, do +// +// ##### Reason +// +// It's the simplest and gives the cleanest semantics. +// +// ... +// +// This is known as "the rule of zero". +// +// -- C++ Core Guidelines +// C.20: If you can avoid defining any default operations, do +// +// +//----------------------------------------------------------------------- +// +// cpp1_rule_of_zero +// +// a type without declared copy/move/destructor functions +// +cpp1_rule_of_zero: (inout t: meta::type_declaration) = +{ + for t.get_member_functions() do (inout mf) + { + t.require( !mf.is_constructor_with_that() + && !mf.is_assignment_with_that() + && !mf.is_destructor(), + "the rule of zero requires no copy/move/destructor functions"); + } + t.disable_member_function_generation(); +} + +//----------------------------------------------------------------------- +// +// "By definition, a `struct` is a `class` in which members +// are by default `public`; that is, +// +// struct s { ... +// +// is simply shorthand for +// +// class s { public: ... +// +// ... Which style you use depends on circumstances and taste. +// I usually prefer to use `struct` for classes that have all +// data `public`." +// +// -- Stroustrup (The C++ Programming Language, 3rd ed., p. 234) +// +//----------------------------------------------------------------------- +// +// struct +// +// a type with only public bases, objects, and functions, +// no virtual functions, and no user-defined constructors +// (i.e., no invariants) or assignment or destructors. +// +// For GCC 10 compatibility, optionally allow passing struct +// that generates a memberwise constructor with a generic deduced +// parameters instead of concrete forwarding parameters (mainly used +// for cppfront internal use, so cppfront builds under GCC 10) +// +struct: (inout t: meta::type_declaration) = +{ + ctor_params: std::string = (); + ctor_inits : std::string = (); + + found_member_without_initializer: = false; + + for t.get_members() do (inout m) + { + m.require( m.make_public(), + "all struct members must be public"); + if m.is_function() { + mf := m.as_function(); + t.require( !mf.is_virtual(), + "a struct may not have a virtual function"); + t.require( !mf.has_name("operator="), + "a struct may not have a user-defined operator="); + } + else if m.is_object() { + mo: = m.as_object(); + if mo.name() != "this" { + if t.get_argument(0) == "noforward" { + ctor_params += "(mo.name())$_, "; + } + else { + ctor_params += "forward (mo.name())$_ : (mo.type())$, "; + } + ctor_inits += "(mo.name())$ = (mo.name())$_; "; + } + else { + ctor_inits += "(mo.type())$ = ((mo.initializer())$); "; + } + found_member_without_initializer |= !mo.has_initializer(); + } + } + t.cpp1_rule_of_zero(); + + // If we found any data members + if !ctor_params.empty() + { + // Then to enable construction from corresponding values + // requires a constructor... an exception to the rule of zero + t.add_member(" operator=: (implicit out this, (ctor_params)$) = { (ctor_inits)$ }"); + + // And if all members had initializers, we need a default constructor + if !found_member_without_initializer { + t.add_member(" operator=: (implicit out this) = { }"); + } + } +} + + +//----------------------------------------------------------------------- +// +// "C enumerations constitute a curiously half-baked concept. ... +// the cleanest way out was to deem each enumeration a separate type." +// +// -- Stroustrup (The Design and Evolution of C++, 11.7) +// +// "An enumeration is a distinct type ... with named constants" +// +// -- ISO C++ Standard +// +//----------------------------------------------------------------------- +// +// basic_enum +// +// a type together with named constants that are its possible values +// +value_member_info: @struct type = { + name : std::string; + type : std::string; + value : std::string; +} + +basic_enum: ( + inout t : meta::type_declaration, + nextval , + bitwise : bool + ) += { + enumerators : std::vector = (); + min_value : i64 = (); + max_value : i64 = (); + underlying_type : std::string; + + t..reserve_names( "operator=", "operator<=>" ); + if bitwise { + t..reserve_names( "has", "set", "clear", "to_string", "get_raw_value", "none" ); + } + + // 1. Gather: The names of all the user-written members, and find/compute the type + + underlying_type = t.get_argument(0); // use the first template argument, if there was one + + found_non_numeric := false; + + (copy value: std::string = "-1") + for t.get_members() + do (m) + if m.is_member_object() + { + m.require( m.is_public() || m.is_default_access(), + "an enumerator cannot be protected or private"); + + mo := m.as_object(); + if !mo.has_wildcard_type() { + mo.error( + "an explicit underlying type should be specified as a compile-time argument " + "to the metafunction - try 'enum' or 'flag_enum'" + ); + } + + init := mo.initializer(); + + is_default_or_numeric := is_empty_or_a_decimal_number(init); + found_non_numeric |= !init.empty() && !is_default_or_numeric; + m.require( !is_default_or_numeric || !found_non_numeric || mo.has_name("none"), + "(mo.name())$: enumerators with non-numeric values must come after all default and numeric values"); + + nextval( value, init ); + + v := std::strtoll(value[0]&, nullptr, 10); // for non-numeric values we'll just get 0 which is okay for now + if v < min_value { + min_value = v; + } + if v > max_value { + max_value = v; + } + + // Adding local variable 'e' to work around a Clang warning + e: value_member_info = ( mo.name() as std::string, "", value ); + enumerators.push_back( e ); + + mo.mark_for_removal_from_enclosing_type(); + _ = mo; + } + + if (enumerators.empty()) { + t.error( "an enumeration must contain at least one enumerator value"); + return; + } + + // Compute the default underlying type, if it wasn't explicitly specified + if underlying_type == "" + { + t.require( !found_non_numeric, + "if you write an enumerator with a non-numeric-literal value, " + "you must specify the enumeration's underlying type" + ); + + if !bitwise { + if min_value >= std::numeric_limits::min() && max_value <= std::numeric_limits::max() { + underlying_type = "i8"; + } + else if min_value >= std::numeric_limits::min() && max_value <= std::numeric_limits::max() { + underlying_type = "i16"; + } + else if min_value >= std::numeric_limits::min() && max_value <= std::numeric_limits::max() { + underlying_type = "i32"; + } + else if min_value >= std::numeric_limits::min() && max_value <= std::numeric_limits::max() { + underlying_type = "i64"; + } + else { + t.error( + "values are outside the range representable by the " + "largest supported underlying signed type (i64)" + ); + } + } + else { + umax := max_value * 2 as u64; + if umax <= std::numeric_limits::max() { + underlying_type = "u8"; + } + else if umax <= std::numeric_limits::max() { + underlying_type = "u16"; + } + else if umax <= std::numeric_limits::max() { + underlying_type = "u32"; + } + else { + underlying_type = "u64"; + } + } + } + + + // 2. Replace: Erase the contents and replace with modified contents + // + // Note that most values and functions are declared as '==' compile-time values, i.e. Cpp1 'constexpr' + + t.remove_marked_members(); + + // Generate the 'none' value if appropriate, and use that or + // else the first enumerator as the default-constructed value + default_value := enumerators[0].name; + if bitwise{ + default_value = "none"; + e: value_member_info = ( "none", "", "0"); + enumerators.push_back( e ); + } + + // Generate all the private implementation + t.add_member( " _value : (underlying_type)$;"); + t.add_member( " private operator= : (implicit out this, _val: i64) == " + "_value = cpp2::unchecked_narrow<(underlying_type)$>(_val);"); + + // Generate the bitwise operations + if bitwise { + t.add_member( " operator|=: ( inout this, that ) == _value |= that._value;"); + t.add_member( " operator&=: ( inout this, that ) == _value &= that._value;"); + t.add_member( " operator^=: ( inout this, that ) == _value ^= that._value;"); + t.add_member( " operator| : ( this, that ) -> (t.name())$ == _value | that._value;"); + t.add_member( " operator& : ( this, that ) -> (t.name())$ == _value & that._value;"); + t.add_member( " operator^ : ( this, that ) -> (t.name())$ == _value ^ that._value;"); + t.add_member( " has : ( this, that ) -> bool == _value & that._value;"); + t.add_member( " set : ( inout this, that ) == { _value |= that._value; }"); + t.add_member( " clear : ( inout this, that ) == { _value &= that._value~; }"); + } + + // Add the enumerators + for enumerators do (e) { + t.add_member( " (e.name)$ : (t.name())$ == (e.value)$;"); + } + + // Generate the common functions + t.add_member( " get_raw_value : (this) -> (underlying_type)$ == _value;"); + t.add_member( " operator= : (out this) == { _value = (default_value)$._value; }"); + t.add_member( " operator= : (out this, that) == { }"); + t.add_member( " operator<=> : (this, that) -> std::strong_ordering;"); + + // Provide 'to_string' and 'to_code' functions to print enumerator + // name(s) as human-readable strings or as code expressions + (copy to_string_impl: std::string = " to_string_impl: (this, prefix: std::string_view") + { + if bitwise { + to_string_impl += ", separator: std::string_view ) -> std::string = { \n" + " ret : std::string = \"(\";\n" + " sep : std::string = ();\n" + " if this == none { return \"(none)\"; }\n"; + } + else { + to_string_impl += ") -> std::string = { \n"; + } + + to_string_impl += " pref := cpp2::to_string(prefix);\n"; + + for enumerators + do (e) { + if e.name != "_" { // ignore unnamed values + if bitwise { + if e.name != "none" { + to_string_impl += " if (this & (t.name())$::(e.name)$) == (t.name())$::(e.name)$ { " + "ret += sep + pref + \"(e.name)$\"; sep = separator; " + "}\n"; + } + } + else { + to_string_impl += " if this == (t.name())$::(e.name)$ { return pref + \"(e.name)$\"; }\n"; + } + } + } + + if bitwise { + to_string_impl += " return ret+\")\";\n}\n"; + } + else { + to_string_impl += " return \"invalid (t.name())$ value\";\n}\n"; + } + + t.add_member( to_string_impl ); + } + + if bitwise { + t.add_member( " to_string: (this) -> std::string = to_string_impl( \"\", \", \" );" ); + t.add_member( " to_code : (this) -> std::string = to_string_impl( \"(t.name())$::\", \" | \" );" ); + } + else { + t.add_member( " to_string: (this) -> std::string = to_string_impl( \"\" );" ); + t.add_member( " to_code : (this) -> std::string = to_string_impl( \"(t.name())$::\" );" ); + } + + // Provide a 'from_string' function to parse strings into enumerators + (copy from_string: std::string = " from_string: (s: std::string_view) -> (t.name())$ = { \n") + { + prefix : std::string_view = ""; + combine_op: std::string_view = "return"; + + // For flags, accept a list that we break apart and then |= together + if bitwise + { + prefix = "flag_"; + combine_op = "ret |="; + + from_string += " ret := none;\n" + " outer: do {\n" + " for cpp2::string_util::split_string_list(s) do (x) {\n"; + } + // Otherwise, accept just a single string + else { + from_string += " x := s;\n"; + } + + (copy else_: std::string_view = "") + for enumerators + do (e) { + from_string += " (else_)$if \"(e.name)$\" == x { (combine_op)$ (t.name())$::(e.name)$; }\n"; + else_ = "else "; + } + + if bitwise { + from_string += " else { break outer; }\n" + " }\n" + " return ret;\n" + " } while false;\n"; + } + + from_string += " cpp2::type_safety.report_violation( (\"can't convert string '\" + cpp2::to_string(s) + \"' to (prefix)$enum of type (t.name())$\").c_str() );\n" + " return (t.name())$::(default_value)$;\n" + " }\n\n"; + + t.add_member( from_string ); + } + + t.add_member( " from_code: (s: std::string_view) -> (t.name())$ = { str: std::string = s; return from_string( cpp2::string_util::replace_all(str, \"(t.name())$::\", \"\" ) ); }" ); +} + + +//----------------------------------------------------------------------- +// +// "An enum[...] is a totally ordered value type that stores a +// value of its enumerators's type, and otherwise has only public +// member variables of its enumerator's type, all of which are +// naturally scoped because they are members of a type." +// +// -- P0707R4, section 3 +// +enum: (inout t: meta::type_declaration) = +{ + // Let basic_enum do its thing, with an incrementing value generator + t.basic_enum( + :(inout value: std::string, specified_value: std::string) = { + if !specified_value.empty() { + value = specified_value; + } else { + v := std::strtoll(value[0]&, nullptr, 10); + value = (v + 1) as std::string; + } + }, + false // disable bitwise operations + ); +} + + +//----------------------------------------------------------------------- +// +// "flag_enum expresses an enumeration that stores values +// corresponding to bitwise-or'd enumerators. The enumerators must +// be powers of two, and are automatically generated [...] A none +// value is provided [...] Operators | and & are provided to +// combine and extract values." +// +// -- P0707R4, section 3 +// +flag_enum: (inout t: meta::type_declaration) = +{ + // Let basic_enum do its thing, with a power-of-two value generator + t.basic_enum( + :(inout value: std::string, specified_value: std::string) = { + if !specified_value.empty() { + value = specified_value; + } else { + v := std::strtoll(value[0]&, nullptr, 10); + if v < 1 { + value = "1"; + } + else { + value = (v * 2) as std::string; + } + } + }, + true // enable bitwise operations + ); +} + + +//----------------------------------------------------------------------- +// +// "As with void*, programmers should know that unions [...] are +// inherently dangerous, should be avoided wherever possible, +// and should be handled with special care when actually needed." +// +// -- Stroustrup (The Design and Evolution of C++, 14.3.4.1) +// +// "C++17 needs a type-safe union... The implications of the +// consensus `variant` design are well understood and have been +// explored over several LEWG discussions, over a thousand emails, +// a joint LEWG/EWG session, and not to mention 12 years of +// experience with Boost and other libraries." +// +// -- Axel Naumann, in P0088 (wg21.link/p0088), +// the adopted proposal for C++17 std::variant +// +//----------------------------------------------------------------------- +// +// union +// +// a type that contains exactly one of a fixed set of values at a time +// + +union: (inout t : meta::type_declaration) += { + alternatives : std::vector = (); + + // 1. Gather: All the user-written members, and find/compute the max size + + (copy value := 0) + for t.get_members() + next value++ + do (m) + if m.is_member_object() + { + m.require( m.is_public() || m.is_default_access(), + "a union alternative cannot be protected or private" + ); + + m.require( !m.name().starts_with("is_") + && !m.name().starts_with("set_"), + "a union alternative's name cannot start with 'is_' or 'set_' - that could cause " + "user confusion with the 'is_alternative' and 'set_alternative' generated functions" + ); + + mo := m.as_object(); + mo.require( mo.initializer().empty(), + "a union alternative cannot have an initializer" + ); + + // Adding local variable 'e' to work around a Clang warning + e: value_member_info = ( mo.name() as std::string, mo.type(), value as std::string ); + alternatives.push_back( e ); + + mo.mark_for_removal_from_enclosing_type(); + _ = mo; + } + + discriminator_type: std::string = (); + if alternatives.ssize() < std::numeric_limits::max() { + discriminator_type = "i8"; + } + else if alternatives.ssize() < std::numeric_limits::max() { + discriminator_type = "i16"; + } + else if alternatives.ssize() < std::numeric_limits::max() { + discriminator_type = "i32"; + } + else { + discriminator_type = "i64"; + } + + + // 2. Replace: Erase the contents and replace with modified contents + + t.remove_marked_members(); + + // Provide storage + (copy storage: std::string = " _storage: cpp2::aligned_storage bool = _discriminator == (a.value)$;\n"); + + t.add_member( " (a.name)$: (this) -> forward (a.type)$ pre(is_(a.name)$()) = " + "reinterpret_cast<* const (a.type)$>(_storage&)*;\n" + ); + + t.add_member( " (a.name)$: (inout this) -> forward (a.type)$ pre(is_(a.name)$()) = " + "reinterpret_cast<*(a.type)$>(_storage&)*;\n" + ); + + t.add_member( " set_(a.name)$: (inout this, _value: (a.type)$) = { " + "if !is_(a.name)$() { _destroy(); std::construct_at( reinterpret_cast<*(a.type)$>(_storage&), _value); } " + "else { reinterpret_cast<*(a.type)$>(_storage&)* = _value; } " + "_discriminator = (a.value)$; " + "}\n" + ); + + t.add_member( " set_(a.name)$: (inout this, forward _args...: _) = { " + "if !is_(a.name)$() { _destroy(); std::construct_at( reinterpret_cast<*(a.type)$>(_storage&), _args...); } " + " else { reinterpret_cast<*(a.type)$>(_storage&)* = :(a.type)$ = (_args...); } " + "_discriminator = (a.value)$; " + "}\n" + ); + } + + // Add destroy + (copy destroy: std::string = " private _destroy: (inout this) = {\n") + { + for alternatives + do (a) { + destroy += " if _discriminator == (a.value)$ { std::destroy_at( reinterpret_cast<*(a.type)$>(_storage&) ); }\n"; + } + + destroy += " _discriminator = -1;\n" + " }\n"; + t.add_member( destroy ); + } + + // Add the destructor + t.add_member( " operator=: (move this) = { _destroy(); _ = this; }" ); + + // Add default constructor + t.add_member( " operator=: (out this) = { }" ); + + // Add copy/move construction and assignment + (copy value_set: std::string = "") + { + for alternatives + do (a) { + value_set += " if that.is_(a.name)$() { set_(a.name)$( that.(a.name)$() ); }\n"; + } + value_set += " }\n"; + + t.add_member( " operator=: (out this, that) = {\n" + " _storage = ();\n" + " _discriminator = -1;\n" + + value_set + ); + t.add_member( " operator=: (inout this, that) = {\n" + " _storage = _;\n" + " _discriminator = _;\n" + + value_set + ); + } +} + + +//----------------------------------------------------------------------- +// +// encapsulated +// +// A type with no public data members +// +encapsulated: (inout t: meta::type_declaration) = +{ + for t.get_member_objects() + do (m) + { + m.require( + !m.is_public(), + "an @encapsulated type must not have public data members" + ); + } +} + + +//----------------------------------------------------------------------- +// +// noncopyable +// +// A type with no copy/move construction/assignment +// +noncopyable: (inout t: meta::type_declaration) = +{ + smfs := t.query_declared_value_set_functions(); + t.require( + !smfs.out_this_in_that + && !smfs.out_this_move_that + && !smfs.inout_this_in_that + && !smfs.inout_this_move_that, + "a @noncopyable type must not have operator= with this and that parameters" + ); +} + + +//----------------------------------------------------------------------- +// +// singleton +// +// An encapsulated noncopyable type with a single instance accessed via +// an ::instance() function +// +// A private default constructor is provided. +// +singleton: (inout t: meta::type_declaration) = +{ + t.noncopyable(); + t.encapsulated(); + + for t.get_member_functions() + do (m) + { + m.require( + !m.is_constructor(), + "a @singleton type must not have a user-written constructor - " + "a private default constructor will be generated automatically" + ); + } + + t.add_member( " private operator=: (out this) = { }\n" ); + t.add_member( " instance: () -> forward (t.name())$ = {\n" + " static _instance: (t.name())$ = ();" + " return _instance;\n" + " }\n" ); +} + + +//----------------------------------------------------------------------- +// +// print - output a pretty-printed visualization of t +// +print: (t: meta::type_declaration) = +{ + std::cout << t.print() << "\n"; +} + + +//----------------------------------------------------------------------- +// +// noisy - make each function print its name and signature, +// so the programmer can see what's called +// +noisy: (t: meta::type_declaration) = +{ + for t.get_members() + do (m) + if m.is_function() + && !m.has_name("operator=") + { + mf := m.as_function(); + if mf.has_compound_body() { + body := mf.get_compound_body(); + body.add_statement( " std::cout << \"(mf.get_signature())$\\n\";" ); + _ = body; + } + } +} + + +//----------------------------------------------------------------------- +// +// python - expose the type using pybind11 +// +// *** Basic proof of concept only, limited and not well tested +// Hardcoded for pybind11 and g++10 and my local cppfront include path +// +python_param_names_and_types: (mf: meta::function_declaration) + -> + ( + names: std::string = (), + types: std::string = () + ) += { + for mf.get_parameters() + do (param) + if param.get_declaration().name() != "this" + { + names += ", "; + if !types.empty() { + types += ", "; + } + names += std::string("pybind11::arg(\"") + param.get_declaration().name() + "\")"; + types += param.get_declaration().type(); + } + // TODO: Remove when fixed (https://github.com/hsutter/cppfront/issues/1426). Force newline for return. + _ = names; +} + +python: (inout t: meta::type_declaration) = +{ + bind: std::string = (); + bind += "PYBIND11_MODULE((t.name())$lib, m) {\n"; + bind += " pybind11::class_<(t.name())$>(m, \"(t.name())$\")\n"; + + for t.get_members() + do (m) + if m.is_function() + { + mf := m.as_function(); + params := mf.python_param_names_and_types(); + + if mf.is_constructor() { + bind += " .def(pybind11::init<(params.types)$>())\n"; + } + else if !mf.has_name("operator=") { + bind += " .def(\"(mf.name())$\", &(t.name())$::(mf.name())$ (params.names)$)\n"; + } + } + + bind += " ;\n"; + bind += "}\n"; + + file := t.filename(); + if file.ends_with(".cpp2") { + file = file.substr(0, file.size()-5); // drop the ".cpp2" + } + build: std::string = "g++-10 -O3 -shared -std=c++20 -fPIC $(python3 -m pybind11 --includes) (file)$.cpp -o (file)$lib$(python3-config --extension-suffix)"; + + t.add_runtime_support_include( "pybind11/pybind11.h", true ); + t.add_runtime_support_include( "pybind11/stl.h", true ); + t.add_extra_cpp1_code ( bind ); + t.add_extra_build_step ( build ); +} + + +//----------------------------------------------------------------------- +// +// javascript - expose the type using emscripten +// +// *** Basic proof of concept only, limited and not well tested +// +javascript: (inout t: meta::type_declaration) = +{ + bind: std::string = (); + bind += "using namespace emscripten;\n"; + bind += "EMSCRIPTEN_BINDINGS((t.name())$_module) {\n"; + bind += " class_<(t.name())$>(\"(t.name())$\")\n"; + + for t.get_members() + do (m) + if m.is_function() + { + mf := m.as_function(); + params := mf.python_param_names_and_types(); // good enough! only care about .types + + if mf.is_constructor() { + bind += " .constructor<(params.types)$>()\n"; + } + else if !mf.has_name("operator=") { + bind += " .function(\"(mf.name())$\", &(t.name())$::(mf.name())$)\n"; + } + } + + bind += " ;\n"; + bind += "}\n"; + + file := t.filename(); + if file.ends_with(".cpp2") { + file = file.substr(0, file.size()-5); // drop the ".cpp2" + } + build: std::string = "em++ -std=c++20 -O3 (file)$.cpp --bind -s MODULARIZE=1 -s ENVIRONMENT='web,node' -s ALLOW_MEMORY_GROWTH=1 -s FILESYSTEM=0 -s LEGACY_VM_SUPPORT=1 -o (file)$.js"; + t.add_runtime_support_include( "emscripten/bind.h", true ); + t.add_extra_cpp1_code ( bind ); + t.add_extra_build_step ( build ); + t.disable_ref_qualifier_generation(); +} + + +//----------------------------------------------------------------------- +// +// For reflection test cases +// +sample_print: (s: std::string_view, indent: i32) = +{ + std::cout + << pre(indent) + << s + << "\n"; +} + +simple_traverser: type = { + + pre_traverse: (virtual inout this, decl: meta::declaration) = { + traverse(decl); + } + + traverse: (virtual inout this, decl: meta::declaration) = + { + if decl.is_function() { + pre_traverse(decl.as_function()); + } + + if decl.is_object() { + pre_traverse(decl.as_object()); + } + + if decl.is_type() { + pre_traverse(decl.as_type()); + } + + // ... + // ... extend as desired to namespace, alias, etc. + // ... + } + + + pre_traverse: (virtual inout this, f: meta::function_declaration) = { + traverse(f); + } + + traverse: (virtual inout this, f: meta::function_declaration) = + { + parameters := f.get_parameters(); + for parameters do (param) { + pre_traverse(param); + } + + returns := f.get_returns(); + for returns do (param) { + pre_traverse(param); + } + + if !f.has_compound_body() { + pre_traverse(f.get_body()); + } + else { + pre_traverse(f.get_compound_body()); + } + } + + + pre_traverse: (virtual inout this, o: meta::object_declaration) = { + traverse(o); + } + + traverse: (virtual inout this, o: meta::object_declaration) = + { + if o.has_initializer() { + pre_traverse(o.get_initializer()); + } + } + + + pre_traverse: (virtual inout this, t: meta::type_declaration) = { + traverse(t); + } + + traverse: (virtual inout this, t: meta::type_declaration) = + { + for t.get_members() do (m) { + pre_traverse(m); + } + } + + + pre_traverse: (virtual inout this, t: meta::parameter_declaration) = { + traverse(t); + } + + traverse: (virtual inout this, t: meta::parameter_declaration) = + { + pre_traverse(t.get_declaration()); + } + + pre_traverse: (virtual inout this, stmt: meta::statement) = { + traverse(stmt); + } + + traverse: (virtual inout this, stmt: meta::statement) = + { + if stmt.is_expression_statement() { + pre_traverse(stmt.as_expression_statement().get_expression()); + } + + if stmt.is_compound_statement() { + pre_traverse(stmt.as_compound_statement()); + } + + if stmt.is_selection_statement() + { + pre_traverse(stmt.as_selection_statement()); + } + + if stmt.is_declaration() { + pre_traverse(stmt.as_declaration()); + } + + if stmt.is_return_statement() { + pre_traverse(stmt.as_return_statement()); + } + + if stmt.is_iteration_statement() { + pre_traverse(stmt.as_iteration_statement()); + } + + // TODO: + // using + // contract + // inspect + // jump + } + + + pre_traverse: (virtual inout this, stmt: meta::compound_statement) = { + traverse(stmt); + } + + traverse: (virtual inout this, stmt: meta::compound_statement) = + { + stmts := stmt.get_statements(); + + for stmts do (cur) { + pre_traverse(cur); + } + } + + + pre_traverse: (virtual inout this, stmt: meta::return_statement) = { + traverse(stmt); + } + + traverse: (virtual inout this, stmt: meta::return_statement) = + { + if stmt.has_expression() { + pre_traverse(stmt.get_expression()); + } + } + + + pre_traverse: (virtual inout this, stmt: meta::iteration_statement) = { + traverse(stmt); + } + + traverse: (virtual inout this, stmt: meta::iteration_statement) = + { + if stmt.is_do() || stmt.is_while() { + pre_traverse(stmt.get_do_while_condition()); + pre_traverse(stmt.get_do_while_body()); + } + else { + assert(stmt.is_for()); + pre_traverse(stmt.get_for_range()); + pre_traverse(stmt.get_for_parameter()); + pre_traverse(stmt.get_for_body()); + } + + if stmt.has_next() { + pre_traverse(stmt.get_next_expression()); + } + } + + + pre_traverse: (virtual inout this, stmt: meta::selection_statement) = { + traverse(stmt); + } + + traverse: (virtual inout this, stmt: meta::selection_statement) = + { + pre_traverse(stmt.get_expression()); + pre_traverse(stmt.get_true_branch()); + + if stmt.has_false_branch() { + pre_traverse(stmt.get_false_branch()); + } + } + + + pre_traverse: (virtual inout this, expr: meta::expression) = + { + // Nothing to select here. + traverse(expr); + } + + traverse: (virtual inout this, expr: meta::expression) = + { + // An expression has other shortcuts to query deeper properties, + // but let's just traverse all the nested grammer elements to + // show how that traversal works + + // The expressions use the pre_traverse function to decide which expression + // they are. The correct one calls traverse only once. + + // The expression's basic payload is just an assignment expression + pre_traverse(expr.as_assignment_expression()); + } + + + pre_traverse: (virtual inout this, binexpr: meta::assignment_expression) = + { + terms := binexpr.get_terms(); + assert(!terms.empty()); + + // If this has only one term, it's not an actual assignment, + // it's holding a lower grammar production so go traverse that + if terms.ssize() == 1 { + pre_traverse(terms.front().get_term()); + } + + // Else we're at an actual binary expression with a rhs + else { + traverse(binexpr); + } + } + + traverse: (virtual inout this, binexpr: meta::assignment_expression) = + { + terms := binexpr.get_terms(); + + for terms + do (term) + { + traverse(term.get_term()); + } + } + + pre_traverse: (virtual inout this, binexpr: meta::logical_or_expression) = + { + terms := binexpr.get_terms(); + assert(!terms.empty()); + + // If this has only one term, it's not an actual logical-or, + // it's holding a lower grammar production so go traverse that + if terms.ssize() == 1 { + pre_traverse(terms.front().get_term()); + } + + // Else we're at an actual binary expression with a rhs + else { + traverse(binexpr); + } + } + + traverse: (virtual inout this, binexpr: meta::logical_or_expression) = + { + terms := binexpr.get_terms(); + + for terms + do (term) + { + traverse(term.get_term()); + } + } + + + pre_traverse: (virtual inout this, binexpr: meta::logical_and_expression) = + { + terms := binexpr.get_terms(); + assert(!terms.empty()); + + // If this has only one term, it's not an actual logical-and, + // it's holding a lower grammar production so go traverse that + if terms.ssize() == 1 { + pre_traverse(terms.front().get_term()); + } + + // Else we're at an actual binary expression with a rhs + else { + traverse(binexpr); + } + } + + traverse: (virtual inout this, binexpr: meta::logical_and_expression) = + { + terms := binexpr.get_terms(); + + for terms + do (term) + { + traverse(term.get_term()); + } + } + + pre_traverse: (virtual inout this, binexpr: meta::bit_or_expression) = + { + terms := binexpr.get_terms(); + assert(!terms.empty()); + + // If this has only one term, it's not an actual bit-or, + // it's holding a lower grammar production so go traverse that + if terms.ssize() == 1 { + pre_traverse(terms.front().get_term()); + } + + // Else we're at an actual binary expression with a rhs + else { + traverse(binexpr); + } + } + + traverse: (virtual inout this, binexpr: meta::bit_or_expression) = + { + terms := binexpr.get_terms(); + + for terms + do (term) + { + traverse(term.get_term()); + } + } + + pre_traverse: (virtual inout this, binexpr: meta::bit_xor_expression) = + { + terms := binexpr.get_terms(); + assert(!terms.empty()); + + // If this has only one term, it's not an actual bit-xor, + // it's holding a lower grammar production so go traverse that + if terms.ssize() == 1 { + pre_traverse(terms.front().get_term()); + } + + // Else we're at an actual binary expression with a rhs + else { + traverse(binexpr); + } + } + + traverse: (virtual inout this, binexpr: meta::bit_xor_expression) = + { + terms := binexpr.get_terms(); + + for terms + do (term) + { + traverse(term.get_term()); + } + } + + + pre_traverse: (virtual inout this, binexpr: meta::bit_and_expression) = + { + terms := binexpr.get_terms(); + assert(!terms.empty()); + + // If this has only one term, it's not an actual bit-and, + // it's holding a lower grammar production so go traverse that + if terms.ssize() == 1 { + pre_traverse(terms.front().get_term()); + } + + // Else we're at an actual binary expression with a rhs + else { + traverse(binexpr); + } + } + + traverse: (virtual inout this, binexpr: meta::bit_and_expression) = + { + terms := binexpr.get_terms(); + + for terms + do (term) + { + traverse(term.get_term()); + } + } + + + pre_traverse: (virtual inout this, binexpr: meta::equality_expression) = + { + terms := binexpr.get_terms(); + assert(!terms.empty()); + + // If this has only one term, it's not an actual equality, + // it's holding a lower grammar production so go traverse that + if terms.ssize() == 1 { + pre_traverse(terms.front().get_term()); + } + + // Else we're at an actual binary expression with a rhs + else { + traverse(binexpr); + } + } + + traverse: (virtual inout this, binexpr: meta::equality_expression) = + { + terms := binexpr.get_terms(); + + for terms + do (term) + { + traverse(term.get_term()); + } + } + + pre_traverse: (virtual inout this, binexpr: meta::relational_expression) = + { + terms := binexpr.get_terms(); + assert(!terms.empty()); + + // If this has only one term, it's not an actual relational, + // it's holding a lower grammar production so go traverse that + if terms.ssize() == 1 { + pre_traverse(terms.front().get_term()); + } + + // Else we're at an actual binary expression with a rhs + else { + traverse(binexpr); + } + } + + traverse: (virtual inout this, binexpr: meta::relational_expression) = + { + terms := binexpr.get_terms(); + + for terms + do (term) + { + traverse(term.get_term()); + } + } + + pre_traverse: (virtual inout this, binexpr: meta::compare_expression) = + { + terms := binexpr.get_terms(); + assert(!terms.empty()); + + // If this has only one term, it's not an actual compare, + // it's holding a lower grammar production so go traverse that + if terms.ssize() == 1 { + pre_traverse(terms.front().get_term()); + } + + // Else we're at an actual binary expression with a rhs + else { + traverse(binexpr); + } + } + + traverse: (virtual inout this, binexpr: meta::compare_expression) = + { + terms := binexpr.get_terms(); + + for terms + do (term) + { + traverse(term.get_term()); + } + } + + pre_traverse: (virtual inout this, binexpr: meta::shift_expression) = + { + terms := binexpr.get_terms(); + assert(!terms.empty()); + + // If this has only one term, it's not an actual shift, + // it's holding a lower grammar production so go traverse that + if terms.ssize() == 1 { + pre_traverse(terms.front().get_term()); + } + + // Else we're at an actual binary expression with a rhs + else { + traverse(binexpr); + } + } + + traverse: (virtual inout this, binexpr: meta::shift_expression) = + { + terms := binexpr.get_terms(); + + for terms + do (term) + { + traverse(term.get_term()); + } + } + + pre_traverse: (virtual inout this, binexpr: meta::additive_expression) = + { + terms := binexpr.get_terms(); + assert(!terms.empty()); + + // If this has only one term, it's not an actual additive, + // it's holding a lower grammar production so go traverse that + if terms.ssize() == 1 { + pre_traverse(terms.front().get_term()); + } + + // Else we're at an actual binary expression with a rhs + else { + traverse(binexpr); + } + } + + traverse: (virtual inout this, binexpr: meta::additive_expression) = + { + terms := binexpr.get_terms(); + + for terms + do (term) + { + traverse(term.get_term()); + } + } + + + pre_traverse: (virtual inout this, binexpr: meta::multiplicative_expression) = + { + terms := binexpr.get_terms(); + assert(!terms.empty()); + + // If this has only one term, it's not an actual multiplicative, + // it's holding a lower grammar production so go traverse that + if terms.ssize() == 1 { + pre_traverse(terms.front().get_term()); + } + + // Else we're at an actual binary expression with a rhs + else { + traverse(binexpr); + } + } + + traverse: (virtual inout this, binexpr: meta::multiplicative_expression) = + { + terms := binexpr.get_terms(); + + for terms + do (term) + { + traverse(term.get_term()); + } + } + + pre_traverse: (virtual inout this, isas: meta::is_as_expression) = + { + terms := isas.get_terms(); + + // If this has no additional terms, it's not an actual is-as, + // it's holding a lower grammar production so go traverse that + if terms.empty() { + pre_traverse(isas.get_expression()); + } + + // Else we're at an actual is-as expression with a rhs + else { + traverse(isas); + } + } + + traverse: (virtual inout this, isas: meta::is_as_expression) = + { + terms := isas.get_terms(); + + pre_traverse(isas.get_expression()); + + for terms do (term) { + traverse(term.get_expr()); + } + } + + traverse: (virtual inout this, exprs: meta::expression_list) = + { + for exprs.get_expressions() do (expr) { + traverse(expr); + } + } + + pre_traverse: (virtual inout this, prefix: meta::prefix_expression) = + { + ops := prefix.get_ops(); + + // If this has no additional ops, it's not a naked prefix expr, + // it's holding a lower grammar production so go traverse that + if ops.empty() { + pre_traverse(prefix.get_postfix_expression(),); + } + + // Else we're at an actual prefix expression with ops + else { + traverse(prefix); + } + } + + traverse: (virtual inout this, prefix: meta::prefix_expression) = + { + pre_traverse(prefix.get_postfix_expression()); + } + + pre_traverse: (virtual inout this, postfix: meta::postfix_expression) = + { + terms := postfix.get_terms(); + + // If this has no additional terms, it's not a naked postfix expr, + // it's holding a lower grammar production so go traverse that + if terms.empty() { + traverse(postfix.get_primary_expression()); + } + + // Else we're at an actual postfix expression with ops + else { + traverse(postfix); + } + } + + traverse: (virtual inout this, postfix: meta::postfix_expression) = + { + terms := postfix.get_terms(); + + traverse(postfix.get_primary_expression()); + + for terms do (term) { + if term.is_id_expression() { + traverse(term.get_id_expression()); + } + else if term.is_expression_list() { + traverse(term.get_expression_list()); + } + else if term.is_expression() { + traverse(term.get_expression()); + } + } + } + + traverse: (virtual inout this, uid: meta::unqualified_id) = + { + _ = uid; + } + + + traverse: (virtual inout this, qid: meta::qualified_id) = + { + for qid.get_terms() + do (term) + { + traverse(term.get_unqualified()); + } + } + + + traverse: (virtual inout this, tid: meta::type_id) = + { + if tid.is_postfix_expression() { + traverse(tid.as_postfix_expression()); + } + else if tid.is_qualified_id() { + traverse(tid.as_qualified_id()); + } + else if tid.is_unqualified_id() { + traverse(tid.as_unqualified_id()); + } + else { + // Regular type_id + } + } + + + traverse: (virtual inout this, primary: meta::primary_expression) = + { + if primary.is_identifier() { + // Regular identifier + } + else if primary.is_expression_list() { + traverse(primary.as_expression_list()); + } + else if primary.is_literal() { + // Regular literal + } + else if primary.is_declaration() { + // TODO: traverse(primary.as_declaration()); + } + else { + // Regular primary + } + } + + + traverse: (virtual inout this, idexpr: meta::id_expression) = + { + if idexpr.is_identifier() { + // Regular id + } + else if idexpr.is_qualified() { + traverse(idexpr.as_qualified()); + } + else if idexpr.is_unqualified() { + traverse(idexpr.as_unqualified()); + } + else { + // Regular id expr + } + } +} + + +//----------------------------------------------------------------------- +// +// sample_traverser serves two purposes: +// +// - infrastructure for writing reflection API test cases +// +// - a sample for how code can use the reflection API, notably +// for reflecting on function bodies (statements, expressions) +// + +sample_traverser: (decl: meta::declaration, indent: i32) = +{ + sample_print("Declaration: (decl.name())$", indent); + + if decl.is_function() { + sample_traverser(decl.as_function(), indent+1); + } + + if decl.is_object() { + sample_traverser(decl.as_object(), indent+1); + } + + if decl.is_type() { + sample_traverser(decl.as_type(), indent+1); + } + + // ... + // ... extend as desired to namespace, alias, etc. + // ... +} + + +sample_traverser: (f: meta::function_declaration, indent: i32 = 0) = +{ + sample_print("Function: (f.name())$", indent+1); + + parameters := f.get_parameters(); + if !parameters.empty() { + sample_print("Parameters:", indent+2); + for parameters do (param) { + sample_traverser(param, indent+3); + } + } + + returns := f.get_returns(); + if !returns.empty() { + sample_print("Returns:", indent+2); + for returns do (param) { + sample_traverser(param, indent+3); + } + } + + sample_print("Body:", indent+2); + if !f.has_compound_body() { + sample_traverser(f.get_body(), indent+3); + } + else { + sample_traverser(f.get_compound_body(), indent+3); + } +} + + +sample_traverser: (o: meta::object_declaration, indent: i32) = +{ + sample_print("Object: name (o.name())$, type (o.type())$", indent); + if o.has_initializer() { + sample_print("Initializer:", indent+1); + sample_traverser(o.get_initializer(), indent+2); + } +} + + +sample_traverser: (t: meta::type_declaration, indent: i32 = 0) = +{ + sample_print("Type: (t.name())$", indent); + + if t.parent_is_nonglobal_namespace() + { + ns := t.get_parent().as_nonglobal_namespace(); + sample_print("is a member of namespace (ns.name())$ which contains the following names:", indent+1); + for ns.get_members() do (m) { + sample_print(m.name(), indent+2); + } + ns.add_member( "add_1: (x) = x+1;"); + _ = ns; + } + + for t.get_members() do (m) { + sample_traverser(m, indent+1); + } +} + + +sample_traverser: (t: meta::parameter_declaration, indent: i32 = 0) = +{ + sample_print("parameter:", indent); + + pass := t.get_passing_style(); + if pass == passing_style::in { sample_print("passing style: in", indent+1 ); } + if pass == passing_style::in_ref { sample_print("passing style: in_ref", indent+1 ); } + if pass == passing_style::copy { sample_print("passing style: copy", indent+1 ); } + if pass == passing_style::inout { sample_print("passing style: inout", indent+1 ); } + if pass == passing_style::out { sample_print("passing style: out", indent+1 ); } + if pass == passing_style::move { sample_print("passing style: move", indent+1 ); } + if pass == passing_style::forward { sample_print("passing style: forward", indent+1 ); } + if pass == passing_style::forward_ref { sample_print("passing style: forward_ref", indent+1 ); } + + sample_print("declaration:", indent+1); + sample_traverser(t.get_declaration(), indent+2); +} + + +sample_traverser: (stmt: meta::statement, indent: i32) = +{ + params := stmt.get_parameters(); + if !params.empty() { + sample_print("statement parameters: ", indent); + for params do (param) { + sample_traverser( param, indent+1 ); + } + } + + if stmt.is_expression_statement() { + sample_traverser(stmt.as_expression_statement().get_expression(), indent); + } + + if stmt.is_compound_statement() { + sample_traverser(stmt.as_compound_statement(), indent); + } + + if stmt.is_selection_statement() + { + sel := stmt.as_selection_statement(); + sample_print("(sel.get_identifier())$ statement", indent); + + sample_print("condition:", indent+1); + sample_traverser(sel.get_expression(), indent+2); + + sample_print("true branch:", indent+1); + sample_traverser(sel.get_true_branch(), indent+2); + + if sel.has_false_branch() { + sample_print("false branch:", indent+1); + sample_traverser(sel.get_false_branch(), indent+2); + } + } + + if stmt.is_declaration() { + sample_traverser(stmt.as_declaration(), indent+1); + } + + if stmt.is_return_statement() { + sample_traverser(stmt.as_return_statement(), indent+1); + } + + if stmt.is_iteration_statement() { + sample_traverser(stmt.as_iteration_statement(), indent+1); + } + + // TODO: + // using + // contract + // inspect + // jump +} + + +sample_traverser: (stmt: meta::compound_statement, indent: i32) = +{ + stmts := stmt.get_statements(); + + if stmts.empty() { + sample_print("compound statement (empty)", indent); + return; + } + + // Else + sample_print("compound statement", indent); + for stmts do (stmt2) { + sample_traverser(stmt2, indent+1); + } +} + + +sample_traverser: (stmt: meta::return_statement, indent: i32) = +{ + sample_print("return statement", indent); + if stmt.has_expression() { + sample_print("expression", indent+1); + sample_traverser(stmt.get_expression(), indent+2); + } +} + + +sample_traverser: (stmt: meta::iteration_statement, indent: i32) = +{ + if stmt.is_do() || stmt.is_while() { + if stmt.is_do() { + sample_print("do loop:", indent); + } + else { + sample_print("while loop:", indent); + } + sample_print("condition:", indent+1); + sample_traverser(stmt.get_do_while_condition(), indent+2); + sample_print("body:", indent+1); + sample_traverser(stmt.get_do_while_body(), indent+2); + } + else { + assert(stmt.is_for()); + sample_print("for loop:", indent); + sample_print("range:", indent+1); + sample_traverser(stmt.get_for_range(), indent+2); + sample_print("parameter:", indent+1); + sample_traverser(stmt.get_for_parameter(), indent+2); + sample_print("body:", indent+1); + sample_traverser(stmt.get_for_body(), indent+2); + } + + if stmt.has_next() { + sample_print("next expression:", indent+1); + sample_traverser(stmt.get_next_expression(), indent+2); + } +} + + +sample_traverser: (expr: meta::expression, indent: i32) = +{ + // An expression has other shortcuts to query deeper properties, + // but let's just traverse all the nested grammar elements to + // show how that traversal works + + // The expression's basic payload is just an assignment expression + // today - this can change when we add try-expressions + if expr.is_assignment_expression() { + sample_traverser(expr.as_assignment_expression(), indent); + } +} + + +sample_traverser: (binexpr: meta::assignment_expression, indent: i32) = +{ + terms := binexpr.get_terms(); + assert(!terms.empty()); + + // If this has only one term, it's not an actual assignment, + // it's holding a lower grammar production so go traverse that + if terms.ssize() == 1 { + sample_traverser(terms.front().get_term(), indent); + } + + // Else we're at an actual binary expression with a rhs + else { + sample_print("assignment", indent); + + (copy first := true) + for terms + do (term) + { + if !first { + sample_print("op: (term.get_op())$", indent+1); + } + first = false; + sample_print("term:", indent+1); + sample_traverser(term.get_term(), indent+2); + } + } +} + + +sample_traverser: (binexpr: meta::logical_or_expression, indent: i32) = +{ + terms := binexpr.get_terms(); + assert(!terms.empty()); + + // If this has only one term, it's not an actual logical-or, + // it's holding a lower grammar production so go traverse that + if terms.ssize() == 1 { + sample_traverser(terms.front().get_term(), indent); + } + + // Else we're at an actual binary expression with a rhs + else { + sample_print("logical-or", indent); + + (copy first := true) + for terms + do (term) + { + if !first { + sample_print("op: (term.get_op())$", indent+1); + } + first = false; + sample_print("term:", indent+1); + sample_traverser(term.get_term(), indent+2); + } + } +} + + +sample_traverser: (binexpr: meta::logical_and_expression, indent: i32) = +{ + terms := binexpr.get_terms(); + assert(!terms.empty()); + + // If this has only one term, it's not an actual logical-and, + // it's holding a lower grammar production so go traverse that + if terms.ssize() == 1 { + sample_traverser(terms.front().get_term(), indent); + } + + // Else we're at an actual binary expression with a rhs + else { + sample_print("logical-and", indent); + + (copy first := true) + for terms + do (term) + { + if !first { + sample_print("op: (term.get_op())$", indent+1); + } + first = false; + sample_print("term:", indent+1); + sample_traverser(term.get_term(), indent+2); + } + } +} + + +sample_traverser: (binexpr: meta::bit_or_expression, indent: i32) = +{ + terms := binexpr.get_terms(); + assert(!terms.empty()); + + // If this has only one term, it's not an actual bit-or, + // it's holding a lower grammar production so go traverse that + if terms.ssize() == 1 { + sample_traverser(terms.front().get_term(), indent); + } + + // Else we're at an actual binary expression with a rhs + else { + sample_print("bit-or", indent); + + (copy first := true) + for terms + do (term) + { + if !first { + sample_print("op: (term.get_op())$", indent+1); + } + first = false; + sample_print("term:", indent+1); + sample_traverser(term.get_term(), indent+2); + } + } +} + + +sample_traverser: (binexpr: meta::bit_xor_expression, indent: i32) = +{ + terms := binexpr.get_terms(); + assert(!terms.empty()); + + // If this has only one term, it's not an actual bit-xor, + // it's holding a lower grammar production so go traverse that + if terms.ssize() == 1 { + sample_traverser(terms.front().get_term(), indent); + } + + // Else we're at an actual binary expression with a rhs + else { + sample_print("bit-xor", indent); + + (copy first := true) + for terms + do (term) + { + if !first { + sample_print("op: (term.get_op())$", indent+1); + } + first = false; + sample_print("term:", indent+1); + sample_traverser(term.get_term(), indent+2); + } + } +} + + +sample_traverser: (binexpr: meta::bit_and_expression, indent: i32) = +{ + terms := binexpr.get_terms(); + assert(!terms.empty()); + + // If this has only one term, it's not an actual bit-and, + // it's holding a lower grammar production so go traverse that + if terms.ssize() == 1 { + sample_traverser(terms.front().get_term(), indent); + } + + // Else we're at an actual binary expression with a rhs + else { + sample_print("bit-and", indent); + + (copy first := true) + for terms + do (term) + { + if !first { + sample_print("op: (term.get_op())$", indent+1); + } + first = false; + sample_print("term:", indent+1); + sample_traverser(term.get_term(), indent+2); + } + } +} + + +sample_traverser: (binexpr: meta::equality_expression, indent: i32) = +{ + terms := binexpr.get_terms(); + assert(!terms.empty()); + + // If this has only one term, it's not an actual equality, + // it's holding a lower grammar production so go traverse that + if terms.ssize() == 1 { + sample_traverser(terms.front().get_term(), indent); + } + + // Else we're at an actual binary expression with a rhs + else { + sample_print("equality", indent); + + (copy first := true) + for terms + do (term) + { + if !first { + sample_print("op: (term.get_op())$", indent+1); + } + first = false; + sample_print("term:", indent+1); + sample_traverser(term.get_term(), indent+2); + } + } +} + + +sample_traverser: (binexpr: meta::relational_expression, indent: i32) = +{ + terms := binexpr.get_terms(); + assert(!terms.empty()); + + // If this has only one term, it's not an actual relational, + // it's holding a lower grammar production so go traverse that + if terms.ssize() == 1 { + sample_traverser(terms.front().get_term(), indent); + } + + // Else we're at an actual binary expression with a rhs + else { + sample_print("relational", indent); + + (copy first := true) + for terms + do (term) + { + if !first { + sample_print("op: (term.get_op())$", indent+1); + } + first = false; + sample_print("term:", indent+1); + sample_traverser(term.get_term(), indent+2); + } + } +} + + +sample_traverser: (binexpr: meta::compare_expression, indent: i32) = +{ + terms := binexpr.get_terms(); + assert(!terms.empty()); + + // If this has only one term, it's not an actual compare, + // it's holding a lower grammar production so go traverse that + if terms.ssize() == 1 { + sample_traverser(terms.front().get_term(), indent); + } + + // Else we're at an actual binary expression with a rhs + else { + sample_print("compare", indent); + + (copy first := true) + for terms + do (term) + { + if !first { + sample_print("op: (term.get_op())$", indent+1); + } + first = false; + sample_print("term:", indent+1); + sample_traverser(term.get_term(), indent+2); + } + } +} + + +sample_traverser: (binexpr: meta::shift_expression, indent: i32) = +{ + terms := binexpr.get_terms(); + assert(!terms.empty()); + + // If this has only one term, it's not an actual shift, + // it's holding a lower grammar production so go traverse that + if terms.ssize() == 1 { + sample_traverser(terms.front().get_term(), indent); + } + + // Else we're at an actual binary expression with a rhs + else { + sample_print("shift", indent); + + (copy first := true) + for terms + do (term) + { + if !first { + sample_print("op: (term.get_op())$", indent+1); + } + first = false; + sample_print("term:", indent+1); + sample_traverser(term.get_term(), indent+2); + } + } +} + + +sample_traverser: (binexpr: meta::additive_expression, indent: i32) = +{ + terms := binexpr.get_terms(); + assert(!terms.empty()); + + // If this has only one term, it's not an actual additive, + // it's holding a lower grammar production so go traverse that + if terms.ssize() == 1 { + sample_traverser(terms.front().get_term(), indent); + } + + // Else we're at an actual binary expression with a rhs + else { + sample_print("additive", indent); + + (copy first := true) + for terms + do (term) + { + if !first { + sample_print("op: (term.get_op())$", indent+1); + } + first = false; + sample_print("term:", indent+1); + sample_traverser(term.get_term(), indent+2); + } + } +} + + +sample_traverser: (binexpr: meta::multiplicative_expression, indent: i32) = +{ + terms := binexpr.get_terms(); + assert(!terms.empty()); + + // If this has only one term, it's not an actual multiplicative, + // it's holding a lower grammar production so go traverse that + if terms.ssize() == 1 { + sample_traverser(terms.front().get_term(), indent); + } + + // Else we're at an actual binary expression with a rhs + else { + sample_print("multiplicative", indent); + + (copy first := true) + for terms + do (term) + { + if !first { + sample_print("op: (term.get_op())$", indent+1); + } + first = false; + sample_print("term:", indent+1); + sample_traverser(term.get_term(), indent+2); + } + } +} + + +sample_traverser: (isas: meta::is_as_expression, indent: i32) = +{ + terms := isas.get_terms(); + + // If this has no additional terms, it's not an actual is-as, + // it's holding a lower grammar production so go traverse that + if terms.empty() { + sample_traverser(isas.get_expression(), indent); + } + + // Else we're at an actual is-as expression with a rhs + else { + sample_print("is-as expression", indent); + + sample_print("expression", indent+1); + sample_traverser(isas.get_expression(), indent+2); + + for terms do (term) { + sample_print("op: (term.get_op())$", indent+1); + sample_print("term:", indent+1); + sample_traverser(term.get_expr(), indent+2); + } + } +} + + +sample_traverser: (exprs: meta::expression_list, indent: i32) = +{ + if exprs.is_empty() { + sample_print("()", indent); + } + else { + sample_print("(", indent); + for exprs.get_expressions() do (expr) { + sample_traverser(expr, indent+1); + } + sample_print(")", indent); + } +} + + +sample_traverser: (prefix: meta::prefix_expression, indent: i32) = +{ + ops := prefix.get_ops(); + + // If this has no additional ops, it's not a naked prefix expr, + // it's holding a lower grammar production so go traverse that + if ops.empty() { + sample_traverser(prefix.get_postfix_expression(), indent); + } + + // Else we're at an actual prefix expression with ops + else { + sample_print("prefix expression", indent); + + for ops do (op) { + sample_print("op: (op)$", indent+1); + } + + sample_print("expression", indent+1); + sample_traverser(prefix.get_postfix_expression(), indent+2); + } +} + + +sample_traverser: (postfix: meta::postfix_expression, indent: i32) = +{ + terms := postfix.get_terms(); + + // If this has no additional terms, it's not a naked postfix expr, + // it's holding a lower grammar production so go traverse that + if terms.empty() { + sample_traverser(postfix.get_primary_expression(), indent); + } + + // Else we're at an actual postfix expression with ops + else { + sample_print("postfix expression", indent); + + sample_print("expression", indent+1); + sample_traverser(postfix.get_primary_expression(), indent+2); + + for terms do (term) { + sample_print("op: (term.get_op())$", indent+1); + if term.is_id_expression() { + sample_traverser(term.get_id_expression(), indent+1); + } + else if term.is_expression_list() { + sample_traverser(term.get_expression_list(), indent+1); + } + else if term.is_expression() { + sample_traverser(term.get_expression(), indent+1); + } + } + } +} + + +sample_traverser: (uid: meta::unqualified_id, indent: i32) = +{ + if uid.is_identifier() { + sample_print(uid.get_identifier(), indent); + } + else { + sample_print(uid.to_string(), indent+1); + } +} + + +sample_traverser: (qid: meta::qualified_id, indent: i32) = +{ + (copy first := true) + for qid.get_terms() + do (term) + { + if !first { + sample_print("op: (term.get_op())$", indent+1); + } + first = false; + sample_print("unqualified:", indent+1); + sample_traverser(term.get_unqualified(), indent+2); + } +} + + +sample_traverser: (tid: meta::type_id, indent: i32) = +{ + if tid.is_postfix_expression() { + sample_traverser(tid.as_postfix_expression(), indent); + } + else if tid.is_qualified_id() { + sample_traverser(tid.as_qualified_id(), indent); + } + else if tid.is_unqualified_id() { + sample_traverser(tid.as_unqualified_id(), indent); + } + else { + sample_print(tid.to_string(), indent); + } +} + + +sample_traverser: (primary: meta::primary_expression, indent: i32) = +{ + if primary.is_identifier() { + sample_print(primary.as_identifier(), indent+1); + } + else if primary.is_expression_list() { + sample_traverser(primary.as_expression_list(), indent+1); + } + else if primary.is_literal() { + sample_print(primary.as_literal(), indent+1); + } + else if primary.is_declaration() { + sample_traverser(primary.as_declaration(), indent+1); + } + else { + sample_print(primary.to_string(), indent+1); + } +} + + +sample_traverser: (idexpr: meta::id_expression, indent: i32) = +{ + if idexpr.is_identifier() { + sample_print(idexpr.as_identifier(), indent+1); + } + else if idexpr.is_qualified() { + sample_traverser(idexpr.as_qualified(), indent+1); + } + else if idexpr.is_unqualified() { + sample_traverser(idexpr.as_unqualified(), indent+1); + } + else { + sample_print(idexpr.to_string(), indent+1); + } +} + + +//----------------------------------------------------------------------- +// +// autodiff +// + +autodiff_special_func: type = { + public name : std::string; + public n_args : int; + public is_member : bool; + + public code_primal : std::string; + public code_fwd : std::string; + public code_rws : std::string; + public code_primal_higher_order: std::string; + public code_fwd_higher_order : std::string; + public code_rws_higher_order : std::string; + + operator=: (out this, name_: std::string, n_args_: int, is_member_: bool, code_primal_: std::string = "", code_fwd_: std::string = "", + code_rws_: std::string = "", code_primal_higher_order_: std::string = "", code_fwd_higher_order_: std::string = "", + code_rws_higher_order_: std::string = "") = { + name = name_; + n_args = n_args_; + is_member = is_member_; + + code_primal = code_primal_; + code_fwd = code_fwd_; + code_rws = code_rws_; + code_primal_higher_order = code_primal_higher_order_; + code_fwd_higher_order = code_fwd_higher_order_; + code_rws_higher_order = code_rws_higher_order_; + + if code_primal_higher_order.empty() { + code_primal_higher_order = code_primal; + } + if code_fwd_higher_order.empty() { + code_fwd_higher_order = code_fwd; + } + if code_rws_higher_order.empty() { + code_rws_higher_order = code_rws; + } + } + + operator=: (out this, that) = {} // Default copy. + + is_match: (this, o: autodiff_special_func) -> bool = { + return name == o.name && n_args == o.n_args && is_member == o.is_member; + } +} + +autodiff_declared_variable: @copy_constructible type = { + public name : std::string = ""; + public decl : std::string = ""; // TODO: Maybe use variant here. + public is_active: bool = false; + public is_member: bool = false; + + operator=:(out this) = {} + + operator=:(out this, name_: std::string, decl_: std::string, is_active_: bool, is_member_: bool) = { + name = name_; + decl = decl_; + is_active = is_active_; + is_member = is_member_; + } + + operator=:(out this, that) = {} +} + +autodiff_declaration_stack_item: @copy_constructible type = { + public full_name: std::string; // namespace + type name + public decl: meta::type_or_namespace_declaration; + + public diff_request: std::vector = (); + public diff_done: std::vector = (); + + public declared_variables_stack: std::vector> = (1); + + operator=: (out this, full_name_: std::string, decl_: meta::type_or_namespace_declaration) = { + full_name = full_name_; + decl = decl_; + } + + lookup_declaration: (this, decl_name: std::string) -> (r: std::vector = ()) = { + for decl.get_members() do (cur) { + if cur.has_name() && decl_name == cur.name() { + r.push_back(cur); + + // Do not break for overloads. <3 + } + } + } + + lookup_variable_declaration: (this, decl_name: std::string) -> (found: bool = false, r: autodiff_declared_variable = ()) = { + // Note: Not using "for std::ranges::views::reverse(...)" because + // that does not work correctly in Clang 12 + older libstdc++ + (copy cur_context := declared_variables_stack.rbegin()) + while cur_context != declared_variables_stack.rend() + next cur_context++ + { + for cur_context* do (cur) { + if cur.name == decl_name { + found = true; + r = cur; + return; + } + } + } + } + + +} + +autodiff_context: type = { + private temporary_count : int = 0; + + // Code in special function is replaced. Placeholders are: + // _o_ : name of object for member functions. + // _o_ : name of derivative object for member functions. + // _a1_ : First argument value + // _ad1_: First derivative argument value + // _a2_ : Second argument value + // _ad2_: Second derivative argument value + public special_funcs : std::vector = ( + autodiff_special_func("sin", 1, /* is_member = */ false, + "sin(_a1_)", + "cos(_a1_) * _ad1_", + "_ab1_ += cos(_a1_) * _rb_;\n", + "sin(_a1_)", + "_ad1_.sin(_a1_)", + "TODO", + + ), + autodiff_special_func("cos", 1, /* is_member = */ false, + "cos(_a1_)", + "-sin(_a1_) * _ad1_", + "_ab1_ += -sin(_a1_) * _rb_;\n", + "cos(_a1_)", + "_ad1_.cos(_a1_)", + "TODO", + ), + autodiff_special_func("exp", 1, /* is_member = */ false, + "exp(_a1_)", + "exp(_a1_) * _ad1_", + "_ab1_ += exp(_a1_) * _rb_;\n", + "exp(_a1_)", + "_ad1_.exp(_a1_)", + "TODO", + ), + autodiff_special_func("sqrt", 1, /* is_member = */ false, + "sqrt(_a1_)", + "0.5 * _ad1_ / sqrt(_a1_)", + "_ab1_ += 0.5 * _rb_ / sqrt(_a1_);\n", + "sqrt(_a1_)", + "_ad1_.sqrt(_a1_)", + "TODO", + ), + autodiff_special_func("push_back", 1, /* is_member = */ true, + "_o_.push_back(_a1_);", + "_od_.push_back(_ad1_);", + "TODO") + ); + + public fwd_suffix : std::string = "_d"; + public rws_suffix : std::string = "_b"; + private order : int = 1; + public reverse: bool = false; + + // Members depending on order + public fwd_ad_type: std::string = "double"; + public rws_ad_type: std::string = "double"; + + public declaration_map : std::map> = (); + public declaration_stack: std::vector = (); + + operator=:(out this) = {} + operator=:(out this, order_: int, reverse_: bool) = { + order = order_; + reverse = reverse_; + + if 1 != order { + if reverse { + fwd_ad_type = "cpp2::taylor"; + rws_ad_type = "cpp2::taylor"; + } + else { + fwd_ad_type = "cpp2::taylor"; + } + } + + } + + add_variable_declaration: (inout this, name: std::string, type: std::string, is_active: bool, is_member: bool = false) = { + declaration_stack.back().declared_variables_stack.back().push_back(autodiff_declared_variable(name, type, is_active, is_member)); + } + + is_variable_active: (inout this, name: std::string) -> bool = { + return lookup_variable_declaration(name).is_active; + } + + create_namespace_stack: (inout this, t: meta::type_or_namespace_declaration) = { + if t.parent_is_nonglobal_namespace() { + create_namespace_stack(t.get_parent().as_nonglobal_namespace()); + } + else if t.parent_is_type() { + create_namespace_stack(t.get_parent().as_type()); + } + + full_name: std::string = "::"; + if !declaration_stack.empty() { + full_name = declaration_stack.back().full_name + "::"; + } + full_name += t.name(); + + _ = declaration_stack.push_back(autodiff_declaration_stack_item(full_name, t)); + } + + is_forward: (this) = !reverse || (reverse && order != 1); + is_reverse: (this) = reverse; + is_taylor : (this) = order != 1; + + gen_temporary : (inout this) -> std::string = { + temporary_count += 1; + return "temp_(temporary_count)$"; + } + + is_type_active: (inout this, type: std::string) -> bool = { + decls := lookup_type_declaration(type); + r := false; + + if !decls.empty() { + assert(decls.ssize() == 1); + ada: autodiff_activity_check = (this&); + ada.pre_traverse(decls[0]); + r = ada.active; + } + + // TODO: Add template activity lookup. + + if !r { + // Declaration lookup did not yield an activity: Apply some heuristics. + r = type.contains("double"); + } + + return r; + } + + get_fwd_ad_type: (inout this, type: std::string) -> std::string = { + type_d := type; + + if "double" != type { + type_decls := lookup_type_declaration(type); + if !type_decls.empty() { + // We found a cpp2 type declaration, mark it for differentiation. + add_for_differentiation(type_decls[0]); + + // Add the AD suffix to the type + type_d += fwd_suffix; + } + } + + // Replace with AD type for the AD order. + return string_util::replace_all(type_d, "double", fwd_ad_type); + } + + get_rws_ad_type: (inout this, type: std::string) -> std::string = { + type_d := type; + + if "double" != type { + type_decls := lookup_type_declaration(type); + if !type_decls.empty() { + // We found a cpp2 type declaration, mark it for differentiation. + add_for_differentiation(type_decls[0]); + + // Add the AD suffix to the type + type_d += rws_suffix; + } + } + + // Replace with AD type for the AD order. + return string_util::replace_all(type_d, "double", rws_ad_type); + } + + get_reverse_passing_style: (this, p: passing_style) -> passing_style = { + // TODO: inspect does not work here: error: error: no matching function for call to ‘is(const cpp2::passing_style&)’ + // return inspect p -> passing_style { + // is passing_style::in = passing_style::inout; + // is passing_style::in_ref = passing_style::inout; + // is passing_style::copy = passing_style::inout; + // is passing_style::inout = passing_style::inout; + // is passing_style::out = passing_style::inout; + // is passing_style::move = passing_style::inout; + // is passing_style::forward = passing_style::inout; + // is passing_style::forward_ref = passing_style::inout; + // is _ = passing_style::inout; + // }; + if p == passing_style::in { return passing_style::inout; } + if p == passing_style::in_ref { return passing_style::inout; } + if p == passing_style::copy { return passing_style::inout; } + if p == passing_style::inout { return passing_style::inout; } + if p == passing_style::out { return passing_style::inout; } + if p == passing_style::move { return passing_style::inout; } + if p == passing_style::forward { return passing_style::inout; } + if p == passing_style::forward_ref { return passing_style::inout; } + + + declaration_stack.back().decl.error("AD: Do not know how to handle passing style:(p)$"); + + return passing_style::inout; + } + + lookup_declaration: (inout this, decl_name: std::string) -> (r : std::vector = ()) = { + // Note: Not using "for std::ranges::views::reverse(...)" because + // that does not work correctly in Clang 12 + older libstdc++ + (copy cur := declaration_stack.rbegin()) + while cur != declaration_stack.rend() + next cur++ + { + cur_full_name : std::string = cur*.full_name + "::" + decl_name; + ele := declaration_map.find(cur_full_name); + if ele == declaration_map.end() { + ele = declaration_map.insert_or_assign(cur_full_name, cur*.lookup_declaration(decl_name)).first; + } + + if !ele*.second.empty() { + // A simple assignment or emplace_back did not work. It tired to use move copy operators. + for ele*.second do (cp) { + r.push_back(cp); + } + //r = ele*.second; + break; + // TODO: For overload resolution we may want to continue here and just add everything for all parent namespaces. + } + } + + return; + } + + lookup_variable_declaration: (inout this, name: std::string) -> autodiff_declared_variable = { + if name == "_" { + return autodiff_declared_variable(name, "_", false, false); + } + + // Note: Not using "for std::ranges::views::reverse(...)" because + // that does not work correctly in Clang 12 + older libstdc++ + (copy cur_context := declaration_stack.rbegin()) + while cur_context != declaration_stack.rend() + next cur_context++ + { + r := cur_context*.lookup_variable_declaration(name); + if r.found { + return r.r; + } + } + + declaration_stack.back().decl.error("AD: Could not find declaration of variable with name `(name)$`."); + + return autodiff_declared_variable(); + } + + lookup_function_declaration: (inout this, decl_name: std::string) -> (r : std::vector = ()) = { + r_all := lookup_declaration(decl_name); + + for r_all do (cur) { + if cur.is_function() { + r.push_back(cur.as_function()); + } + } + } + + lookup_member_function_declaration: (inout this, obj_type: meta::type_declaration, decl_name: std::string) -> (r : std::vector = ()) = { + for obj_type.get_members() do (cur) { + if cur.is_function() && cur.has_name() && decl_name == cur.name() { + r.push_back(cur.as_function()); + + // Do not break for overloads. <3 + } + } + } + + lookup_type_declaration: (inout this, decl_name: std::string) -> (r : std::vector = ()) = { + r_all := lookup_declaration(decl_name); + + for r_all do (cur) { + if cur.is_type() { + r.push_back(cur.as_type()); + } + } + } + + lookup_special_function_handling: (this, func_name: std::string, n_args: int, is_member: bool) -> (m: bool, code_primal: std::string, code_fwd: std::string, code_rws: std::string) = { + lookup : autodiff_special_func = (func_name, n_args, is_member); + + m = false; + code_primal = ""; + code_fwd = ""; + code_rws = ""; + for special_funcs do (func) { + if func.is_match(lookup) { + m = true; + if is_taylor() { + code_primal = func.code_primal_higher_order; + code_fwd = func.code_fwd_higher_order; + code_rws = func.code_rws_higher_order; + } + else { + code_primal = func.code_primal; + code_fwd = func.code_fwd; + code_rws = func.code_rws; + } + return; + } + } + } + + add_as_differentiated: (inout this, t: meta::declaration) = { + top := declaration_stack.back()&; + + assert(t.get_parent().is_same(top*.decl)); + + top*.diff_done.push_back(t); + } + + add_for_differentiation: (inout this, t: meta::declaration) = { + t_parent := t.get_parent(); + + found := false; + + // Note: Not using "for std::ranges::views::reverse(...)" because + // that does not work correctly in Clang 12 + older libstdc++ + (copy cur := declaration_stack.rbegin()) + while cur != declaration_stack.rend() + next cur++ + { + if t_parent.is_same(cur*.decl) { + if !is_in_list(t, cur*.diff_request) { + cur*.diff_request.push_back(t); + } + + found = true; + break; + } + } + + if !found { + t.error("AD: Could not find parent type/namespace for: (t)$"); + } + } + + is_in_list: (v: meta::declaration, list: std::vector) -> bool = { + for list do (cur) { + if cur.is_same(v) { + return true; + } + } + + return false; + } + + enter_function: (inout this) = { + temporary_count = 0; + declaration_stack.back().declared_variables_stack.push_back(std::vector()); + } + + leave_function: (inout this) = { + declaration_stack.back().declared_variables_stack.pop_back(); + } + + push_stack: (inout this, decl: meta::type_or_namespace_declaration) = { + full_name: std::string = ""; + + if !declaration_stack.empty() { + full_name += declaration_stack.back().full_name; + } + + full_name += "::"; + full_name += decl.name(); + + declaration_stack.push_back(autodiff_declaration_stack_item(full_name, decl)); + } + + pop_stack: (inout this) = { + assert(!declaration_stack.empty()); + + top := declaration_stack.back()&; + ad: autodiff_declaration_handler = (this&, top*.decl); + + for top*.diff_request do (cur) { + if !is_in_list(cur, top*.diff_done) { + ad.pre_traverse(cur); + } + } + + declaration_stack.pop_back(); + } + + finish: (inout this) = { + while !declaration_stack.empty() { + pop_stack(); + } + } + + //TODO: Remove when autodiff_diff_code is updated + get_self: (inout this) -> *autodiff_context = { + return this&; + } + +} + +autodiff_diff_code: type = { + public ctx: *autodiff_context; + + public fwd : std::string = ""; + public rws_primal : std::string = ""; + public rws_backprop: std::string = ""; + + operator=:(out this, ctx_: *autodiff_context) = { + ctx = ctx_; + } + operator=:(out this, that) = {} + + add_forward : (inout this, v: std::string) = { if ctx*.is_forward() { fwd += v; }} + add_reverse_primal : (inout this, v: std::string) = { if ctx*.is_reverse() { rws_primal += v; }} + add_reverse_backprop: (inout this, v: std::string) = { if ctx*.is_reverse() { rws_backprop = v + rws_backprop; }} + + reset: (inout this) = { + fwd = ""; + rws_primal = ""; + rws_backprop = ""; + } + + // Temporary: TODO: remove when everything has been adapted to primal, fwd, rws pushes. + operator=:(inout this, v: std::string) = { + ctx = ctx*.get_self(); + fwd = v; + } + + // Temporary: TODO: remove when everything has been adapted to primal, fwd, rws pushes. + operator+=: (inout this, v: std::string) = { + fwd += v; + } + + // Temporary: TODO: remove when everything has been adapted to primal, fwd, rws pushes. + operator+=: (inout this, v: autodiff_diff_code) = { + fwd += v.fwd; + } + + // Temporary: TODO: remove when everything has been adapted to primal, fwd, rws pushes. + empty: (this) -> bool = { + return fwd.empty(); + } +} + +// // Temporary: TODO: remove when everything has been adapted to primal, fwd, rws pushes. +// to_string: (v: autodiff_diff_code) -> std::string = { +// return v.fwd; +// } + +autodiff_activity_check: type = { + this: simple_traverser = (); + + public ctx : *autodiff_context; + public active: bool = false; + + operator=: (out this, ctx_: *autodiff_context) = { + ctx = ctx_; + } + + traverse: (override inout this, t: meta::type_declaration) = { + for t.get_members() + do (m) + { + if m.is_object() || m.is_member_object() { + pre_traverse(m); + } + + // TODO: Maybe also add functions. + } + } + + traverse: (override inout this, o: meta::object_declaration) = { + + type := o.type(); + + if "_" == type { + if o.has_initializer() { + pre_traverse(o.get_initializer()); + } + else { + // Assume active + active = true; + } + } + else { + active |= ctx*.is_type_active(type); + } + } + + traverse: (override inout this, primary: meta::primary_expression) = + { + if primary.is_identifier() { + active |= ctx*.is_variable_active(primary.to_string()); + } + else if primary.is_expression_list() { + for primary.as_expression_list().get_expressions() do (cur) { + pre_traverse(cur); + } + } + else if primary.is_literal() { + // TODO: Improve check + if primary.to_string().contains(".") { + active = true; + } + } + else if primary.is_declaration() { + pre_traverse(primary.as_declaration()); + } + else { + primary.error("AD: Unknown primary expression kind: (primary.to_string())$"); + } + } + + traverse: (override inout this, postfix: meta::postfix_expression) = + { + terms := postfix.get_terms(); + + is_func := false; + + (copy i := 0) + for terms next i += 1 do (term) { + if term.get_op() == "." { + continue; + } + if term.get_op() == "(" && i + 1 == terms.ssize() { // Function operator has to be the last + is_func = true; + continue; + } + else { + postfix.error("AD: Unknown operator for postfix expression. op: (term.get_op())$ expr: (postfix)$"); + } + } + + // TODO: Really check for members + if !is_func || terms.ssize() != 1 { + active |= ctx*.is_variable_active(postfix.get_primary_expression().to_string()); + } + + if is_func { + // Check arguments of function + for terms.back().get_expression_list().get_expressions() do (cur) { + pre_traverse(cur); + } + } + } +} + +autodiff_handler_base: type = { + public ctx: *autodiff_context; + + public diff : autodiff_diff_code; + + operator=: (out this, ctx_: *autodiff_context) = { + ctx = ctx_; + diff = (ctx); + } + + // Temporary: TODO: remove when everything has been adapted to primal, fwd, rws pushes. + append: (inout this, in_ref o: autodiff_handler_base) = { + diff.fwd += o.diff.fwd; + diff.rws_primal += o.diff.rws_primal; + diff.rws_backprop = o.diff.rws_backprop + diff.rws_backprop; + } +} + +autodiff_expression_handler: type = { + this: simple_traverser = (); + this: autodiff_handler_base; + + base: type == simple_traverser; + + public primal_expr: std::string = ""; + public fwd_expr : std::string = ""; + public rws_expr : std::string = ""; + + operator=: (out this, ctx_: *autodiff_context) = { + autodiff_handler_base = (ctx_); + } + + add_suffix_if_not_wildcard: (this, lhs: std::string, suffix: std::string) -> std::string = { + if "_" == lhs { + return lhs; + } + else { + return lhs + suffix; + } + } + + prepare_backprop: (this, rhs_b: std::string, lhs: std::string, lhs_d: std::string, lhs_b: std::string) -> std::string = { + r := rhs_b; + r = string_util::replace_all(r, "_r_", lhs); + r = string_util::replace_all(r, "_rd_", lhs_d); + r = string_util::replace_all(r, "_rb_", lhs_b); + + return r; + } + prepare_backprop: (this, rhs_b: std::string, lhs: std::string) -> std::string = prepare_backprop(rhs_b, lhs, lhs + ctx*.fwd_suffix, lhs + ctx*.rws_suffix); + + gen_assignment: (inout this, lhs: std::string, lhs_d: std::string, lhs_b: std::string, rhs: std::string, rhs_d: std::string, rhs_b: std::string) = { + diff.add_forward("(lhs_d)$ = (rhs_d)$;\n"); + diff.add_forward("(lhs)$ = (rhs)$;\n"); + + if ctx*.is_taylor() { + diff.add_reverse_primal("(lhs_d)$ = (rhs_d)$;\n"); + } + diff.add_reverse_primal("(lhs)$ = (rhs)$;\n"); + diff.add_reverse_backprop("(lhs_b)$ = 0.0;\n"); + diff.add_reverse_backprop(prepare_backprop(rhs_b, lhs, lhs_d, lhs_b)); + } + gen_assignment: (inout this, lhs: std::string, lhs_d: std::string, lhs_b: std::string) + = gen_assignment(lhs, lhs_d, lhs_b, primal_expr, fwd_expr, rws_expr); + gen_assignment: (inout this, lhs: std::string) + = gen_assignment(lhs, add_suffix_if_not_wildcard(lhs, ctx*.fwd_suffix), add_suffix_if_not_wildcard(lhs, ctx*.rws_suffix), primal_expr, fwd_expr, rws_expr); + + + gen_declaration: (inout this, lhs: std::string, lhs_d: std::string, lhs_b: std::string, rhs: std::string, rhs_d: std::string, rhs_b: std::string, type: std::string, type_d: std::string, type_b: std::string) = { + diff.add_forward("(lhs_d)$: (type_d)$ = (rhs_d)$;\n"); + diff.add_forward("(lhs)$ : (type)$ = (rhs)$;\n"); + + if ctx*.is_taylor() { + diff.add_reverse_primal("(lhs_d)$: (type_d)$ = (rhs_d)$;\n"); + } + diff.add_reverse_primal("(lhs_b)$ : (type_b)$ = 0.0;\n"); + diff.add_reverse_primal("(lhs)$ : (type)$ = (rhs)$;\n"); + diff.add_reverse_backprop("(lhs_b)$ = 0.0;\n"); + diff.add_reverse_backprop(prepare_backprop(rhs_b, lhs, lhs_d, lhs_b)); + } + gen_declaration: (inout this, lhs: std::string, lhs_d: std::string, lhs_b: std::string, rhs: std::string, rhs_d: std::string, rhs_b: std::string, type: std::string) + = gen_declaration(lhs, lhs_d, lhs_b, rhs, rhs_d, rhs_b, type, ctx*.get_fwd_ad_type(type) , ctx*.get_rws_ad_type(type)); + gen_declaration: (inout this, lhs: std::string, lhs_d: std::string, lhs_b: std::string, type: std::string) + = gen_declaration(lhs, lhs_d, lhs_b, primal_expr, fwd_expr, rws_expr, type); + gen_declaration: (inout this, lhs: std::string, type: std::string) + = gen_declaration(lhs, lhs + ctx*.fwd_suffix, lhs + ctx*.rws_suffix, type); + + + + primal_fwd_rws_name: @struct type = { + primal: std::string = ""; + fwd : std::string = ""; + rws : std::string = ""; + active: bool = false; + } + + handle_expression_list: (inout this, list: meta::expression_list) -> std::vector = { + args : std::vector = (); + for list.get_expressions() do (expr) { + args.push_back(handle_expression_term(expr)); + } + + return args; + } + + handle_expression_term :(inout this, term) -> primal_fwd_rws_name = { + if term.is_identifier() { + primal := term.to_string(); + fwd := primal + ctx*.fwd_suffix; + rws := primal + ctx*.rws_suffix; + + decl := ctx*.lookup_variable_declaration(primal); + if decl.is_member { + fwd = "this(ctx*.fwd_suffix)$." + fwd; + rws = "this(ctx*.rws_suffix)$." + rws; + } + + if decl.is_active { + return (primal, fwd, rws, true); + } + else { + return (primal, "", "", false); + } + + } + else if term.is_expression_list() { + exprs := term..as_expression_list()..get_expressions(); + if exprs.ssize() != 1 { + term.error("Can not handle multiple expressions. (term.to_string())"); + return ("error", "", "", false); + } + expr := exprs[0]; + bin_expr := expr..as_assignment_expression(); + + if bin_expr.terms_size() != 0 { + term.error("Can not handle assign expr inside of expression. (expr.to_string())$"); + return ("error", "", "", false); + } + + return handle_expression_term(bin_expr.get_terms().front().get_term()); + } + else { + // Nothing special. A regular expression. + expr := term; + + ada: autodiff_activity_check = (ctx); + ada.pre_traverse(expr); + + if ada.active { + + ad : autodiff_expression_handler = (ctx); + ad..pre_traverse(expr); + t := ctx*.gen_temporary(); + ad.gen_declaration(t, "double"); // TODO: get type of expression + append(ad); + + r : primal_fwd_rws_name = (t, t + ctx*.fwd_suffix, t + ctx*.rws_suffix, true); // TODO: Check why on return (t, t + ctx*.fwd_suffix) the primal is initialized empty. Probably because of the move(t) + _ = t; + return r; + } + else { + return (expr.to_string(), "", "", false); + } + } + } + + handle_function_call: (inout this, postfix: meta::postfix_expression, has_return: bool) = { + terms := postfix.get_terms(); + + is_func := true; + + (copy i := 0) + for terms next i += 1 do (term) { + if term.get_op() == "." { + continue; + } + if term.get_op() == "(" && i + 1 == terms.ssize() { // Function operator has to be the last + continue; + } + + is_func = false; + } + + // Check for function call, everything else is not handled. + if !(is_func) { + postfix.error( "AD: Postfix expressions are only handled for function calls, or member function calls. Do not know how to handle: (postfix.to_string())$" ); + return; + } + + object : std::string = ""; + object_d : std::string = ""; + object_b : std::string = ""; + function_name : std::string = ""; + args : std::vector = (); + + primary := postfix.get_primary_expression(); + + if 1 != terms.ssize() { + object = primary.to_string(); + object_d = primary.to_string() + ctx*.fwd_suffix; + object_b = primary.to_string() + ctx*.rws_suffix; + } + else { + function_name = primary.to_string(); + } + + (copy i := 0) + for terms next i += 1 do (term) { + if term.get_op() == "." { + assert(term.is_id_expression()); + name := term.get_id_expression().to_string(); + + if i + 2 == terms.ssize() { // Second last term is function name, last term is function argument list + function_name = name; + } + else { + object += "." + name; + object_d += "." + name + ctx*.fwd_suffix; + } + } + else if term.get_op() == "(" { + assert(term.is_expression_list()); + + args = handle_expression_list(term.get_expression_list()); + } + else { + postfix.error("AD: Do not know how to handle postfix term: (term.to_string())$"); + } + } + + if handle_special_function(object, object_d, object_b, function_name, args) { + return; + } + + if object.contains(".") { + postfix.error("AD: can not handle nested member function calls: (postfix.to_string())$"); + return; + } + + call_primal: std::string = ""; + call_fwd : std::string = ""; + call_rws : std::string = ""; + + // All arguments have now been handled. Form the function call + ret_temp : std::string = ""; + if has_return { + ret_temp = ctx*.gen_temporary(); + call_fwd += "(ret_temp)$ := "; + } + + // TODO: This is untested for functions with no return value. Requires handling of out and inout parameters in functions. + if !object.empty() { // Prepend object call + call_primal += "(object)$."; + call_fwd += "(object)$."; + call_rws += "(object)$."; + } + call_primal += "(function_name)$("; + call_fwd += "(function_name)$(ctx*.fwd_suffix)$("; + call_rws += "(function_name)$(ctx*.rws_suffix)$("; + if !object.empty() { // Add this_d argument. + call_fwd += "(object_d)$, "; + call_rws += "(object_b)$, "; + } + for args do (arg) { + // TODO: Add taylor reverse handling. + call_primal += "(arg.primal)$, "; + call_fwd += "(arg.primal)$, "; + call_rws += "(arg.primal)$, "; + if arg.active { + call_fwd += "(arg.fwd)$, "; + call_rws += "(arg.rws)$, "; + } + } + + if has_return { + functions : std::vector = (); + if !object.empty() { + obj_decl := ctx*.lookup_variable_declaration(object); + obj_decl_types := ctx*.lookup_type_declaration(obj_decl.decl); + + if obj_decl_types.empty() { + postfix.error("AD: Could not find type declaration for `(object)$ with type (obj_decl.decl)$`.\n" + " If cpp2 object: this is an alpha limitation, please declare it befor the current declaration.\n" + " If cpp function: please add a special handling for this member function."); + return; + } + functions = ctx*.lookup_member_function_declaration(obj_decl_types[0], function_name); + + ctx*.add_for_differentiation(obj_decl_types[0]); // TODO: Add more fine grained differentiation. + } + else { + functions = ctx*.lookup_function_declaration(function_name); + if functions.ssize() == 0 { + postfix.error("AD: Could not find function declaration for `(function_name)$`.\n" + " If cpp2 function: this is an alpha limitation, please declare it befor the current declaration.\n" + " If cpp function: please add a special handling for this function."); + return; + } + else if functions.ssize() != 1 { + postfix.error("AD: No handling for overload resultion is currently implemented."); + return; + } + + ctx*.add_for_differentiation(functions[0]); + } + + ret_name : std::string = "r"; // Default for regular return. + returns := functions[0].get_returns(); + if !returns.empty() { + if returns.ssize() != 1 { + postfix.error("AD: Expecting single return."); + } + + for returns do (cur) { + ret_name = cur.get_declaration().name(); + } + } + + ret_name_d : std::string = ret_name + ctx*.fwd_suffix; + ret_name_b : std::string = ret_name + ctx*.rws_suffix; + + call_rws += "_rb_, "; + + call_primal += ")"; + call_fwd += ");\n"; + call_rws += ");\n"; + + diff.add_forward(call_fwd); + + primal_expr = call_primal; + fwd_expr = "(ret_temp)$.(ret_name_d)$"; + rws_expr = "_ = (call_rws)$"; + } + else { + call_primal += ");\n"; + call_fwd += ");\n"; + call_rws += ");\n"; + + diff.add_forward(call_fwd); + diff.add_reverse_primal(call_primal); + diff.add_reverse_backprop(call_rws); + } + + // TODO: Add function to list of functions/objects for differentiation for the no return case. + } + + handle_special_function: (inout this, object: std::string, object_d: std::string, object_b: std::string, function_name: std::string, args: std::vector) -> bool = { + + r := ctx*.lookup_special_function_handling(function_name, unchecked_narrow(args.ssize()), !object.empty()); + + if !r.m { + return false; // No match + } + + // Have a match, do the replacement + code_primal: std::string = r.code_primal; + code_fwd : std::string = r.code_fwd; + code_rws : std::string = r.code_rws; + + if !object.empty() { + code_primal = string_util::replace_all(code_primal, "_o_", object); + code_primal = string_util::replace_all(code_primal, "_od_", object_d); + + code_fwd = string_util::replace_all(code_fwd, "_o_", object); + code_fwd = string_util::replace_all(code_fwd, "_od_", object_d); + + code_rws = string_util::replace_all(code_fwd, "_o_", object); + code_rws = string_util::replace_all(code_rws, "_od_", object_d); + code_rws = string_util::replace_all(code_fwd, "_ob_", object_b); + } + + (copy i := 1) + for args do (arg) { + code_primal = string_util::replace_all(code_primal, "_a(i)$_", arg.primal); + code_primal = string_util::replace_all(code_primal, "_ad(i)$_", arg.fwd); + + code_fwd = string_util::replace_all(code_fwd, "_a(i)$_", arg.primal); + code_fwd = string_util::replace_all(code_fwd, "_ad(i)$_", arg.fwd); + + code_rws = string_util::replace_all(code_rws, "_a(i)$_", arg.primal); + code_rws = string_util::replace_all(code_rws, "_ad(i)$_", arg.fwd); + code_rws = string_util::replace_all(code_rws, "_ab(i)$_", arg.rws); + } + + primal_expr = code_primal; + fwd_expr = code_fwd; + rws_expr = code_rws; + + return true; + } + + traverse: (override inout this, expr: meta::expression) = { + base::traverse(expr); + } + + traverse: (override inout this, binexpr: meta::assignment_expression) = { + binexpr.error( "AD: Assign expressions are not yet handled." ); + } + + traverse: (override inout this, binexpr: meta::logical_or_expression) = { + binexpr.error( "AD: Logical or expressions are not yet handled." ); + } + + traverse: (override inout this, binexpr: meta::logical_and_expression) = { + binexpr.error( "AD: Logical and expressions are not yet handled." ); + } + + traverse: (override inout this, binexpr: meta::bit_or_expression) = { + binexpr.error( "AD: Bit or expressions are not yet handled." ); + } + + traverse: (override inout this, binexpr: meta::bit_xor_expression) = { + binexpr.error( "AD: Bit xor expressions are not yet handled." ); + } + + traverse: (override inout this, binexpr: meta::bit_and_expression) = { + binexpr.error( "AD: Bit and expressions are not yet handled." ); + } + + traverse: (override inout this, binexpr: meta::equality_expression) = { + binexpr.error( "AD: Equality or expressions are not yet handled." ); + } - mo := m.as_object(); - if !mo.has_wildcard_type() { - mo.error( - "an explicit underlying type should be specified as a compile-time argument " - "to the metafunction - try 'enum' or 'flag_enum'" - ); + traverse: (override inout this, binexpr: meta::relational_expression) = { + binexpr.error( "AD: Relational expressions are not yet handled." ); + } + + traverse: (override inout this, binexpr: meta::compare_expression) = { + binexpr.error( "AD: Compare or expressions are not yet handled." ); + } + + traverse: (override inout this, binexpr: meta::shift_expression) = { + binexpr.error( "AD: Shift or expressions are not yet handled." ); + } + + traverse: (override inout this, binexpr: meta::additive_expression) = { + terms := binexpr.get_terms(); + + first := true; + first_fwd := true; + op : std::string = "+"; + fwd : std::string = ""; + rws : std::string = ""; + primal: std::string = ""; + for terms do (term) { + if !first { + op = term.get_op().to_string(); + primal += " (op)$ "; + } + + var := handle_expression_term(term.get_term()); + if var.active { + if first_fwd { + if op == "-" {// Special handling for first fwd termn with minus + fwd += "-(var.fwd)$"; + } + else { // Special handling for first fwd term with plus + fwd += var.fwd; + } + } + else { + fwd += "(op)$ (var.fwd)$"; + } + rws += "(var.rws)$ (op)$= _rb_;\n"; + + first_fwd = false; + } + primal += var.primal; + + first = false; } - init := mo.initializer(); + primal_expr = primal; + fwd_expr = fwd; + rws_expr = rws; + } - is_default_or_numeric := is_empty_or_a_decimal_number(init); - found_non_numeric |= !init.empty() && !is_default_or_numeric; - m.require( !is_default_or_numeric || !found_non_numeric || mo.has_name("none"), - "(mo.name())$: enumerators with non-numeric values must come after all default and numeric values"); + traverse: (override inout this, binexpr: meta::multiplicative_expression) = { + terms := binexpr.get_terms(); - nextval( value, init ); + var_a := handle_expression_term(terms[0].get_term()); - v := std::strtoll(value[0]&, nullptr, 10); // for non-numeric values we'll just get 0 which is okay for now - if v < min_value { - min_value = v; + i : int = 1; + while i < terms.ssize() next i += 1 { + var_b := handle_expression_term(terms[i].get_term()); + + op := terms[i].get_op().to_string(); + + fwd : std::string = ""; + rws : std::string = ""; + primal : std::string = ""; + + if "*" == op { + if ctx*.is_taylor() { + // TODO: Add taylor overloads + fwd = "(var_a.fwd)$..mul((var_b.fwd)$, (var_a.primal)$, (var_b.primal)$)"; + if var_a.active { + //fwd += "(var_b.primal)$ * (var_a.fwd)$"; + rws += "(var_a.rws)$ += (var_b.fwd)$..mul(_rb_, (var_b.primal)$, _r_);\n"; + } + if var_b.active { + //if !fwd.empty() { fwd += " + "; } + //fwd += "(var_a.primal)$ * (var_b.fwd)$"; + rws += "(var_b.rws)$ += (var_a.fwd)$..mul(_rb_, (var_a.primal)$, _r_);\n"; + } + } + else { + if var_a.active { + fwd += "(var_b.primal)$ * (var_a.fwd)$"; + rws += "(var_a.rws)$ += (var_b.primal)$ * _rb_;\n"; + } + if var_b.active { + if !fwd.empty() { fwd += " + "; } + fwd += "(var_a.primal)$ * (var_b.fwd)$"; + rws += "(var_b.rws)$ += (var_a.primal)$ * _rb_;\n"; + } + } + primal = "(var_a.primal)$ * (var_b.primal)$"; + } + else if "/" == op { + if ctx*.is_taylor() { + // TODO: Add taylor overloads + fwd = "(var_a.fwd)$.div((var_b.fwd)$, (var_a.primal)$, (var_b.primal)$)"; + if var_a.active { + rws += "(var_a.rws)$ += _rb_.div((var_b.fwd)$, _r_, (var_b.primal)$);\n"; + } + if var_b.active { + rws += "(var_b.rws)$ -= (var_a.fwd)$.mul(_rb_, (var_a.primal)$, _r_).div((var_b.fwd)$.mul((var_b.fwd)$, (var_b.primal)$, (var_b.primal)$), (var_a.primal)$ * _r_, (var_b.primal)$ * (var_b.primal)$);\n"; + } + } + else { + if var_a.active { + fwd += "(var_a.fwd)$ / (var_b.primal)$"; + rws = "(var_a.rws)$ += _rb_ / (var_b.primal)$;\n"; + } + if var_b.active { + if !fwd.empty() { fwd += " + "; } + fwd += "-(var_a.primal)$ * (var_b.fwd)$ / ((var_b.primal)$ * (var_b.primal)$)"; + rws += "(var_b.rws)$ -= (var_a.primal)$ * _rb_ / ((var_b.primal)$ * (var_b.primal)$);\n"; + } + } + primal = "(var_a.primal)$ / (var_b.primal)$"; + } + else { + binexpr.error( "unkown multiplicative operator '(op)$'"); + } + + + if i + 1 == terms.ssize() { + primal_expr = primal; + fwd_expr = fwd; + rws_expr = rws; + } + else { + // Temporary + var_a.primal = ctx*.gen_temporary(); + var_a.fwd = var_a.primal + ctx*.fwd_suffix; + var_a.rws = var_a.primal + ctx*.rws_suffix; + var_a.active = var_a.active | var_b.active; + gen_declaration(var_a.primal, var_a.fwd, var_a.rws, primal, fwd, rws, "", "", ""); + } } - if v > max_value { - max_value = v; + } + + traverse: (override inout this, isas: meta::is_as_expression) = { + isas.error( "AD: Is as expressions are not yet handled." ); + } + + traverse: (override inout this, prefix: meta::prefix_expression) = + { + ops := prefix.get_ops(); + + if ops.ssize() != 1 { + prefix.error( "AD: Can only handle one prefix operation. Expression is: (prefix.to_string())$" ); } - // Adding local variable 'e' to work around a Clang warning - e: value_member_info = ( mo.name() as std::string, "", value ); - enumerators.push_back( e ); + ad: autodiff_expression_handler = (ctx); + ad.pre_traverse(prefix.get_postfix_expression()); + append(ad); - mo.mark_for_removal_from_enclosing_type(); - _ = mo; + primal_expr = ops[0] + ad.primal_expr; + fwd_expr = ops[0] + ad.fwd_expr; } - if (enumerators.empty()) { - t.error( "an enumeration must contain at least one enumerator value"); - return; + traverse: (override inout this, postfix: meta::postfix_expression) = + { + terms := postfix.get_terms(); + + is_func := false; + + (copy i := 0) + for terms next i += 1 do (term) { + if term.get_op() == "." { + continue; + } + if term.get_op() == "(" && i + 1 == terms.ssize() { // Function operator has to be the last + is_func = true; + continue; + } + else { + postfix.error("AD: Unknown operator for postfix expression. op: (term.get_op())$ expr: (postfix)$"); + } + } + + if is_func { + handle_function_call(postfix, true); + } + else { + // Member access + + primary : = postfix.get_primary_expression(); + obj_access : std::string = primary.to_string(); + obj_access_d : std::string = obj_access + ctx*.fwd_suffix; + + for terms do (term) { + obj_access += term.get_op() + term.get_id_expression().to_string(); + obj_access_d += term.get_op() + term.get_id_expression().to_string() + ctx*.fwd_suffix; + } + + primal_expr = obj_access; + fwd_expr = obj_access_d; + } } - // Compute the default underlying type, if it wasn't explicitly specified - if underlying_type == "" + traverse: (override inout this, primary: meta::primary_expression) = { - t.require( !found_non_numeric, - "if you write an enumerator with a non-numeric-literal value, " - "you must specify the enumeration's underlying type" - ); + if primary.is_identifier() { + primal_expr = primary.to_string(); + fwd_expr = add_suffix_if_not_wildcard(primal_expr, ctx*.fwd_suffix); + rws_expr = add_suffix_if_not_wildcard(primal_expr, ctx*.rws_suffix); + + decl := ctx*.lookup_variable_declaration(primal_expr); + if decl.is_member { + fwd_expr = "this(ctx*.fwd_suffix)$." + fwd_expr; + rws_expr = "this(ctx*.rws_suffix)$." + rws_expr; + } + } + else if primary.is_expression_list() { + if primary.as_expression_list().is_empty() { + primal_expr = "()"; + fwd_expr = "()"; + rws_expr = "()"; // TODO: Check for reverse + } + else { + primary.error("AD: Do not know how to handle non empty expression list inside of primary_expression: (primary.to_string())$"); + } + } + else if primary.is_literal() { + primal_expr = primary.to_string(); + fwd_expr = "()"; + rws_expr = "()"; // TODO: Check for reverse + } + else if primary.is_declaration() { + primary.error("AD: Do not know how to handle declaration inside of primary_expression: (primary.to_string())$"); + } + else { + primary.error("AD: Unknown primary expression kind: (primary.to_string())$"); + } + } +} - if !bitwise { - if min_value >= std::numeric_limits::min() && max_value <= std::numeric_limits::max() { - underlying_type = "i8"; +autodiff_stmt_handler: type = { + this: simple_traverser = (); + this: autodiff_handler_base; + + base: type == simple_traverser; + + mf: meta::function_declaration; + + last_params: std::vector = (); + overwritten: std::vector = (); + + overwrite_push_pop: bool = false; + + operator=: (out this, ctx_: *autodiff_context, mf_: meta::function_declaration) = { + autodiff_handler_base = (ctx_); + mf = mf_; + } + + handle_stmt_parameters: (inout this, params: std::vector) -> autodiff_diff_code = { + r : autodiff_diff_code = (ctx); + if params.empty() { + return r; + } + + for params do (param) { + name: std::string = param.get_declaration().name(); + type: std::string = param.get_declaration().type(); + + fwd_pass_style := to_string_view(param.get_passing_style()); + + ada: autodiff_activity_check = (ctx); + ada.pre_traverse(param); + + init : std::string = ""; + init_d: std::string = ""; + // TODO: Add handling for reverse expressions + + if param.get_declaration().has_initializer() { + ad: autodiff_expression_handler = (ctx); + ad.pre_traverse(param.get_declaration().get_initializer()); + init = " = (ad.primal_expr)$"; + + if ada.active { + init_d = " = (ad.fwd_expr)$"; + } } - else if min_value >= std::numeric_limits::min() && max_value <= std::numeric_limits::max() { - underlying_type = "i16"; + + + r.add_forward("(fwd_pass_style)$ (name)$ : (type)$(init)$, "); + r.add_reverse_primal("(fwd_pass_style)$ (name)$ : (type)$(init)$, "); + if ada.active { + r.add_forward("(fwd_pass_style)$ (name)$(ctx*.fwd_suffix)$ : (ctx*.get_fwd_ad_type(type))$(init_d)$, "); } - else if min_value >= std::numeric_limits::min() && max_value <= std::numeric_limits::max() { - underlying_type = "i32"; + + ctx*.add_variable_declaration(name, type, ada.active); + } + + return r; + } + + traverse: (override inout this, decl: meta::declaration) = { + base::traverse(decl); + } + + + traverse: (override inout this, f: meta::function_declaration) = { + f.error("AD: Do not know how to handle function_declaration: (f.to_string())$"); + } + + + traverse: (override inout this, o: meta::object_declaration) = { + lhs : std::string = o.name(); + type : = o.type(); + + active := false; + if "_" != type { + active = ctx*.is_type_active(type); + } + else { + assert(o.has_initializer()); + + ada: autodiff_activity_check = (ctx); + ada.pre_traverse(o.get_initializer()); + active = ada.active; + } + + if active { + + fwd_ad_type : = ctx*.get_fwd_ad_type(type); + rws_ad_type : = ctx*.get_rws_ad_type(type); + + prim_init: std::string = ""; + fwd_init : std::string = ""; + rws_init : std::string = ""; + + if o.has_initializer() { + ad: autodiff_expression_handler = (ctx); + ad.pre_traverse(o.get_initializer()); + append(ad); + + prim_init = " = " + ad.primal_expr; + fwd_init = " = " + ad.fwd_expr; + rws_init = " = ()"; // TODO: Proper initialization. + + if ad.rws_expr != "()" { + diff.add_reverse_backprop(ad.prepare_backprop(ad.rws_expr, lhs)); + } + + if type == "_" && ad.fwd_expr == "()" { + // Special handling for auto initialization from a literal. + fwd_init = " = " + ctx*.get_fwd_ad_type("double") + "()"; + } } - else if min_value >= std::numeric_limits::min() && max_value <= std::numeric_limits::max() { - underlying_type = "i64"; + + diff.add_forward("(lhs)$(ctx*.fwd_suffix)$ : (fwd_ad_type)$(fwd_init)$;\n"); + diff.add_forward("(lhs)$ : (type)$(prim_init)$;\n"); + + diff.add_reverse_primal("(lhs)$(ctx*.rws_suffix)$ : (rws_ad_type)$(rws_init)$;\n"); + diff.add_reverse_primal("(lhs)$ : (type)$(prim_init)$;\n"); + } + else { + diff += "(lhs)$: (type)$"; + if o.has_initializer() { + diff += " = (o.get_initializer().to_string())$"; } - else { - t.error( - "values are outside the range representable by the " - "largest supported underlying signed type (i64)" - ); + diff += ";\n"; + } + + ctx*.add_variable_declaration(lhs, type, active); + } + + + traverse: (override inout this, t: meta::type_declaration) = { + t.error("AD: Do not know how to handle type_declaration: (t.to_string())$"); + } + + + traverse: (override inout this, t: meta::parameter_declaration) = { + t.error("AD: Do not know how to handle parameter_declaration: (t.to_string())$"); + } + + + traverse: (override inout this, stmt: meta::statement) = { + // TODO: Remove this hack when statements like compound_statement can access their root statement. + last_params = stmt.get_parameters(); + base::traverse(stmt); + } + + + traverse: (override inout this, stmt: meta::compound_statement) = { + ad : autodiff_stmt_handler = (ctx, mf); + ad_push_pop: autodiff_stmt_handler = (ctx, mf); + ad_push_pop.overwrite_push_pop = true; + + diff.add_forward("{\n"); + diff.add_reverse_primal("{\n"); + diff.add_reverse_backprop("}\n"); + + for stmt.get_statements() do (cur) { + ad.pre_traverse(cur); + ad_push_pop.pre_traverse(cur); + } + + for ad.overwritten do (cur) { + r := ctx*.lookup_variable_declaration(cur); + diff.add_reverse_primal("cpp2::ad_stack::push<(r.decl)$>((cur)$);"); + } + + diff.add_forward(ad.diff.fwd); + diff.add_reverse_primal(ad.diff.rws_primal); + diff.add_reverse_backprop(ad_push_pop.diff.rws_backprop); + diff.add_reverse_backprop(ad_push_pop.diff.rws_primal); + + for ad.overwritten do (cur) { + r := ctx*.lookup_variable_declaration(cur); + diff.add_reverse_backprop("(cur)$ = cpp2::ad_stack::pop<(r.decl)$>();"); + } + + diff.add_forward("}\n"); + diff.add_reverse_primal("}\n"); + diff.add_reverse_backprop("{\n"); + } + + + traverse: (override inout this, stmt: meta::return_statement) = { + if stmt.has_expression() { + // Return with expression. + // TODO: Remove assumptions + // - Return expression is always active. (Look this up in mf or so.) + // - Return was converted to a two parameter return with the name r. + ad: autodiff_expression_handler = (ctx); + ad..pre_traverse(stmt.get_expression()); + ad.gen_assignment("r",); + append(ad); + } + else { + diff += "return;\n"; + } + } + + reverse_next: (this, expr: std::string) -> std::string = { + if expr.contains("+=") { + return string_util::replace_all(expr, "+=", "-="); + } + else if expr.contains("-=") { + return string_util::replace_all(expr, "-=", "+="); + } + + mf.error("AD: Do not know how to reverse: (expr)$"); + + return "Error"; + + } + + + traverse: (override inout this, stmt: meta::iteration_statement) = { + diff_params := handle_stmt_parameters(last_params); + + if ctx*.is_reverse() && (stmt.is_while() || stmt.is_do()) { + stmt.error("AD: Alpha limitiation now reverse mode for while or do while."); + } + + if stmt.is_while() { + if !last_params.empty() { + diff.add_forward("(" + diff_params.fwd + ")"); + } + // TODO: Assumption is here that nothing is in the condition + diff += "while (stmt.get_do_while_condition().to_string())$ "; + if stmt.has_next() { + // TODO: Assumption is here that nothing is in the next expression + diff += "next (stmt.get_next_expression().to_string())$ "; } + + pre_traverse(stmt.get_do_while_body()); + } + else if stmt.is_do() { + if !last_params.empty() { + diff.add_forward("(" + diff_params.fwd + ")"); + } + + // TODO: Assumption is here that nothing is in the condition + diff += "do "; + pre_traverse(stmt.get_do_while_body()); + + if stmt.has_next() { + // TODO: Assumption is here that nothing is in the next expression + diff += "next (stmt.get_next_expression().to_string())$ "; + } + diff += "while (stmt.get_do_while_condition().to_string())$;"; } else { - umax := max_value * 2 as u64; - if umax <= std::numeric_limits::max() { - underlying_type = "u8"; + assert(stmt.is_for()); + // No zip view available in cpp 20 do a piggy back for range + + // TODO: Assumption that this is just an id expression. + range := stmt.get_for_range().to_string(); + + param := stmt.get_for_parameter(); + param_style := to_string_view(param.get_passing_style()); + param_decl := param.get_declaration(); + + rws : std::string = "("; + rws_restore: std::string = ""; + diff.add_forward("("); // Open statment parameter scope. If the loop has parameters, they are alrady handled and the brace is left open. + diff.add_reverse_primal("{\n"); + if !last_params.empty() { + for last_params do (cur) { + if cur.get_declaration().has_initializer() { + // TODO: Handle no type and no initializer. Handle passing style. + diff.add_reverse_primal("(cur.get_declaration().name())$: (cur.get_declaration().type())$ = (cur.get_declaration().get_initializer().to_string())$;\n"); + rws_restore += "cpp2::ad_stack::push<(cur.get_declaration().type())$>((cur.get_declaration().name())$);\n"; + rws += "(to_string_view(cur.get_passing_style()))$ (cur.get_declaration().name())$: (cur.get_declaration().type())$ = cpp2::ad_stack::pop<(cur.get_declaration().type())$>(), "; + } + } + diff.add_forward(diff_params.fwd); } - else if umax <= std::numeric_limits::max() { - underlying_type = "u16"; + diff.add_forward("copy (param_decl.name())$(ctx*.fwd_suffix)$_iter := (range)$(ctx*.fwd_suffix)$.begin())\n"); + diff.add_forward("for (range)$ next ("); + + rws += "copy (param_decl.name())$(ctx*.rws_suffix)$_iter := (range)$(ctx*.rws_suffix)$.rbegin())\n"; + rws += "for std::ranges::reverse_view((range)$) next ("; + diff.add_reverse_primal("for (range)$ next ("); + if stmt.has_next() { + // TODO: Assumption is here that nothing is in the next expression + diff.add_forward("(stmt.get_next_expression().to_string())$, "); + diff.add_reverse_primal("(stmt.get_next_expression().to_string())$, "); + rws += "(reverse_next(stmt.get_next_expression().to_string()))$, "; } - else if umax <= std::numeric_limits::max() { - underlying_type = "u32"; + diff.add_forward("(param_decl.name())$(ctx*.fwd_suffix)$_iter++"); + diff.add_forward(") do ((param_style)$ (param_decl.name())$: (param_decl.type())$) {\n"); + rws += "(param_decl.name())$(ctx*.rws_suffix)$_iter++"; + rws += ") do ((param_style)$ (param_decl.name())$: (param_decl.type())$) {\n"; + rws += "(inout (param_decl.name())$(ctx*.rws_suffix)$ := (param_decl.name())$(ctx*.rws_suffix)$_iter*)\n"; + + diff.add_reverse_primal(") do ((param_style)$ (param_decl.name())$: (param_decl.type())$)"); + diff.add_forward("((param_style)$ (param_decl.name())$(ctx*.fwd_suffix)$: (param_decl.type())$ = (param_decl.name())$(ctx*.fwd_suffix)$_iter*)"); + + ctx*.add_variable_declaration("(param_decl.name())$", "(param_decl.type())$", true); // TODO: Handle loop/compound context variable declarations. + diff.add_reverse_backprop("}\n"); + + pre_traverse(stmt.get_for_body()); + diff.add_forward("}\n"); + + if stmt.has_next() { + diff.add_reverse_primal("(reverse_next(stmt.get_next_expression().to_string()))$;\n"); + } + diff.add_reverse_primal(rws_restore); + diff.add_reverse_primal("}\n"); + diff.add_reverse_backprop(rws); + } + } + + + traverse: (override inout this, stmt: meta::selection_statement) = { + // TODO: Currently assuming that nothing bad happens in the condition + diff += "if (stmt.get_expression().to_string())$"; + pre_traverse(stmt.get_true_branch()); + + if stmt.has_false_branch() { + diff += "else "; + pre_traverse(stmt.get_false_branch()); + } + } + + traverse : (override inout this, expr: meta::expression) = { + base::traverse(expr); + } + + traverse: (override inout this, binexpr: meta::assignment_expression) = { + ada: autodiff_activity_check = (ctx); + ada.pre_traverse(binexpr.get_lhs_postfix_expression()); + if "_" == binexpr.get_lhs_postfix_expression().to_string() { + ada.pre_traverse(binexpr.get_terms()[1].get_term()); + } + + if ada.active { + h_lhs: autodiff_expression_handler = (ctx); + h_lhs.pre_traverse(binexpr.get_lhs_postfix_expression()); + + // Cpp2 doesn't allow chained assignment, so rhs must be a single logical_or_expression + assignment_terms := binexpr.get_terms(); + + h: autodiff_expression_handler = (ctx); + h.pre_traverse(assignment_terms[1].get_term()); + + is_overwrite := h.primal_expr.contains(h_lhs.primal_expr); + if overwrite_push_pop && is_overwrite { + r := ctx*.lookup_variable_declaration(h_lhs.primal_expr); + diff.add_reverse_primal("cpp2::ad_stack::push<(r.decl)$>((h_lhs.primal_expr)$);"); + } + + if is_overwrite && ctx*.is_reverse() { + t_b := ctx*.gen_temporary() + ctx*.rws_suffix; + h.gen_assignment(h_lhs.primal_expr, h_lhs.fwd_expr, t_b); + append(h); + diff.add_reverse_backprop("(h_lhs.rws_expr)$ = 0.0;\n"); + diff.add_reverse_backprop("(t_b)$ := (h_lhs.rws_expr)$;\n"); + } + else { + h.gen_assignment(h_lhs.primal_expr, h_lhs.fwd_expr, h_lhs.rws_expr); + append(h); + } + + if overwrite_push_pop && is_overwrite { + r := ctx*.lookup_variable_declaration(h_lhs.primal_expr); + diff.add_reverse_backprop("(h_lhs.primal_expr)$ = cpp2::ad_stack::pop<(r.decl)$>();"); } - else { - underlying_type = "u64"; + + // Simple overwrite check + if is_overwrite { + overwritten.push_back(h_lhs.primal_expr); } } + else { + diff.add_forward(binexpr.to_string() + ";\n"); + diff.add_reverse_primal(binexpr.to_string() + ";\n"); + } } + traverse: (override inout this, binexpr: meta::logical_or_expression) = { + binexpr.error( "AD: Logical or expressions are not yet handled as standalone statements." ); + } - // 2. Replace: Erase the contents and replace with modified contents - // - // Note that most values and functions are declared as '==' compile-time values, i.e. Cpp1 'constexpr' + traverse: (override inout this, binexpr: meta::logical_and_expression) = { + binexpr.error( "AD: Logical and expressions are not yet handled as standalone statements." ); + } - t.remove_marked_members(); + traverse: (override inout this, binexpr: meta::bit_or_expression) = { + binexpr.error( "AD: Bit or expressions are not yet handled as standalone statements." ); + } - // Generate the 'none' value if appropriate, and use that or - // else the first enumerator as the default-constructed value - default_value := enumerators[0].name; - if bitwise{ - default_value = "none"; - e: value_member_info = ( "none", "", "0"); - enumerators.push_back( e ); + traverse: (override inout this, binexpr: meta::bit_xor_expression) = { + binexpr.error( "AD: Bit xor expressions are not yet handled as standalone statements." ); } - // Generate all the private implementation - t.add_member( " _value : (underlying_type)$;"); - t.add_member( " private operator= : (implicit out this, _val: i64) == " - "_value = cpp2::unchecked_narrow<(underlying_type)$>(_val);"); + traverse: (override inout this, binexpr: meta::bit_and_expression) = { + binexpr.error( "AD: Bit and expressions are not yet handled as standalone statements." ); + } - // Generate the bitwise operations - if bitwise { - t.add_member( " operator|=: ( inout this, that ) == _value |= that._value;"); - t.add_member( " operator&=: ( inout this, that ) == _value &= that._value;"); - t.add_member( " operator^=: ( inout this, that ) == _value ^= that._value;"); - t.add_member( " operator| : ( this, that ) -> (t.name())$ == _value | that._value;"); - t.add_member( " operator& : ( this, that ) -> (t.name())$ == _value & that._value;"); - t.add_member( " operator^ : ( this, that ) -> (t.name())$ == _value ^ that._value;"); - t.add_member( " has : ( this, that ) -> bool == _value & that._value;"); - t.add_member( " set : ( inout this, that ) == { _value |= that._value; }"); - t.add_member( " clear : ( inout this, that ) == { _value &= that._value~; }"); + traverse: (override inout this, binexpr: meta::equality_expression) = { + binexpr.error( "AD: Equality or expressions are not yet handled as standalone statements." ); } - // Add the enumerators - for enumerators do (e) { - t.add_member( " (e.name)$ : (t.name())$ == (e.value)$;"); + traverse: (override inout this, binexpr: meta::relational_expression) = { + binexpr.error( "AD: Relational expressions are not yet handled as standalone statements." ); } - // Generate the common functions - t.add_member( " get_raw_value : (this) -> (underlying_type)$ == _value;"); - t.add_member( " operator= : (out this) == { _value = (default_value)$._value; }"); - t.add_member( " operator= : (out this, that) == { }"); - t.add_member( " operator<=> : (this, that) -> std::strong_ordering;"); + traverse: (override inout this, binexpr: meta::compare_expression) = { + binexpr.error( "AD: Compare or expressions are not yet handled as standalone statements." ); + } - // Provide 'to_string' and 'to_code' functions to print enumerator - // name(s) as human-readable strings or as code expressions - (copy to_string_impl: std::string = " to_string_impl: (this, prefix: std::string_view") + traverse: (override inout this, binexpr: meta::shift_expression) = { + binexpr.error( "AD: Shift or expressions are not yet handled as standalone statements." ); + } + + traverse: (override inout this, binexpr: meta::additive_expression) = { + binexpr.error( "AD: Additive expressions are not yet handled as standalone statements." ); + } + + traverse: (override inout this, binexpr: meta::multiplicative_expression) = { + binexpr.error( "AD: Multiplicative expressions are not yet handled as standalone statements." ); + } + + traverse: (override inout this, isas: meta::is_as_expression) = { + isas.error( "AD: Is as expressions are not yet handled as standalone statements." ); + } + + traverse: (override inout this, prefix: meta::prefix_expression) = { - if bitwise { - to_string_impl += ", separator: std::string_view ) -> std::string = { \n" - " ret : std::string = \"(\";\n" - " sep : std::string = ();\n" - " if this == none { return \"(none)\"; }\n"; - } - else { - to_string_impl += ") -> std::string = { \n"; - } + prefix.error( "AD: Prefix expressions are not yet handled as standalone statements." ); + } - to_string_impl += " pref := cpp2::to_string(prefix);\n"; + traverse: (override inout this, postfix: meta::postfix_expression) = + { + terms := postfix.get_terms(); - for enumerators - do (e) { - if e.name != "_" { // ignore unnamed values - if bitwise { - if e.name != "none" { - to_string_impl += " if (this & (e.name)$) == (e.name)$ { " - "ret += sep + pref + \"(e.name)$\"; sep = separator; " - "}\n"; - } - } - else { - to_string_impl += " if this == (e.name)$ { return pref + \"(e.name)$\"; }\n"; - } + is_func := false; + + (copy i := 0) + for terms next i += 1 do (term) { + if term.get_op() == "." { + continue; + } + if term.get_op() == "(" && i + 1 == terms.ssize() { // Function operator has to be the last + is_func = true; + continue; + } else { + postfix.error("AD: Unknown operator for standalone postfix expression. op: (term.get_op())$ expr: (postfix)$"); } } - if bitwise { - to_string_impl += " return ret+\")\";\n}\n"; - } - else { - to_string_impl += " return \"invalid (t.name())$ value\";\n}\n"; + // Check for function call, everything else is not handled. + if !(is_func) { + postfix.error( "AD: Postfix expressions are only handled for function calls, or member function calls. Do not know how to handle: (postfix.to_string())$" ); + return; } - t.add_member( to_string_impl ); + ad: autodiff_expression_handler = (ctx); + ad.handle_function_call(postfix, false); + ad.diff += ad.fwd_expr + "\n"; + ad.diff += ad.primal_expr + "\n"; + append(ad); } - if bitwise { - t.add_member( " to_string: (this) -> std::string = to_string_impl( \"\", \", \" );" ); - t.add_member( " to_code : (this) -> std::string = to_string_impl( \"(t.name())$::\", \" | \" );" ); + traverse: (override inout this, primary: meta::primary_expression) = + { + primary.error( "AD: Primary expressions are not yet handled as standalone statements." ); } - else { - t.add_member( " to_string: (this) -> std::string = to_string_impl( \"\" );" ); - t.add_member( " to_code : (this) -> std::string = to_string_impl( \"(t.name())$::\" );" ); +} + +autodiff_declaration_handler: type = { + this: simple_traverser = (); + this: autodiff_handler_base; + + base: type == simple_traverser; + + decl: meta::type_or_namespace_declaration; + + is_type_context: bool = false; + diff_ad_type : std::string = ""; + + operator=: (out this, ctx_: *autodiff_context, decl_: meta::type_or_namespace_declaration) = { + autodiff_handler_base = (ctx_); + decl = decl_; } - // Provide a 'from_string' function to parse strings into enumerators - (copy from_string: std::string = " from_string: (s: std::string_view) -> (t.name())$ = { \n") - { - prefix : std::string_view = ""; - combine_op: std::string_view = "return"; + traverse: (override inout this, decl_: meta::declaration) = { + base::traverse(decl_); + } - // For flags, accept a list that we break apart and then |= together - if bitwise - { - prefix = "flag_"; - combine_op = "ret |="; - from_string += " ret := none;\n" - " outer: do {\n" - " for cpp2::string_util::split_string_list(s) do (x) {\n"; - } - // Otherwise, accept just a single string - else { - from_string += " x := s;\n"; - } + traverse: (override inout this, f: meta::function_declaration) = { + ctx*.enter_function(); - (copy else_: std::string_view = "") - for enumerators - do (e) { - from_string += " (else_)$if \"(e.name)$\" == x { (combine_op)$ (e.name)$; }\n"; - else_ = "else "; - } + // TODO: Add activity for member functions - if bitwise { - from_string += " else { break outer; }\n" - " }\n" - " return ret;\n" - " } while false;\n"; - } + diff.add_forward(" (f.name())$(ctx*.fwd_suffix)$: ("); + diff.add_reverse_primal(" (f.name())$(ctx*.rws_suffix)$: ("); - from_string += " cpp2::type_safety.report_violation( (\"can't convert string '\" + cpp2::to_string(s) + \"' to (prefix)$enum of type (t.name())$\").c_str() );\n" - " return (default_value)$;\n" - " }\n\n"; + // 1. Generate the modified signature + // a) Parameters - t.add_member( from_string ); - } + for f.get_parameters() do (param) { + name: std::string = param.get_declaration().name(); - t.add_member( " from_code: (s: std::string_view) -> (t.name())$ = { str: std::string = s; return from_string( cpp2::string_util::replace_all(str, \"(t.name())$::\", \"\" ) ); }" ); -} + fwd_pass_style := to_string_view(param.get_passing_style()); + rws_pass_style := to_string_view(ctx*.get_reverse_passing_style(param.get_passing_style())); + if "this" == name { + fwd_ad_type := ctx*.get_fwd_ad_type(std::string(decl.name())); + rws_ad_type := ctx*.get_rws_ad_type(std::string(decl.name())); -//----------------------------------------------------------------------- -// -// "An enum[...] is a totally ordered value type that stores a -// value of its enumerators's type, and otherwise has only public -// member variables of its enumerator's type, all of which are -// naturally scoped because they are members of a type." -// -// -- P0707R4, section 3 -// -enum: (inout t: meta::type_declaration) = -{ - // Let basic_enum do its thing, with an incrementing value generator - t.basic_enum( - :(inout value: std::string, specified_value: std::string) = { - if !specified_value.empty() { - value = specified_value; - } else { - v := std::strtoll(value[0]&, nullptr, 10); - value = (v + 1) as std::string; + diff.add_forward("(fwd_pass_style)$ (name)$, "); + diff.add_forward("(fwd_pass_style)$ (name)$(ctx*.fwd_suffix)$: (fwd_ad_type)$, "); + + diff.add_reverse_primal("(fwd_pass_style)$ (name)$, "); + if ctx*.is_taylor() { // Add forward type for higher order + diff.add_reverse_primal("(fwd_pass_style)$ (name)$(ctx*.fwd_suffix)$: (fwd_ad_type)$, "); + } + diff.add_reverse_primal("(rws_pass_style)$ (name)$(ctx*.rws_suffix)$: (rws_ad_type)$, "); } - }, - false // disable bitwise operations - ); -} + else { + type := param.get_declaration().type(); + ada: autodiff_activity_check = (ctx); + ada.pre_traverse(param); -//----------------------------------------------------------------------- -// -// "flag_enum expresses an enumeration that stores values -// corresponding to bitwise-or'd enumerators. The enumerators must -// be powers of two, and are automatically generated [...] A none -// value is provided [...] Operators | and & are provided to -// combine and extract values." -// -// -- P0707R4, section 3 -// -flag_enum: (inout t: meta::type_declaration) = -{ - // Let basic_enum do its thing, with a power-of-two value generator - t.basic_enum( - :(inout value: std::string, specified_value: std::string) = { - if !specified_value.empty() { - value = specified_value; - } else { - v := std::strtoll(value[0]&, nullptr, 10); - if v < 1 { - value = "1"; + if ada.active { + diff.add_forward("(fwd_pass_style)$ (name)$ : (type)$, "); + diff.add_forward("(fwd_pass_style)$ (name)$(ctx*.fwd_suffix)$ : (ctx*.get_fwd_ad_type(type))$, "); + + diff.add_reverse_primal("(fwd_pass_style)$ (name)$ : (type)$, "); + if ctx*.is_taylor() { + diff.add_reverse_primal("(fwd_pass_style)$ (name)$(ctx*.fwd_suffix)$ : (ctx*.get_fwd_ad_type(type))$, "); + } + diff.add_reverse_primal("(rws_pass_style)$ (name)$(ctx*.rws_suffix)$ : (ctx*.get_rws_ad_type(type))$, "); } else { - value = (v * 2) as std::string; + diff.add_forward("(fwd_pass_style)$ (name)$ : (type)$, "); + diff.add_reverse_primal("(fwd_pass_style)$ (name)$ : (type)$, "); } + + ctx*.add_variable_declaration(name, type, ada.active); } - }, - true // enable bitwise operations - ); -} + } + // b) Add arguments for returns that become inputs -//----------------------------------------------------------------------- -// -// "As with void*, programmers should know that unions [...] are -// inherently dangerous, should be avoided wherever possible, -// and should be handled with special care when actually needed." -// -// -- Stroustrup (The Design and Evolution of C++, 14.3.4.1) -// -// "C++17 needs a type-safe union... The implications of the -// consensus `variant` design are well understood and have been -// explored over several LEWG discussions, over a thousand emails, -// a joint LEWG/EWG session, and not to mention 12 years of -// experience with Boost and other libraries." -// -// -- Axel Naumann, in P0088 (wg21.link/p0088), -// the adopted proposal for C++17 std::variant -// -//----------------------------------------------------------------------- -// -// union -// -// a type that contains exactly one of a fixed set of values at a time -// + if f.has_non_void_return_type() && f.get_returns().empty() { // TODO: has_non_void_return_type is true for return lists: (r: double) bug/feature? + // TODO: check if name "r" is available. (Also needs inspection of functions at call sides.) + if f.has_deduced_return_type() { + // TODO: Take care of initialization order error. + diff.add_reverse_primal("inout r(ctx*.rws_suffix)$, "); + } + else { + diff.add_reverse_primal("inout r(ctx*.rws_suffix)$: (ctx*.get_rws_ad_type(f.get_unnamed_return_type()))$, "); + } + } + else { + for f.get_returns() do (param) { + name := param.get_declaration().name(); + type := param.get_declaration().type(); -union: (inout t : meta::type_declaration) -= { - alternatives : std::vector = (); + rws_pass_style := to_string_view(ctx*.get_reverse_passing_style(param.get_passing_style())); + diff.add_reverse_primal("(rws_pass_style)$ (name)$(ctx*.rws_suffix)$ : (ctx*.get_rws_ad_type(type))$ , "); + } + } - // 1. Gather: All the user-written members, and find/compute the max size + diff.add_forward(") -> ("); + diff.add_reverse_primal(") -> ("); - (copy value := 0) - for t.get_members() - next value++ - do (m) - if m.is_member_object() - { - m.require( m.is_public() || m.is_default_access(), - "a union alternative cannot be protected or private" - ); + // c) Returns + + if f.has_non_void_return_type() && f.get_returns().empty() { // TODO: has_non_void_return_type is true for return lists: (r: double) bug/feature? + // TODO: check if name "r" is available. (Also needs inspection of functions at call sides.) + if f.has_deduced_return_type() { + // TODO: Take care of initialization order error. + diff.add_forward("r, r(ctx*.fwd_suffix)$, "); + diff.add_reverse_primal("r, "); + if ctx*.is_taylor() { + diff.add_reverse_primal("r(ctx*.fwd_suffix)$,"); + } + } + else { + diff.add_forward("r: (f.get_unnamed_return_type())$ = (), r(ctx*.fwd_suffix)$: (ctx*.get_fwd_ad_type(f.get_unnamed_return_type()))$ = (), "); + diff.add_reverse_primal("r: (f.get_unnamed_return_type())$ = (), "); + if ctx*.is_taylor() { + diff.add_reverse_primal("r(ctx*.fwd_suffix)$: (ctx*.get_fwd_ad_type(f.get_unnamed_return_type()))$ = (), "); + } + } + } + else { + for f.get_returns() do (param) { + name := param.get_declaration().name(); + type := param.get_declaration().type(); + + fwd_pass_style := to_string_view(param.get_passing_style()); + //rws_pass_style := to_string_view(ctx*.get_reverse_passing_style(param.get_passing_style())); + diff.add_forward("(fwd_pass_style)$ (name)$ : (param.get_declaration().type())$ = 0.0, "); + diff.add_forward("(fwd_pass_style)$ (name)$(ctx*.fwd_suffix)$ : (ctx*.get_fwd_ad_type(type))$ = 0.0, "); + + diff.add_reverse_primal("(fwd_pass_style)$ (name)$ : (param.get_declaration().type())$ = 0.0, "); + if ctx*.is_taylor() { + diff.add_reverse_primal("(fwd_pass_style)$ (name)$(ctx*.fwd_suffix)$ : (ctx*.get_fwd_ad_type(type))$ = 0.0, "); + } + + ctx*.add_variable_declaration("(name)$", "(type)$", true); // TODO_a: Add acitivty check + } + } + + diff.add_forward(") = {"); + diff.add_reverse_primal(") = {"); + + // Generate the body + + if !f.has_compound_body() { + f.error( "temporary alpha limitation: a differentiable function must have a {}-enclosed body" ); + return; + } + + + ad_impl : autodiff_stmt_handler = (ctx*&, f); - m.require( !m.name().starts_with("is_") - && !m.name().starts_with("set_"), - "a union alternative's name cannot start with 'is_' or 'set_' - that could cause " - "user confusion with the 'is_alternative' and 'set_alternative' generated functions" - ); - mo := m.as_object(); - mo.require( mo.initializer().empty(), - "a union alternative cannot have an initializer" - ); + for f.get_compound_body().get_statements() do (stmt) + { + ad_impl..pre_traverse(stmt); + } + diff.add_forward(ad_impl.diff.fwd); + diff.add_reverse_primal(ad_impl.diff.rws_primal); + diff.add_reverse_primal(ad_impl.diff.rws_backprop); - // Adding local variable 'e' to work around a Clang warning - e: value_member_info = ( mo.name() as std::string, mo.type(), value as std::string ); - alternatives.push_back( e ); + diff.add_forward("}"); + diff.add_reverse_primal("}"); - mo.mark_for_removal_from_enclosing_type(); - _ = mo; - } + ctx*.leave_function(); - discriminator_type: std::string = (); - if alternatives.ssize() < std::numeric_limits::max() { - discriminator_type = "i8"; - } - else if alternatives.ssize() < std::numeric_limits::max() { - discriminator_type = "i16"; - } - else if alternatives.ssize() < std::numeric_limits::max() { - discriminator_type = "i32"; - } - else { - discriminator_type = "i64"; + if ctx*.is_forward() { + decl.add_member( diff.fwd ); + } + if ctx*.is_reverse() { + decl.add_member( diff.rws_primal ); + } + diff.reset(); + + ctx*.add_as_differentiated(f); } - // 2. Replace: Erase the contents and replace with modified contents + traverse: (override inout this, o: meta::object_declaration) = { + ad_name : std::string = "(o.name())$(ctx*.fwd_suffix)$"; + fwd_ad_type : std::string = ctx*.get_fwd_ad_type(o.type()); + ad_init : std::string = ""; - t.remove_marked_members(); + if o.has_initializer() { + ad: autodiff_expression_handler = (ctx); + ad.pre_traverse(o.get_initializer()); - // Provide storage - (copy storage: std::string = " _storage: cpp2::aligned_storage bool = _discriminator == (a.value)$;\n"); + traverse: (override inout this, t: meta::type_declaration) = { + ctx*.push_stack(t); + ad: autodiff_declaration_handler = (ctx, t); + ad.is_type_context = true; - t.add_member( " (a.name)$: (this) -> forward (a.type)$ pre(is_(a.name)$()) = " - "reinterpret_cast<* const (a.type)$>(_storage&)*;\n" - ); + for t.get_members() + do (m) + { + ad.pre_traverse(m); + } - t.add_member( " (a.name)$: (inout this) -> forward (a.type)$ pre(is_(a.name)$()) = " - "reinterpret_cast<*(a.type)$>(_storage&)*;\n" - ); + ctx*.pop_stack(); - t.add_member( " set_(a.name)$: (inout this, _value: (a.type)$) = { " - "if !is_(a.name)$() { _destroy(); std::construct_at( reinterpret_cast<*(a.type)$>(_storage&), _value); } " - "else { reinterpret_cast<*(a.type)$>(_storage&)* = _value; } " - "_discriminator = (a.value)$; " - "}\n" - ); + if !ad.diff_ad_type.empty() { + diff = "(t.name())$(ctx*.fwd_suffix)$ : type = {\n"; + diff += "(ad.diff_ad_type)$"; + diff += "}"; - t.add_member( " set_(a.name)$: (inout this, forward _args...: _) = { " - "if !is_(a.name)$() { _destroy(); std::construct_at( reinterpret_cast<*(a.type)$>(_storage&), _args...); } " - " else { reinterpret_cast<*(a.type)$>(_storage&)* = :(a.type)$ = (_args...); } " - "_discriminator = (a.value)$; " - "}\n" - ); + decl.add_member(diff.fwd); + diff = ""; + } } - // Add destroy - (copy destroy: std::string = " private _destroy: (inout this) = {\n") - { - for alternatives - do (a) { - destroy += " if _discriminator == (a.value)$ { std::destroy_at( reinterpret_cast<*(a.type)$>(_storage&) ); }\n"; + + traverse: (override inout this, t: meta::parameter_declaration) = { + t.error("AD: Do not know how to handle parameter_declaration: (t.to_string())$"); + } + + + traverse: (override inout this, stmt: meta::statement) = { + stmt.error("AD: Do not know how to handle statement in declaration context: (stmt.to_string())$"); + } +} + + +autodiff: (inout t: meta::type_declaration) = +{ + + suffix_token : std::string_view == "suffix="; + rws_suffix_token : std::string_view == "rws_suffix="; + order_token : std::string_view == "order="; + reverse_token : std::string_view == "reverse"; + + args := t.get_arguments(); + + suffix : std::string = "_d"; + rws_suffix: std::string = "_b"; + order : int = 1; + reverse : bool = false; + for args do (arg_str) { + if arg_str.starts_with("\"") && arg_str.ends_with("\"") { + arg := arg_str.substr(1, arg_str.ssize() - 2); + + if arg.starts_with(suffix_token) { + suffix = arg.substr(suffix_token.size()); + continue; + } + else if arg.starts_with(rws_suffix_token) { + suffix = arg.substr(rws_suffix_token.size()); + continue; + } + else if arg.starts_with(order_token) { + if !string_util::string_to_int(arg.substr(order_token.size()), order) { + t.error("AD: Could not parse derivative order: (arg.substr(order_token.size()))$"); + return; + } + continue; + } + else if arg == reverse_token { + reverse = true; + continue; + } } - destroy += " _discriminator = -1;\n" - " }\n"; - t.add_member( destroy ); + t.error("AD: Unknown argument: (arg_str)$"); + return; } - // Add the destructor - t.add_member( " operator=: (move this) = { _destroy(); _ = this; }" ); + if reverse { + std::cout << "AD: Warning - reverse mode differentiation is very experimental\n"; + } - // Add default constructor - t.add_member( " operator=: (out this) = { }" ); + ad_ctx: autodiff_context = (order, reverse); + ad_ctx.fwd_suffix = suffix; + ad_ctx.rws_suffix = rws_suffix; - // Add copy/move construction and assignment - (copy value_set: std::string = "") - { - for alternatives - do (a) { - value_set += " if that.is_(a.name)$() { set_(a.name)$( that.(a.name)$() ); }\n"; + if t.parent_is_nonglobal_namespace() { + p := t.get_parent().as_nonglobal_namespace(); + ad_ctx.create_namespace_stack(p); + ad: autodiff_declaration_handler = (ad_ctx&, p); + ad.pre_traverse(t); + + } + else if t.parent_is_type() { + p := t.get_parent().as_type(); + ad_ctx.create_namespace_stack(p); + ad: autodiff_declaration_handler = (ad_ctx&, p); + ad.pre_traverse(t); + } + else { + // TODO: Remove when global namespace is available. + // Traverse without parent context + ad_ctx.push_stack(t); + ad: autodiff_declaration_handler = (ad_ctx&, t); + + for t.get_members() + do (m) + if m.is_function() + { + ad.pre_traverse(m); } - value_set += " }\n"; + ad_ctx.pop_stack(); + } - t.add_member( " operator=: (out this, that) = {\n" - " _storage = ();\n" - " _discriminator = -1;\n" - + value_set - ); - t.add_member( " operator=: (inout this, that) = {\n" - " _storage = _;\n" - " _discriminator = _;\n" - + value_set - ); + if 1 != order { + t.add_runtime_support_include( "cpp2taylor.h" ); + } + if reverse { + t.add_runtime_support_include( "cpp2ad_stack.h" ); } -} + ad_ctx.finish(); -//----------------------------------------------------------------------- -// -// print - output a pretty-printed visualization of t -// -print: (t: meta::type_declaration) = -{ - std::cout << t.print() << "\n"; + _ = ad_ctx; } @@ -1601,6 +6340,7 @@ regex_token: @polymorphic_base type = //parse: (inout ctx: parse_context) -> token_ptr; generate_code: (virtual this, inout _: generation_context); // Generate the matching code. + reverse: (virtual this) -> std::shared_ptr; // Create a reverse token for look behind expressions. add_groups: (virtual this, inout _: std::set) = {} // Adds all group indices to the set. to_string: (this) -> std::string = { return string_rep; } // Create a string representation. @@ -1627,6 +6367,8 @@ regex_token_check: @polymorphic_base type = generate_code: (override this, inout ctx: generation_context) = { ctx..add_check(check + "(" + ctx..match_parameters() + ")"); } + + reverse: (override this) -> token_ptr = shared.new(this.to_string(), this.check); } @@ -1646,6 +6388,8 @@ regex_token_code: @polymorphic_base type = generate_code: (override this, inout ctx: generation_context) = { ctx..add(code); } + + reverse: (override this) -> token_ptr = shared.new(this.to_string(), this.code); } @@ -1662,6 +6406,8 @@ regex_token_empty: @polymorphic_base type = generate_code: (override this, inout _: generation_context) = { // Nothing. } + + reverse: (override this) -> token_ptr = shared.new(this.to_string()); } @@ -1697,6 +6443,19 @@ regex_token_list: @polymorphic_base type = } return r; } + + reverse: (override this) -> token_ptr = { + s : int = cpp2::unchecked_narrow(tokens..size()); + + reverse_vec: token_vec = (); + reverse_vec..resize(s); + + i: int = 0; + while i < tokens.ssize() next (i += 1) { + reverse_vec[s - 1 -i] = tokens[i]*.reverse(); + } + return shared.new(reverse_vec); + } } @@ -1816,6 +6575,8 @@ parse_context: type = pos: size_t = 0; // Current parsing position. root: token_ptr; // Token representing the regular expression. + public is_start_match: bool = false; // If the regex contains \G at the beginning. + cur_group_state: parse_context_group_state = (); cur_branch_reset_state: parse_context_branch_reset_state = (); @@ -2138,7 +6899,7 @@ parse_context: type = return true; } - parse_until:(inout this, term: char) -> bool = { + parse_until: (inout this, term: char) -> bool = { cur_token: token_ptr = (); while valid() next _ = next() @@ -2161,6 +6922,7 @@ parse_context: type = if !cur_token && valid() { cur_token = octal_token_parse(this); } if !cur_token && valid() { cur_token = range_token::parse(this); } if !cur_token && valid() { cur_token = special_range_token::parse(this); } + if !cur_token && valid() { cur_token = start_match_parse(this); } if !cur_token && valid() { cur_token = word_boundary_token_parse(this); } // Everything else is matched as it is. @@ -2267,7 +7029,7 @@ generation_context: type = cur := new_context(); cur*.code += "(cur*.tabs)$(name)$: @struct type = {\n"; - cur*.code += "(cur*.tabs)$ operator(): (this, cur: Iter, inout ctx: context, other) -> cpp2::regex::match_return = {\n"; + cur*.code += "(cur*.tabs)$ operator(): (this, cur: Iter, forward ctx, other) -> cpp2::regex::match_return = {\n"; cur*.code += "(cur*.tabs)$ r := ctx..pass(cur);\n"; cur*.code += "(cur*.tabs)$ do {\n"; cur*..add_tabs(3); @@ -2292,6 +7054,7 @@ generation_context: type = cur*.code += "(cur*.tabs)$ else {\n"; cur*.code += "(cur*.tabs)$ r.pos = ctx.end;\n"; cur*.code += "(cur*.tabs)$ }\n"; + cur*.code += "(cur*.tabs)$ _ = ctx;\n"; cur*.code += "(cur*.tabs)$ return r;\n"; cur*.code += "(cur*.tabs)$ }\n"; cur*.code += "(cur*.tabs)$}\n"; @@ -2486,6 +7249,19 @@ alternative_token_gen: @polymorphic_base type = return r; } + + reverse: (override this) -> token_ptr = { + s : int = cpp2::unchecked_narrow(alternatives..size()); + + reverse_vec: token_vec = (); + reverse_vec..resize(s); + + i: int = 0; + while i < s next (i += 1) { + reverse_vec[i] = alternatives[i]*.reverse(); // We only reverse the alternatives, not the order in which they are checked. + } + return shared.new(reverse_vec); + } } @@ -2506,6 +7282,35 @@ any_token: @polymorphic_base type = } } +// Regex syntax: (?>) Example: a(?>bc|c)c +// +atomic_group_token: @polymorphic_base type = +{ + this : regex_token = (""); + + public inner_token : token_ptr = nullptr; + + operator=: (out this) = {} + + reverse: (override this) -> token_ptr = { + r := shared.new(); + r*.inner_token = inner_token*.reverse(); + + return r; + } + + generate_code: (override this, inout ctx: generation_context) = + { + inner_name := ctx..generate_func(inner_token); + + next_name := ctx..next_func_name(); + ctx..add_statefull(next_name, "cpp2::regex::atomic_group_matcher((ctx..match_parameters())$, (inner_name)$, other, (next_name)$)"); + } + + add_groups: (override this, inout groups: std::set) = { + inner_token*..add_groups(groups); + } +} // Regex syntax: a // @@ -2522,6 +7327,12 @@ char_token: @polymorphic_base type = ignore_case = ignore_case_; } + operator=: (out this, t: std::string, ignore_case_: bool) = { + regex_token = (t); + token = t; + ignore_case = ignore_case_; + } + parse: (inout ctx: parse_context) -> token_ptr = { return shared.new(ctx..current(), ctx..get_modifiers()..has(expression_flags::case_insensitive)); } @@ -2603,6 +7414,12 @@ char_token: @polymorphic_base type = return str; } + reverse: (override this) -> token_ptr = { + reverse_str: std::string = token; + std::reverse(reverse_str..begin(), reverse_str..end()); + return shared.new(reverse_str, ignore_case); + } + append: (inout this, that) = { this.token += that.token; this.string_rep += that.string_rep; @@ -2754,6 +7571,15 @@ class_token: @polymorphic_base type = ); } + reverse: (override this) -> token_ptr = { + return shared.new( + negate, + case_insensitive, + class_str, + to_string() + ); + } + generate_code: (override this, inout ctx: generation_context) = { ctx..add_check("class_token_matcher::match((ctx..match_parameters())$)"); @@ -2833,12 +7659,14 @@ group_ref_token: @polymorphic_base type = id : int; case_insensitive: bool; + reverse_eval : bool; - operator=:(out this, id_: int, case_insensitive_: bool, str: std::string) = + operator=:(out this, id_: int, case_insensitive_: bool, reverse_: bool, str: std::string) = { regex_token = str; id = id_; case_insensitive = case_insensitive_; + reverse_eval = reverse_; } parse: (inout ctx: parse_context) -> token_ptr = @@ -2939,11 +7767,15 @@ group_ref_token: @polymorphic_base type = if -1 == group_id { return ctx..error("Group names does not exist. (Name is: (group)$)");} } - return shared.new(group_id, ctx..get_modifiers()..has(expression_flags::case_insensitive), str); + return shared.new(group_id, ctx..get_modifiers()..has(expression_flags::case_insensitive), false, str); + } + + reverse: (override this) -> token_ptr = { + return shared.new(id, case_insensitive, !reverse_eval, to_string()); } generate_code: (override this, inout ctx: generation_context) = { - ctx..add_check("group_ref_token_matcher((ctx..match_parameters())$)"); + ctx..add_check("group_ref_token_matcher((ctx..match_parameters())$)"); } } @@ -2962,20 +7794,39 @@ group_token: @polymorphic_base type = { this: regex_token = (); - number: int = -1; - inner: token_ptr = nullptr; + number: int = -1; + reverse_eval: bool = false; + inner: token_ptr = nullptr; - parse_lookahead: (inout ctx: parse_context, syntax: std::string, positive: bool) -> token_ptr = + parse_lookahead_lookbehind: (inout ctx: parse_context, syntax: std::string, lookahead: bool, positive: bool) -> token_ptr = { _ = ctx..next(); // Skip last token defining the syntax - r := shared.new(positive); + r := shared.new(lookahead, positive); old_state := ctx..start_group(); - if !ctx..parse_until(')') { return ctx..error("Lookahead without a closing bracket."); } + if !ctx..parse_until(')') { return ctx..error("Group without a closing bracket."); } r*.inner = ctx..end_group(old_state); r*..set_string("((syntax)$(r*.inner*..to_string())$)"); + if !lookahead { + r*.inner = r*.inner*..reverse(); + } + + return r; + } + + parse_atomic_pattern: (inout ctx: parse_context, syntax: std::string) -> token_ptr = + { + _ = ctx..next(); // Skip last token defining the syntax + + r := shared.new(); + + old_state := ctx..start_group(); + if !ctx..parse_until(')') { return ctx..error("Group without a closing bracket."); } + r*.inner_token = ctx..end_group(old_state); + r*..set_string("((syntax)$(r*.inner_token*..to_string())$)"); + return r; } @@ -2998,7 +7849,14 @@ group_token: @polymorphic_base type = // Special group if !ctx..next_no_skip() { return ctx..error("Missing character after group opening."); } - if ctx..current() == '<' || ctx..current() == '\'' + if ctx.current() == '<' && (ctx.peek() == '=' || ctx.peek() == '!') + { + // Lookbehind + _ = ctx.next(); // Skip the '<' + + return parse_lookahead_lookbehind(ctx, "?<(ctx..current())$", false, ctx..current() == '='); + } + else if ctx..current() == '<' || ctx..current() == '\'' { // Named group end_char := ctx..current(); @@ -3049,7 +7907,13 @@ group_token: @polymorphic_base type = } else if ctx..current() == '=' || ctx..current() == '!' { - return parse_lookahead(ctx, "?(ctx..current())$", ctx..current() == '='); + // Lookahead + return parse_lookahead_lookbehind(ctx, "?(ctx..current())$", true, ctx..current() == '='); + } + else if ctx..current() == '>' + { + // Atomic pattern + return parse_atomic_pattern(ctx, "?(ctx..current())$"); } else { @@ -3076,10 +7940,19 @@ group_token: @polymorphic_base type = if !ctx..grab_until(':', out name) { return ctx..error("Missing colon for named pattern."); } if name == "pla" || name == "positive_lookahead" { - return parse_lookahead(ctx, "*(name)$:", true); + return parse_lookahead_lookbehind(ctx, "*(name)$:", true, true); } else if name == "nla" || name == "negative_lookahead" { - return parse_lookahead(ctx, "*(name)$:", false); + return parse_lookahead_lookbehind(ctx, "*(name)$:", true, false); + } + else if name == "plb" || name == "positive_lookbehind" { + return parse_lookahead_lookbehind(ctx, "*(name)$:", false, true); + } + else if name == "nlb" || name == "negative_lookbehind" { + return parse_lookahead_lookbehind(ctx, "*(name)$:", false, false); + } + else if name == "atomic" { + return parse_atomic_pattern(ctx, "*(name)$:"); } else { return ctx..error("Unknown named group pattern: '(name)$'"); @@ -3116,6 +7989,14 @@ group_token: @polymorphic_base type = } } + reverse: (override this) -> token_ptr = { + r := shared.new(); + r*.number = number; + r*.reverse_eval = !reverse_eval; + r*.inner = inner*.reverse(); + return r; + } + gen_string: (name: std::string, name_brackets: bool, has_modifier: bool, modifiers: std::string, inner_: token_ptr) -> std::string = { start : std::string = "("; @@ -3137,12 +8018,23 @@ group_token: @polymorphic_base type = generate_code: (override this, inout ctx: generation_context) = { if -1 != number { - ctx..add("ctx..set_group_start((number)$, r.pos);"); + if reverse_eval { + ctx..add("ctx..set_group_end((number)$, r.pos);"); + } + else { + ctx..add("ctx..set_group_start((number)$, r.pos);"); + } } inner*..generate_code(ctx); if -1 != number { - ctx..add("ctx..set_group_end((number)$, r.pos);"); + if reverse_eval { + ctx..add("ctx..set_group_start((number)$, r.pos);"); + } + else { + ctx..add("ctx..set_group_end((number)$, r.pos);"); + } + tmp_name := ctx..gen_temp(); ctx..add("(tmp_name)$_func := :() = {"); ctx..add(" if !r&$*.matched {"); @@ -3245,21 +8137,35 @@ line_start_token_parse: (inout ctx: parse_context) -> token_ptr = // // Parsed in group_token. // -lookahead_token: @polymorphic_base type = +lookahead_lookbehind_token: @polymorphic_base type = { this: regex_token = (""); - protected positive: bool; - public inner : token_ptr = nullptr; + protected lookahead: bool; + protected positive: bool; + public inner : token_ptr = nullptr; - operator=: (out this, positive_: bool) = { - positive = positive_; + operator=: (out this, lookahead_: bool, positive_: bool) = { + lookahead = lookahead_; + positive = positive_; } generate_code: (override this, inout ctx: generation_context) = { inner_name := ctx..generate_func(inner); - ctx..add_check("lookahead_token_matcher((ctx..match_parameters())$, (inner_name)$)"); + if lookahead { + ctx..add_check("lookahead_token_matcher((ctx..match_parameters())$, (inner_name)$)"); + } + else { + ctx..add_check("lookbehind_token_matcher((ctx..match_parameters())$, (inner_name)$)"); + } + } + + reverse: (override this) -> token_ptr = { + r := shared.new(lookahead, positive); + r*.inner = inner; // We do not reverse here. Nested lookahead and lookbehind stay as they are. + + return r; } add_groups: (override this, inout groups: std::set) = { @@ -3454,6 +8360,16 @@ range_token: @polymorphic_base type = return r; } + reverse: (override this) -> token_ptr = { + r := shared.new(); + r*.min_count = min_count; + r*.max_count = max_count; + r*.kind = kind; + r*.inner_token = inner_token*.reverse(); + + return r; + } + generate_code: (override this, inout ctx: generation_context) = { inner_name := ctx..generate_func(inner_token); @@ -3468,7 +8384,6 @@ range_token: @polymorphic_base type = add_groups: (override this, inout groups: std::set) = { inner_token*..add_groups(groups); } - } @@ -3510,6 +8425,25 @@ special_range_token: @polymorphic_base type = } } +// Regex syntax: \G Example: \Gaa +// +// Forces the match and/or consecutive matches to start at the position of the last match. +// +start_match_parse: (inout ctx: parse_context) -> token_ptr = +{ + if ctx..current() != '\\' { return nullptr; } + + if ctx..peek() == 'G' { + if 0 != ctx..get_pos() { return ctx..error("\\G is only supported at the first position in the regex."); } + _ = ctx..next(); + ctx.is_start_match = true; + return shared.new("\\G"); + } + else { + return nullptr; + } +} + // Regex syntax: \b or \B Example: \bword\b // @@ -3567,12 +8501,11 @@ regex_generator: type = } source += "{\n"; - source += " wrap: type = {\n"; // TODO: Remove wrapper when template template parameters are available. - source += " context: type == cpp2::regex::match_context;"; + source += " context: type == cpp2::regex::match_context;"; gen_ctx: generation_context = (); source += gen_ctx..run(parse_ctx..get_as_token()); - source += " entry: (cur: Iter, inout ctx: context) -> cpp2::regex::match_return = {\n"; + source += " entry: (cur: Iter, inout ctx: context) -> cpp2::regex::match_return = {\n"; source += " ctx..set_group_start(0, cur);\n"; source += " r := (gen_ctx..get_entry_func())$(cur, ctx, cpp2::regex::true_end_func());\n"; source += " if r.matched { ctx..set_group_end(0, r.pos); }\n"; @@ -3580,10 +8513,11 @@ regex_generator: type = source += " }\n"; source += gen_ctx..create_named_group_lookup(parse_ctx.named_groups); - source += "}\n"; + source += " is_start_match: () -> bool == (parse_ctx.is_start_match)$;"; string := parse_ctx..get_as_token()*..to_string(); source += " to_string: () -> std::string = { return R\"((modifier_escape)$(string)$(modifier_escape)$(modifier)$)\"; }\n"; + source += "}\n"; _ = parse_ctx; @@ -3663,8 +8597,8 @@ regex_gen: (inout t: meta::type_declaration) = regular_expression := generate_regex(expr.second, :(message) = t$.error(message);); if !regular_expression..empty() { - t.add_member("public (expr.first)$_matcher: type = (regular_expression)$"); - t.add_member("public (expr.first)$: cpp2::regex::regular_expression = ();"); + t.add_member("public (expr.first)$_matcher: type = (regular_expression)$"); + t.add_member("public (expr.first)$: cpp2::regex::regular_expression> = ();\n"); } } @@ -3736,6 +8670,9 @@ apply_metafunctions: ( else if name == "copyable" { copyable( rtype ); } + else if name == "copy_constructible" { + copy_constructible( rtype ); + } else if name == "hashable" { hashable( rtype ); } @@ -3766,19 +8703,41 @@ apply_metafunctions: ( else if name == "union" { cpp2_union( rtype ); } + else if name == "encapsulated" { + encapsulated( rtype ); + } + else if name == "noncopyable" { + noncopyable( rtype ); + } + else if name == "singleton" { + singleton( rtype ); + } else if name == "print" { print( rtype ); } + else if name == "noisy" { + noisy( rtype ); + } + else if name == "python" { + python( rtype ); + } + else if name == "javascript" { + javascript( rtype ); + } + else if name == "autodiff" { + autodiff( rtype ); + } else if name == "regex" { regex_gen( rtype ); } + else if name == "sample_traverser" { + sample_traverser( rtype ); + } else { error( "unrecognized metafunction name: " + name ); error( - "(temporary alpha limitation) currently the supported names are: " - "interface, polymorphic_base, ordered, weakly_ordered, partially_ordered, " - "copyable, basic_value, value, weakly_ordered_value, partially_ordered_value, " - "struct, enum, flag_enum, union, cpp1_rule_of_zero, regex, print" + "the current supported names are listed at " + "https://hsutter.github.io/cppfront/cpp2/metafunctions/#built-in-metafunctions" ); return false; } diff --git a/source/sema.h b/source/sema.h index f3d8ac63f..35faccc21 100644 --- a/source/sema.h +++ b/source/sema.h @@ -1,14 +1,9 @@ -// Copyright (c) Herb Sutter -// SPDX-License-Identifier: CC-BY-NC-ND-4.0 - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. +// Copyright 2022-2026 Herb Sutter +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +// Part of the Cppfront Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://github.com/hsutter/cppfront/blob/main/LICENSE for license information. //=========================================================================== @@ -29,7 +24,7 @@ auto parser::apply_type_metafunctions( declaration_node& n ) assert(n.is_type()); // Get the reflection state ready to pass to the function - auto cs = meta::compiler_services{ &errors, &includes, generated_tokens }; + auto cs = meta::compiler_services{ &errors, &includes, &extra_cpp1, &extra_build, filename, generated_tokens }; auto rtype = meta::type_declaration{ &n, cs }; return apply_metafunctions( @@ -1165,6 +1160,7 @@ class sema ) const -> bool { + assert(decl); auto name = decl->identifier->to_string(); struct selection_stack_entry{ @@ -1235,9 +1231,9 @@ class sema auto const& sym = std::get(symbols[pos].sym); assert (sym.identifier); - if ( - sym.is_use() + if (sym.is_use() && is_definite_initialization(sym.identifier) + && !decl->return_param ) { errors.emplace_back( @@ -1580,6 +1576,22 @@ class sema return false; } + // A 'singleton'-declarated object is only allowed at function local scope (aka "magic static") + if ( + n.is_static + && ( + !n.is_object() + || !n.parent_is_function() + ) + ) + { + handle_error( + n.position(), + "an object declared as 'static' must be in a function body scope" + ); + return false; + } + // An object of deduced type must have an initializer if ( n.is_object() @@ -1998,7 +2010,7 @@ class sema } } - for (auto& decl : n.get_type_scope_declarations()) + for (auto& decl : n.get_nested_declarations()) { if (decl->has_name("that")) { @@ -2042,6 +2054,7 @@ class sema if (n.is_type()) { auto compound_stmt = n.initializer->get_if(); assert (compound_stmt); + bool seen_function = false; for (auto& stmt : compound_stmt->statements) { if ( !stmt->is_declaration() @@ -2054,6 +2067,25 @@ class sema ); return false; } + auto stmt_decl = stmt->get_if(); + // If this is a declaration, check if it's a function + if (stmt_decl && stmt_decl->is_function()) { + seen_function = true; + } + + // If this is called 'this', then make sure we haven't seen any functions + if ( + stmt_decl + && stmt_decl->has_name("this") + && seen_function + ) + { + handle_error( + stmt->position(), + "a type cannot declare a parent after defining a function" + ); + return false; + } } } @@ -2091,6 +2123,21 @@ class sema } } + // If the first parameter is 'out this', it must be a constructor. + if ( + !n.is_constructor() + && (*n.parameters).ssize() > 0 + && (*n.parameters)[0]->has_name("this") + && (*n.parameters)[0]->direction() == passing_style::out + ) + { + errors.emplace_back( + n.position(), + "a function with an 'out this' parameter must be a constructor" + ); + return false; + } + return true; } @@ -2119,6 +2166,25 @@ class sema } + auto check(compound_statement_node const& n) + -> bool + { + for (auto& h: n.handlers) + { + if (h.param->pass != passing_style::in) + { + errors.emplace_back( + n.position(), + "a catch handler handler must be an 'in' parameter" + ); + return false; + } + } + + return true; + } + + //----------------------------------------------------------------------- // Visitor functions // @@ -2345,7 +2411,7 @@ class sema } if (n.pass != passing_style::out) { - push_activation( declaration_sym( true, n.declaration.get(), n.declaration->name(), n.declaration->initializer.get(), &n, inside_returns_list)); + push_activation( declaration_sym( true, n.declaration.get(), n.declaration->name(), n.declaration->initializer.get(), &n, false, inside_returns_list)); current_declarations.push_back( &symbols.back().as_declaration() ); } } diff --git a/source/to_cpp1.h b/source/to_cpp1.h index 3e08d83e6..9cc5b669d 100644 --- a/source/to_cpp1.h +++ b/source/to_cpp1.h @@ -1,14 +1,9 @@ -// Copyright (c) Herb Sutter -// SPDX-License-Identifier: CC-BY-NC-ND-4.0 - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. +// Copyright 2022-2026 Herb Sutter +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +// Part of the Cppfront Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://github.com/hsutter/cppfront/blob/main/LICENSE for license information. //=========================================================================== @@ -437,7 +432,7 @@ class positional_printer c.dbg_was_printed = true; } - auto flush_comments( source_position pos ) + auto flush_comments( source_position pos, bool print_remaining_comments = false ) -> void { if (!pcomments) { @@ -449,7 +444,7 @@ class positional_printer // Add unprinted comments and blank lines as needed to catch up vertically // - while (curr_pos.lineno < pos.lineno) + while (print_remaining_comments ? (next_comment < std::ssize(comments)) : (curr_pos.lineno < pos.lineno)) { // If a comment goes on this line, print it if ( @@ -473,7 +468,9 @@ class positional_printer ) { print_comment( comments[next_comment] ); - assert(curr_pos.lineno <= pos.lineno); // we shouldn't have overshot + if (!print_remaining_comments) { + assert(curr_pos.lineno <= pos.lineno); // we shouldn't have overshot + } } ++next_comment; @@ -484,6 +481,10 @@ class positional_printer print("\n"); } } + // And catch up. + while (curr_pos.lineno < pos.lineno) { + print("\n"); + } } auto print_unprinted_comments() @@ -594,7 +595,7 @@ class positional_printer && psource->has_cpp2() ) { - flush_comments( {curr_pos.lineno+1, 1} ); + flush_comments( {curr_pos.lineno+1, 1}, print_remaining_comments ); if (print_remaining_comments) { print_unprinted_comments(); @@ -1015,6 +1016,8 @@ class cppfront std::string sourcefile; std::vector errors; std::set includes; + std::vector extra_cpp1; + std::vector extra_build; // For building // @@ -1175,7 +1178,7 @@ class cppfront : sourcefile{ filename } , source { errors } , tokens { errors } - , parser { errors, includes } + , parser { errors, includes, extra_cpp1, extra_build, filename } , sema { errors } { // "Constraints enable creativity in the right directions" @@ -1184,6 +1187,7 @@ class cppfront if ( !sourcefile.ends_with(".cpp2") && !sourcefile.ends_with(".h2") + && sourcefile != "stdin" ) { errors.emplace_back( @@ -1262,14 +1266,18 @@ class cppfront } // Now we'll open the Cpp1 file - auto cpp1_filename = sourcefile.substr(0, std::ssize(sourcefile) - 1); + // Default to stdout if input is stdin + auto cpp1_filename = std::string{"stdout"}; + if (sourcefile != "stdin") { + assert(sourcefile.ends_with("2")); + cpp1_filename = sourcefile.substr(0, std::ssize(sourcefile) - 1); + } - // Use explicit filename override if present, - // otherwise strip leading path + // Use explicit filename override if present, otherwise strip leading path if (!flag_cpp1_filename.empty()) { cpp1_filename = flag_cpp1_filename; } - else { + else if (cpp1_filename != "stdout") { cpp1_filename = std::filesystem::path(cpp1_filename).filename().string(); } @@ -1291,6 +1299,35 @@ class cppfront // Generate a reasonable macroized name auto cpp1_FILENAME = to_upper_and_underbar(cpp1_filename); + // Emit any prefix of Cpp1-only header #include directives + // to ensure they stay in front of all Cpp2 code + if (source.has_cpp2()) + { + for ( + lineno_t curr_lineno = 0; + auto& line : source.get_lines() + ) + { + if ( + line.cat == source_line::category::preprocessor + && contains(line.text, "#include") + && !line.text.ends_with(".h2\"") + ) + { + printer.print_cpp1(line.text, curr_lineno); + line.cat = source_line::category::preprocessor_was_emitted; + } + else if ( + line.cat != source_line::category::empty + && line.cat != source_line::category::comment + ) + { + break; + } + ++curr_lineno; + } + } + //--------------------------------------------------------------------- // Do lowered file prolog @@ -1333,8 +1370,8 @@ class cppfront printer.print_extra( "#define CPP2_NO_RTTI Yes\n" ); } - for (auto& h: includes) { - printer.print_extra( "#include \"" + h + "\"\n" ); + for (auto const& h: includes) { + printer.print_extra( "#include " + h + "\n" ); } } @@ -1414,6 +1451,7 @@ class cppfront if ( source.has_cpp2() && line.cat != source_line::category::preprocessor + && line.cat != source_line::category::preprocessor_was_emitted ) { ++ret.cpp2_lines; @@ -1423,11 +1461,12 @@ class cppfront ++ret.cpp1_lines; } + // In Cpp2-only mode, there should be no nonblank Cpp1-content lines if ( flag_cpp2_only - && !line.text.empty() && line.cat != source_line::category::comment && line.cat != source_line::category::import + && std::any_of(line.text.begin(), line.text.end(), [](auto c) { return !std::isspace(c); }) ) { if (line.cat == source_line::category::preprocessor) { @@ -1458,7 +1497,7 @@ class cppfront printer.print_cpp1( h_include + "\"", curr_lineno ); hpp_includes += h_include + "pp\"\n"; } - else { + else if (line.cat != source_line::category::preprocessor_was_emitted) { printer.print_cpp1( line.text, curr_lineno ); } } @@ -1565,12 +1604,30 @@ class cppfront printer.finalize_phase( true ); - // Finally, some debug checks + + //--------------------------------------------------------------------- + // Do epilog and some debug checks + + for (auto& e: extra_cpp1) { + printer.print_extra( e + "\n" ); + } + assert( (!errors.empty() || tokens.num_unprinted_comments() == 0) && "ICE: not all comments were printed" ); + + //--------------------------------------------------------------------- + // Emit any extra build steps + + auto build = std::ofstream("cpp2_post_build.sh", std::ios::binary); + if (!extra_build.empty()) { + for (auto& e: extra_build) { + build << e << "\n"; + } + } + return ret; } @@ -1769,6 +1826,7 @@ class cppfront // Otherwise we'll use cpp2::move bool add_move = !add_forward + && !n.identifier->as_string_view().starts_with("guard") && ( !last_use || last_use->safe_to_move @@ -2033,8 +2091,16 @@ class cppfront ) -> void { STACKINSTR + if (!sema.check(n)) { + return; + } + emit_prolog_mem_inits(function_prolog, n.body_indent+1); + if (!n.handlers.empty()) { + printer.print_cpp2( "try ", n.open_brace ); + } + printer.print_cpp2( "{", n.open_brace ); emit_prolog_statements(function_prolog, n.body_indent+1); @@ -2047,6 +2113,24 @@ class cppfront emit_epilog_statements( function_epilog, n.body_indent+1); printer.print_cpp2( "}", n.close_brace ); + + for (auto& h: n.handlers) + { + printer.print_cpp2( " catch (", n.open_brace ); + if ( + h.param->has_name("_") + && h.param->declaration->has_wildcard_type() + ) + { + printer.print_cpp2( "...", n.close_brace ); + } + else + { + emit(*h.param); + } + printer.print_cpp2( ") ", n.open_brace ); + emit(*h.statement); + } } @@ -2437,6 +2521,7 @@ class cppfront else if ( !is_parameter_name && sema.get_declaration_of(*tok) + && !sema.get_declaration_of(*tok)->declaration->is_static && !sema.is_captured(*tok) ) { @@ -2745,7 +2830,6 @@ class cppfront auto emit(primary_expression_node const& n) -> void { STACKINSTR - try_emit(n.expr); try_emit(n.expr); try_emit(n.expr); try_emit(n.expr, true); @@ -4072,6 +4156,8 @@ class cppfront && ( x.op->type() == lexeme::Slash || x.op->type() == lexeme::SlashEq + || x.op->type() == lexeme::Modulo + || x.op->type() == lexeme::ModuloEq ) ) { @@ -4398,34 +4484,6 @@ class cppfront } - //----------------------------------------------------------------------- - // Within a type scope implementation, disallow declaring a name that - // is the same as (i.e., shadows) a type scope name... this is a - // convenient place to check because we have the decls stack - // - auto check_shadowing_of_type_scope_names( - declaration_node const& decl - ) - -> bool - { - if ( - decl.has_name() // this is a named declaration - && !decl.has_name("this") // that's not 'this' - && !decl.parent_is_type() // and the type isn't the direct parent - && is_name_declared_in_current_type_scope(*decl.name()) - ) // and it shadows a name - { - errors.emplace_back( - decl.position(), - "a type's implementation may not declare a name that is the same as (i.e., shadows) a type scope name - for example, a type scope function's local variable may not have the same as one of the type's members" - ); - return false; - } - - return true; - } - - //----------------------------------------------------------------------- // auto emit( @@ -4444,10 +4502,6 @@ class cppfront assert( n.declaration ); assert( !n.declaration->is_function() ); - if (!check_shadowing_of_type_scope_names(*n.declaration)) { - return; - } - assert( n.declaration->identifier ); auto identifier = print_to_string( *n.declaration->identifier ); auto identifier_pos = n.position(); @@ -4567,7 +4621,7 @@ class cppfront // [[maybe_unused]] to silence Cpp1 compiler warnings assert(!current_functions.empty()); auto maybe_unused = std::string{}; - if (current_functions.back().decl->get_parent()->get_type_scope_declarations(declaration_node::objects).empty()) { + if (current_functions.back().decl->get_parent()->get_nested_declarations(declaration_node::objects).empty()) { maybe_unused = "[[maybe_unused]] "; } @@ -4682,10 +4736,10 @@ class cppfront if ( !is_returns - && !n.declaration->is_variadic && !type_id.is_wildcard() && !is_dependent_parameter_type - && !type_id.is_pointer_qualified() + && !type_id.is_function_typeid() + && !n.declaration->is_variadic ) { switch (n.pass) { @@ -4698,13 +4752,6 @@ class cppfront printer.preempt_position_push( n.position() ); if ( - type_id.is_pointer_qualified() - && n.pass == passing_style::in - ) - { - printer.print_cpp2( param_type, n.position() ); - } - else if ( type_id.is_wildcard() || is_dependent_parameter_type || n.declaration->is_variadic @@ -4783,7 +4830,7 @@ class cppfront !is_returns && !type_id.is_wildcard() && !is_dependent_parameter_type - && !type_id.is_pointer_qualified() + && !type_id.is_function_typeid() && !n.declaration->is_variadic ) { @@ -5194,7 +5241,7 @@ class cppfront ) { // ... for each of its type scope decls... - for (auto const& decl : (*parent)->get_type_scope_declarations()) + for (auto const& decl : (*parent)->get_nested_declarations()) { // ... check the name if (decl->has_name(s)) @@ -5378,7 +5425,7 @@ class cppfront // If this constructor's type has data members, handle their initialization // - objects is the list of this type's declarations // - statements is the list of this constructor's statements - auto objects = n.parent_declaration->get_type_scope_declarations(n.objects); + auto objects = n.parent_declaration->get_nested_declarations(n.objects); auto statements = n.get_initializer_statements(); auto out_inits = std::vector{}; @@ -6001,10 +6048,6 @@ class cppfront ; auto is_in_type = n.parent_is_type(); - if (!check_shadowing_of_type_scope_names(n)) { - return; - } - // If this is a function that has multiple return values, // first we need to emit the struct that contains the returns @@ -6499,12 +6542,20 @@ class cppfront break;case passing_style::in: suffix1 += " const"; // Cpp1 ref-qualifiers don't belong on virtual functions - if (!this_->is_polymorphic()) { + if ( + !this_->is_polymorphic() + && n.get_parent()->ref_qualifier_generation + ) + { suffix1 += "&"; } break;case passing_style::inout: // Cpp1 ref-qualifiers don't belong on virtual functions - if (!this_->is_polymorphic()) { + if ( + !this_->is_polymorphic() + && n.get_parent()->ref_qualifier_generation + ) + { suffix1 += " &"; } break;case passing_style::out: @@ -6543,6 +6594,7 @@ class cppfront func->is_constructor() && !func->is_constructor_with_that() && generating_assignment_from != &n + && func->parameter_count() < 2 ) { prefix += "explicit "; @@ -6608,48 +6660,35 @@ class cppfront prefix ); - // If there's no inheritance and this operator= has two parameters, - // it's setting from a single value -- either from the same type - // (aka copy/move) or another type (a conversion) -- so recurse to - // emit related functions if the user didn't write them by hand + // If this operator= has two parameters, it's setting from a single value -- + // either from the same type (aka copy/move) or another type (a conversion) -- + // so recurse to emit related functions if the user didn't write them by hand if ( - !n.parent_is_polymorphic() - && func->parameters->ssize() == 2 + func->parameters->ssize() == 2 && generating_assignment_from != &n ) { assert(!current_functions.empty()); // A) Generate (A)ssignment from a constructor, - // if the user didn't write the assignment function themselves + // if the user didn't write a more-specific function themselves if ( - // A1) This is '(out this, that)' - // and no '(inout this, that)' was written by the user + // A1) This is '(out this, that)' + // and the user didn't write any other ctor/assignment function themselves ( &n == current_functions.back().declared_value_set_functions.out_this_in_that + && !current_functions.back().declared_value_set_functions.out_this_move_that && !current_functions.back().declared_value_set_functions.inout_this_in_that - ) - || - // A2) This is '(out this, move that)' - // and no '(inout this, move that)' was written by the user - // (*) and no '(inout this, that)' was written by the user (*) - // - // (*) This third test is to tie-break M2 and A2 in favor of M2. Both M2 and A2 - // can generate a missing '(inout this, move that)', and if we have both - // options then we should prefer to use M2 (generate move assignment from - // copy assignment) rather than A2 (generate move assignment from move - // construction) as M2 is a better fit (move assignment is more like copy - // assignment than like move construction, because assignments are designed - // structurally to set the value of an existing 'this' object) - ( - &n == current_functions.back().declared_value_set_functions.out_this_move_that && !current_functions.back().declared_value_set_functions.inout_this_move_that - && !current_functions.back().declared_value_set_functions.inout_this_in_that ) || - // A3) This is '(out this, something-other-than-that)' + // A3) This is '(out this, something-other-than-that)' + // and the user didn't write an assignment from this type themselves + // and the type is not polymorphic (this generation is great for most types, + // but polymorphic base classes often have no meaningful way to write assignment) ( - n.is_constructor() + !n.parent_is_polymorphic() + && n.is_constructor() && !n.is_constructor_with_that() && !contains( current_functions.back().declared_value_set_functions.assignments_from, n.nth_parameter_type_name(2) ) ) @@ -6913,8 +6952,8 @@ class cppfront generating_assignment_from = {}; } - // If this was a constructor and we want also want to emit - // it as an assignment operator, do it via a recursive call + // If this was a copy function and we want also want to emit + // it as a move function, do it via a recursive call if (need_to_generate_move) { // Reset the 'emitted' flags @@ -6982,6 +7021,11 @@ class cppfront emit_requires_clause(); + if (n.is_static) + { + printer.print_cpp2( "static ", n.position() ); + } + if ( printer.get_phase() != printer.phase2_func_defs && n.parent_is_namespace() diff --git a/source/version.info b/source/version.info index 2d5749ca0..7fd6ba145 100644 --- a/source/version.info +++ b/source/version.info @@ -1 +1 @@ -"v0.8.0" \ No newline at end of file +"v0.8.2" \ No newline at end of file