diff --git a/.github/workflows/ros2-rolling.yaml b/.github/workflows/ros2-rolling.yaml
index 15d3b06ce..c447143aa 100644
--- a/.github/workflows/ros2-rolling.yaml
+++ b/.github/workflows/ros2-rolling.yaml
@@ -19,4 +19,4 @@ jobs:
- uses: 'ros-industrial/industrial_ci@master'
env: ${{matrix.env}}
with:
- package-name: plotjuggler
+ package-name: behaviortree_cpp
diff --git a/.github/workflows/ros2.yaml b/.github/workflows/ros2.yaml
index 8fbbc25e6..1f34181a2 100644
--- a/.github/workflows/ros2.yaml
+++ b/.github/workflows/ros2.yaml
@@ -20,4 +20,4 @@ jobs:
- uses: 'ros-industrial/industrial_ci@master'
env: ${{matrix.env}}
with:
- package-name: plotjuggler
+ package-name: behaviortree_cpp
diff --git a/.gitignore b/.gitignore
index 3c2733746..bd4563b41 100644
--- a/.gitignore
+++ b/.gitignore
@@ -24,6 +24,9 @@ tags
/llvm.sh
t11_groot_howto.btlog
minitrace.json
+
+TODO.md
/.worktrees/*
/docs/plans/*
/coverage_report/*
+/coverage.info
diff --git a/3rdparty/lexy/CMakeLists.txt b/3rdparty/lexy/CMakeLists.txt
deleted file mode 100644
index 3a63b7798..000000000
--- a/3rdparty/lexy/CMakeLists.txt
+++ /dev/null
@@ -1,79 +0,0 @@
-# Copyright (C) 2020-2024 Jonathan Müller and lexy contributors
-# SPDX-License-Identifier: BSL-1.0
-
-cmake_minimum_required(VERSION 3.8)
-project(lexy VERSION 2022.12.1 LANGUAGES CXX)
-
-set(LEXY_USER_CONFIG_HEADER "" CACHE FILEPATH "The user config header for lexy.")
-option(LEXY_FORCE_CPP17 "Whether or not lexy should use C++17 even if compiler supports C++20." OFF)
-
-add_subdirectory(src)
-
-option(LEXY_ENABLE_INSTALL "whether or not to enable the install rule" OFF)
-if(LEXY_ENABLE_INSTALL)
- include(CMakePackageConfigHelpers)
- include(GNUInstallDirs)
-
- install(TARGETS lexy lexy_core lexy_file lexy_unicode lexy_ext _lexy_base lexy_dev
- EXPORT ${PROJECT_NAME}Targets
- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
-
- install(EXPORT ${PROJECT_NAME}Targets
- NAMESPACE foonathan::
- DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}")
-
- configure_package_config_file(
- cmake/lexyConfig.cmake.in
- "${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
- INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}")
- install(FILES "${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
- DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}")
-
- # YYYY.MM.N1 is compatible with YYYY.MM.N2.
- write_basic_package_version_file(
- "${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
- COMPATIBILITY SameMinorVersion)
-
- install(FILES "${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
- DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}")
-
- install(DIRECTORY include/lexy include/lexy_ext
- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
- FILES_MATCHING
- PATTERN "*.hpp")
-endif()
-
-if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
- cmake_minimum_required(VERSION 3.18)
- option(LEXY_BUILD_BENCHMARKS "whether or not benchmarks should be built" OFF)
- option(LEXY_BUILD_EXAMPLES "whether or not examples should be built" ON)
- option(LEXY_BUILD_TESTS "whether or not tests should be built" ON)
- option(LEXY_BUILD_DOCS "whether or not docs should be built" OFF)
- option(LEXY_BUILD_PACKAGE "whether or not the package should be built" ON)
-
- if(LEXY_BUILD_PACKAGE)
- set(package_files include/ src/ cmake/ CMakeLists.txt LICENSE)
- add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lexy-src.zip
- COMMAND ${CMAKE_COMMAND} -E tar c ${CMAKE_CURRENT_BINARY_DIR}/lexy-src.zip --format=zip -- ${package_files}
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
- DEPENDS ${package_files})
- add_custom_target(lexy_package DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/lexy-src.zip)
- endif()
-
- if(LEXY_BUILD_EXAMPLES)
- add_subdirectory(examples)
- endif()
- if(LEXY_BUILD_BENCHMARKS)
- add_subdirectory(benchmarks)
- endif()
- if(LEXY_BUILD_TESTS)
- set(DOCTEST_NO_INSTALL ON)
- enable_testing()
- add_subdirectory(tests)
- endif()
- if(LEXY_BUILD_DOCS)
- add_subdirectory(docs EXCLUDE_FROM_ALL)
- endif()
-endif()
diff --git a/3rdparty/lexy/LICENSE b/3rdparty/lexy/LICENSE
deleted file mode 100644
index 36b7cd93c..000000000
--- a/3rdparty/lexy/LICENSE
+++ /dev/null
@@ -1,23 +0,0 @@
-Boost Software License - Version 1.0 - August 17th, 2003
-
-Permission is hereby granted, free of charge, to any person or organization
-obtaining a copy of the software and accompanying documentation covered by
-this license (the "Software") to use, reproduce, display, distribute,
-execute, and transmit the Software, and to prepare derivative works of the
-Software, and to permit third-parties to whom the Software is furnished to
-do so, all subject to the following:
-
-The copyright notices in the Software and this entire statement, including
-the above license grant, this restriction and the following disclaimer,
-must be included in all copies of the Software, in whole or in part, and
-all derivative works of the Software, unless such copies or derivative
-works are solely in the form of machine-executable object code generated by
-a source language processor.
-
-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, TITLE AND NON-INFRINGEMENT. IN NO EVENT
-SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
-FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-DEALINGS IN THE SOFTWARE.
diff --git a/3rdparty/lexy/README.adoc b/3rdparty/lexy/README.adoc
deleted file mode 100644
index 6bc88487f..000000000
--- a/3rdparty/lexy/README.adoc
+++ /dev/null
@@ -1,175 +0,0 @@
-= lexy
-
-ifdef::env-github[]
-image:https://img.shields.io/endpoint?url=https%3A%2F%2Fwww.jonathanmueller.dev%2Fproject%2Flexy%2Findex.json[Project Status,link=https://www.jonathanmueller.dev/project/]
-image:https://github.com/foonathan/lexy/workflows/Main%20CI/badge.svg[Build Status]
-image:https://img.shields.io/badge/try_it_online-blue[Playground,link=https://lexy.foonathan.net/playground]
-endif::[]
-
-lexy is a parser combinator library for {cpp}17 and onwards.
-It allows you to write a parser by specifying it in a convenient {cpp} DSL,
-which gives you all the flexibility and control of a handwritten parser without any of the manual work.
-
-ifdef::env-github[]
-*Documentation*: https://lexy.foonathan.net/[lexy.foonathan.net]
-endif::[]
-
-.IPv4 address parser
---
-ifndef::env-github[]
-[.godbolt-example]
-.+++{{< svg "icons/play.svg" >}}+++
-endif::[]
-[source,cpp]
-----
-namespace dsl = lexy::dsl;
-
-// Parse an IPv4 address into a `std::uint32_t`.
-struct ipv4_address
-{
- // What is being matched.
- static constexpr auto rule = []{
- // Match a sequence of (decimal) digits and convert it into a std::uint8_t.
- auto octet = dsl::integer;
-
- // Match four of them separated by periods.
- return dsl::times<4>(octet, dsl::sep(dsl::period)) + dsl::eof;
- }();
-
- // How the matched output is being stored.
- static constexpr auto value
- = lexy::callback([](std::uint8_t a, std::uint8_t b, std::uint8_t c, std::uint8_t d) {
- return (a << 24) | (b << 16) | (c << 8) | d;
- });
-};
-----
---
-
-== Features
-
-Full control::
- * *Describe the parser, not some abstract grammar*:
- Unlike parser generators that use some table driven magic for parsing, lexy's grammar is just syntax sugar for a hand-written recursive descent parser.
- The parsing algorithm does exactly what you've instructed it to do -- no more ambiguities or weird shift/reduce errors!
- * *No implicit backtracking or lookahead*:
- It will only backtrack when you say it should, and only lookahead when and how far you want it.
- Don't worry about rules that have side-effects, they won't be executed unnecessarily thanks to the user-specified lookahead conditions.
- https://lexy.foonathan.net/playground?example=peek[Try it online].
- * *Escape hatch for manual parsing*:
- Sometimes you want to parse something that can't be expressed easily with lexy's facilities.
- Don't worry, you can integrate a hand-written parser into the grammar at any point.
- https://lexy.foonathan.net/playground/?example=scan[Try it online].
- * *Tracing*:
- Figure out why the grammar isn't working the way you want it to.
- https://lexy.foonathan.net/playground/?example=trace&mode=trace[Try it online].
-
-Easily integrated::
- * *A pure {cpp} DSL*:
- No need to use an external grammar file; embed the grammar directly in your {cpp} project using operator overloading and functions.
- * *Bring your own data structures*:
- You can directly store results into your own types and have full control over all heap allocations.
- * *Fully `constexpr` parsing*:
- You want to parse a string literal at compile-time? You can do so.
- * *Minimal standard library dependencies*:
- The core parsing library only depends on fundamental headers such as `` or ``; no big includes like `` or ``.
- * *Header-only core library* (by necessity, not by choice -- it's `constexpr` after all).
-
-ifdef::env-github[Designed for text::]
-ifndef::env-github[Designed for text (e.g. {{< github-example json >}}, {{< github-example xml >}}, {{< github-example email >}}) ::]
- * *Unicode support*: parse UTF-8, UTF-16, or UTF-32, and access the Unicode character database to query char classes or perform case folding.
- https://lexy.foonathan.net/playground?example=identifier-unicode[Try it online].
- * *Convenience*:
- Built-in rules for parsing nested structures, quotes and escape sequences.
- https://lexy.foonathan.net/playground?example=parenthesized[Try it online].
- * *Automatic whitespace skipping*:
- No need to manually handle whitespace or comments.
- https://lexy.foonathan.net/playground/?example=whitespace_comment[Try it online].
-
-ifdef::env-github[Designed for programming languages::]
-ifndef::env-github[Designed for programming languages (e.g. {{< github-example calculator >}}, {{< github-example shell >}})::]
- * *Keyword and identifier parsing*:
- Reserve a set of keywords that won't be matched as regular identifiers.
- https://lexy.foonathan.net/playground/?example=reserved_identifier[Try it online].
- * *Operator parsing*:
- Parse unary/binary operators with different precedences and associativity, including chained comparisons `a < b < c`.
- https://lexy.foonathan.net/playground/?example=expr[Try it online].
- * *Automatic error recovery*:
- Log an error, recover, and continue parsing!
- https://lexy.foonathan.net/playground/?example=recover[Try it online].
-
-ifdef::env-github[Designed for binary input::]
-ifndef::env-github[Designed for binary input (e.g. {{< github-example protobuf >}})::]
- * *Bytes*: Rules for parsing `N` bytes or Nbit big/little endian integer.
- * *Bits*: Rules for parsing individual bit patterns.
- * *Blobs*: Rules for parsing TLV formats.
-
-== FAQ
-
-Why should I use lexy over XYZ?::
- lexy is closest to other PEG parsers.
- However, they usually do more implicit backtracking, which can hurt performance and you need to be very careful with rules that have side-effects.
- This is not the case for lexy, where backtracking is controlled using branch conditions.
- lexy also gives you a lot of control over error reporting, supports error recovery, special support for operator precedence parsing, and other advanced features.
-
- http://boost-spirit.com/home/[Boost.Spirit]:::
- The main difference: it is not a Boost library.
- In addition, Boost.Spirit is quite old and doesn't support e.g. non-common ranges as input.
- Boost.Spirit also eagerly creates attributes from the rules, which can lead to nested tuples/variants while lexy uses callbacks which enables zero-copy parsing directly into your own data structure.
- However, lexy's grammar is more verbose and designed to parser bigger grammars instead of the small one-off rules that Boost.Spirit is good at.
- https://github.com/taocpp/PEGTL[PEGTL]:::
- PEGTL is very similar and was a big inspiration.
- The biggest difference is that lexy uses an operator based DSL instead of inheriting from templated classes as PEGTL does;
- depending on your preference this can be an advantage or disadvantage.
- Hand-written Parsers:::
- Writing a handwritten parser is more manual work and error prone.
- lexy automates that away without having to sacrifice control.
- You can use it to quickly prototype a parser and then slowly replace more and more with a handwritten parser over time;
- mixing a hand-written parser and a lexy grammar works seamlessly.
-
-How bad are the compilation times?::
-They're not as bad as you might expect (in debug mode, that is).
-+
-The example JSON parser compiles in about 2s on my machine.
-If we remove all the lexy specific parts and just benchmark the time it takes for the compiler to process the datastructure (and stdlib includes),
-that takes about 700ms.
-If we validate JSON only instead of parsing it, so remove the data structures and keep only the lexy specific parts, we're looking at about 840ms.
-+
-Keep in mind, that you can fully isolate lexy in a single translation unit that only needs to be touched when you change the parser.
-You can also split a lexy grammar into multiple translation units using the `dsl::subgrammar` rule.
-
-How bad are the {cpp} error messages if you mess something up?::
- They're certainly worse than the error message lexy gives you.
- The big problem here is that the first line gives you the error, followed by dozens of template instantiations, which end at your `lexy::parse` call.
- Besides providing an external tool to filter those error messages, there is nothing I can do about that.
-
-How fast is it?::
- Benchmarks are available in the `benchmarks/` directory.
- A sample result of the JSON validator benchmark which compares the example JSON parser with various other implementations is available https://lexy.foonathan.net/benchmark_json/[here].
-
-Why is it called lexy?::
- I previously had a tokenizer library called foonathan/lex.
- I've tried adding a parser to it, but found that the line between pure tokenization and parsing has become increasingly blurred.
- lexy is a re-imagination on of the parser I've added to foonathan/lex, and I've simply kept a similar name.
-
-ifdef::env-github[]
-== Documentation
-
-The documentation, including tutorials, reference documentation, and an interactive playground can be found at https://lexy.foonathan.net/[lexy.foonathan.net].
-
-A minimal `CMakeLists.txt` that uses lexy can look like this:
-
-.`CMakeLists.txt`
-```cmake
-project(lexy-example)
-
-include(FetchContent)
-FetchContent_Declare(lexy URL https://lexy.foonathan.net/download/lexy-src.zip)
-FetchContent_MakeAvailable(lexy)
-
-add_executable(lexy_example)
-target_sources(lexy_example PRIVATE main.cpp)
-target_link_libraries(lexy_example PRIVATE foonathan::lexy)
-```
-
-endif::[]
-
diff --git a/3rdparty/lexy/cmake/lexyConfig.cmake.in b/3rdparty/lexy/cmake/lexyConfig.cmake.in
deleted file mode 100644
index e6dc89d30..000000000
--- a/3rdparty/lexy/cmake/lexyConfig.cmake.in
+++ /dev/null
@@ -1,8 +0,0 @@
-# Copyright (C) 2020-2024 Jonathan Müller and lexy contributors
-# SPDX-License-Identifier: BSL-1.0
-
-# lexy CMake configuration file.
-
-@PACKAGE_INIT@
-
-include ("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake")
diff --git a/3rdparty/lexy/include/lexy/_detail/any_ref.hpp b/3rdparty/lexy/include/lexy/_detail/any_ref.hpp
deleted file mode 100644
index 9eca714b2..000000000
--- a/3rdparty/lexy/include/lexy/_detail/any_ref.hpp
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright (C) 2020-2024 Jonathan Müller and lexy contributors
-// SPDX-License-Identifier: BSL-1.0
-
-#ifndef LEXY_DETAIL_ANY_REF_HPP_INCLUDED
-#define LEXY_DETAIL_ANY_REF_HPP_INCLUDED
-
-#include
-
-// Essentially a void*, but we can cast it in a constexpr context.
-// The cost is an extra layer of indirection.
-
-namespace lexy::_detail
-{
-template
-class any_holder;
-
-// Store a pointer to this instead of a void*.
-class any_base
-{
-public:
- any_base(const any_base&) = delete;
- any_base& operator=(const any_base&) = delete;
-
- template
- constexpr T& get() noexcept
- {
- return static_cast*>(this)->get();
- }
- template
- constexpr const T& get() const noexcept
- {
- return static_cast*>(this)->get();
- }
-
-private:
- constexpr any_base() = default;
- ~any_base() = default;
-
- template
- friend class any_holder;
-};
-
-using any_ref = any_base*;
-using any_cref = const any_base*;
-
-// Need to store the object in here.
-template
-class any_holder : public any_base
-{
-public:
- constexpr explicit any_holder(T&& obj) : _obj(LEXY_MOV(obj)) {}
-
- constexpr T& get() noexcept
- {
- return _obj;
- }
- constexpr const T& get() const noexcept
- {
- return _obj;
- }
-
-private:
- T _obj;
-};
-} // namespace lexy::_detail
-
-#endif // LEXY_DETAIL_ANY_REF_HPP_INCLUDED
-
diff --git a/3rdparty/lexy/include/lexy/_detail/assert.hpp b/3rdparty/lexy/include/lexy/_detail/assert.hpp
deleted file mode 100644
index 52aa115de..000000000
--- a/3rdparty/lexy/include/lexy/_detail/assert.hpp
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright (C) 2020-2024 Jonathan Müller and lexy contributors
-// SPDX-License-Identifier: BSL-1.0
-
-#ifndef LEXY_DETAIL_ASSERT_HPP_INCLUDED
-#define LEXY_DETAIL_ASSERT_HPP_INCLUDED
-
-#include
-
-#ifndef LEXY_ENABLE_ASSERT
-
-// By default, enable assertions if NDEBUG is not defined.
-
-# if NDEBUG
-# define LEXY_ENABLE_ASSERT 0
-# else
-# define LEXY_ENABLE_ASSERT 1
-# endif
-
-#endif
-
-#if LEXY_ENABLE_ASSERT
-
-// We want assertions: use assert() if that's available, otherwise abort.
-// We don't use assert() directly as that's not constexpr.
-
-# if NDEBUG
-
-# include
-# define LEXY_PRECONDITION(Expr) ((Expr) ? void(0) : std::abort())
-# define LEXY_ASSERT(Expr, Msg) ((Expr) ? void(0) : std::abort())
-
-# else
-
-# include
-
-# define LEXY_PRECONDITION(Expr) ((Expr) ? void(0) : assert(Expr))
-# define LEXY_ASSERT(Expr, Msg) ((Expr) ? void(0) : assert((Expr) && (Msg)))
-
-# endif
-
-#else
-
-// We don't want assertions.
-
-# define LEXY_PRECONDITION(Expr) static_cast(sizeof(Expr))
-# define LEXY_ASSERT(Expr, Msg) static_cast(sizeof(Expr))
-
-#endif
-
-#endif // LEXY_DETAIL_ASSERT_HPP_INCLUDED
-
diff --git a/3rdparty/lexy/include/lexy/_detail/buffer_builder.hpp b/3rdparty/lexy/include/lexy/_detail/buffer_builder.hpp
deleted file mode 100644
index 94ba1fd27..000000000
--- a/3rdparty/lexy/include/lexy/_detail/buffer_builder.hpp
+++ /dev/null
@@ -1,160 +0,0 @@
-// Copyright (C) 2020-2024 Jonathan Müller and lexy contributors
-// SPDX-License-Identifier: BSL-1.0
-
-#ifndef LEXY_DETAIL_BUFFER_BUILDER_HPP_INCLUDED
-#define LEXY_DETAIL_BUFFER_BUILDER_HPP_INCLUDED
-
-#include
-#include
-#include
-#include
-#include
-
-namespace lexy::_detail
-{
-// Builds a buffer: it has a read are and a write area.
-// The characters in the read area are already valid and can be read.
-// The characters in the write area are not valid, but can be written too.
-template
-class buffer_builder
-{
- static_assert(std::is_trivial_v);
-
- static constexpr std::size_t total_size_bytes = 1024;
- static constexpr std::size_t stack_buffer_size
- = (total_size_bytes - 3 * sizeof(T*)) / sizeof(T);
- static constexpr auto growth_factor = 2;
-
-public:
- buffer_builder() noexcept : _data(_stack_buffer), _read_size(0), _write_size(stack_buffer_size)
- {
- static_assert(sizeof(*this) == total_size_bytes, "invalid buffer size calculation");
- }
-
- ~buffer_builder() noexcept
- {
- // Free memory if we allocated any.
- if (_data != _stack_buffer)
- ::operator delete(_data);
- }
-
- buffer_builder(const buffer_builder&) = delete;
- buffer_builder& operator=(const buffer_builder&) = delete;
-
- // The total capacity: read + write.
- std::size_t capacity() const noexcept
- {
- return _read_size + _write_size;
- }
-
- // The read area.
- const T* read_data() const noexcept
- {
- return _data;
- }
- std::size_t read_size() const noexcept
- {
- return _read_size;
- }
-
- // The write area.
- T* write_data() noexcept
- {
- return _data + _read_size;
- }
- std::size_t write_size() const noexcept
- {
- return _write_size;
- }
-
- // Clears the read area.
- void clear() noexcept
- {
- _write_size += _read_size;
- _read_size = 0;
- }
-
- // Takes the first n characters of the write area and appends them to the read area.
- void commit(std::size_t n) noexcept
- {
- LEXY_PRECONDITION(n <= _write_size);
- _read_size += n;
- _write_size -= n;
- }
-
- // Increases the write area, invalidates all pointers.
- void grow()
- {
- const auto cur_cap = capacity();
- const auto new_cap = growth_factor * cur_cap;
-
- // Allocate new memory.
- auto memory = static_cast(::operator new(new_cap * sizeof(T)));
- // Copy the read area into the new memory.
- std::memcpy(memory, _data, _read_size);
-
- // Release the old memory, if there was any.
- if (_data != _stack_buffer)
- ::operator delete(_data);
-
- // Update for the new area.
- _data = memory;
- // _read_size hasn't been changed
- _write_size = new_cap - _read_size;
- }
-
- //=== iterator ===//
- // Stable iterator over the memory.
- class stable_iterator : public forward_iterator_base
- {
- public:
- constexpr stable_iterator() = default;
-
- explicit constexpr stable_iterator(const _detail::buffer_builder& buffer,
- std::size_t idx) noexcept
- : _buffer(&buffer), _idx(idx)
- {}
-
- constexpr const T& deref() const noexcept
- {
- LEXY_PRECONDITION(_idx != _buffer->read_size());
- return _buffer->read_data()[_idx];
- }
-
- constexpr void increment() noexcept
- {
- LEXY_PRECONDITION(_idx != _buffer->read_size());
- ++_idx;
- }
-
- constexpr bool equal(stable_iterator rhs) const noexcept
- {
- if (!_buffer || !rhs._buffer)
- return !_buffer && !rhs._buffer;
- else
- {
- LEXY_PRECONDITION(_buffer == rhs._buffer);
- return _idx == rhs._idx;
- }
- }
-
- constexpr std::size_t index() const noexcept
- {
- return _idx;
- }
-
- private:
- const _detail::buffer_builder* _buffer = nullptr;
- std::size_t _idx = 0;
- };
-
-private:
- T* _data;
- std::size_t _read_size;
- std::size_t _write_size;
- T _stack_buffer[stack_buffer_size];
-};
-} // namespace lexy::_detail
-
-#endif // LEXY_DETAIL_BUFFER_BUILDER_HPP_INCLUDED
-
diff --git a/3rdparty/lexy/include/lexy/_detail/code_point.hpp b/3rdparty/lexy/include/lexy/_detail/code_point.hpp
deleted file mode 100644
index bc805b11e..000000000
--- a/3rdparty/lexy/include/lexy/_detail/code_point.hpp
+++ /dev/null
@@ -1,368 +0,0 @@
-// Copyright (C) 2020-2024 Jonathan Müller and lexy contributors
-// SPDX-License-Identifier: BSL-1.0
-
-#ifndef LEXY_DETAIL_CODE_POINT_HPP_INCLUDED
-#define LEXY_DETAIL_CODE_POINT_HPP_INCLUDED
-
-#include
-
-//=== encoding ===//
-namespace lexy::_detail
-{
-template
-constexpr std::size_t encode_code_point(char32_t cp, typename Encoding::char_type* buffer,
- std::size_t size)
-{
- if constexpr (std::is_same_v)
- {
- LEXY_PRECONDITION(size >= 1);
-
- *buffer = char(cp);
- return 1;
- }
- else if constexpr (std::is_same_v //
- || std::is_same_v)
- {
- using char_type = typename Encoding::char_type;
- // Taken from http://www.herongyang.com/Unicode/UTF-8-UTF-8-Encoding-Algorithm.html.
- if (cp <= 0x7F)
- {
- LEXY_PRECONDITION(size >= 1);
-
- buffer[0] = char_type(cp);
- return 1;
- }
- else if (cp <= 0x07'FF)
- {
- LEXY_PRECONDITION(size >= 2);
-
- auto first = (cp >> 6) & 0x1F;
- auto second = (cp >> 0) & 0x3F;
-
- buffer[0] = char_type(0xC0 | first);
- buffer[1] = char_type(0x80 | second);
- return 2;
- }
- else if (cp <= 0xFF'FF)
- {
- LEXY_PRECONDITION(size >= 3);
-
- auto first = (cp >> 12) & 0x0F;
- auto second = (cp >> 6) & 0x3F;
- auto third = (cp >> 0) & 0x3F;
-
- buffer[0] = char_type(0xE0 | first);
- buffer[1] = char_type(0x80 | second);
- buffer[2] = char_type(0x80 | third);
- return 3;
- }
- else
- {
- LEXY_PRECONDITION(size >= 4);
-
- auto first = (cp >> 18) & 0x07;
- auto second = (cp >> 12) & 0x3F;
- auto third = (cp >> 6) & 0x3F;
- auto fourth = (cp >> 0) & 0x3F;
-
- buffer[0] = char_type(0xF0 | first);
- buffer[1] = char_type(0x80 | second);
- buffer[2] = char_type(0x80 | third);
- buffer[3] = char_type(0x80 | fourth);
- return 4;
- }
- }
- else if constexpr (std::is_same_v)
- {
- if (cp <= 0xFF'FF)
- {
- LEXY_PRECONDITION(size >= 1);
-
- buffer[0] = char16_t(cp);
- return 1;
- }
- else
- {
- // Algorithm implemented from
- // https://en.wikipedia.org/wiki/UTF-16#Code_points_from_U+010000_to_U+10FFFF.
- LEXY_PRECONDITION(size >= 2);
-
- auto u_prime = cp - 0x1'0000;
- auto high_ten_bits = u_prime >> 10;
- auto low_ten_bits = u_prime & 0b0000'0011'1111'1111;
-
- buffer[0] = char16_t(0xD800 + high_ten_bits);
- buffer[1] = char16_t(0xDC00 + low_ten_bits);
- return 2;
- }
- }
- else if constexpr (std::is_same_v)
- {
- LEXY_PRECONDITION(size >= 1);
-
- *buffer = char32_t(cp);
- return 1;
- }
- else
- {
- static_assert(lexy::_detail::error,
- "cannot encode a code point in this encoding");
- (void)cp;
- (void)buffer;
- (void)size;
- return 0;
- }
-}
-} // namespace lexy::_detail
-
-//=== parsing ===//
-namespace lexy::_detail
-{
-enum class cp_error
-{
- success,
- eof,
- leads_with_trailing,
- missing_trailing,
- surrogate,
- overlong_sequence,
- out_of_range,
-};
-
-template
-struct cp_result
-{
- char32_t cp;
- cp_error error;
- typename Reader::marker end;
-};
-
-template
-constexpr cp_result parse_code_point(Reader reader)
-{
- if constexpr (std::is_same_v)
- {
- if (reader.peek() == Reader::encoding::eof())
- return {{}, cp_error::eof, reader.current()};
-
- auto cur = reader.peek();
- reader.bump();
-
- auto cp = static_cast(cur);
- if (cp <= 0x7F)
- return {cp, cp_error::success, reader.current()};
- else
- return {cp, cp_error::out_of_range, reader.current()};
- }
- else if constexpr (std::is_same_v //
- || std::is_same_v)
- {
- using uchar_t = unsigned char;
- constexpr auto payload_lead1 = 0b0111'1111;
- constexpr auto payload_lead2 = 0b0001'1111;
- constexpr auto payload_lead3 = 0b0000'1111;
- constexpr auto payload_lead4 = 0b0000'0111;
- constexpr auto payload_cont = 0b0011'1111;
-
- constexpr auto pattern_lead1 = 0b0 << 7;
- constexpr auto pattern_lead2 = 0b110 << 5;
- constexpr auto pattern_lead3 = 0b1110 << 4;
- constexpr auto pattern_lead4 = 0b11110 << 3;
- constexpr auto pattern_cont = 0b10 << 6;
-
- auto first = uchar_t(reader.peek());
- if ((first & ~payload_lead1) == pattern_lead1)
- {
- // ASCII character.
- reader.bump();
- return {first, cp_error::success, reader.current()};
- }
- else if ((first & ~payload_cont) == pattern_cont)
- {
- return {{}, cp_error::leads_with_trailing, reader.current()};
- }
- else if ((first & ~payload_lead2) == pattern_lead2)
- {
- reader.bump();
-
- auto second = uchar_t(reader.peek());
- if ((second & ~payload_cont) != pattern_cont)
- return {{}, cp_error::missing_trailing, reader.current()};
- reader.bump();
-
- auto result = char32_t(first & payload_lead2);
- result <<= 6;
- result |= char32_t(second & payload_cont);
-
- // C0 and C1 are overlong ASCII.
- if (first == 0xC0 || first == 0xC1)
- return {result, cp_error::overlong_sequence, reader.current()};
- else
- return {result, cp_error::success, reader.current()};
- }
- else if ((first & ~payload_lead3) == pattern_lead3)
- {
- reader.bump();
-
- auto second = uchar_t(reader.peek());
- if ((second & ~payload_cont) != pattern_cont)
- return {{}, cp_error::missing_trailing, reader.current()};
- reader.bump();
-
- auto third = uchar_t(reader.peek());
- if ((third & ~payload_cont) != pattern_cont)
- return {{}, cp_error::missing_trailing, reader.current()};
- reader.bump();
-
- auto result = char32_t(first & payload_lead3);
- result <<= 6;
- result |= char32_t(second & payload_cont);
- result <<= 6;
- result |= char32_t(third & payload_cont);
-
- auto cp = result;
- if (0xD800 <= cp && cp <= 0xDFFF)
- return {cp, cp_error::surrogate, reader.current()};
- else if (first == 0xE0 && second < 0xA0)
- return {cp, cp_error::overlong_sequence, reader.current()};
- else
- return {cp, cp_error::success, reader.current()};
- }
- else if ((first & ~payload_lead4) == pattern_lead4)
- {
- reader.bump();
-
- auto second = uchar_t(reader.peek());
- if ((second & ~payload_cont) != pattern_cont)
- return {{}, cp_error::missing_trailing, reader.current()};
- reader.bump();
-
- auto third = uchar_t(reader.peek());
- if ((third & ~payload_cont) != pattern_cont)
- return {{}, cp_error::missing_trailing, reader.current()};
- reader.bump();
-
- auto fourth = uchar_t(reader.peek());
- if ((fourth & ~payload_cont) != pattern_cont)
- return {{}, cp_error::missing_trailing, reader.current()};
- reader.bump();
-
- auto result = char32_t(first & payload_lead4);
- result <<= 6;
- result |= char32_t(second & payload_cont);
- result <<= 6;
- result |= char32_t(third & payload_cont);
- result <<= 6;
- result |= char32_t(fourth & payload_cont);
-
- auto cp = result;
- if (cp > 0x10'FFFF)
- return {cp, cp_error::out_of_range, reader.current()};
- else if (first == 0xF0 && second < 0x90)
- return {cp, cp_error::overlong_sequence, reader.current()};
- else
- return {cp, cp_error::success, reader.current()};
- }
- else // FE or FF
- {
- return {{}, cp_error::eof, reader.current()};
- }
- }
- else if constexpr (std::is_same_v)
- {
- constexpr auto payload1 = 0b0000'0011'1111'1111;
- constexpr auto payload2 = payload1;
-
- constexpr auto pattern1 = 0b110110 << 10;
- constexpr auto pattern2 = 0b110111 << 10;
-
- if (reader.peek() == Reader::encoding::eof())
- return {{}, cp_error::eof, reader.current()};
-
- auto first = char16_t(reader.peek());
- if ((first & ~payload1) == pattern1)
- {
- reader.bump();
- if (reader.peek() == Reader::encoding::eof())
- return {{}, cp_error::missing_trailing, reader.current()};
-
- auto second = char16_t(reader.peek());
- if ((second & ~payload2) != pattern2)
- return {{}, cp_error::missing_trailing, reader.current()};
- reader.bump();
-
- // We've got a valid code point.
- auto result = char32_t(first & payload1);
- result <<= 10;
- result |= char32_t(second & payload2);
- result |= 0x10000;
- return {result, cp_error::success, reader.current()};
- }
- else if ((first & ~payload2) == pattern2)
- {
- return {{}, cp_error::leads_with_trailing, reader.current()};
- }
- else
- {
- // Single code unit code point; always valid.
- reader.bump();
- return {first, cp_error::success, reader.current()};
- }
- }
- else if constexpr (std::is_same_v)
- {
- if (reader.peek() == Reader::encoding::eof())
- return {{}, cp_error::eof, reader.current()};
-
- auto cur = reader.peek();
- reader.bump();
-
- auto cp = cur;
- if (cp > 0x10'FFFF)
- return {cp, cp_error::out_of_range, reader.current()};
- else if (0xD800 <= cp && cp <= 0xDFFF)
- return {cp, cp_error::surrogate, reader.current()};
- else
- return {cp, cp_error::success, reader.current()};
- }
- else
- {
- static_assert(lexy::_detail::error,
- "no known code point for this encoding");
- return {};
- }
-}
-
-template
-constexpr void recover_code_point(Reader& reader, cp_result result)
-{
- switch (result.error)
- {
- case cp_error::success:
- // Consume the entire code point.
- reader.reset(result.end);
- break;
- case cp_error::eof:
- // We don't need to do anything to "recover" from EOF.
- break;
-
- case cp_error::leads_with_trailing:
- // Invalid code unit, consume to recover.
- LEXY_PRECONDITION(result.end.position() == reader.position());
- reader.bump();
- break;
-
- case cp_error::missing_trailing:
- case cp_error::surrogate:
- case cp_error::out_of_range:
- case cp_error::overlong_sequence:
- // Consume all the invalid code units to recover.
- reader.reset(result.end);
- break;
- }
-}
-} // namespace lexy::_detail
-
-#endif // LEXY_DETAIL_CODE_POINT_HPP_INCLUDED
-
diff --git a/3rdparty/lexy/include/lexy/_detail/config.hpp b/3rdparty/lexy/include/lexy/_detail/config.hpp
deleted file mode 100644
index 4aa40135b..000000000
--- a/3rdparty/lexy/include/lexy/_detail/config.hpp
+++ /dev/null
@@ -1,199 +0,0 @@
-// Copyright (C) 2020-2024 Jonathan Müller and lexy contributors
-// SPDX-License-Identifier: BSL-1.0
-
-#ifndef LEXY_DETAIL_CONFIG_HPP_INCLUDED
-#define LEXY_DETAIL_CONFIG_HPP_INCLUDED
-
-#include
-#include
-
-#if defined(LEXY_USER_CONFIG_HEADER)
-# include LEXY_USER_CONFIG_HEADER
-#elif defined(__has_include)
-# if __has_include()
-# include
-# elif __has_include("lexy_user_config.hpp")
-# include "lexy_user_config.hpp"
-# endif
-#endif
-
-#ifndef LEXY_HAS_UNICODE_DATABASE
-# define LEXY_HAS_UNICODE_DATABASE 0
-#endif
-
-#ifndef LEXY_EXPERIMENTAL
-# define LEXY_EXPERIMENTAL 0
-#endif
-
-//=== utility traits===//
-#define LEXY_MOV(...) static_cast&&>(__VA_ARGS__)
-#define LEXY_FWD(...) static_cast(__VA_ARGS__)
-
-#define LEXY_DECLVAL(...) lexy::_detail::declval<__VA_ARGS__>()
-
-#define LEXY_DECAY_DECLTYPE(...) std::decay_t
-
-/// Creates a new type from the instantiation of a template.
-/// This is used to shorten type names.
-#define LEXY_INSTANTIATION_NEWTYPE(Name, Templ, ...) \
- struct Name : Templ<__VA_ARGS__> \
- { \
- using Templ<__VA_ARGS__>::Templ; \
- }
-
-namespace lexy::_detail
-{
-template
-constexpr bool error = false;
-
-template
-std::add_rvalue_reference_t declval();
-
-template
-constexpr void swap(T& lhs, T& rhs)
-{
- T tmp = LEXY_MOV(lhs);
- lhs = LEXY_MOV(rhs);
- rhs = LEXY_MOV(tmp);
-}
-
-template
-constexpr bool is_decayed_same = std::is_same_v, std::decay_t>;
-
-template
-using type_or = std::conditional_t, Fallback, T>;
-} // namespace lexy::_detail
-
-//=== NTTP ===//
-#ifndef LEXY_HAS_NTTP
-// See https://github.com/foonathan/lexy/issues/15.
-# if __cpp_nontype_template_parameter_class >= 201806 || __cpp_nontype_template_args >= 201911
-# define LEXY_HAS_NTTP 1
-# else
-# define LEXY_HAS_NTTP 0
-# endif
-#endif
-
-#if LEXY_HAS_NTTP
-# define LEXY_NTTP_PARAM auto
-#else
-# define LEXY_NTTP_PARAM const auto&
-#endif
-
-//=== consteval ===//
-#ifndef LEXY_HAS_CONSTEVAL
-# if defined(_MSC_VER) && !defined(__clang__)
-// Currently can't handle returning strings from consteval, check back later.
-# define LEXY_HAS_CONSTEVAL 0
-# elif __cpp_consteval
-# define LEXY_HAS_CONSTEVAL 1
-# else
-# define LEXY_HAS_CONSTEVAL 0
-# endif
-#endif
-
-#if LEXY_HAS_CONSTEVAL
-# define LEXY_CONSTEVAL consteval
-#else
-# define LEXY_CONSTEVAL constexpr
-#endif
-
-//=== constexpr ===//
-#ifndef LEXY_HAS_CONSTEXPR_DTOR
-# if __cpp_constexpr_dynamic_alloc
-# define LEXY_HAS_CONSTEXPR_DTOR 1
-# else
-# define LEXY_HAS_CONSTEXPR_DTOR 0
-# endif
-#endif
-
-#if LEXY_HAS_CONSTEXPR_DTOR
-# define LEXY_CONSTEXPR_DTOR constexpr
-#else
-# define LEXY_CONSTEXPR_DTOR
-#endif
-
-//=== char8_t ===//
-#ifndef LEXY_HAS_CHAR8_T
-# if __cpp_char8_t
-# define LEXY_HAS_CHAR8_T 1
-# else
-# define LEXY_HAS_CHAR8_T 0
-# endif
-#endif
-
-#if LEXY_HAS_CHAR8_T
-
-# define LEXY_CHAR_OF_u8 char8_t
-# define LEXY_CHAR8_T char8_t
-# define LEXY_CHAR8_STR(Str) u8##Str
-
-#else
-
-namespace lexy
-{
-using _char8_t = unsigned char;
-} // namespace lexy
-
-# define LEXY_CHAR_OF_u8 char
-# define LEXY_CHAR8_T ::lexy::_char8_t
-# define LEXY_CHAR8_STR(Str) \
- LEXY_NTTP_STRING(::lexy::_detail::type_string, u8##Str)::c_str
-
-#endif
-
-//=== endianness ===//
-#ifndef LEXY_IS_LITTLE_ENDIAN
-# if defined(__BYTE_ORDER__)
-# if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
-# define LEXY_IS_LITTLE_ENDIAN 1
-# elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
-# define LEXY_IS_LITTLE_ENDIAN 0
-# else
-# error "unsupported byte order"
-# endif
-# elif defined(_MSC_VER)
-# define LEXY_IS_LITTLE_ENDIAN 1
-# else
-# error "unknown endianness"
-# endif
-#endif
-
-//=== force inline ===//
-#ifndef LEXY_FORCE_INLINE
-# if defined(__has_cpp_attribute)
-# if __has_cpp_attribute(gnu::always_inline)
-# define LEXY_FORCE_INLINE [[gnu::always_inline]]
-# endif
-# endif
-#
-# ifndef LEXY_FORCE_INLINE
-# define LEXY_FORCE_INLINE inline
-# endif
-#endif
-
-//=== empty_member ===//
-#ifndef LEXY_EMPTY_MEMBER
-
-# if defined(__has_cpp_attribute)
-# if defined(__GNUC__) && !defined(__clang__) && __GNUC__ <= 11
-// GCC <= 11 has buggy support, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101040
-# define LEXY_HAS_EMPTY_MEMBER 0
-# elif __has_cpp_attribute(no_unique_address)
-# define LEXY_HAS_EMPTY_MEMBER 1
-# endif
-# endif
-# ifndef LEXY_HAS_EMPTY_MEMBER
-# define LEXY_HAS_EMPTY_MEMBER 0
-# endif
-
-# if LEXY_HAS_EMPTY_MEMBER
-# define LEXY_EMPTY_MEMBER [[no_unique_address]]
-# else
-# define LEXY_EMPTY_MEMBER
-# endif
-
-#endif
-
-#endif // LEXY_DETAIL_CONFIG_HPP_INCLUDED
-
diff --git a/3rdparty/lexy/include/lexy/_detail/detect.hpp b/3rdparty/lexy/include/lexy/_detail/detect.hpp
deleted file mode 100644
index 7534c44c4..000000000
--- a/3rdparty/lexy/include/lexy/_detail/detect.hpp
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright (C) 2020-2024 Jonathan Müller and lexy contributors
-// SPDX-License-Identifier: BSL-1.0
-
-#ifndef LEXY_DETAIL_DETECT_HPP_INCLUDED
-#define LEXY_DETAIL_DETECT_HPP_INCLUDED
-
-#include
-
-namespace lexy::_detail
-{
-template
-using void_t = void;
-
-template typename Op, typename Void, typename... Args>
-struct _detector : std::false_type
-{
- template
- using type_or = Fallback;
-};
-template typename Op, typename... Args>
-struct _detector>, Args...> : std::true_type
-{
- template
- using type_or = Op;
-};
-
-template typename Op, typename... Args>
-constexpr bool is_detected = _detector::value;
-
-template typename Op, typename... Args>
-using detected_or = typename _detector::template type_or;
-} // namespace lexy::_detail
-
-#endif // LEXY_DETAIL_DETECT_HPP_INCLUDED
-
diff --git a/3rdparty/lexy/include/lexy/_detail/integer_sequence.hpp b/3rdparty/lexy/include/lexy/_detail/integer_sequence.hpp
deleted file mode 100644
index 36e3cb08c..000000000
--- a/3rdparty/lexy/include/lexy/_detail/integer_sequence.hpp
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright (C) 2020-2024 Jonathan Müller and lexy contributors
-// SPDX-License-Identifier: BSL-1.0
-
-#ifndef LEXY_DETAIL_INTEGER_SEQUENCE_HPP_INCLUDED
-#define LEXY_DETAIL_INTEGER_SEQUENCE_HPP_INCLUDED
-
-#include
-
-namespace lexy::_detail
-{
-template
-struct integer_sequence
-{
- using type = integer_sequence;
-};
-template
-using index_sequence = integer_sequence;
-
-#if defined(__clang__)
-template
-using make_index_sequence = __make_integer_seq;
-#elif defined(__GNUC__) && __GNUC__ >= 8
-template
-using make_index_sequence = index_sequence<__integer_pack(Size)...>;
-#elif defined(_MSC_VER)
-template
-using make_index_sequence = __make_integer_seq;
-#else
-
-// Adapted from https://stackoverflow.com/a/32223343.
-template
-struct concat_seq;
-template
-struct concat_seq, index_sequence>
-{
- using type = index_sequence;
-};
-
-template
-struct _make_index_sequence : concat_seq::type,
- typename _make_index_sequence::type>
-{};
-template <>
-struct _make_index_sequence<0>
-{
- using type = index_sequence<>;
-};
-template <>
-struct _make_index_sequence<1>
-{
- using type = index_sequence<0>;
-};
-
-template
-using make_index_sequence = typename _make_index_sequence::type;
-
-#endif
-
-template
-using index_sequence_for = make_index_sequence;
-} // namespace lexy::_detail
-
-#endif // LEXY_DETAIL_INTEGER_SEQUENCE_HPP_INCLUDED
-
diff --git a/3rdparty/lexy/include/lexy/_detail/invoke.hpp b/3rdparty/lexy/include/lexy/_detail/invoke.hpp
deleted file mode 100644
index 8604e582e..000000000
--- a/3rdparty/lexy/include/lexy/_detail/invoke.hpp
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright (C) 2020-2024 Jonathan Müller and lexy contributors
-// SPDX-License-Identifier: BSL-1.0
-
-#ifndef LEXY_DETAIL_INVOKE_HPP_INCLUDED
-#define LEXY_DETAIL_INVOKE_HPP_INCLUDED
-
-#include
-
-namespace lexy::_detail
-{
-template >
-struct _mem_invoker;
-template
-struct _mem_invoker
-{
- static constexpr decltype(auto) invoke(R ClassT::*f, ClassT& object)
- {
- return object.*f;
- }
- static constexpr decltype(auto) invoke(R ClassT::*f, const ClassT& object)
- {
- return object.*f;
- }
-
- template
- static constexpr auto invoke(R ClassT::*f, Ptr&& ptr) -> decltype((*LEXY_FWD(ptr)).*f)
- {
- return (*LEXY_FWD(ptr)).*f;
- }
-};
-template
-struct _mem_invoker
-{
- template
- static constexpr auto _invoke(int, F ClassT::*f, ObjectT&& object, Args&&... args)
- -> decltype((LEXY_FWD(object).*f)(LEXY_FWD(args)...))
- {
- return (LEXY_FWD(object).*f)(LEXY_FWD(args)...);
- }
- template
- static constexpr auto _invoke(short, F ClassT::*f, PtrT&& ptr, Args&&... args)
- -> decltype(((*LEXY_FWD(ptr)).*f)(LEXY_FWD(args)...))
- {
- return ((*LEXY_FWD(ptr)).*f)(LEXY_FWD(args)...);
- }
-
- template
- static constexpr auto invoke(F ClassT::*f, Args&&... args)
- -> decltype(_invoke(0, f, LEXY_FWD(args)...))
- {
- return _invoke(0, f, LEXY_FWD(args)...);
- }
-};
-
-template
-constexpr auto invoke(F ClassT::*f, Args&&... args)
- -> decltype(_mem_invoker::invoke(f, LEXY_FWD(args)...))
-{
- return _mem_invoker::invoke(f, LEXY_FWD(args)...);
-}
-
-template
-constexpr auto invoke(F&& f, Args&&... args) -> decltype(LEXY_FWD(f)(LEXY_FWD(args)...))
-{
- return LEXY_FWD(f)(LEXY_FWD(args)...);
-}
-} // namespace lexy::_detail
-
-#endif // LEXY_DETAIL_INVOKE_HPP_INCLUDED
-
diff --git a/3rdparty/lexy/include/lexy/_detail/iterator.hpp b/3rdparty/lexy/include/lexy/_detail/iterator.hpp
deleted file mode 100644
index 42ec995a4..000000000
--- a/3rdparty/lexy/include/lexy/_detail/iterator.hpp
+++ /dev/null
@@ -1,244 +0,0 @@
-// Copyright (C) 2020-2024 Jonathan Müller and lexy contributors
-// SPDX-License-Identifier: BSL-1.0
-
-#ifndef LEXY_DETAIL_ITERATOR_HPP_INCLUDED
-#define LEXY_DETAIL_ITERATOR_HPP_INCLUDED
-
-#include
-#include
-#include
-#include
-
-//=== iterator algorithms ===//
-namespace lexy::_detail
-{
-// Can't use std::is_base_of_v without including .
-template
-using _detect_random_access = decltype(LEXY_DECLVAL(Iterator) - LEXY_DECLVAL(Iterator));
-template
-constexpr auto is_random_access_iterator = is_detected<_detect_random_access, Iterator>;
-
-template
-constexpr std::size_t range_size(Iterator begin, Sentinel end)
-{
- if constexpr (std::is_same_v && is_random_access_iterator)
- {
- return static_cast(end - begin);
- }
- else
- {
- std::size_t result = 0;
- for (auto cur = begin; cur != end; ++cur)
- ++result;
- return result;
- }
-}
-
-template
-constexpr Iterator next(Iterator iter)
-{
- return ++iter;
-}
-template
-constexpr Iterator next(Iterator iter, std::size_t n)
-{
- if constexpr (is_random_access_iterator)
- {
- return iter + n;
- }
- else
- {
- for (auto i = 0u; i != n; ++i)
- ++iter;
- return iter;
- }
-}
-
-template
-constexpr Iterator next_clamped(Iterator iter, std::size_t n, Sentinel end)
-{
- if constexpr (is_random_access_iterator && std::is_same_v)
- {
- auto remaining = std::size_t(end - iter);
- if (remaining < n)
- return end;
- else
- return iter + n;
- }
- else
- {
- for (auto i = 0u; i != n; ++i)
- {
- if (iter == end)
- break;
- ++iter;
- }
- return iter;
- }
-}
-
-// Used for assertions.
-template
-constexpr bool precedes([[maybe_unused]] Iterator first, [[maybe_unused]] Sentinel after)
-{
- if constexpr (is_random_access_iterator && std::is_same_v)
- return first <= after;
- else
- return true;
-}
-
-// Requires: begin <= end_a && begin <= end_b.
-// Returns min(end_a, end_b).
-template
-constexpr Iterator min_range_end(Iterator begin, Iterator end_a, Iterator end_b)
-{
- if constexpr (is_random_access_iterator)
- {
- LEXY_PRECONDITION(begin <= end_a && begin <= end_b);
- if (end_a <= end_b)
- return end_a;
- else
- return end_b;
- }
- else
- {
- auto cur = begin;
- while (cur != end_a && cur != end_b)
- ++cur;
- return cur;
- }
-}
-
-// Requires: begin <= end_a && begin <= end_b.
-// Returns max(end_a, end_b).
-template
-constexpr Iterator max_range_end(Iterator begin, Iterator end_a, Iterator end_b)
-{
- if constexpr (is_random_access_iterator)
- {
- LEXY_PRECONDITION(begin <= end_a && begin <= end_b);
- if (end_a <= end_b)
- return end_b;
- else
- return end_a;
- }
- else
- {
- auto cur = begin;
- while (true)
- {
- if (cur == end_a)
- return end_b;
- else if (cur == end_b)
- return end_a;
-
- ++cur;
- }
- return begin; // unreachable
- }
-}
-} // namespace lexy::_detail
-
-//=== facade classes ===//
-namespace lexy::_detail
-{
-template
-struct _proxy_pointer
-{
- T value;
-
- constexpr T* operator->() noexcept
- {
- return &value;
- }
-};
-
-template
-struct forward_iterator_base
-{
- using value_type = std::remove_cv_t;
- using reference = Reference;
- using pointer = lexy::_detail::type_or>;
- using difference_type = std::ptrdiff_t;
- using iterator_category = std::forward_iterator_tag;
-
- constexpr reference operator*() const noexcept
- {
- return static_cast(*this).deref();
- }
- constexpr pointer operator->() const noexcept
- {
- if constexpr (std::is_void_v)
- return pointer{**this};
- else
- return &**this;
- }
-
- constexpr Derived& operator++() noexcept
- {
- auto& derived = static_cast(*this);
- derived.increment();
- return derived;
- }
- constexpr Derived operator++(int) noexcept
- {
- auto& derived = static_cast(*this);
- auto copy = derived;
- derived.increment();
- return copy;
- }
-
- friend constexpr bool operator==(const Derived& lhs, const Derived& rhs)
- {
- return lhs.equal(rhs);
- }
- friend constexpr bool operator!=(const Derived& lhs, const Derived& rhs)
- {
- return !lhs.equal(rhs);
- }
-};
-
-template
-struct bidirectional_iterator_base : forward_iterator_base
-{
- using iterator_category = std::bidirectional_iterator_tag;
-
- constexpr Derived& operator--() noexcept
- {
- auto& derived = static_cast(*this);
- derived.decrement();
- return derived;
- }
- constexpr Derived operator--(int) noexcept
- {
- auto& derived = static_cast(*this);
- auto copy = derived;
- derived.decrement();
- return copy;
- }
-};
-
-template
-struct sentinel_base
-{
- friend constexpr bool operator==(const Iterator& lhs, Derived) noexcept
- {
- return lhs.is_end();
- }
- friend constexpr bool operator!=(const Iterator& lhs, Derived) noexcept
- {
- return !(lhs == Derived{});
- }
- friend constexpr bool operator==(Derived, const Iterator& rhs) noexcept
- {
- return rhs == Derived{};
- }
- friend constexpr bool operator!=(Derived, const Iterator& rhs) noexcept
- {
- return !(rhs == Derived{});
- }
-};
-} // namespace lexy::_detail
-
-#endif // LEXY_DETAIL_ITERATOR_HPP_INCLUDED
-
diff --git a/3rdparty/lexy/include/lexy/_detail/lazy_init.hpp b/3rdparty/lexy/include/lexy/_detail/lazy_init.hpp
deleted file mode 100644
index 29fcfa308..000000000
--- a/3rdparty/lexy/include/lexy/_detail/lazy_init.hpp
+++ /dev/null
@@ -1,246 +0,0 @@
-// Copyright (C) 2020-2024 Jonathan Müller and lexy contributors
-// SPDX-License-Identifier: BSL-1.0
-
-#ifndef LEXY_DETAIL_LAZY_INIT_HPP_INCLUDED
-#define LEXY_DETAIL_LAZY_INIT_HPP_INCLUDED
-
-#include
-#include
-#include
-
-namespace lexy::_detail
-{
-template
-struct _lazy_init_storage_trivial
-{
- bool _init;
- union
- {
- char _empty;
- T _value;
- };
-
- constexpr _lazy_init_storage_trivial() noexcept : _init(false), _empty() {}
-
- template
- constexpr _lazy_init_storage_trivial(int, Args&&... args)
- : _init(true), _value(LEXY_FWD(args)...)
- {}
-
- template
- constexpr void _construct(Args&&... args)
- {
- *this = _lazy_init_storage_trivial(0, LEXY_FWD(args)...);
- }
-};
-
-template
-struct _lazy_init_storage_non_trivial
-{
- bool _init;
- union
- {
- char _empty;
- T _value;
- };
-
- constexpr _lazy_init_storage_non_trivial() noexcept : _init(false), _empty() {}
-
- template
- LEXY_CONSTEXPR_DTOR void _construct(Args&&... args)
- {
- _detail::construct_at(&_value, LEXY_FWD(args)...);
- _init = true;
- }
-
- // Cannot add noexcept due to https://github.com/llvm/llvm-project/issues/59854.
- LEXY_CONSTEXPR_DTOR ~_lazy_init_storage_non_trivial() /* noexcept */
- {
- if (_init)
- _value.~T();
- }
-
- LEXY_CONSTEXPR_DTOR _lazy_init_storage_non_trivial(
- _lazy_init_storage_non_trivial&& other) noexcept
- : _init(other._init), _empty()
- {
- if (_init)
- _detail::construct_at(&_value, LEXY_MOV(other._value));
- }
-
- LEXY_CONSTEXPR_DTOR _lazy_init_storage_non_trivial& operator=(
- _lazy_init_storage_non_trivial&& other) noexcept
- {
- if (_init && other._init)
- _value = LEXY_MOV(other._value);
- else if (_init && !other._init)
- {
- _value.~T();
- _init = false;
- }
- else if (!_init && other._init)
- {
- _detail::construct_at(&_value, LEXY_MOV(other._value));
- _init = true;
- }
- else
- {
- // Both not initialized, nothing to do.
- }
-
- return *this;
- }
-};
-
-template
-constexpr auto _lazy_init_trivial = [] {
- // https://www.foonathan.net/2021/03/trivially-copyable/
- return std::is_trivially_destructible_v //
- && std::is_trivially_copy_constructible_v //
- && std::is_trivially_copy_assignable_v //
- && std::is_trivially_move_constructible_v //
- && std::is_trivially_move_assignable_v;
-}();
-template
-using _lazy_init_storage = std::conditional_t<_lazy_init_trivial, _lazy_init_storage_trivial,
- _lazy_init_storage_non_trivial>;
-
-template
-class lazy_init : _lazy_init_storage
-{
-public:
- using value_type = T;
-
- constexpr lazy_init() noexcept = default;
-
- template
- constexpr T& emplace(Args&&... args)
- {
- if (*this)
- this->_value = T(LEXY_FWD(args)...);
- else
- this->_construct(LEXY_FWD(args)...);
-
- return this->_value;
- }
-
- template
- constexpr T& emplace_result(Fn&& fn, Args&&... args)
- {
- return emplace(LEXY_FWD(fn)(LEXY_FWD(args)...));
- }
-
- constexpr explicit operator bool() const noexcept
- {
- return this->_init;
- }
-
- constexpr T& operator*() & noexcept
- {
- LEXY_PRECONDITION(*this);
- return this->_value;
- }
- constexpr const T& operator*() const& noexcept
- {
- LEXY_PRECONDITION(*this);
- return this->_value;
- }
- constexpr T&& operator*() && noexcept
- {
- LEXY_PRECONDITION(*this);
- return LEXY_MOV(this->_value);
- }
- constexpr const T&& operator*() const&& noexcept
- {
- LEXY_PRECONDITION(*this);
- return LEXY_MOV(this->_value);
- }
-
- constexpr T* operator->() noexcept
- {
- LEXY_PRECONDITION(*this);
- return &this->_value;
- }
- constexpr const T* operator->() const noexcept
- {
- LEXY_PRECONDITION(*this);
- return &this->_value;
- }
-
-private:
- template
- constexpr explicit lazy_init(int, Args&&... args) noexcept
- : _lazy_init_storage(0, LEXY_FWD(args)...)
- {}
-};
-template
-class lazy_init
-{
-public:
- using value_type = T&;
-
- constexpr lazy_init() noexcept : _ptr(nullptr) {}
-
- constexpr T& emplace(T& ref)
- {
- _ptr = &ref;
- return ref;
- }
-
- template
- constexpr T& emplace_result(Fn&& fn, Args&&... args)
- {
- return emplace(LEXY_FWD(fn)(LEXY_FWD(args)...));
- }
-
- constexpr explicit operator bool() const noexcept
- {
- return _ptr != nullptr;
- }
-
- constexpr T& operator*() const noexcept
- {
- LEXY_PRECONDITION(*this);
- return *_ptr;
- }
-
- constexpr T* operator->() const noexcept
- {
- LEXY_PRECONDITION(*this);
- return _ptr;
- }
-
-private:
- T* _ptr;
-};
-template <>
-class lazy_init
-{
-public:
- using value_type = void;
-
- constexpr lazy_init() noexcept : _init(false) {}
-
- constexpr void emplace()
- {
- _init = true;
- }
- template
- constexpr void emplace_result(Fn&& fn, Args&&... args)
- {
- LEXY_FWD(fn)(LEXY_FWD(args)...);
- _init = true;
- }
-
- constexpr explicit operator bool() const noexcept
- {
- return _init;
- }
-
-private:
- bool _init;
-};
-} // namespace lexy::_detail
-
-#endif // LEXY_DETAIL_LAZY_INIT_HPP_INCLUDED
-
diff --git a/3rdparty/lexy/include/lexy/_detail/memory_resource.hpp b/3rdparty/lexy/include/lexy/_detail/memory_resource.hpp
deleted file mode 100644
index 324a96c84..000000000
--- a/3rdparty/lexy/include/lexy/_detail/memory_resource.hpp
+++ /dev/null
@@ -1,152 +0,0 @@
-// Copyright (C) 2020-2024 Jonathan Müller and lexy contributors
-// SPDX-License-Identifier: BSL-1.0
-
-#ifndef LEXY_DETAIL_MEMORY_RESOURCE_HPP_INCLUDED
-#define LEXY_DETAIL_MEMORY_RESOURCE_HPP_INCLUDED
-
-#include
-#include
-#include
-#include
-
-#if 0
-// Subset of the interface of std::pmr::memory_resource.
-class MemoryResource
-{
-public:
- void* allocate(std::size_t bytes, std::size_t alignment);
- void deallocate(void* ptr, std::size_t bytes, std::size_t alignment);
-
- friend bool operator==(const MemoryResource& lhs, const MemoryResource& rhs);
-};
-#endif
-
-namespace lexy::_detail
-{
-class default_memory_resource
-{
-public:
- static void* allocate(std::size_t bytes, std::size_t alignment)
- {
- if (alignment > __STDCPP_DEFAULT_NEW_ALIGNMENT__)
- return ::operator new(bytes, std::align_val_t{alignment});
- else
- return ::operator new(bytes);
- }
-
- static void deallocate(void* ptr, std::size_t bytes, std::size_t alignment) noexcept
- {
-#if LEXY_ENABLE_ASSERT
- // In debug mode, we fill freed memory with 0xFF to detect dangling lexemes.
- // For default, ASCII, bytes, this is just a noticable value.
- // For UTF-8, this is the EOF integer value as its an invalid code unit.
- // For UTF-16, this is the code point 0xFFFF, which is the replacement character.
- // For UTF-32, this is an out of range code point.
- std::memset(ptr, 0xFF, bytes);
-#endif
-
-#ifdef __cpp_sized_deallocation
- if (alignment > __STDCPP_DEFAULT_NEW_ALIGNMENT__)
- ::operator delete(ptr, bytes, std::align_val_t{alignment});
- else
- ::operator delete(ptr, bytes);
-#else
- (void)bytes;
-
- if (alignment > __STDCPP_DEFAULT_NEW_ALIGNMENT__)
- ::operator delete(ptr, std::align_val_t{alignment});
- else
- ::operator delete(ptr);
-#endif
- }
-
- friend constexpr bool operator==(default_memory_resource, default_memory_resource) noexcept
- {
- return true;
- }
-};
-} // namespace lexy::_detail
-
-namespace lexy::_detail
-{
-template
-class _memory_resource_ptr_empty
-{
-public:
- constexpr explicit _memory_resource_ptr_empty(MemoryResource*) noexcept {}
- constexpr explicit _memory_resource_ptr_empty(void*) noexcept {}
-
- constexpr auto operator*() const noexcept
- {
- return MemoryResource{};
- }
-
- constexpr auto operator->() const noexcept
- {
- struct proxy
- {
- MemoryResource _resource;
-
- constexpr MemoryResource* operator->() noexcept
- {
- return &_resource;
- }
- };
-
- return proxy{};
- }
-
- constexpr MemoryResource* get() const noexcept
- {
- return nullptr;
- }
-};
-
-template
-class _memory_resource_ptr
-{
-public:
- constexpr explicit _memory_resource_ptr(MemoryResource* resource) noexcept : _resource(resource)
- {
- LEXY_PRECONDITION(resource);
- }
-
- constexpr MemoryResource& operator*() const noexcept
- {
- return *_resource;
- }
-
- constexpr MemoryResource* operator->() const noexcept
- {
- return _resource;
- }
-
- constexpr MemoryResource* get() const noexcept
- {
- return _resource;
- }
-
-private:
- MemoryResource* _resource;
-};
-
-// clang-format off
-template
-using memory_resource_ptr
- = std::conditional_t,
- _memory_resource_ptr_empty,
- std::conditional_t,
- _memory_resource_ptr_empty,
- _memory_resource_ptr>>;
-// clang-format on
-
-template
- || std::is_empty_v>>
-constexpr MemoryResource* get_memory_resource()
-{
- return nullptr;
-}
-} // namespace lexy::_detail
-
-#endif // LEXY_DETAIL_MEMORY_RESOURCE_HPP_INCLUDED
-
diff --git a/3rdparty/lexy/include/lexy/_detail/nttp_string.hpp b/3rdparty/lexy/include/lexy/_detail/nttp_string.hpp
deleted file mode 100644
index 7301914a8..000000000
--- a/3rdparty/lexy/include/lexy/_detail/nttp_string.hpp
+++ /dev/null
@@ -1,147 +0,0 @@
-// Copyright (C) 2020-2024 Jonathan Müller and lexy contributors
-// SPDX-License-Identifier: BSL-1.0
-
-#ifndef LEXY_DETAIL_NTTP_STRING_HPP_INCLUDED
-#define LEXY_DETAIL_NTTP_STRING_HPP_INCLUDED
-
-#include
-#include
-#include
-
-namespace lexy::_detail
-{
-// Note: we can't use type_string, it doesn't work on older GCC.
-template
-struct type_string
-{
- using char_type = CharT;
-
- template typename T>
- using rename = T;
-
- static constexpr auto size = sizeof...(Cs);
-
- template
- static constexpr T c_str[sizeof...(Cs) + 1] = {transcode_char(Cs)..., T()};
-};
-} // namespace lexy::_detail
-
-#if LEXY_HAS_NTTP // string NTTP implementation
-
-# include
-
-namespace lexy::_detail
-{
-template
-struct string_literal
-{
- CharT data[N];
-
- using char_type = CharT;
-
- LEXY_CONSTEVAL string_literal(const CharT* str) : data{}
- {
- for (auto i = 0u; i != N; ++i)
- data[i] = str[i];
- }
- LEXY_CONSTEVAL string_literal(CharT c) : data{}
- {
- data[0] = c;
- }
-
- static LEXY_CONSTEVAL auto size()
- {
- return N;
- }
-};
-template
-string_literal(const CharT (&)[N]) -> string_literal;
-template
-string_literal(CharT) -> string_literal<1, CharT>;
-
-template typename T, string_literal Str, std::size_t... Idx>
-auto _to_type_string(index_sequence)
-{
- return T{};
-}
-template typename T, string_literal Str>
-using to_type_string
- = decltype(_to_type_string(make_index_sequence{}));
-} // namespace lexy::_detail
-
-# define LEXY_NTTP_STRING(T, Str) \
- ::lexy::_detail::to_type_string
-
-#elif defined(__GNUC__) // literal implementation
-
-# pragma GCC diagnostic push
-# pragma GCC diagnostic ignored "-Wpedantic"
-# ifdef __clang__
-# pragma GCC diagnostic ignored "-Wgnu-string-literal-operator-template"
-# endif
-
-template
-constexpr ::lexy::_detail::type_string operator""_lexy_string_udl()
-{
- return {};
-}
-
-# define LEXY_NTTP_STRING(T, Str) decltype(Str##_lexy_string_udl)::rename
-
-# pragma GCC diagnostic pop
-
-#else // string macro implementation
-
-namespace lexy::_detail
-{
-template
-struct cat_;
-template
-struct cat_, type_string>
-{
- using type = type_string;
-};
-template
-using cat = typename cat_::type;
-
-template typename T, typename TypeString, std::size_t Size,
- std::size_t MaxSize>
-struct macro_type_string
-{
- static_assert(Size <= MaxSize, "string out of range");
- using type = typename TypeString::template rename;
-};
-
-} // namespace lexy::_detail
-
-# define LEXY_NTTP_STRING_LENGTH(Str) (sizeof(Str) / sizeof(Str[0]) - 1)
-
-// extract Ith character if not out of bounds
-# define LEXY_NTTP_STRING1(Str, I) \
- ::std::conditional_t< \
- (I < LEXY_NTTP_STRING_LENGTH(Str)), \
- ::lexy::_detail::type_string<::LEXY_DECAY_DECLTYPE(Str[0]), \
- (I >= LEXY_NTTP_STRING_LENGTH(Str) ? Str[0] : Str[I])>, \
- ::lexy::_detail::type_string<::LEXY_DECAY_DECLTYPE(Str[0])>>
-
-// recursively split the string in two
-# define LEXY_NTTP_STRING2(Str, I) \
- ::lexy::_detail::cat
-# define LEXY_NTTP_STRING4(Str, I) \
- ::lexy::_detail::cat
-# define LEXY_NTTP_STRING8(Str, I) \
- ::lexy::_detail::cat
-# define LEXY_NTTP_STRING16(Str, I) \
- ::lexy::_detail::cat
-# define LEXY_NTTP_STRING32(Str, I) \
- ::lexy::_detail::cat
-
-// instantiate with overflow check
-# define LEXY_NTTP_STRING(T, Str) \
- ::lexy::_detail::macro_type_string::type
-
-#endif
-
-#endif // LEXY_DETAIL_NTTP_STRING_HPP_INCLUDED
-
diff --git a/3rdparty/lexy/include/lexy/_detail/stateless_lambda.hpp b/3rdparty/lexy/include/lexy/_detail/stateless_lambda.hpp
deleted file mode 100644
index 63c8dc7e5..000000000
--- a/3rdparty/lexy/include/lexy/_detail/stateless_lambda.hpp
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright (C) 2020-2024 Jonathan Müller and lexy contributors
-// SPDX-License-Identifier: BSL-1.0
-
-#ifndef LEXY_DETAIL_STATELESS_LAMBDA_HPP_INCLUDED
-#define LEXY_DETAIL_STATELESS_LAMBDA_HPP_INCLUDED
-
-#include
-
-namespace lexy::_detail
-{
-template
-struct stateless_lambda
-{
- static_assert(std::is_class_v);
- static_assert(std::is_empty_v);
-
- static constexpr Lambda get()
- {
- if constexpr (std::is_default_constructible_v)
- {
- // We're using C++20, lambdas are default constructible.
- return Lambda();
- }
- else
- {
- // We're not having C++20; use a sequence of weird workarounds to legally construct a
- // Lambda object without invoking any constructors.
- // This works and is well-defined, but sadly not constexpr.
- // Taken from: https://www.youtube.com/watch?v=yTb6xz_FSkY
-
- // We're defining two standard layout types that have a char as a common initial
- // sequence (as the Lambda is empty, it doesn't add anymore members to B).
- struct A
- {
- char member;
- };
- struct B : Lambda
- {
- char member;
- };
- static_assert(std::is_standard_layout_v && std::is_standard_layout_v);
-
- // We put the two types in a union and initialize the a member, which we can do.
- union storage_t
- {
- A a;
- B b;
- } storage{};
-
- // We can now take the address of member via b, as it is in the common initial sequence.
- auto char_ptr = &storage.b.member;
- // char_ptr is a pointer to the first member of B, so we can reinterpret_cast it to a
- // pointer to B.
- auto b_ptr = reinterpret_cast(char_ptr);
- // Now we're having a pointer to a B object, which can we can cast to the base class
- // Lambda.
- auto lambda_ptr = static_cast(b_ptr);
- // Dereference the pointer to get the lambda object.
- return *lambda_ptr;
- }
- }
-
- template
- constexpr decltype(auto) operator()(Args&&... args) const
- {
- return get()(LEXY_FWD(args)...);
- }
-};
-} // namespace lexy::_detail
-
-#endif // LEXY_DETAIL_STATELESS_LAMBDA_HPP_INCLUDED
-
diff --git a/3rdparty/lexy/include/lexy/_detail/std.hpp b/3rdparty/lexy/include/lexy/_detail/std.hpp
deleted file mode 100644
index bb3381f08..000000000
--- a/3rdparty/lexy/include/lexy/_detail/std.hpp
+++ /dev/null
@@ -1,98 +0,0 @@
-// Copyright (C) 2020-2024 Jonathan Müller and lexy contributors
-// SPDX-License-Identifier: BSL-1.0
-
-#ifndef LEXY_DETAIL_STD_HPP_INCLUDED
-#define LEXY_DETAIL_STD_HPP_INCLUDED
-
-#include
-
-//=== iterator tags ===//
-#if defined(__GLIBCXX__)
-
-namespace std
-{
-_GLIBCXX_BEGIN_NAMESPACE_VERSION
-struct forward_iterator_tag;
-struct bidirectional_iterator_tag;
-_GLIBCXX_END_NAMESPACE_VERSION
-} // namespace std
-
-#elif defined(_LIBCPP_VERSION)
-
-_LIBCPP_BEGIN_NAMESPACE_STD
-struct forward_iterator_tag;
-struct bidirectional_iterator_tag;
-_LIBCPP_END_NAMESPACE_STD
-
-#else
-
-// Forward declaring things in std is not allowed, but I'm willing to take the risk.
-
-namespace std
-{
-struct forward_iterator_tag;
-struct bidirectional_iterator_tag;
-} // namespace std
-
-#endif
-
-//=== (constexpr) construct_at ===//
-#if !LEXY_HAS_CONSTEXPR_DTOR
-
-namespace lexy::_detail
-{
-// We don't have constexpr dtor's, so this is just a regular function.
-template
-T* construct_at(T* ptr, Args&&... args)
-{
- return ::new ((void*)ptr) T(LEXY_FWD(args)...);
-}
-} // namespace lexy::_detail
-
-#elif defined(_MSC_VER)
-
-namespace lexy::_detail
-{
-// MSVC can make it constexpr if marked with an attribute given by a macro.
-template
-constexpr T* construct_at(T* ptr, Args&&... args)
-{
-# if defined(_MSVC_CONSTEXPR)
- _MSVC_CONSTEXPR
-# endif
- return ::new ((void*)ptr) T(LEXY_FWD(args)...);
-}
-} // namespace lexy::_detail
-
-#else
-
-namespace lexy::_detail
-{
-struct _construct_at_tag
-{};
-} // namespace lexy::_detail
-
-namespace std
-{
-// GCC only allows constexpr placement new inside a function called `std::construct_at`.
-// So we write our own.
-template
-constexpr T* construct_at(lexy::_detail::_construct_at_tag, T* ptr, Args&&... args)
-{
- return ::new ((void*)ptr) T(LEXY_FWD(args)...);
-}
-} // namespace std
-
-namespace lexy::_detail
-{
-template
-constexpr T* construct_at(T* ptr, Args&&... args)
-{
- return std::construct_at(lexy::_detail::_construct_at_tag{}, ptr, LEXY_FWD(args)...);
-}
-} // namespace lexy::_detail
-
-#endif
-
-#endif // LEXY_DETAIL_STD_HPP_INCLUDED
-
diff --git a/3rdparty/lexy/include/lexy/_detail/string_view.hpp b/3rdparty/lexy/include/lexy/_detail/string_view.hpp
deleted file mode 100644
index 41d42bc42..000000000
--- a/3rdparty/lexy/include/lexy/_detail/string_view.hpp
+++ /dev/null
@@ -1,212 +0,0 @@
-// Copyright (C) 2020-2024 Jonathan Müller and lexy contributors
-// SPDX-License-Identifier: BSL-1.0
-
-#ifndef LEXY_DETAIL_STRING_VIEW_HPP_INCLUDED
-#define LEXY_DETAIL_STRING_VIEW_HPP_INCLUDED
-
-#include
-#include
-#include