From 58df868b2fa6fdcfad160d0394de955d87933c5b Mon Sep 17 00:00:00 2001 From: Alex Tsvetanov Date: Sun, 30 Jun 2024 01:28:02 +0300 Subject: [PATCH 01/19] Clean up and start over - properties - rules --- .gitignore | 10 +- CMakeLists.txt | 24 +- README.md | 27 +- example/ORM.cpp | 64 +- example/users/users.hpp | 94 +- lib/CMakeLists.txt | 54 +- lib/include/ORM/CRUD/delete.hpp | 128 - lib/include/ORM/CRUD/insert.hpp | 31 - lib/include/ORM/CRUD/select.hpp | 117 - lib/include/ORM/CRUD/update.hpp | 146 - lib/include/ORM/CRUD/utils.hpp | 333 - lib/include/ORM/ORM.hpp | 48 +- lib/include/ORM/db/connectors/MockDB/data.hpp | 11 - lib/include/ORM/db/connectors/MockDB/init.hpp | 538 - lib/include/ORM/db/connectors/interface.hpp | 94 - lib/include/ORM/db/types/db_type_wrappers.hpp | 299 - .../ORM/db/types/primitive_type_wrapper.hpp | 286 - lib/include/ORM/details/fundamental_type.hpp | 19 - lib/include/ORM/details/member_pointer.hpp | 301 - lib/include/ORM/details/orm_tuple.hpp | 294 - lib/include/ORM/details/result_type.hpp | 61 - lib/include/ORM/details/string_literal.hpp | 47 - lib/include/ORM/details/warnings.hpp | 35 - lib/include/ORM/fields.hpp | 152 - lib/include/ORM/forward-decl.hpp | 15 + lib/include/ORM/join_rule.hpp | 104 - lib/include/ORM/limits.hpp | 33 - lib/include/ORM/rules.hpp | 27 - lib/include/ORM/std/string_view | 1778 -- lib/include/ORM/table.hpp | 59 - lib/include/ORM/tools/property.hpp | 33 + lib/include/ORM/tools/rule.hpp | 40 + lib/include/ORM/tools/string_literal.hpp | 42 + lib/include/ORM/utils/concept.hpp | 31 + lib/include/ORM/utils/mem_ptr_utils.hpp | 11 + lib/include/ORM/utils/mem_ptr_wrapper.hpp | 43 + lib/include/ORM/utils/placeholder.hpp | 39 + lib/include/ORM/utils/query_input_data.hpp | 20 + lib/include/ORM/utils/rule_operators.hpp | 17 + lib/include/ORM/wrappers/db_types.hpp | 144 + lib/pfr/include/pfr.hpp | 24 - lib/pfr/include/pfr/config.hpp | 121 - lib/pfr/include/pfr/core.hpp | 249 - .../pfr/detail/cast_to_layout_compatible.hpp | 76 - lib/pfr/include/pfr/detail/config.hpp | 25 - lib/pfr/include/pfr/detail/core.hpp | 24 - lib/pfr/include/pfr/detail/core14_classic.hpp | 681 - .../include/pfr/detail/core14_loophole.hpp | 189 - lib/pfr/include/pfr/detail/core17.hpp | 73 - .../include/pfr/detail/core17_generated.hpp | 5925 ------ lib/pfr/include/pfr/detail/detectors.hpp | 69 - lib/pfr/include/pfr/detail/fields_count.hpp | 314 - .../pfr/detail/for_each_field_impl.hpp | 62 - lib/pfr/include/pfr/detail/functional.hpp | 237 - lib/pfr/include/pfr/detail/io.hpp | 104 - .../detail/make_flat_tuple_of_references.hpp | 93 - .../pfr/detail/make_integer_sequence.hpp | 87 - .../pfr/detail/offset_based_getter.hpp | 152 - .../pfr/detail/possible_reflectable.hpp | 39 - lib/pfr/include/pfr/detail/rvalue_t.hpp | 41 - lib/pfr/include/pfr/detail/sequence_tuple.hpp | 158 - lib/pfr/include/pfr/detail/size_array.hpp | 99 - lib/pfr/include/pfr/detail/size_t_.hpp | 21 - lib/pfr/include/pfr/detail/stdtuple.hpp | 41 - .../pfr/detail/tie_from_structure_tuple.hpp | 45 - lib/pfr/include/pfr/detail/unsafe_declval.hpp | 39 - lib/pfr/include/pfr/functions_for.hpp | 113 - lib/pfr/include/pfr/functors.hpp | 241 - lib/pfr/include/pfr/io.hpp | 106 - lib/pfr/include/pfr/io_fields.hpp | 172 - lib/pfr/include/pfr/ops.hpp | 176 - lib/pfr/include/pfr/ops_fields.hpp | 122 - lib/pfr/include/pfr/traits.hpp | 66 - lib/pfr/include/pfr/traits_fwd.hpp | 19 - lib/pfr/include/pfr/tuple_size.hpp | 45 - lib/src/ORM/CMakeLists.txt | 10 + lib/src/ORM/CRUD/insert.cpp | 13 - lib/src/ORM/CRUD/select.cpp | 145 - lib/src/ORM/CRUD/utils.cpp | 6 - lib/src/ORM/ORM-version.cpp | 1 - lib/src/ORM/ORM.cpp | 14 +- lib/src/ORM/db/connectors/MockDB/data.cpp | 6 - lib/src/ORM/db/connectors/MockDB/init.cpp | 6 - lib/src/ORM/db/connectors/interface.cpp | 6 - lib/src/ORM/details/fundamental_type.cpp | 6 - lib/src/ORM/details/member_pointer.cpp | 13 - lib/src/ORM/details/orm_tuple.cpp | 6 - lib/src/ORM/details/result_type.cpp | 13 - lib/src/ORM/details/string_literal.cpp | 6 - lib/src/ORM/details/warnings.cpp | 6 - lib/src/ORM/fields.cpp | 13 - lib/src/ORM/limits.cpp | 83 - lib/src/ORM/rules.cpp | 377 - lib/src/ORM/table.cpp | 113 - lib/src/ORM/tools/property.cpp | 15 + lib/src/ORM/tools/rule.cpp | 104 + tests/ORM/CMakeLists.txt | 11 +- tests/ORM/checks/lvalue.hpp | 26 +- tests/ORM/checks/rvalue.hpp | 18 +- tests/ORM/main.cpp | 9 +- tests/ORM/specs/fields.hpp | 111 +- tests/ORM/specs/init.cpp | 5 + tests/ORM/specs/init.hpp | 4 +- tests/ORM/specs/rules.hpp | 484 +- tests/ORM/specs/table.hpp | 139 +- tests/lib/fakeit.hpp | 17281 +++++++--------- tests/lib/moka/src/must.h | 444 +- tests/lib/moka/src/test.h | 666 +- tests/lib/moka/src/util.h | 131 +- 109 files changed, 9527 insertions(+), 26461 deletions(-) delete mode 100644 lib/include/ORM/CRUD/delete.hpp delete mode 100644 lib/include/ORM/CRUD/insert.hpp delete mode 100644 lib/include/ORM/CRUD/select.hpp delete mode 100644 lib/include/ORM/CRUD/update.hpp delete mode 100644 lib/include/ORM/CRUD/utils.hpp delete mode 100644 lib/include/ORM/db/connectors/MockDB/data.hpp delete mode 100644 lib/include/ORM/db/connectors/MockDB/init.hpp delete mode 100644 lib/include/ORM/db/connectors/interface.hpp delete mode 100644 lib/include/ORM/db/types/db_type_wrappers.hpp delete mode 100644 lib/include/ORM/db/types/primitive_type_wrapper.hpp delete mode 100644 lib/include/ORM/details/fundamental_type.hpp delete mode 100644 lib/include/ORM/details/member_pointer.hpp delete mode 100644 lib/include/ORM/details/orm_tuple.hpp delete mode 100644 lib/include/ORM/details/result_type.hpp delete mode 100644 lib/include/ORM/details/string_literal.hpp delete mode 100644 lib/include/ORM/details/warnings.hpp delete mode 100644 lib/include/ORM/fields.hpp create mode 100644 lib/include/ORM/forward-decl.hpp delete mode 100644 lib/include/ORM/join_rule.hpp delete mode 100644 lib/include/ORM/limits.hpp delete mode 100644 lib/include/ORM/rules.hpp delete mode 100644 lib/include/ORM/std/string_view delete mode 100644 lib/include/ORM/table.hpp create mode 100644 lib/include/ORM/tools/property.hpp create mode 100644 lib/include/ORM/tools/rule.hpp create mode 100644 lib/include/ORM/tools/string_literal.hpp create mode 100644 lib/include/ORM/utils/concept.hpp create mode 100644 lib/include/ORM/utils/mem_ptr_utils.hpp create mode 100644 lib/include/ORM/utils/mem_ptr_wrapper.hpp create mode 100644 lib/include/ORM/utils/placeholder.hpp create mode 100644 lib/include/ORM/utils/query_input_data.hpp create mode 100644 lib/include/ORM/utils/rule_operators.hpp create mode 100644 lib/include/ORM/wrappers/db_types.hpp delete mode 100644 lib/pfr/include/pfr.hpp delete mode 100644 lib/pfr/include/pfr/config.hpp delete mode 100644 lib/pfr/include/pfr/core.hpp delete mode 100644 lib/pfr/include/pfr/detail/cast_to_layout_compatible.hpp delete mode 100644 lib/pfr/include/pfr/detail/config.hpp delete mode 100644 lib/pfr/include/pfr/detail/core.hpp delete mode 100644 lib/pfr/include/pfr/detail/core14_classic.hpp delete mode 100644 lib/pfr/include/pfr/detail/core14_loophole.hpp delete mode 100644 lib/pfr/include/pfr/detail/core17.hpp delete mode 100644 lib/pfr/include/pfr/detail/core17_generated.hpp delete mode 100644 lib/pfr/include/pfr/detail/detectors.hpp delete mode 100644 lib/pfr/include/pfr/detail/fields_count.hpp delete mode 100644 lib/pfr/include/pfr/detail/for_each_field_impl.hpp delete mode 100644 lib/pfr/include/pfr/detail/functional.hpp delete mode 100644 lib/pfr/include/pfr/detail/io.hpp delete mode 100644 lib/pfr/include/pfr/detail/make_flat_tuple_of_references.hpp delete mode 100644 lib/pfr/include/pfr/detail/make_integer_sequence.hpp delete mode 100644 lib/pfr/include/pfr/detail/offset_based_getter.hpp delete mode 100644 lib/pfr/include/pfr/detail/possible_reflectable.hpp delete mode 100644 lib/pfr/include/pfr/detail/rvalue_t.hpp delete mode 100644 lib/pfr/include/pfr/detail/sequence_tuple.hpp delete mode 100644 lib/pfr/include/pfr/detail/size_array.hpp delete mode 100644 lib/pfr/include/pfr/detail/size_t_.hpp delete mode 100644 lib/pfr/include/pfr/detail/stdtuple.hpp delete mode 100644 lib/pfr/include/pfr/detail/tie_from_structure_tuple.hpp delete mode 100644 lib/pfr/include/pfr/detail/unsafe_declval.hpp delete mode 100644 lib/pfr/include/pfr/functions_for.hpp delete mode 100644 lib/pfr/include/pfr/functors.hpp delete mode 100644 lib/pfr/include/pfr/io.hpp delete mode 100644 lib/pfr/include/pfr/io_fields.hpp delete mode 100644 lib/pfr/include/pfr/ops.hpp delete mode 100644 lib/pfr/include/pfr/ops_fields.hpp delete mode 100644 lib/pfr/include/pfr/traits.hpp delete mode 100644 lib/pfr/include/pfr/traits_fwd.hpp delete mode 100644 lib/pfr/include/pfr/tuple_size.hpp create mode 100644 lib/src/ORM/CMakeLists.txt delete mode 100644 lib/src/ORM/CRUD/insert.cpp delete mode 100644 lib/src/ORM/CRUD/select.cpp delete mode 100644 lib/src/ORM/CRUD/utils.cpp delete mode 100644 lib/src/ORM/ORM-version.cpp delete mode 100644 lib/src/ORM/db/connectors/MockDB/data.cpp delete mode 100644 lib/src/ORM/db/connectors/MockDB/init.cpp delete mode 100644 lib/src/ORM/db/connectors/interface.cpp delete mode 100644 lib/src/ORM/details/fundamental_type.cpp delete mode 100644 lib/src/ORM/details/member_pointer.cpp delete mode 100644 lib/src/ORM/details/orm_tuple.cpp delete mode 100644 lib/src/ORM/details/result_type.cpp delete mode 100644 lib/src/ORM/details/string_literal.cpp delete mode 100644 lib/src/ORM/details/warnings.cpp delete mode 100644 lib/src/ORM/fields.cpp delete mode 100644 lib/src/ORM/limits.cpp delete mode 100644 lib/src/ORM/rules.cpp delete mode 100644 lib/src/ORM/table.cpp create mode 100644 lib/src/ORM/tools/property.cpp create mode 100644 lib/src/ORM/tools/rule.cpp create mode 100644 tests/ORM/specs/init.cpp diff --git a/.gitignore b/.gitignore index 06ad4b3..cd3051f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,15 +1,7 @@ -.vscode/ *.exe **/*.exe -cmake_install.cmake -CMakeCache.txt -CMakeFiles/ -Makefile -mysql-connector-c++-1.1.13/ -cmake/ -out/ .vs/ .vscode/ -WSL_Build/ +lib/include/ORM/ORM-version.hpp build*/ **/.DS_Store \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 8401cec..d0834bf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,19 +42,17 @@ if(USE_MYSQL) endif() if(RUN_TESTS) - include(CTest) - enable_testing() - add_subdirectory("tests/") + add_subdirectory("tests") endif() # Generate example source code -add_executable(Webframe_ORM_Example example/ORM.cpp) -target_compile_definitions(Webframe_ORM_Example PUBLIC DB_USERNAME="root" DB_PASSWORD="test") -target_link_libraries(Webframe_ORM_Example PUBLIC ${EXTRA_LIBS}) -target_include_directories(Webframe_ORM_Example PUBLIC - ${EXTRA_INCLUDES} - ${PROJECT_BINARY_DIR} - ) -add_executable(Webframe::ORM::Example ALIAS Webframe_ORM_Example) - -include(CPack) +# add_executable(Webframe_ORM_Example example/ORM.cpp) +# target_compile_definitions(Webframe_ORM_Example PUBLIC DB_USERNAME="root" DB_PASSWORD="test") +# target_link_libraries(Webframe_ORM_Example PUBLIC ${EXTRA_LIBS}) +# target_include_directories(Webframe_ORM_Example PUBLIC +# ${EXTRA_INCLUDES} +# ${PROJECT_BINARY_DIR} +# ) +# add_executable(Webframe::ORM::Example ALIAS Webframe_ORM_Example) + +#include(CPack) diff --git a/README.md b/README.md index 708b227..af3f72b 100644 --- a/README.md +++ b/README.md @@ -143,19 +143,27 @@ Check [example/](https://github.com/WebFrame/ORM-Abstract/blob/main/example) for [![LinkedIn](https://img.shields.io/badge/linkedin-%230077B5.svg?logo=linkedin&logoColor=white)](https://www.linkedin.com/in/alex-tsvetanov/) # ToDo -1. Limits fix - - ```sql - [LIMIT [offset_value] number_rows | LIMIT number_rows OFFSET offset_value] - ``` +1. Properties + - ``== nullptr`` + - ``!= nullptr`` 1. Result type - Member pointers and standard types - Get references by member pointer - Get references by table class - Get references by index 1. Rules + - EXISTS - IN / NOT IN 1. CRUD operations + - ~~Create / insert~~ - Read / select + - ~~ALL~~ + - ~~JOIN~~ + - ~~WHERE~~ + - ~~LIMIT~~ + - DISTINCT / DISTINCTROW + - GROUP BY / HAVING + - ORDER BY - COUNT(*) / COUNT(...) ```sql SELECT [ ALL | DISTINCT | DISTINCTROW ] @@ -172,11 +180,18 @@ Check [example/](https://github.com/WebFrame/ORM-Abstract/blob/main/example) for [HAVING condition] [ORDER BY expression [ ASC | DESC ]] [LIMIT [offset_value] number_rows | LIMIT number_rows OFFSET offset_value] - INTO [ OUTFILE 'file_name' options + [INTO [ OUTFILE 'file_name' options | DUMPFILE 'file_name' | @variable1, @variable2, ... @variable_n] [FOR UPDATE | LOCK IN SHARE MODE]; ``` + - Update / update + - ~~WHERE~~ + - ORDER BY + - Delete / delete + - WHERE + - ORDER BY + - LIMIT 1. Transferring the abstract database implementation from v1.1 to v2 using the new SQL-free query style 1. Implement free MySQL driver 1. Implement free MongoDB driver @@ -184,4 +199,4 @@ Check [example/](https://github.com/WebFrame/ORM-Abstract/blob/main/example) for - Keep track of latest migration done - Apply new migrations if any - C++ Migrations tool -1. Run tests with SQL and NoSQL databases +1. Run tests with SQL and NoSQL databases \ No newline at end of file diff --git a/example/ORM.cpp b/example/ORM.cpp index d3c359a..ca27d03 100644 --- a/example/ORM.cpp +++ b/example/ORM.cpp @@ -8,64 +8,56 @@ using namespace std; using namespace webframe::ORM::literals; -template constexpr void create_table_helper() -{ - if constexpr (i >= pfr::tuple_size::value) - { - return; - } - if constexpr (std::derived_from(std::declval())), webframe::ORM::details::property>) - { +template +constexpr void create_table_helper() { + if constexpr (i >= pfr::tuple_size::value) return; + if constexpr (std::derived_from(std::declval())), webframe::ORM::details::property>) { constexpr std::string_view column_name = decltype(pfr::get(std::declval()))::_name(); using ColumnType = typename decltype(pfr::get(std::declval()))::var_t; - - std::cout << MockDB::MockDB::delim << /*T::table_name << "." <<*/ column_name << " " << typeid(ColumnType).name(); - } - if constexpr (i + 1 < pfr::tuple_size::value) - { - std::cout << ","; - create_table_helper(); + + std::cout << column_name << " " << typeid(ColumnType).name() << std::endl; } + if constexpr (i+1 < pfr::tuple_size::value) create_table_helper(); } -template void create_table() -{ - std::cout << "CREATE TABLE " << T::table_name << "("; +template +void create_table() { create_table_helper(); - std::cout << "\n);"; } -#define my_assert(x) \ - if (!(x)) \ - { \ - std::cout << "\"" << #x << "\" failed." << std::endl; \ - } +#define my_assert(x) if (!(x)) { std::cout << "\"" << #x<< "\" failed." << std::endl; } int main() { + std::cout << typeid(P<&UserPost::post> == P<&Post::id>).name(); + User test; + std::cout << test.id._name() << std::endl; + test.id = 5; + std::cout << test.id << std::endl; + test.id += 10; + std::cout << test.id << std::endl; create_table(); - std::cout << std::endl << std::endl; - - User alex = webframe::ORM::Table::tuple_to_struct(webframe::ORM::Table::to_tuple((INTEGER<>)(0), (TEXT<>)("Alex"))); + my_assert(webframe::ORM::Table::get_index_by_column("id"sv) == 0); + my_assert(webframe::ORM::Table::get_index_by_column("username"sv) == 1); + my_assert(webframe::ORM::Table::get_index_by_column(decltype(std::declval().username)::_name()) == 1); + std::cout << webframe::ORM::Table::get_index_by_column("id"sv) << std::endl; + std::cout << webframe::ORM::Table::get_index_by_column("username"sv) << std::endl; + User alex = webframe::ORM::Table::tuple_to_struct(webframe::ORM::Table::to_tuple(0, "Alex")); my_assert(alex.id == 0); my_assert(alex.username == "Alex"); + std::cout << alex.id << " " << std::string(alex.username) << std::endl; + + webframe::ORM::relationship y; + std::cout << typeid(!(P<&UserPost::author> == P<&User::id> && P<&UserPost::post> == P<&Post::id>)).name() << std::endl; + std::cout << typeid(!((P<&UserPost::author> == P<&User::id>) ^ (P<&UserPost::post> == P<&Post::id>))).name() << std::endl; MockDB::MockDB db; std::cout << (db << Utils::insert_new_user)("Name") << std::endl; - std::cout << std::endl; std::cout << (db << Utils::insert_new_user_with_id_placeholder)(5, "Name") << std::endl; - std::cout << std::endl; std::cout << (db << Utils::insert_new_user_with_id_placeholder)(5, "Name", 6, "alex") << std::endl; - std::cout << std::endl; std::cout << (db << Utils::get_all_posts_with_their_assosiated_users)() << std::endl; - std::cout << std::endl; std::cout << (db << Utils::get_all_users_with_id_above)(5) << std::endl; - std::cout << std::endl; std::cout << (db << Utils::update_something)(5, 10) << std::endl; - std::cout << std::endl; std::cout << (db << Utils::update_with_optimized_rules)(5, 10) << std::endl; - std::cout << std::endl; - std::cout << (db << Utils::delete_all_posts)(5, 5) << std::endl; - std::cout << std::endl; return 0; } diff --git a/example/users/users.hpp b/example/users/users.hpp index cd34c9b..c0c9da3 100644 --- a/example/users/users.hpp +++ b/example/users/users.hpp @@ -4,65 +4,57 @@ using namespace webframe::ORM; -template class Utils; +template +class Utils; -struct Post -{ - static constexpr std::string_view table_name = "Posts"; - property, "id"> id; - property, "content"> content; +struct Post { + static constexpr std::string_view entity_name = "Posts"; + property id; + property content; }; -struct User -{ - static constexpr std::string_view table_name = "Users"; - property, "id"> id; - property, "username"> username; - relationship posts; +struct User { + static constexpr std::string_view entity_name = "Users"; + property id; + property username; + relationship posts; }; -struct UserPost -{ - static constexpr std::string_view table_name = "UserPosts"; - property>, "id"> id; - relationship author; - relationship post; +struct UserPost { + static constexpr std::string_view entity_name = "UserPosts"; + property id; + relationship author; + relationship post; }; -template <> class Utils : public webframe::ORM::Table -{ - public: - static constexpr auto insert_new_user_with_id_placeholder = webframe::ORM::insert<&User::id, &User::username>; - static constexpr auto insert_new_user = webframe::ORM::insert<&User::username>; - static constexpr auto get_all_users_with_id_above = - webframe::ORM::select.where(P<&User::id> > P>).limit(15_per_page & 5_page).limit(5_page & 15_per_page); - static constexpr auto update_with_optimized_rules = webframe::ORM::update(P<& User::id> = P>, P<& User::username> = "Test") - .where(!(P<&User::id> > P>)) - .order_by<&User::id, modes::ASC>() - .limit(5_page & 15_per_page); - static constexpr auto update_something = - webframe::ORM::update(P<& User::id> = P>, P<& User::username> = "Test").where(P<&User::id> > P>); - static constexpr auto update_something_2 = - webframe::ORM::update(P<& User::id> = P>).update(P<& User::username> = "Test").where(P<&User::id> > P>); +template<> +class Utils : public webframe::ORM::Table { +public: + static constexpr auto insert_new_user_with_id_placeholder = webframe::ORM::insert, &User::username>; + static constexpr auto insert_new_user = webframe::ORM::insert<&User::username>; + static constexpr auto get_all_users_with_id_above = webframe::ORM::select<&User::id, &User::username> + .where(P<&User::id> > P>) + .limit(15_per_page & 5_page) + .limit(5_page & 15_per_page) + ; + static constexpr auto update_with_optimized_rules = webframe::ORM::update(P<&User::id> = P>, P<&User::username> = "Test") + .where(!(P<&User::id> > P>)) + ; + static constexpr auto update_something = webframe::ORM::update(P<&User::id> = P>, P<&User::username> = "Test") + .where(P<&User::id> > P>) + ; + static constexpr auto update_something_2 = webframe::ORM::update(P<&User::id> = P>) + .update(P<&User::username> = "Test") + .where(P<&User::id> > P>) + ; }; -template <> class Utils : public webframe::ORM::Table -{ - public: - static constexpr auto get_all_posts_with_their_assosiated_users = - webframe::ORM::select - .join(!(P<&UserPost::post> == P<&Post::id> && P<&UserPost::post> != P<&Post::id>)) - .limit(15_per_page & 5_page) - .limit(5_page & 15_per_page) - .group_by<&UserPost::id>(P<&Post::id> == 5) - .group_by<&UserPost::id>() - .order_by<&UserPost::id, modes::ASC, &UserPost::id, modes::DESC, &UserPost::id, modes::DEFAULT, &UserPost::id>() - ; - static constexpr auto delete_all_posts = - webframe::ORM::deleteq - .where(P<&UserPost::id> > P>) - .where(P<&UserPost::id> != P) - .order_by<&UserPost::id, modes::ASC, &UserPost::id, modes::DESC, &UserPost::id, modes::DEFAULT, &UserPost::id>() - .limit(5_page & 15_per_page) +template<> +class Utils : public webframe::ORM::Table { +public: + static constexpr auto get_all_posts_with_their_assosiated_users = webframe::ORM::select<&UserPost::id, &User::id, &User::username, &Post::id, &Post::content> + .join(P<&UserPost::post> == P<&Post::id>) + .limit(15_per_page & 5_page) + .limit(5_page & 15_per_page) ; }; diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 74fca50..dd65a61 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -1,58 +1,6 @@ cmake_minimum_required (VERSION 3.14) -SET(SOURCE_COMPONENTS - table - limits - ORM-version - details/warnings - details/orm_tuple - details/fundamental_type - details/member_pointer - details/result_type - details/string_literal - CRUD/utils - CRUD/select - CRUD/insert - db/connectors/interface - db/connectors/MockDB/data - db/connectors/MockDB/init - rules - fields -) - -SET(HEADER_COMPONENTS - rules - fields - details/string_literal - details/result_type - details/fundamental_type - details/member_pointer - details/warnings - details/select - limits - db/connectors/interface - table -) - -foreach(component ${HEADER_COMPONENTS}) - LIST(APPEND ORM_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/include/ORM/${component}.hpp) -endforeach() - -foreach(component ${SOURCE_COMPONENTS}) - string(REPLACE "/" "_" lib_name ${component}) - - add_library(Webframe_ORM_${lib_name} OBJECT ${CMAKE_CURRENT_SOURCE_DIR}/src/ORM/${component}.cpp) - target_include_directories(Webframe_ORM_${lib_name} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/include" "${CMAKE_CURRENT_SOURCE_DIR}/pfr/include") - set_target_properties(Webframe_ORM_${lib_name} PROPERTIES LINKER_LANGUAGE CXX) - - LIST(APPEND libs Webframe_ORM_${lib_name}) - LIST(APPEND ORM_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src/ORM/${component}.cpp) -endforeach() - -add_library(Webframe_ORM STATIC src/ORM/ORM.cpp) -target_include_directories(Webframe_ORM PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include" "${CMAKE_CURRENT_SOURCE_DIR}/pfr/include") -set_target_properties(Webframe_ORM PROPERTIES LINKER_LANGUAGE CXX) -target_link_libraries(Webframe_ORM PUBLIC ${libs}) +add_subdirectory(src/ORM) install(TARGETS Webframe_ORM DESTINATION ${PROJECT_BINARY_DIR}) diff --git a/lib/include/ORM/CRUD/delete.hpp b/lib/include/ORM/CRUD/delete.hpp deleted file mode 100644 index be871d6..0000000 --- a/lib/include/ORM/CRUD/delete.hpp +++ /dev/null @@ -1,128 +0,0 @@ -#pragma once - -#include "../details/orm_tuple.hpp" -#include "../details/member_pointer.hpp" -#include "utils.hpp" - -namespace webframe::ORM::CRUD -{ - template class delete_query : public details::delete_query_t - { - Filters filters; - Limits limits; - Ordering ordering; - - public: - using table = Table; - using tables = - decltype(webframe::ORM::details::orm_tuple(typename details::unique_tables_t::properties(), - typename webframe::ORM::details::get_properties::properties()))>::orm_tuple_type())); - using properties = decltype(webframe::ORM::details::orm_tuple(std::tuple_cat(typename webframe::ORM::details::get_properties::properties()))); - - static constexpr size_t where_size = Filters::size; - static constexpr size_t order_size = Ordering::size; - static constexpr size_t limit_size = Limits::size; - - constexpr delete_query() : filters(), limits(), ordering() - { - } - constexpr delete_query(Filters _filters, Ordering _ordering, Limits _limits) : filters(_filters), limits(_limits), ordering(_ordering) - { - } - - constexpr inline Filters wheres() const - { - return filters; - } - constexpr inline Ordering order_clauses() const - { - return ordering; - } - constexpr inline Limits limit_clauses() const - { - return limits; - } - - template constexpr inline auto where(Ts... new_filters) const - { - using new_wheres = decltype(webframe::ORM::details::orm_tuple(std::tuple_cat(filters.to_tuple(), std::tuple(new_filters...)))); - return delete_query( - webframe::ORM::details::orm_tuple(std::tuple_cat(filters.to_tuple(), std::tuple(new_filters...))), ordering, limits); - } - - protected: - template constexpr inline auto order_by_helper1() const - { - using tuple_type = decltype(std::tuple_cat( - std::declval().to_tuple(), std::declval())>>())); - using orm_tuple_type = decltype(webframe::ORM::details::orm_tuple(std::declval())); - orm_tuple_type orm_new_tuple(std::tuple_cat(ordering.to_tuple(), std::make_tuple(webframe::ORM::OrderBy()))); - return delete_query(filters, orm_new_tuple, limits); - } - - template constexpr inline auto order_by_helper2() const - { - using tuple_type = - decltype(std::tuple_cat(std::declval().to_tuple(), std::declval())>>())); - using orm_tuple_type = decltype(webframe::ORM::details::orm_tuple(std::declval())); - orm_tuple_type orm_new_tuple(std::tuple_cat(ordering.to_tuple(), std::make_tuple(webframe::ORM::OrderBy()))); - return delete_query(filters, orm_new_tuple, limits); - } - - template constexpr inline auto order_by_impl(std::index_sequence) const - { - constexpr auto args = webframe::ORM::details::orm_tuple(std::make_tuple(Args...)); - if constexpr (sizeof...(Args) > 0) - { - if constexpr ( - webframe::ORM::details::is_property && std::is_same_v()), webframe::ORM::modes::order>) - { - return order_by_helper2().template order_by_impl(std::make_index_sequence{}); - } - if constexpr ( - webframe::ORM::details::is_property && !std::is_same_v()), webframe::ORM::modes::order>) - { - return order_by_helper1().template order_by_impl(std::make_index_sequence{}); - } - } - if constexpr (sizeof...(Args) > 0 && !webframe::ORM::details::is_property) - { - return order_by_impl(std::make_index_sequence{}); - } - if constexpr (sizeof...(Args) == 0) - { - if constexpr (webframe::ORM::details::is_property) - { - return order_by_helper1(); - } - if constexpr (!webframe::ORM::details::is_property) - { - return *this; - } - } - } - - public: - template constexpr inline auto order_by() const - { - return order_by_impl(std::make_index_sequence{}); - } - - template constexpr inline auto limit(Ts... new_limits) const - { - using new_limits_t = decltype(webframe::ORM::details::orm_tuple(std::tuple_cat(limits.to_tuple(), std::tuple(new_limits...)))); - return delete_query( - filters, ordering, webframe::ORM::details::orm_tuple(std::tuple_cat(limits.to_tuple(), std::tuple(new_limits...)))); - } - - template friend class delete_query; - }; -} // namespace webframe::ORM::CRUD - -namespace webframe::ORM -{ - template - static constexpr auto deleteq = CRUD::delete_query, details::orm_tuple<>, details::orm_tuple<>>( - details::orm_tuple(), details::orm_tuple(), details::orm_tuple()); -} diff --git a/lib/include/ORM/CRUD/insert.hpp b/lib/include/ORM/CRUD/insert.hpp deleted file mode 100644 index 1f79fd2..0000000 --- a/lib/include/ORM/CRUD/insert.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/** - * @file select.hpp - * @brief Functional-programming-like select queries - * @author Alex Tsvetanov - * @date 2023-08-31 - ***********************************************/ - -#pragma once - -#include -#include -#include -#include "../details/result_type.hpp" -#include "utils.hpp" - -namespace webframe::ORM::CRUD -{ - template class insert_query : public details::insert_query_t - { - public: - using properties = - typename webframe::ORM::details::get_placeholders_and_properties>::orm_placeholders; - using tables = typename details::unique_tables::orm_tuple_type; - static constexpr auto signature = webframe::ORM::details::orm_tuple(std::make_tuple(Properties...)); - }; -} // namespace webframe::ORM::CRUD -namespace webframe::ORM -{ - template static constexpr auto insert = webframe::ORM::CRUD::insert_query(); -} -#include "../../../src/ORM/CRUD/insert.cpp" diff --git a/lib/include/ORM/CRUD/select.hpp b/lib/include/ORM/CRUD/select.hpp deleted file mode 100644 index a30f980..0000000 --- a/lib/include/ORM/CRUD/select.hpp +++ /dev/null @@ -1,117 +0,0 @@ -/** - * @file select.hpp - * @brief Functional-programming-like select queries - * @author Alex Tsvetanov - * @date 2023-08-31 - ***********************************************/ - -#pragma once - -#include -#include -#include "../details/result_type.hpp" -#include "utils.hpp" -#include "../join_rule.hpp" - -namespace webframe::ORM::CRUD -{ - template - class select_query : public details::select_query_t - { - protected: - Result properties_to_select_query; - Rules joins; - Filters filters; - Limits limits; - Grouping groupings; - Ordering ordering; - - public: - static constexpr webframe::ORM::modes::select mode = row_way; - using properties = typename webframe::ORM::details::get_placeholders::properties(), - typename webframe::ORM::details::get_properties::properties(), - typename webframe::ORM::details::get_properties::properties()))>::orm_placeholders; - using Response = Result; - using Joins = Rules; - using Wheres = Filters; - using Limitations = Limits; - using Groupings = Grouping; - using OrderBy = Ordering; - - constexpr select_query(Result _properties_to_select_query, Rules _joins, Filters _filters, Limits _limits, Grouping _groupings, Ordering _ordering) - : properties_to_select_query(_properties_to_select_query), joins(_joins), filters(_filters), limits(_limits), groupings(_groupings), - ordering(_ordering) - { - } - - template constexpr inline auto join(Ts...) const; - - template constexpr inline auto where(Ts...) const; - - template constexpr inline auto limit(Ts...) const; - - template constexpr inline auto group_by(auto) const; - - template constexpr inline auto group_by() const; - - protected: - template constexpr inline auto order_by_impl(std::index_sequence) const; - - template constexpr inline auto order_by_helper1() const; - - template constexpr inline auto order_by_helper2() const; - - public: - template constexpr inline auto order_by() const; - - constexpr Response selected_properties() const - { - return properties_to_select_query; - } - constexpr Joins join_clauses() const - { - return joins; - } - constexpr Wheres where_clauses() const - { - return filters; - } - constexpr Limits limit_clauses() const - { - return limits; - } - constexpr Grouping group_clauses() const - { - return groupings; - } - constexpr Ordering order_clauses() const - { - return ordering; - } - - template friend class select_query; - }; -} // namespace webframe::ORM::CRUD -namespace webframe::ORM -{ - template - static constexpr auto select = CRUD::select_query< - mode, - decltype(webframe::ORM::details::result_t::create(args...)), // properties to select - webframe::ORM::details::orm_tuple<>, // Join clauses - webframe::ORM::details::orm_tuple<>, // Where clauses - webframe::ORM::details::orm_tuple<>, // Limit clauses - webframe::ORM::details::orm_tuple<>, // Group-by clauses - webframe::ORM::details::orm_tuple<> // Order-by clauses - >( - webframe::ORM::details::result_t::create(args...), // properties to select - webframe::ORM::details::orm_tuple<>(), // Join clauses - webframe::ORM::details::orm_tuple<>(), // Where clauses - webframe::ORM::details::orm_tuple<>(), // Limit clauses - webframe::ORM::details::orm_tuple<>(), // Group-by clauses - webframe::ORM::details::orm_tuple<>() // Order-by clauses - ); -} - -#include "../../../src/ORM/CRUD/select.cpp" diff --git a/lib/include/ORM/CRUD/update.hpp b/lib/include/ORM/CRUD/update.hpp deleted file mode 100644 index ee9d4f0..0000000 --- a/lib/include/ORM/CRUD/update.hpp +++ /dev/null @@ -1,146 +0,0 @@ -#pragma once - -#include "../details/orm_tuple.hpp" -#include "../details/member_pointer.hpp" -#include "utils.hpp" - -namespace webframe::ORM::CRUD -{ - template class update_query : public details::update_query_t - { - Statements statements; - Filters filters; - Limits limits; - Ordering ordering; - - public: - using tables = - decltype(webframe::ORM::details::orm_tuple(typename details::unique_tables_t::properties(), - typename webframe::ORM::details::get_properties::properties(), - typename webframe::ORM::details::get_properties::properties()))>::orm_tuple_type())); - using properties = decltype(webframe::ORM::details::orm_tuple(std::tuple_cat( - typename webframe::ORM::details::get_placeholders::orm_tuple_type>::placeholders(), - typename webframe::ORM::details::get_properties::properties()))); - - static constexpr size_t size = Statements::size; - static constexpr size_t where_size = Filters::size; - static constexpr size_t order_size = Ordering::size; - static constexpr size_t limit_size = Limits::size; - - constexpr update_query() : statements(), filters(), limits(), ordering() - { - } - constexpr update_query(Statements _statements, Filters _filters, Ordering _ordering, Limits _limits) - : statements(_statements), filters(_filters), limits(_limits), ordering(_ordering) - { - } - - constexpr inline Statements updates() const - { - return statements; - } - constexpr inline Filters wheres() const - { - return filters; - } - constexpr inline Ordering order_clauses() const - { - return ordering; - } - constexpr inline Limits limit_clauses() const - { - return limits; - } - - template constexpr inline auto update(Ts... new_statements) const - { - using new_statements_t = decltype(webframe::ORM::details::orm_tuple(std::tuple_cat(statements.to_tuple(), std::tuple(new_statements...)))); - return update_query( - webframe::ORM::details::orm_tuple(std::tuple_cat(statements.to_tuple(), std::tuple(new_statements...))), filters, ordering, limits); - } - - template constexpr inline auto where(Ts... new_filters) const - { - using new_wheres = decltype(webframe::ORM::details::orm_tuple(std::tuple_cat(filters.to_tuple(), std::tuple(new_filters...)))); - return update_query( - statements, webframe::ORM::details::orm_tuple(std::tuple_cat(filters.to_tuple(), std::tuple(new_filters...))), ordering, limits); - } - - protected: - template constexpr inline auto order_by_helper1() const - { - using tuple_type = decltype(std::tuple_cat( - std::declval().to_tuple(), std::declval())>>())); - using orm_tuple_type = decltype(webframe::ORM::details::orm_tuple(std::declval())); - orm_tuple_type orm_new_tuple(std::tuple_cat(ordering.to_tuple(), std::make_tuple(webframe::ORM::OrderBy()))); - return update_query(statements, filters, orm_new_tuple, limits); - } - - template constexpr inline auto order_by_helper2() const - { - using tuple_type = - decltype(std::tuple_cat(std::declval().to_tuple(), std::declval())>>())); - using orm_tuple_type = decltype(webframe::ORM::details::orm_tuple(std::declval())); - orm_tuple_type orm_new_tuple(std::tuple_cat(ordering.to_tuple(), std::make_tuple(webframe::ORM::OrderBy()))); - return update_query(statements, filters, orm_new_tuple, limits); - } - - template constexpr inline auto order_by_impl(std::index_sequence) const - { - constexpr auto args = webframe::ORM::details::orm_tuple(std::make_tuple(Args...)); - if constexpr (sizeof...(Args) > 0) - { - if constexpr ( - webframe::ORM::details::is_property && std::is_same_v()), webframe::ORM::modes::order>) - { - return order_by_helper2().template order_by_impl(std::make_index_sequence{}); - } - if constexpr ( - webframe::ORM::details::is_property && !std::is_same_v()), webframe::ORM::modes::order>) - { - return order_by_helper1().template order_by_impl(std::make_index_sequence{}); - } - } - if constexpr (sizeof...(Args) > 0 && !webframe::ORM::details::is_property) - { - return order_by_impl(std::make_index_sequence{}); - } - if constexpr (sizeof...(Args) == 0) - { - if constexpr (webframe::ORM::details::is_property) - { - return order_by_helper1(); - } - if constexpr (!webframe::ORM::details::is_property) - { - return *this; - } - } - } - - public: - template constexpr inline auto order_by() const - { - return order_by_impl(std::make_index_sequence{}); - } - - template constexpr inline auto limit(Ts... new_limits) const - { - using new_limits_t = decltype(webframe::ORM::details::orm_tuple(std::tuple_cat(limits.to_tuple(), std::tuple(new_limits...)))); - return update_query( - statements, filters, ordering, webframe::ORM::details::orm_tuple(std::tuple_cat(limits.to_tuple(), std::tuple(new_limits...)))); - } - - template friend class update_query; - }; -} // namespace webframe::ORM::CRUD - -namespace webframe::ORM -{ - static constexpr auto update(auto... Statements) - { - return CRUD::update_query, details::orm_tuple<>, details::orm_tuple<>, details::orm_tuple<>>( - details::orm_tuple(std::tuple(Statements...)), details::orm_tuple(), details::orm_tuple(), details::orm_tuple()); - } -} // namespace webframe::ORM diff --git a/lib/include/ORM/CRUD/utils.hpp b/lib/include/ORM/CRUD/utils.hpp deleted file mode 100644 index a39e9d0..0000000 --- a/lib/include/ORM/CRUD/utils.hpp +++ /dev/null @@ -1,333 +0,0 @@ -#pragma once - -#include -#include "../details/member_pointer.hpp" -#include "../db/connectors/interface.hpp" -#include "../details/orm_tuple.hpp" - -namespace webframe::ORM::CRUD::details -{ - - // Unique tables utils - template struct contains; - - template struct contains> - { - static constexpr inline bool check() - { - return (std::is_same_v || ...); - } - }; - - template struct contains> - { - static constexpr inline bool check() - { - return false; - } - }; - - template constexpr bool contains_v = contains::check(); - - template - concept not_new_type = contains_v; - - template - concept new_type = !not_new_type; - - template struct type_container - { - using type = T; - constexpr type_container() - { - } - }; - - template struct unique_first_tables; - - template <> struct unique_first_tables> - { - static constexpr auto empty_tuple() - { - return type_container>(); - } - using types = std::tuple<>; - using orm_tuple_type = decltype(webframe::ORM::details::orm_tuple(std::declval>())); - }; - - template struct unique_first_tables> - { - static constexpr auto empty_tuple() - { - using T = decltype(std::declval()._1); - using Ts = webframe::ORM::details::orm_tuple; - // skip non-property things - if constexpr (!webframe::ORM::details::is_property || webframe::ORM::details::is_orm_placeholder) - { - if constexpr (Ts::size == 0) - { - return type_container>(); - } - else - { - return unique_first_tables::empty_tuple(); - } - } - if constexpr (webframe::ORM::details::is_property && !webframe::ORM::details::is_orm_placeholder) - { - // so we end up with a property - if constexpr (Ts::size == 0) - { - return type_container::Table>>(); - } - - constexpr auto empty_tuple_of_righter_tables = unique_first_tables::empty_tuple(); - - if constexpr (new_type::Table, typename decltype(empty_tuple_of_righter_tables)::type>) - { - return type_container::Table>(), typename decltype(empty_tuple_of_righter_tables)::type()))>(); - } - - if constexpr (not_new_type::Table, typename decltype(empty_tuple_of_righter_tables)::type>) - { - return empty_tuple_of_righter_tables; - } - } - } - using types = typename decltype(empty_tuple())::type; - using orm_tuple_type = decltype(webframe::ORM::details::orm_tuple(std::declval())); - }; - - template struct second_properties; - - template struct second_properties> - { - static constexpr auto empty_tuple() - { - using T = decltype(std::declval()._2); - using Ts = webframe::ORM::details::orm_tuple; - // constexpr bool is_property = webframe::ORM::details::is_property; - // skip property things - // if constexpr (is_property) { - // if constexpr (Ts::size == 0) - // return type_container>(); - // if constexpr (Ts::size != 0) - // return second_properties::empty_tuple(); - // } - // if constexpr (!is_property) - { - // so we end up with a property - if constexpr (Ts::size == 0) - { - return type_container>(); - } - - constexpr auto empty_tuple_of_righter_tables = second_properties::empty_tuple(); - - return type_container(), typename decltype(empty_tuple_of_righter_tables)::type()))>(); - } - static_assert(true, "balo si e mamata"); - } - using types = typename decltype(empty_tuple())::type; - using orm_tuple_type = decltype(webframe::ORM::details::orm_tuple(std::declval())); - }; - - template <> struct second_properties> - { - static constexpr type_container> empty_tuple() - { - return type_container>(); - } - using types = typename decltype(empty_tuple())::type; - using orm_tuple_type = decltype(webframe::ORM::details::orm_tuple(std::declval())); - }; - - // unique tables using mem_ptr - template struct unique_tables; - - template <> struct unique_tables<> - { - static constexpr auto empty_tuple() - { - return type_container>(); - } - }; - - template struct unique_tables - { - static constexpr auto empty_tuple() - { - // skip non-property things - if constexpr (!webframe::ORM::details::is_property || webframe::ORM::details::is_orm_placeholder) - { - if constexpr (sizeof...(Ts) == 0) - { - return type_container>(); - } - else - { - return unique_tables::empty_tuple(); - } - } - if constexpr (webframe::ORM::details::is_property && !webframe::ORM::details::is_orm_placeholder) - { - // so we end up with a property - if constexpr (sizeof...(Ts) == 0) - { - return type_container::Table>>(); - } - - constexpr auto empty_tuple_of_righter_tables = unique_tables::empty_tuple(); - - if constexpr (new_type::Table, typename decltype(empty_tuple_of_righter_tables)::type>) - { - return type_container::Table>(), typename decltype(empty_tuple_of_righter_tables)::type()))>(); - } - - if constexpr (not_new_type::Table, typename decltype(empty_tuple_of_righter_tables)::type>) - { - return empty_tuple_of_righter_tables; - } - } - } - using types = typename decltype(empty_tuple())::type; - using orm_tuple_type = decltype(webframe::ORM::details::orm_tuple(std::declval())); - }; - - // unique tables using tuple - template struct unique_tables_t; - - template struct unique_tables_t> - { - static constexpr auto empty_tuple() - { - return type_container>(); - } - using types = typename unique_tables_t>::types; - using orm_tuple_type = typename unique_tables_t>::orm_tuple_type; - }; - - template <> struct unique_tables_t> - { - static constexpr auto empty_tuple() - { - return type_container>(); - } - using types = std::tuple<>; - using orm_tuple_type = decltype(webframe::ORM::details::orm_tuple(std::declval>())); - }; - - template struct unique_tables_t> - { - static constexpr auto empty_tuple() - { - // skip non-property things - if constexpr (!webframe::ORM::details::is_property || webframe::ORM::details::is_orm_placeholder) - { - if constexpr (sizeof...(Ts) == 0) - { - return type_container>(); - } - else - { - return unique_tables_t>::empty_tuple(); - } - } - if constexpr (webframe::ORM::details::is_property && !webframe::ORM::details::is_orm_placeholder) - { - // so we end up with a property - if constexpr (sizeof...(Ts) == 0) - { - return type_container::Table>>(); - } - - constexpr auto empty_tuple_of_righter_tables = unique_tables_t>::empty_tuple(); - - if constexpr (new_type::Table, typename decltype(empty_tuple_of_righter_tables)::type>) - { - return type_container::Table>(), typename decltype(empty_tuple_of_righter_tables)::type()))>(); - } - - if constexpr (not_new_type::Table, typename decltype(empty_tuple_of_righter_tables)::type>) - { - return empty_tuple_of_righter_tables; - } - } - } - using types = typename decltype(empty_tuple())::type; - using orm_tuple_type = decltype(webframe::ORM::details::orm_tuple(std::declval())); - }; - - // Query utils - class IQuery - { - }; - template - concept is_query = std::derived_from; - - template - concept params_match = requires { - { - webframe::ORM::details::convertible_tuples>{} - } -> webframe::ORM::details::pseudo_concept; - }; - - // DB << query operator - template auto operator<<(DB db, const QueryType query) - { - return [ db, query ](auto... args) - requires(params_match) - { - if constexpr (std::is_same_v) - { - db.execute(query, args...); - return; - } - if constexpr (!std::is_same_v) - { - return db.execute(query, args...); - } - }; - } - // concepts - class select_query_t : public IQuery - { - }; - class insert_query_t : public IQuery - { - }; - class update_query_t : public IQuery - { - }; - class delete_query_t : public IQuery - { - }; -} // namespace webframe::ORM::CRUD::details - -namespace webframe::ORM::modes -{ - enum select - { - ALL, - DISTINCT, - DISTINCTROW - }; - - enum join - { - INNER, - LEFT, - RIGHT, - FULL - }; - - enum order - { - DEFAULT, - ASC, - DESC - }; -} // namespace webframe::ORM::modes diff --git a/lib/include/ORM/ORM.hpp b/lib/include/ORM/ORM.hpp index d60f936..f4c4f2e 100644 --- a/lib/include/ORM/ORM.hpp +++ b/lib/include/ORM/ORM.hpp @@ -1,45 +1,13 @@ -/** - * @file ORM.hpp - * @brief Single header containing all the necessary tools regarding the abstract ORM - * @author Alex Tsvetanov - * @date 2022-09-09 - ***********************************************/ - #pragma once -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -// #include -#include -#include -#include +#include +#include +#include +#include +#include +#include namespace webframe::ORM { - - template class Query - { - public: - using res_t = Result; - constexpr Query() - { - } - }; - -} // namespace webframe::ORM - -#include "../../src/ORM/ORM.cpp" + +} diff --git a/lib/include/ORM/db/connectors/MockDB/data.hpp b/lib/include/ORM/db/connectors/MockDB/data.hpp deleted file mode 100644 index ff97aa5..0000000 --- a/lib/include/ORM/db/connectors/MockDB/data.hpp +++ /dev/null @@ -1,11 +0,0 @@ -#pragma once - -namespace webframe::ORM::MockDB::data -{ - struct mock_int - { - }; - struct mock_string - { - }; -} // namespace webframe::ORM::MockDB::data diff --git a/lib/include/ORM/db/connectors/MockDB/init.hpp b/lib/include/ORM/db/connectors/MockDB/init.hpp deleted file mode 100644 index 623f1de..0000000 --- a/lib/include/ORM/db/connectors/MockDB/init.hpp +++ /dev/null @@ -1,538 +0,0 @@ -#pragma once - -#include "data.hpp" -#include "../interface.hpp" -#include "../../../details/member_pointer.hpp" -#include "../../../rules.hpp" -#include "../../../CRUD/utils.hpp" -#include -#include -#include -#include - -namespace webframe::ORM -{ - - // template<> - // Connector::operator webframe::ORM::MockDB::data::mock_int() const { - // return MockDB::data::mock_int(); - // } - - // template<> - // Connector::operator MockDB::data::mock_int&() { - // MockDB::data::mock_int* answer_ptr = new MockDB::data::mock_int; - // MockDB::data::mock_int& answer = *answer_ptr; - // return answer; - // } - - // template<> - // Connector::operator MockDB::data::mock_string() const { - // return MockDB::data::mock_string(); - // } - - // template<> - // Connector::operator MockDB::data::mock_string&() { - // MockDB::data::mock_string* answer_ptr = new MockDB::data::mock_string; - // MockDB::data::mock_string& answer = *answer_ptr; - // return answer; - // } - - namespace MockDB - { - class MockDB - { - public: - static constexpr std::string_view delim = "\n\t"; - - private: - template struct prepare_rule; - - template struct prepare_rule> - { - static constexpr size_t run() - { - if constexpr (std::derived_from) - { - constexpr size_t new_placeholder = prepare_rule::run(); - if constexpr (std::derived_from) - { - return prepare_rule::run(); - } - return new_placeholder; - } - if constexpr (!std::derived_from) - { - constexpr size_t new_placeholder = ind_placeholders + (webframe::ORM::details::is_orm_placeholder); - if constexpr (std::derived_from) - { - return prepare_rule::run(); - } - return new_placeholder; - } - } - }; - - template - static void print_rule(std::stringstream& ss, const webframe::ORM::Rule rule, const Tuple vals) - { - if constexpr (std::derived_from) - { - constexpr size_t new_placeholder = prepare_rule::run(); - print_rule(ss, rule._1, vals); - ss << " " << op.operator std::string_view() << " "; - if constexpr (std::derived_from) - { - print_rule(ss, rule._2, vals); - } - if constexpr (!std::derived_from) - { - if constexpr (webframe::ORM::details::is_orm_placeholder) - { - ss << injection_prevent(vals.template get()); - } - if constexpr (!webframe::ORM::details::is_orm_placeholder) - { - ss << injection_prevent(rule._2); - } - } - } - if constexpr (!std::derived_from) - { - constexpr size_t new_placeholder = ind_placeholders + (webframe::ORM::details::is_orm_placeholder); - if constexpr (webframe::ORM::details::is_orm_placeholder) - { - ss << injection_prevent(vals.template get()) << " "; - } - if constexpr (!webframe::ORM::details::is_orm_placeholder) - { - ss << injection_prevent(rule._1) << " "; - } - ss << op.operator std::string_view() << " "; - if constexpr (std::derived_from) - { - print_rule(ss, rule._2, vals); - } - if constexpr (!std::derived_from) - { - if constexpr (webframe::ORM::details::is_orm_placeholder) - { - ss << injection_prevent(vals.template get()); - } - if constexpr (!webframe::ORM::details::is_orm_placeholder) - { - ss << injection_prevent(rule._2); - } - } - } - } - - template static constexpr auto injection_prevent(T val) - { - if constexpr (std::is_same_v) - { - return "NULL"sv; - } - if constexpr (std::is_same_v) - { - return val; - } - if constexpr (std::is_same_v) - { - return "\"" + val + "\""; - } - if constexpr (std::is_same_v) - { - return "\"" + val + "\""; - } - if constexpr (std::is_same_v) - { - return std::string("\"") + std::string(val) + "\""; - } - if constexpr (std::is_member_pointer_v) - { - if constexpr (std::is_same_v::Table>) - { - return std::string(webframe::ORM::details::i_mem_ptr::type::_name()); - } - if constexpr (!std::is_same_v::Table>) - { - return std::string(webframe::ORM::details::i_mem_ptr::Table::table_name) + "." + - std::string(webframe::ORM::details::i_mem_ptr::type::_name()); - } - } - // if constexpr ( - // !std::is_same_v && - // !std::is_same_v && - // !std::is_same_v && - // !std::is_same_v && - // !std::is_member_pointer_v - //) - // return val; - } - - template void execute_insert_impl(std::stringstream& ss, const auto& query, const auto& tuple_params) const - { - if constexpr (ind_query < std::remove_cvref_t::properties::size) - { - if constexpr ( - !details::is_property())> && - !details::is_orm_placeholder())>) - { - ss << query.signature.template get(); - if constexpr (ind_query + 1 < std::remove_cvref_t::properties::size) - { - ss << ", "; - } - execute_insert_impl(ss, query, tuple_params); - } - if constexpr (ind_param < std::remove_cvref_t::size) - { - if constexpr ( - details::is_orm_placeholder())> || - details::is_property())>) - { - ss << injection_prevent(tuple_params.template get()); - if constexpr (ind_query + 1 < std::remove_cvref_t::properties::size) - { - ss << ", "; - } - execute_insert_impl(ss, query, tuple_params); - } - } - } - if constexpr (ind_query == std::remove_cvref_t::properties::size) - { - ss << ")"; - if constexpr (ind_param * 2 <= std::remove_cvref_t::size) - { - ss << ", ("; - execute_insert_impl<0, ind_param>(ss, query, tuple_params); - } - } - } - - std::string execute_insert(auto query, auto... params) const - requires(decltype(query)::tables::size == 1) - { - webframe::ORM::details::orm_tuple args(std::make_tuple(params...)); - std::stringstream ss; - ss << "INSERT INTO " << std::remove_cvref_t::tables::template orm_type<0>::table_name; - ss << "("; - for_with( - [&]() { - ss << webframe::ORM::details::i_mem_ptr>::type::_name(); - if constexpr (i != T::size - 1) - { - ss << ", "; - } - }, - std::make_index_sequence::properties::size>{}); - ss << ") VALUES ("; - execute_insert_impl<0, 0>(ss, query, args); - return ss.str(); - } - - template void for_(auto func, std::index_sequence) const - { - (func.template operator()(), ...); - } - - template void for_with(auto func, std::index_sequence) const - { - (func.template operator()(), ...); - } - - template - inline void execute_select_impl(std::stringstream& ss, const auto& query, const auto& tuple_params) const - { - using select_type = std::remove_cvref_t; - if constexpr (ind_to_select < select_type::Response::size) - { - ss << injection_prevent(query.selected_properties().template get()); - if constexpr (ind_to_select + 1 < select_type::Response::size) - { - ss << ", "; - } - execute_select_impl(ss, query, tuple_params); - } - if constexpr (ind_to_select == select_type::Response::size && ind_join < select_type::Joins::size) - { - constexpr auto mode = decltype(query.join_clauses().template get())::mode; - if constexpr (mode == webframe::ORM::modes::join::LEFT) - { - ss << " LEFT"; - } - if constexpr (mode == webframe::ORM::modes::join::RIGHT) - { - ss << " RIGHT"; - } - // if constexpr (mode == webframe::ORM::modes::join::FULL) ss << " FULL"; - if constexpr (mode == webframe::ORM::modes::join::INNER) - { - ss << " INNER"; - } - ss << delim << "JOIN " << decltype(query.join_clauses().template get())::Table::table_name << " ON "; - print_rule(ss, query.join_clauses().template get().to_rule(), tuple_params); - constexpr size_t next_placeholder = prepare_rule().to_rule())>::run(); - execute_select_impl( - ss, query, tuple_params); - } - if constexpr (ind_to_select == select_type::Response::size && ind_join == select_type::Joins::size && ind_filter < select_type::Wheres::size) - { - ss << delim << "WHERE "; - print_rule(ss, query.where_clauses().template get(), tuple_params); - constexpr size_t next_placeholder = prepare_rule())>::run(); - execute_select_impl( - ss, query, tuple_params); - } - if constexpr ( - ind_to_select == select_type::Response::size && ind_join == select_type::Joins::size && ind_filter == select_type::Wheres::size && - ind_limit < select_type::Limitations::size) - { - ss << delim << "LIMIT " << query.limit_clauses().template get().get_elements_per_page() << " x " - << query.limit_clauses().template get().get_number_of_page(); - execute_select_impl(ss, query, tuple_params); - } - if constexpr ( - ind_to_select == select_type::Response::size && ind_join == select_type::Joins::size && ind_filter == select_type::Wheres::size && - ind_limit == select_type::Limitations::size && ind_grouping < select_type::Groupings::size) - { - ss << delim << "GROUP BY ("; - for_( - [&]() { ss << injection_prevent(query.group_clauses().template get().properties.template get()); }, - std::make_index_sequence())::Properties::size>{}); - ss << ")"; - if constexpr (decltype(query.group_clauses().template get())::has_rule()) - { - ss << delim << "HAVING "; - print_rule(ss, query.group_clauses().template get().to_rule(), tuple_params); - constexpr size_t next_placeholder = - prepare_rule().to_rule())>::run(); - execute_select_impl( - ss, query, tuple_params); - } - else - { - execute_select_impl(ss, query, tuple_params); - } - } - if constexpr ( - ind_to_select == select_type::Response::size && ind_join == select_type::Joins::size && ind_filter == select_type::Wheres::size && - ind_limit == select_type::Limitations::size && ind_grouping == select_type::Groupings::size && ind_ordering < select_type::OrderBy::size) - { - if constexpr (ind_ordering == 0) - { - ss << delim << "ORDER BY "; - } - ss << injection_prevent(decltype(query.order_clauses().template get())::property); - if constexpr (decltype(query.order_clauses().template get())::sort == webframe::ORM::modes::order::ASC) - { - ss << " ASC"; - } - if constexpr (decltype(query.order_clauses().template get())::sort == webframe::ORM::modes::order::DESC) - { - ss << " DESC"; - } - if constexpr (ind_ordering + 1 < decltype(query.order_clauses())::size) - { - ss << ", "; - } - execute_select_impl(ss, query, tuple_params); - } - return; - } - std::string execute_select(auto query, auto... params) const - { - webframe::ORM::details::orm_tuple args(std::make_tuple(params...)); - std::stringstream ss; - ss << "SELECT "; - if constexpr (decltype(query)::mode == webframe::ORM::modes::select::ALL) - { - ss << "ALL "; - } - if constexpr (decltype(query)::mode == webframe::ORM::modes::select::DISTINCT) - { - ss << "DISTINCT "; - } - if constexpr (decltype(query)::mode == webframe::ORM::modes::select::DISTINCTROW) - { - ss << "DISTINCTROW "; - } - execute_select_impl<0, 0, 0, 0, 0, 0, 0>(ss, query, args); - return ss.str(); - } - - template - inline void execute_update_impl(std::stringstream& ss, const auto& query, const auto& tuple_params) const - { - if constexpr (ind_query < std::remove_cvref_t::size) - { - auto statement = query.updates().template get(); - ss << injection_prevent(statement._1) << " = "; - if constexpr (details::is_orm_placeholder) - { - ss << injection_prevent(tuple_params.template get()) << ", "; - execute_update_impl(ss, query, tuple_params); - } - if constexpr (!details::is_orm_placeholder) - { - ss << injection_prevent(statement._2); - if constexpr (ind_query + 1 != std::remove_cvref_t::size) - { - ss << ", "; - } - execute_update_impl(ss, query, tuple_params); - } - } - if constexpr (ind_query == std::remove_cvref_t::size) - { - if constexpr (ind_filter != std::remove_cvref_t::where_size) - { - ss << delim << "WHERE "; - } - if constexpr (ind_filter == std::remove_cvref_t::where_size) - { - if constexpr (ind_ordering == std::remove_cvref_t::order_size) - { - // re-run functionality not available - // if constexpr (ind_limit == std::remove_cvref_t::limit_size && ind_param + ind_query + ind_filter + ind_ordering - // + ind_limit <= std::remove_cvref_t::size) { - // execute_update_impl<0, ind_param, 0, 0, 0>(ss, query, tuple_params); - // } - if constexpr (ind_limit < std::remove_cvref_t::limit_size) - { - ss << delim << "LIMIT " << query.limit_clauses().template get().get_elements_per_page() << " x " - << query.limit_clauses().template get().get_number_of_page(); - execute_update_impl(ss, query, tuple_params); - } - } - if constexpr (ind_ordering < std::remove_cvref_t::order_size && std::remove_cvref_t::order_size != 0) - { - if constexpr (ind_ordering == 0) - { - ss << delim << "ORDER BY "; - } - ss << injection_prevent(decltype(query.order_clauses().template get())::property); - if constexpr (decltype(query.order_clauses().template get())::sort == webframe::ORM::modes::order::ASC) - { - ss << " ASC"; - } - if constexpr (decltype(query.order_clauses().template get())::sort == webframe::ORM::modes::order::DESC) - { - ss << " DESC"; - } - if constexpr (ind_ordering + 1 < decltype(query.order_clauses())::size) - { - ss << ", "; - } - execute_update_impl(ss, query, tuple_params); - } - } - if constexpr (ind_filter < std::remove_cvref_t::where_size) - { - print_rule(ss, query.wheres().template get(), tuple_params); - constexpr size_t next_placeholder = prepare_rule())>::run(); - execute_update_impl(ss, query, tuple_params); - } - } - return; - } - std::string execute_update(auto query, auto... params) const - requires(decltype(query)::tables::size == 1) - { - webframe::ORM::details::orm_tuple args(std::make_tuple(params...)); - std::stringstream ss; - ss << "UPDATE " << decltype(query)::tables::template orm_type<0>::table_name << " SET "; - execute_update_impl<0, 0, 0, 0, 0>(ss, query, args); - return ss.str(); - } - template - inline void execute_delete_impl(std::stringstream& ss, const auto& query, const auto& tuple_params) const - { - if constexpr (ind_filter != std::remove_cvref_t::where_size) - { - ss << delim << "WHERE "; - } - if constexpr (ind_filter == std::remove_cvref_t::where_size) - { - if constexpr (ind_ordering == std::remove_cvref_t::order_size) - { - // re-run functionality not available - // if constexpr (ind_limit == std::remove_cvref_t::limit_size && ind_param + ind_filter + ind_ordering + ind_limit <= - // std::remove_cvref_t::size) { - // execute_delete_impl(ss, query, tuple_params); - // } - if constexpr (ind_limit < std::remove_cvref_t::limit_size) - { - ss << delim << "LIMIT " << query.limit_clauses().template get().get_elements_per_page() << " x " - << query.limit_clauses().template get().get_number_of_page(); - execute_delete_impl(ss, query, tuple_params); - } - } - if constexpr (ind_ordering < std::remove_cvref_t::order_size && std::remove_cvref_t::order_size != 0) - { - if constexpr (ind_ordering == 0) - { - ss << delim << "ORDER BY "; - } - ss << injection_prevent(decltype(query.order_clauses().template get())::property); - if constexpr (decltype(query.order_clauses().template get())::sort == webframe::ORM::modes::order::ASC) - { - ss << " ASC"; - } - if constexpr (decltype(query.order_clauses().template get())::sort == webframe::ORM::modes::order::DESC) - { - ss << " DESC"; - } - if constexpr (ind_ordering + 1 < decltype(query.order_clauses())::size) - { - ss << ", "; - } - execute_delete_impl(ss, query, tuple_params); - } - } - if constexpr (ind_filter < std::remove_cvref_t::where_size) - { - print_rule(ss, query.wheres().template get(), tuple_params); - constexpr size_t next_placeholder = prepare_rule())>::run(); - execute_delete_impl(ss, query, tuple_params); - } - return; - } - std::string execute_delete(auto query, auto... params) const - { - webframe::ORM::details::orm_tuple args(std::make_tuple(params...)); - std::stringstream ss; - ss << "DELETE " << decltype(query)::table::table_name << " "; - execute_delete_impl<0, 0, 0, 0>(ss, query, args); - return ss.str(); - } - - public: - template inline auto execute(QueryType query, auto... params) const - { - // Select query handling - if constexpr (std::is_base_of_v) - { - return this->execute_select(query, params...); - } - // Insert query handling - if constexpr (std::is_base_of_v) - { - return this->execute_insert(query, params...); - } - // Update query handling - if constexpr (std::is_base_of_v) - { - return this->execute_update(query, params...); - } - // Delete query handling - if constexpr (std::is_base_of_v) - { - return this->execute_delete(query, params...); - } - } - }; - } // namespace MockDB - -} // namespace webframe::ORM diff --git a/lib/include/ORM/db/connectors/interface.hpp b/lib/include/ORM/db/connectors/interface.hpp deleted file mode 100644 index 8702989..0000000 --- a/lib/include/ORM/db/connectors/interface.hpp +++ /dev/null @@ -1,94 +0,0 @@ -#pragma once - -#include -#include "../../details/fundamental_type.hpp" - -namespace webframe::ORM -{ - namespace details - { - class DBDataType - { - }; - class IDB - { - }; - } // namespace details - - template - concept is_db = std::derived_from; - - template - concept is_db_data_type = std::derived_from; - - template class Connector; - - template class Connector<_DB_type, CPP_type> : public details::DBDataType, public CPP_type - { - public: - using DB_type = _DB_type; - using type = CPP_type; - - Connector(const _DB_type value) - { - *this = value; - } - Connector(_DB_type& value) - { - *this = value; - } - - operator _DB_type() const; - operator _DB_type&(); - const _DB_type& operator=(const _DB_type& _value); - }; - - template class Connector<_DB_type, CPP_type> : public details::DBDataType - { - protected: - CPP_type value; - - public: - using DB_type = _DB_type; - using type = CPP_type; - - Connector(const CPP_type value) : value(value) - { - } - Connector(CPP_type& value) : value(value) - { - } - - Connector(const _DB_type value) - { - *this = value; - } - Connector(_DB_type& value) - { - *this = value; - } - - Connector() : value() - { - } - - inline operator CPP_type() const - { - return value; - } - inline operator CPP_type&() - { - return value; - } - - CPP_type operator=(const CPP_type& _value) - { - return value = _value; - } - - operator _DB_type() const; - operator _DB_type&(); - const _DB_type& operator=(const _DB_type& _value); - }; - -} // namespace webframe::ORM diff --git a/lib/include/ORM/db/types/db_type_wrappers.hpp b/lib/include/ORM/db/types/db_type_wrappers.hpp deleted file mode 100644 index a346f2b..0000000 --- a/lib/include/ORM/db/types/db_type_wrappers.hpp +++ /dev/null @@ -1,299 +0,0 @@ -#pragma once -#include -#include -#include -#include "primitive_type_wrapper.hpp" - -namespace webframe::ORM -{ - - // Bitset - template class BIT : public std::bitset - { - public: - using reference = typename std::bitset::reference; - using native_type = std::bitset; - static constexpr size_t db_size = n; - static constexpr std::string_view db_type = "BIT"; - - BIT(auto... Ts) : std::bitset(Ts...) - { - } - - native_type& get() - { - return *this; - } - const native_type& get_const() const - { - return *this; - } - }; - - // Strings - template - concept Character = std::same_as || std::same_as || std::same_as || std::same_as || - std::same_as || std::same_as || std::same_as; - - template - requires(Character) - class CHAR : public std::basic_string - { - public: - using native_type = std::basic_string; - static constexpr size_t db_size = n; - static constexpr std::string_view db_type = "CHAR"; - - CHAR(auto... Ts) : std::basic_string(Ts...) - { - } - - native_type& get() - { - return *this; - } - const native_type& get_const() const - { - return *this; - } - }; - - template - requires(Character) - class VARCHAR : public std::basic_string - { - public: - using native_type = std::basic_string; - static constexpr size_t db_size = n; - static constexpr std::string_view db_type = "VARCHAR"; - - VARCHAR(auto... Ts) : std::basic_string(Ts...) - { - } - - native_type& get() - { - return *this; - } - const native_type& get_const() const - { - return *this; - } - }; - - template - requires(n <= 255) - using TINYTEXT = VARCHAR; - template - requires(n <= 65'535) - using TEXT = VARCHAR; - template - requires(n <= 16'777'215) - using MEDIUMTEXT = VARCHAR; - template - requires(n <= 4'294'967'295) - using LONGTEXT = VARCHAR; - - // Binary - template class BINARY : CHAR - { - public: - using native_type = typename CHAR::native_type; - static constexpr size_t db_size = n; - static constexpr std::string_view db_type = "BINARY"; - - BINARY(auto... Ts) : CHAR(Ts...) - { - } - - native_type& get() - { - return *this; - } - const native_type& get_const() const - { - return *this; - } - }; - - template class VARBINARY : VARCHAR - { - public: - using native_type = typename VARCHAR::native_type; - static constexpr size_t db_size = n; - static constexpr std::string_view db_type = "VARBINARY"; - - VARBINARY(auto... Ts) : VARCHAR(Ts...) - { - } - - native_type& get() - { - return *this; - } - const native_type& get_const() const - { - return *this; - } - }; - - template - requires(n <= 255) - using TINYBLOB = VARBINARY; - template - requires(n <= 65'535) - using BLOB = VARBINARY; - template - requires(n <= 16'777'215) - using MEDIUMBLOB = VARBINARY; - template - requires(n <= 4'294'967'295) - using LONGBLOB = VARBINARY; - - // Boolean - class BOOL - { - bool value; - - public: - using native_type = bool; - static constexpr std::string_view db_type = "BOOL"; - - BOOL(const bool value) : value(value) - { - } - BOOL(bool& value) : value(value) - { - } - - BOOL() : value() - { - } - - inline operator bool() const - { - return value; - } - inline operator bool&() - { - return value; - } - - bool& operator=(auto _value) - { - static_cast(*this) = _value; - return this->value; - } - - native_type& get() - { - return this->value; - } - const native_type& get_const() const - { - return this->value; - } - }; - - using BOOLEAN = BOOL; - - // Integers - namespace impl - { - template - requires(n <= 64) - struct INTEGER_wrapper; - -#define specify(CLASS, N1, N2, UN_OR_SIGNED, TYPE) \ - template \ - requires(n >= N1 && n <= N2) \ - struct CLASS \ - { \ - using type = webframe::ORM::Primitive; \ - } - - specify(INTEGER_wrapper, 0, 16, signed, int16_t); - specify(INTEGER_wrapper, 17, 32, signed, int32_t); - specify(INTEGER_wrapper, 33, 64, signed, int64_t); - specify(INTEGER_wrapper, 0, 16, unsigned, uint16_t); - specify(INTEGER_wrapper, 17, 32, unsigned, uint32_t); - specify(INTEGER_wrapper, 33, 64, unsigned, uint64_t); -#undef specify - } // namespace impl - - template - requires(n <= 64) - using INTEGER = typename impl::INTEGER_wrapper::type; - - constexpr size_t percision_not_set = 18446744073709551615ull; - - template - requires(p <= 24 || p == percision_not_set) - using FLOAT = webframe::ORM::Primitive; - - template - requires((p >= 25 && p <= 53) || p == percision_not_set) - using DOUBLE = webframe::ORM::Primitive; - - namespace impl - { - template struct DECIMAL_wrapper; - - template - requires(p <= 24) - struct DECIMAL_wrapper - { - using type = FLOAT; - }; - - template - requires(p >= 25 && p <= 53) - struct DECIMAL_wrapper - { - using type = DOUBLE; - }; - } // namespace impl - - template using DECIMAL = typename impl::DECIMAL_wrapper::type; - - // NULLable - class INullable - { - }; - - template - concept is_nullable = std::is_base_of_v; - - template class Nullable : public INullable, public T - { - bool _is_null; - - public: - using original_type = T; - - Nullable() : Nullable(nullptr) - { - } - - template - requires(!std::is_same_v) - Nullable(U x) : T(x), _is_null(false) - { - } - - template - requires(!std::is_same_v) - Nullable(U x, auto... args) : T(x, args...), _is_null(false) - { - } - - Nullable(nullptr_t) : _is_null(true) - { - } - - bool is_null() const - { - return _is_null; - } - }; -} // namespace webframe::ORM diff --git a/lib/include/ORM/db/types/primitive_type_wrapper.hpp b/lib/include/ORM/db/types/primitive_type_wrapper.hpp deleted file mode 100644 index e2d053b..0000000 --- a/lib/include/ORM/db/types/primitive_type_wrapper.hpp +++ /dev/null @@ -1,286 +0,0 @@ -#pragma once - -#include -#include - -namespace webframe::ORM -{ - namespace details - { - template - requires(std::is_fundamental_v) - class Wrapper - { - protected: - virtual T& get() = 0; - virtual const T& get() const = 0; - }; - - template - concept operator_not_available = false; - -#define BinaryOperatorWrapper(op, name) \ - template struct name; \ - \ - template \ - requires requires(T& a, T b) { \ - { \ - a op b \ - }; \ - } \ - struct name : public Wrapper \ - { \ - template inline decltype(T() op U()) operator op(U b) const \ - { \ - return (this->get() op b); \ - } \ - }; \ - \ - template \ - requires(!requires(T& a, T b) { \ - { \ - a op b \ - }; \ - }) \ - struct name : public Wrapper \ - { \ - template inline T operator op(U) const \ - { \ - static_assert(operator_not_available, "error: invalid operands of types ‘T’ and ‘U’ to binary ‘operator" #op "’"); \ - return this->get(); \ - } \ - } - -#define BinaryRefOperatorWrapper(op, name) \ - template struct name; \ - \ - template \ - requires requires(T& a, T b) { \ - { \ - a op b \ - }; \ - } \ - struct name : public Wrapper \ - { \ - template \ - requires(!std::is_base_of_v) \ - inline T& operator op(U b) \ - { \ - return (this->get() op b); \ - } \ - }; \ - \ - template \ - requires(!requires(T& a, T b) { \ - { \ - a op b \ - }; \ - }) \ - struct name : public Wrapper \ - { \ - template \ - requires(!std::is_base_of_v) \ - inline T& operator op(U) \ - { \ - static_assert(operator_not_available, "error: invalid operands of types ‘T’ and ‘U’ to binary ‘operator" #op "’"); \ - return (this->get()); \ - } \ - } - -#define UnaryPrefixOperatorWrapper(op, name) \ - template struct name; \ - \ - template \ - requires requires(T& a) { \ - { \ - op a \ - }; \ - } \ - struct name : public Wrapper \ - { \ - inline T& operator op() \ - { \ - return (op this->get()); \ - } \ - }; \ - \ - template \ - requires(!requires(T& a) { \ - { \ - op a \ - }; \ - }) \ - struct name : public Wrapper \ - { \ - inline T& operator op() \ - { \ - static_assert(operator_not_available, "error: invalid operand of types ‘T’ to unary prefix ‘operator" #op "’"); \ - return (this->get()); \ - } \ - } - -#define UnarySuffixOperatorWrapper(op, name) \ - template struct name; \ - \ - template \ - requires requires(T& a) { \ - { \ - a op \ - }; \ - } \ - struct name : public Wrapper \ - { \ - inline T& operator op(int) \ - { \ - return (this->get() op); \ - } \ - }; \ - \ - template \ - requires(!requires(T& a) { \ - { \ - a op \ - }; \ - }) \ - struct name : public Wrapper \ - { \ - inline T& operator op(int) \ - { \ - static_assert(operator_not_available, "error: invalid operand of types ‘T’ to unary suffix ‘operator" #op "’"); \ - return (this->get()); \ - } \ - } - - BinaryOperatorWrapper(+, PlusWrapper); - BinaryOperatorWrapper(-, MinusWrapper); - BinaryOperatorWrapper(/, DevisionWrapper); - BinaryOperatorWrapper(*, MultiplicationWrapper); - BinaryOperatorWrapper(%, ModulasWrapper); - - BinaryOperatorWrapper(&, BitWiseAndWrapper); - BinaryOperatorWrapper(|, BitWiseOrWrapper); - BinaryOperatorWrapper(^, BitWiseXorWrapper); - BinaryOperatorWrapper(>>, BitWiseShiftRightWrapper); - BinaryOperatorWrapper(<<, BitWiseShiftLeftWrapper); - - BinaryOperatorWrapper(==, EqualsWrapper); - BinaryOperatorWrapper(!=, NotEqualsWrapper); - BinaryOperatorWrapper(>, GreaterThanWrapper); - BinaryOperatorWrapper(<, LessThanWrapper); - BinaryOperatorWrapper(>=, GreaterOrEqualWrapper); - BinaryOperatorWrapper(<=, LessOrEqualWrapper); - BinaryOperatorWrapper(&&, AndWrapper); - BinaryOperatorWrapper(||, OrWrapper); - - BinaryRefOperatorWrapper(+=, AssignmentPlusWrapper); - BinaryRefOperatorWrapper(-=, AssignmentMinusWrapper); - BinaryRefOperatorWrapper(/=, AssignmentDevisionWrapper); - BinaryRefOperatorWrapper(*=, AssignmentMultiplicationWrapper); - BinaryRefOperatorWrapper(%=, AssignmentModulasWrapper); - BinaryRefOperatorWrapper(>>=, AssignmentShiftRightWrapper); - BinaryRefOperatorWrapper(<<=, AssignmentShiftLeftWrapper); - - BinaryRefOperatorWrapper(&=, AssignmentBitWiseAndWrapper); - BinaryRefOperatorWrapper(|=, AssignmentBitWiseOrWrapper); - BinaryRefOperatorWrapper(^=, AssignmentBitWiseXorWrapper); - - UnaryPrefixOperatorWrapper(!, PrefixNotWrapper); - - UnaryPrefixOperatorWrapper(++, PrefixIncrementWrapper); - UnaryPrefixOperatorWrapper(--, PrefixDecrementWrapper); - - UnarySuffixOperatorWrapper(++, SuffixIncrementWrapper); - UnarySuffixOperatorWrapper(--, SuffixDecrementWrapper); - -#undef BinaryOperatorWrapper -#undef BinaryRefOperatorWrapper -#undef UnaryPrefixOperatorWrapper -#undef UnarySuffixOperatorWrapper - - template struct istreamOperationsWrapper : public Wrapper - { - template - friend inline std::basic_istream& operator>>(std::basic_istream& in, istreamOperationsWrapper& a) - { - return (in >> a.get()); - } - }; - - template struct ostreamOperationsWrapper : public Wrapper - { - template - friend inline std::basic_ostream& operator<<(std::basic_ostream& out, const ostreamOperationsWrapper& a) - { - return (out << a.get()); - } - }; - } // namespace details - - template - class Primitive : public details::PlusWrapper, - public details::MinusWrapper, - public details::DevisionWrapper, - public details::MultiplicationWrapper, - public details::ModulasWrapper, - public details::BitWiseAndWrapper, - public details::BitWiseOrWrapper, - public details::BitWiseXorWrapper, - public details::BitWiseShiftRightWrapper, - public details::BitWiseShiftLeftWrapper, - public details::EqualsWrapper, - public details::NotEqualsWrapper, - public details::GreaterThanWrapper, - public details::LessThanWrapper, - public details::GreaterOrEqualWrapper, - public details::LessOrEqualWrapper, - public details::AndWrapper, - public details::OrWrapper, - public details::AssignmentPlusWrapper, - public details::AssignmentMinusWrapper, - public details::AssignmentDevisionWrapper, - public details::AssignmentMultiplicationWrapper, - public details::AssignmentModulasWrapper, - public details::AssignmentShiftRightWrapper, - public details::AssignmentShiftLeftWrapper, - public details::AssignmentBitWiseAndWrapper, - public details::AssignmentBitWiseOrWrapper, - public details::AssignmentBitWiseXorWrapper, - public details::PrefixNotWrapper, - public details::PrefixIncrementWrapper, - public details::PrefixDecrementWrapper, - public details::SuffixIncrementWrapper, - public details::SuffixDecrementWrapper, - public details::istreamOperationsWrapper, - public details::ostreamOperationsWrapper - { - protected: - T val; - virtual T& get() final - { - return val; - }; - virtual const T& get() const final - { - return val; - }; - - public: - Primitive() : val() - { - } - Primitive(auto... _vals) : val(_vals...) - { - } - - public: - virtual operator T() final - { - return get(); - } - - using native_type = T; - static constexpr size_t db_size = size; - static constexpr size_t db_percision = P; - static constexpr std::string_view db_type = name; - }; -} // namespace webframe::ORM diff --git a/lib/include/ORM/details/fundamental_type.hpp b/lib/include/ORM/details/fundamental_type.hpp deleted file mode 100644 index a559fe7..0000000 --- a/lib/include/ORM/details/fundamental_type.hpp +++ /dev/null @@ -1,19 +0,0 @@ -/** - * @file fundamental_type.hpp - * @brief Concept definition for fundamental type - * @author Alex Tsvetanov - * @date 2023-08-31 - ***********************************************/ - -#pragma once - -#include - -namespace webframe::ORM::details -{ - template - concept is_inheritable = !std::is_fundamental_v && !std::is_enum_v; - - template - concept is_not_inheritable = std::is_fundamental_v || std::is_enum_v; -} // namespace webframe::ORM::details diff --git a/lib/include/ORM/details/member_pointer.hpp b/lib/include/ORM/details/member_pointer.hpp deleted file mode 100644 index 720eee7..0000000 --- a/lib/include/ORM/details/member_pointer.hpp +++ /dev/null @@ -1,301 +0,0 @@ -/** - * @file member_pointer.hpp - * @brief Concept definitions different types of member pointers - * @author Alex Tsvetanov - * @date 2023-08-31 - ***********************************************/ - -#ifndef WEBFRAME_ORM_MEM_PTR -#define WEBFRAME_ORM_MEM_PTR - -#include -#include -#include -#include "string_literal.hpp" - -namespace webframe::ORM::details -{ - template - concept is_property = std::is_member_pointer_v; - - template - concept is_not_property = !std::is_member_pointer_v; - - template - concept is_query_string = std::is_convertible_v && !is_property; - - template class i_mem_ptr; - template class mem_ptr; - - class mem_ptr_detector - { - }; - - template class i_mem_ptr : public mem_ptr_detector - { - public: - using Table = _Table; - using type = T; - using ptr_t = T Table::*; - - public: - virtual constexpr ptr_t get() const = 0; - }; - - template - concept is_mem_ptr_t = std::derived_from; - - template - concept is_not_mem_ptr_t = !is_mem_ptr_t; -} // namespace webframe::ORM::details - -namespace webframe::ORM -{ - - class IStatement - { - }; - template - concept is_statement = std::derived_from; - template class Statement; - - template class Statement : public IStatement - { - public: - static constexpr std::string_view operation = op.operator std::string_view(); - typename T1::ptr_t _1; - T2 _2; - constexpr Statement() - { - } - constexpr Statement(typename T1::ptr_t a, T2 b) : _1(a), _2(b) - { - } - }; - - template class Statement : public IStatement - { - public: - static constexpr std::string_view operation = op.operator std::string_view(); - typename T1::ptr_t _1; - typename T2::ptr_t _2; - constexpr Statement() - { - } - constexpr Statement(typename T1::ptr_t a, typename T2::ptr_t b) : _1(a), _2(b) - { - } - }; - - template - constexpr inline bool are_same(const Statement& Statement1, const Statement& Statement2) - { - // Different operations - if constexpr (op1.operator std::string_view() != op2.operator std::string_view()) - { - return false; - } - // Different operand types - else if constexpr ( - requires { - { - Statement1._1.operation - }; - } ^ - requires { - { - Statement2._1.operation - }; - }) - { - return false; - } - else if constexpr ( - requires { - { - Statement1._2.operation - }; - } ^ - requires { - { - Statement2._2.operation - }; - }) - { - return false; - } - else - { - bool answer = true; - // Both Statements - if constexpr ( - requires { - { - Statement1._1.operation - }; - } && - requires { - { - Statement2._1.operation - }; - }) - { - answer = answer && (are_same(Statement1._1, Statement2._1)); - } - // Both not Statements - if constexpr ( - !requires { - { - Statement1._1.operation - }; - } && - requires { - { - Statement2._1.operation - }; - }) - { - answer = answer && (Statement1._1 == Statement2._1); - } - // Both Statements - if constexpr ( - requires { - { - Statement1._2.operation - }; - } && - requires { - { - Statement2._2.operation - }; - }) - { - answer = answer && (are_same(Statement1._2, Statement2._2)); - } - // Both not Statements - if constexpr ( - !requires { - { - Statement1._2.operation - }; - } && - requires { - { - Statement2._2.operation - }; - }) - { - answer = answer && (Statement1._2 == Statement2._2); - } - return answer; - } - } - - template - inline std::ostream& operator<<(std::ostream& out, const Statement& statement) - { - out << "("; - if constexpr (requires { - { - typename details::i_mem_ptr::Table() - }; - }) - { - out << typeid(typename details::i_mem_ptr::type).name() << " " << typeid(typename details::i_mem_ptr::Table).name() << "::*"; - } - if constexpr (!requires { - { - typename details::i_mem_ptr::Table() - }; - }) - { - out << statement._1; - } - out << ") " << statement.operation << " ("; - if constexpr (requires { - { - typename details::i_mem_ptr::Table() - }; - }) - { - out << typeid(typename details::i_mem_ptr::type).name() << " " << typeid(typename details::i_mem_ptr::Table).name() << "::*"; - } - if constexpr (!requires { - { - typename details::i_mem_ptr::Table() - }; - }) - { - out << statement._2; - } - out << ")"; - return out; - } -} // namespace webframe::ORM - -namespace webframe::ORM::details -{ - template class mem_ptr; - - template - requires(!std::is_same_v) - class mem_ptr : public i_mem_ptr - { - public: - using typename i_mem_ptr::Table; - using typename i_mem_ptr::type; - using typename i_mem_ptr::ptr_t; - - constexpr inline ptr_t get() const - { - return property; - } - - constexpr inline auto operator=(auto x) const - { - if constexpr (details::is_mem_ptr_t) - { - return webframe::ORM::Statement, "=", typename decltype(x)::ptr_t>(this->get(), x.get()); - } - if constexpr (details::is_not_mem_ptr_t) - { - return webframe::ORM::Statement, "=", decltype(x)>(this->get(), x); - } - } - }; - - struct Filler - { - private: - template struct pseudo_property - { - public: - using var_t = T; - static constexpr std::string_view _name() - { - return lit.value; - } - }; - - public: - static constexpr std::string_view table_name = ""; - pseudo_property Null; - }; - - template <> class mem_ptr : public mem_ptr<&Filler::Null> - { - public: - using typename i_mem_ptr::Table; - using typename i_mem_ptr::type; - using typename i_mem_ptr::ptr_t; - }; -} // namespace webframe::ORM::details - -namespace webframe::ORM -{ - template constexpr details::mem_ptr P = details::mem_ptr(); -} - -#include "../../../src/ORM/details/member_pointer.cpp" - -#endif diff --git a/lib/include/ORM/details/orm_tuple.hpp b/lib/include/ORM/details/orm_tuple.hpp deleted file mode 100644 index e04e23e..0000000 --- a/lib/include/ORM/details/orm_tuple.hpp +++ /dev/null @@ -1,294 +0,0 @@ -#pragma once - -#include -#include -#include "member_pointer.hpp" -#include "../rules.hpp" -#include "../fields.hpp" - -namespace webframe::ORM::details -{ - - // Extended std::tuple - template class orm_tuple : public std::tuple - { - public: - static constexpr size_t size = sizeof...(Ts); - - template using orm_type = typename std::tuple_element>::type; - - // explicit constexpr orm_tuple(const std::tuple&& t) : std::tuple(t) {} - // explicit constexpr orm_tuple(const std::tuple& t) : std::tuple(t) {} - constexpr orm_tuple(const std::tuple t) : std::tuple(t) - { - } - constexpr orm_tuple() : std::tuple() - { - } - - constexpr std::tuple to_tuple() const - { - return *this; - } - - template constexpr auto get() const - { - return std::get(*this); - } - - template constexpr auto get() const - { - if constexpr (std::is_integral_v) - { - return std::get(*this); - } - if constexpr (!std::is_integral_v) - { - return std::get(*this); - } - } - }; - - template <> class orm_tuple<> : public std::tuple<> - { - public: - // explicit constexpr orm_tuple(const std::tuple<>&& t) : std::tuple<>(t) {} - // explicit constexpr orm_tuple(const std::tuple<>& t) : std::tuple<>(t) {} - constexpr orm_tuple(const std::tuple<> t) : std::tuple<>(t) - { - } - constexpr orm_tuple() : std::tuple<>() - { - } - static constexpr size_t size = 0; - - constexpr std::tuple<> to_tuple() const - { - return *this; - } - }; - - // Decomposite tuples of params - template class get_type; - - template - requires(std::is_member_pointer_v) - class get_type - { - public: - using type = typename webframe::ORM::details::i_mem_ptr::type::var_t; - using actual_type = typename webframe::ORM::details::i_mem_ptr::type; - using table = typename webframe::ORM::details::i_mem_ptr::Table; - }; - - template - requires(!std::is_member_pointer_v) - class get_type - { - public: - using type = value; - using actual_type = value; - using table = decltype(nullptr); - }; - - template class decomposite_properties; - - template class decomposite_properties> - { - public: - using data_types = orm_tuple::type...>; - using data_tables = orm_tuple::table...>; - }; - - // Convertible tuples utils - template class normalize_type; - - template class normalize_type - { - public: - using type = T; - }; - - template class normalize_type - { - public: - using type = typename i_mem_ptr::type::var_t; - }; - - template class convertible_tuples; - - template class convertible_tuples, webframe::ORM::details::orm_tuple> - { - public: - using T = webframe::ORM::details::orm_tuple; - using U = webframe::ORM::details::orm_tuple; - template static constexpr bool eval(std::index_sequence) - { - if constexpr (T::size == 0) - { - return U::size == 0; - } - return (requires(typename normalize_type>::type var) { - { - var = std::declval>() - }; - } && ...); - } - static constexpr bool value = eval(std::index_sequence_for{}); - }; - - template - concept pseudo_concept = T::value; - - // Placeholders - class IPlaceholder - { - }; - - template class placeholder : public IPlaceholder - { - public: - webframe::ORM::property _; - }; - - template - concept is_orm_placeholder = std::derived_from::Table, IPlaceholder>; - - template - concept is_not_orm_placeholder = !is_orm_placeholder; - - // Get properties - template class get_properties; - - // Tuple - template class get_properties> - { - public: - using properties = decltype(std::tuple_cat(typename get_properties::properties()...)); - using orm_properties = decltype(orm_tuple(properties())); - }; - - template class get_properties> - { - public: - using properties = typename get_properties>::properties; - using orm_properties = decltype(orm_tuple(properties())); - }; - - // Property - template class get_properties - { - public: - using properties = std::tuple; - using orm_properties = decltype(orm_tuple(properties())); - }; - - // Rule - template class get_properties - { - public: - using properties = - decltype(std::tuple_cat(typename get_properties::properties(), typename get_properties::properties())); - using orm_properties = decltype(orm_tuple(properties())); - }; - - // Random value - template struct is_tuple : std::false_type - { - }; - template struct is_tuple> : std::true_type - { - }; - - template - concept is_property_or_rule_or_tuple = is_property || is_rule || is_tuple::value; - template - concept is_not_property_not_rule_not_tuple = !is_property_or_rule_or_tuple; - template class get_properties - { - public: - using properties = std::tuple<>; - using orm_properties = decltype(orm_tuple(properties())); - }; - - // Filter the placeholders from a tuple - template class get_placeholders; - - template class get_placeholders> - { - public: - using placeholders = typename get_placeholders>::placeholders; - using orm_placeholders = typename get_placeholders>::orm_placeholders; - }; - - template <> class get_placeholders> - { - public: - using placeholders = std::tuple<>; - using orm_placeholders = decltype(orm_tuple(placeholders())); - }; - - template class get_placeholders> - { - public: - using placeholders = typename get_placeholders>::placeholders; - using orm_placeholders = typename get_placeholders>::orm_placeholders; - }; - - template class get_placeholders> - { - public: - using placeholders = decltype(std::tuple_cat(std::tuple(), std::declval>::placeholders>())); - using orm_placeholders = decltype(orm_tuple(std::declval())); - }; - - // filter the placeholders and the properties from a tuple - template class get_placeholders_and_properties; - - template <> class get_placeholders_and_properties> - { - public: - using placeholders = std::tuple<>; - using orm_placeholders = decltype(orm_tuple(placeholders())); - }; - - template class get_placeholders_and_properties> - { - public: - using placeholders = - decltype(std::tuple_cat(std::tuple(), std::declval>::placeholders>())); - using orm_placeholders = decltype(orm_tuple(placeholders())); - }; - - template - concept is_property_but_not_placeholder = is_property && !is_orm_placeholder; - template class get_placeholders_and_properties> - { - public: - using placeholders = - decltype(std::tuple_cat(std::tuple(), std::declval>::placeholders>())); - using orm_placeholders = decltype(orm_tuple(placeholders())); - }; - - template - concept is_not_property_or_placeholder = !(is_property_but_not_placeholder || is_orm_placeholder); - - template class get_placeholders_and_properties> - { - public: - using placeholders = typename get_placeholders>::placeholders; - using orm_placeholders = typename get_placeholders>::orm_placeholders; - }; - - template class get_placeholders_and_properties> - { - public: - using placeholders = typename get_placeholders_and_properties>::placeholders; - using orm_placeholders = typename get_placeholders_and_properties>::orm_placeholders; - }; -} // namespace webframe::ORM::details - -namespace webframe::ORM -{ - template static constexpr auto Placeholder = &details::placeholder::_; -} diff --git a/lib/include/ORM/details/result_type.hpp b/lib/include/ORM/details/result_type.hpp deleted file mode 100644 index 169e7c3..0000000 --- a/lib/include/ORM/details/result_type.hpp +++ /dev/null @@ -1,61 +0,0 @@ -/** - * @file result_type.hpp - * @brief Result dataset class definition - * @author Alex Tsvetanov - * @date 2023-08-31 - ***********************************************/ - -#pragma once - -#include "member_pointer.hpp" -#include "orm_tuple.hpp" -#include - -namespace webframe::ORM::details -{ - constexpr auto result_all = []() consteval { return true; }; - constexpr auto result_properties = []() consteval { return details::is_property; }; - - template - requires requires { - { - filter.template operator()() - }; - } - class result_t - { - private: - template static constexpr auto result_t_utils(arg1 a, args1... A) - { - if constexpr (sizeof...(args1) == 0) - { - if constexpr (filter.template operator()()) - { - return orm_tuple(std::make_tuple(a)); - } - if constexpr (!filter.template operator()()) - { - return orm_tuple(std::tuple<>()); - } - } - if constexpr (sizeof...(args1) > 0) - { - return orm_tuple(std::tuple_cat(result_t_utils(a).to_tuple(), result_t_utils(A...).to_tuple())); - } - } - - public: - using type = decltype(result_t_utils((std::declval())...)); - - static constexpr type create(args... argv) - { - return result_t_utils(argv...); - } - - static constexpr type fuck_this_shit(args...) - { - } - }; -} // namespace webframe::ORM::details - -#include "../../../src/ORM/details/result_type.cpp" diff --git a/lib/include/ORM/details/string_literal.hpp b/lib/include/ORM/details/string_literal.hpp deleted file mode 100644 index 45c8990..0000000 --- a/lib/include/ORM/details/string_literal.hpp +++ /dev/null @@ -1,47 +0,0 @@ -/** - * @file string_literal.hpp - * @brief Single header containing structure that allows to use string as template parameters - * @author Alex Tsvetanov - * @date 2023-06-04 - ***********************************************/ - -#pragma once - -#include -#include - -namespace webframe::ORM -{ - namespace details - { - template struct string_literal - { - constexpr static size_t size = N; - - constexpr string_literal(const char (&str)[N]) - { - std::copy_n(str, N, value); - } - - constexpr operator std::string_view() const - { - return std::string_view(value); - } - - constexpr std::string_view to_sv() const - { - return std::string_view(value); - } - - char value[N]; - }; - } // namespace details - - namespace literals - { - template constexpr decltype(Str) operator""_sl() - { - return Str; - } - } // namespace literals -} // namespace webframe::ORM diff --git a/lib/include/ORM/details/warnings.hpp b/lib/include/ORM/details/warnings.hpp deleted file mode 100644 index e0e44ea..0000000 --- a/lib/include/ORM/details/warnings.hpp +++ /dev/null @@ -1,35 +0,0 @@ -/** - * @file warnings.hpp - * @brief Warning disabling macros for certain scenarios - * @author Alex Tsvetanov - * @date 2023-08-31 - ***********************************************/ - -#pragma once - -#if defined(_MSC_VER) - #define DISABLE_WARNING_PUSH __pragma(warning(push)) - #define DISABLE_WARNING_PUSH3 __pragma(warning(push, 3)) - #define DISABLE_WARNING_POP __pragma(warning(pop)) - #define DISABLE_WARNING(warningNumber) __pragma(warning(disable : warningNumber)) - - #define DISABLE_WARNING_UNREACHABLE_CODE DISABLE_WARNING(4702) - #define DISABLE_WARNING_LOSS_OF_DATA DISABLE_WARNING(4244) -#elif defined(__GNUC__) || defined(__clang__) - #define DO_PRAGMA(X) _Pragma(#X) - #define DISABLE_WARNING_PUSH DO_PRAGMA(GCC diagnostic push) - #define DISABLE_WARNING_PUSH3 /**/ - #define DISABLE_WARNING_POP DO_PRAGMA(GCC diagnostic pop) - #define DISABLE_WARNING(warningName) DO_PRAGMA(GCC diagnostic ignored #warningName) - - #define DISABLE_WARNING_UNREACHABLE_CODE DISABLE_WARNING(-Wunreachable-code) - #define DISABLE_WARNING_LOSS_OF_DATA DISABLE_WARNING(-Wconversion) -#else - #define DISABLE_WARNING_PUSH /**/ - #define DISABLE_WARNING_PUSH3 /**/ - #define DISABLE_WARNING_POP /**/ - #define DISABLE_WARNING_UNREACHABLE_CODE /**/ - #define DISABLE_WARNING_LOSS_OF_DATA /**/ - - #define DISABLE_WARNING_USER_DEFINED_COMMA /**/ -#endif diff --git a/lib/include/ORM/fields.hpp b/lib/include/ORM/fields.hpp deleted file mode 100644 index e89c952..0000000 --- a/lib/include/ORM/fields.hpp +++ /dev/null @@ -1,152 +0,0 @@ -/** - * @file fields.hpp - * @brief Properties and relationships structures - * @author Alex Tsvetanov - * @date 2023-06-04 - ***********************************************/ - -#pragma once -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -namespace webframe::ORM -{ - namespace details - { - class property - { - }; - - class relationship - { - }; - } // namespace details - - template class property; - - template - requires(!std::is_same_v && !std::is_same_v) - class property : public T, public details::property - { - public: - using var_t = typename T::native_type; - static constexpr std::string_view _name() - { - return lit.value; - } - - property() : T() - { - } - property(const T& a) : T(a) - { - } - - template - requires requires(Y a) { - { - static_cast(a) - }; - } - property(const Y& a) : T(static_cast(a)) - { - } - }; - - template - requires(std::is_same_v || std::is_same_v) - class property : public T, public details::property - { - public: - using var_t = T; - static constexpr std::string_view _name() - { - return lit.value; - } - - explicit inline operator T() - { - return *this; - } - - inline const T& operator=(auto _value) - { - return static_cast(*this) = _value; - } - }; - - template class property : public details::property - { - protected: - T value; - - public: - using var_t = T; - static constexpr std::string_view __name = lit.value; - static constexpr std::string_view _name() - { - return lit.value; - } - - property(const T value) : value(value) - { - } - property(T& value) : value(value) - { - } - - property() : value() - { - } - - inline operator T() const - { - return value; - } - inline operator T&() - { - return value; - } - - const T& operator=(auto _value) - { - value = _value; - return value; - } - }; - - enum RelationshipTypes - { - one2one, - one2many - }; - - template class relationship; - - template - class relationship<_type, external_ref, name> : public P, public details::relationship - { - public: - using Source = T; - static constexpr RelationshipTypes type = _type; - static constexpr inline std::string_view _name() - { - return name.to_sv(); - } - - protected: - std::vector records; - }; -} // namespace webframe::ORM - -#include "../../src/ORM/fields.cpp" diff --git a/lib/include/ORM/forward-decl.hpp b/lib/include/ORM/forward-decl.hpp new file mode 100644 index 0000000..4dbb463 --- /dev/null +++ b/lib/include/ORM/forward-decl.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include +#include +#include + +namespace webframe::ORM +{ + template + requires (details::is_database_wrapped_class && !std::is_base_of_v) + class property; + + template + class Rule; +} // namespace webframe::ORM diff --git a/lib/include/ORM/join_rule.hpp b/lib/include/ORM/join_rule.hpp deleted file mode 100644 index e02b404..0000000 --- a/lib/include/ORM/join_rule.hpp +++ /dev/null @@ -1,104 +0,0 @@ -/** - * @file join_rule.hpp - * @brief Wrapper for rules extended with join funcitonality - * @author Alex Tsvetanov - * @date 2023-09-21 - ***********************************************/ - -#pragma once - -#include "rules.hpp" -#include "CRUD/utils.hpp" - -using namespace std::literals; - -namespace webframe::ORM -{ - template class JoinRule : public rule_t - { - public: - static constexpr auto mode = _mode; - using Table = _Table; - constexpr JoinRule() : rule_t() - { - } - constexpr JoinRule(rule_t a) : rule_t(a) - { - } - constexpr JoinRule(auto a, auto b) : rule_t(a, b) - { - } - - constexpr operator rule_t() - { - return this->to_rule(); - } - - constexpr rule_t to_rule() const - { - return static_cast(*this); - } - }; - - template class GroupByRule; - - template class GroupByRule<_Properties, rule_t> : public rule_t - { - public: - using Properties = _Properties; - Properties properties; - static constexpr size_t size = Properties::size; - - constexpr GroupByRule() : rule_t() - { - } - constexpr GroupByRule(Properties a, rule_t b) : rule_t(b), properties(a) - { - } - constexpr GroupByRule(Properties p, auto a, auto b) : rule_t(a, b), properties(p) - { - } - - static constexpr bool has_rule() - { - return true; - } - - constexpr operator rule_t() - { - return this->to_rule(); - } - - constexpr rule_t to_rule() const - { - return static_cast(*this); - } - }; - - template class GroupByRule<_Properties, nullptr_t> - { - public: - using Properties = _Properties; - Properties properties; - static constexpr size_t size = Properties::size; - - constexpr GroupByRule() - { - } - constexpr GroupByRule(Properties a, nullptr_t) : properties(a) - { - } - - static constexpr bool has_rule() - { - return false; - } - }; - - template class OrderBy - { - public: - static constexpr auto property = P; - static constexpr auto sort = way; - }; -} // namespace webframe::ORM diff --git a/lib/include/ORM/limits.hpp b/lib/include/ORM/limits.hpp deleted file mode 100644 index 12343b4..0000000 --- a/lib/include/ORM/limits.hpp +++ /dev/null @@ -1,33 +0,0 @@ -/** - * @file limits.hpp - * @brief Pagification literals - * @author Alex Tsvetanov - * @date 2023-08-31 - ***********************************************/ - -#pragma once - -namespace webframe::ORM -{ - class Pagification - { - private: - unsigned long long elements_per_page; - unsigned long long number_of_page; - - protected: - class Page; - class Per_page; - - public: - unsigned long long get_elements_per_page() const; - unsigned long long get_number_of_page() const; - constexpr Pagification(unsigned long long = 0, unsigned long long = 0); - friend constexpr Pagification operator&(Per_page, Page); - friend constexpr Pagification operator&(Page, Per_page); - friend constexpr Per_page operator""_per_page(unsigned long long); - friend constexpr Page operator""_page(unsigned long long); - }; -} // namespace webframe::ORM - -#include "../../src/ORM/limits.cpp" diff --git a/lib/include/ORM/rules.hpp b/lib/include/ORM/rules.hpp deleted file mode 100644 index f5a799d..0000000 --- a/lib/include/ORM/rules.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/** - * @file rules.hpp - * @brief Rule class definition - * @author Alex Tsvetanov - * @date 2023-08-31 - ***********************************************/ - -#pragma once - -#include "details/string_literal.hpp" -#include "details/member_pointer.hpp" -#include "details/string_literal.hpp" -#include - -using namespace std::literals; - -namespace webframe::ORM -{ - class IRule - { - }; - template - concept is_rule = std::derived_from; - template class Rule; -} // namespace webframe::ORM - -#include "../../src/ORM/rules.cpp" diff --git a/lib/include/ORM/std/string_view b/lib/include/ORM/std/string_view deleted file mode 100644 index 2f1e3cc..0000000 --- a/lib/include/ORM/std/string_view +++ /dev/null @@ -1,1778 +0,0 @@ -// Copyright 2017-2020 by Martin Moene -// -// string-view lite, a C++17-like string_view for C++98 and later. -// For more information see https://github.com/martinmoene/string-view-lite -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#pragma once - -#ifndef NONSTD_SV_LITE_H_INCLUDED -#define NONSTD_SV_LITE_H_INCLUDED - -#define string_view_lite_MAJOR 1 -#define string_view_lite_MINOR 7 -#define string_view_lite_PATCH 0 - -#define string_view_lite_VERSION nssv_STRINGIFY(string_view_lite_MAJOR) "." nssv_STRINGIFY(string_view_lite_MINOR) "." nssv_STRINGIFY(string_view_lite_PATCH) - -#define nssv_STRINGIFY( x ) nssv_STRINGIFY_( x ) -#define nssv_STRINGIFY_( x ) #x - -// string-view lite configuration: - -#define nssv_STRING_VIEW_DEFAULT 0 -#define nssv_STRING_VIEW_NONSTD 1 -#define nssv_STRING_VIEW_STD 2 - -// tweak header support: - -#ifdef __has_include -# if __has_include() -# include -# endif -#define nssv_HAVE_TWEAK_HEADER 1 -#else -#define nssv_HAVE_TWEAK_HEADER 0 -//# pragma message("string_view.hpp: Note: Tweak header not supported.") -#endif - -// string_view selection and configuration: - -#if !defined( nssv_CONFIG_SELECT_STRING_VIEW ) -# define nssv_CONFIG_SELECT_STRING_VIEW ( nssv_HAVE_STD_STRING_VIEW ? nssv_STRING_VIEW_STD : nssv_STRING_VIEW_NONSTD ) -#endif - -#ifndef nssv_CONFIG_STD_SV_OPERATOR -# define nssv_CONFIG_STD_SV_OPERATOR 0 -#endif - -#ifndef nssv_CONFIG_USR_SV_OPERATOR -# define nssv_CONFIG_USR_SV_OPERATOR 1 -#endif - -#ifdef nssv_CONFIG_CONVERSION_STD_STRING -# define nssv_CONFIG_CONVERSION_STD_STRING_CLASS_METHODS nssv_CONFIG_CONVERSION_STD_STRING -# define nssv_CONFIG_CONVERSION_STD_STRING_FREE_FUNCTIONS nssv_CONFIG_CONVERSION_STD_STRING -#endif - -#ifndef nssv_CONFIG_CONVERSION_STD_STRING_CLASS_METHODS -# define nssv_CONFIG_CONVERSION_STD_STRING_CLASS_METHODS 1 -#endif - -#ifndef nssv_CONFIG_CONVERSION_STD_STRING_FREE_FUNCTIONS -# define nssv_CONFIG_CONVERSION_STD_STRING_FREE_FUNCTIONS 1 -#endif - -#ifndef nssv_CONFIG_NO_STREAM_INSERTION -# define nssv_CONFIG_NO_STREAM_INSERTION 0 -#endif - -// Control presence of exception handling (try and auto discover): - -#ifndef nssv_CONFIG_NO_EXCEPTIONS -# if defined(_MSC_VER) -# include // for _HAS_EXCEPTIONS -# endif -# if defined(__cpp_exceptions) || defined(__EXCEPTIONS) || (_HAS_EXCEPTIONS) -# define nssv_CONFIG_NO_EXCEPTIONS 0 -# else -# define nssv_CONFIG_NO_EXCEPTIONS 1 -# endif -#endif - -// C++ language version detection (C++23 is speculative): -// Note: VC14.0/1900 (VS2015) lacks too much from C++14. - -#ifndef nssv_CPLUSPLUS -# if defined(_MSVC_LANG ) && !defined(__clang__) -# define nssv_CPLUSPLUS (_MSC_VER == 1900 ? 201103L : _MSVC_LANG ) -# else -# define nssv_CPLUSPLUS __cplusplus -# endif -#endif - -#define nssv_CPP98_OR_GREATER ( nssv_CPLUSPLUS >= 199711L ) -#define nssv_CPP11_OR_GREATER ( nssv_CPLUSPLUS >= 201103L ) -#define nssv_CPP11_OR_GREATER_ ( nssv_CPLUSPLUS >= 201103L ) -#define nssv_CPP14_OR_GREATER ( nssv_CPLUSPLUS >= 201402L ) -#define nssv_CPP17_OR_GREATER ( nssv_CPLUSPLUS >= 201703L ) -#define nssv_CPP20_OR_GREATER ( nssv_CPLUSPLUS >= 202002L ) -#define nssv_CPP23_OR_GREATER ( nssv_CPLUSPLUS >= 202300L ) - -// use C++17 std::string_view if available and requested: - -#if nssv_CPP17_OR_GREATER && defined(__has_include ) -# if __has_include( ) -# define nssv_HAVE_STD_STRING_VIEW 1 -# else -# define nssv_HAVE_STD_STRING_VIEW 0 -# endif -#else -# define nssv_HAVE_STD_STRING_VIEW 0 -#endif - -#define nssv_USES_STD_STRING_VIEW ( (nssv_CONFIG_SELECT_STRING_VIEW == nssv_STRING_VIEW_STD) || ((nssv_CONFIG_SELECT_STRING_VIEW == nssv_STRING_VIEW_DEFAULT) && nssv_HAVE_STD_STRING_VIEW) ) - -#define nssv_HAVE_STARTS_WITH ( nssv_CPP20_OR_GREATER || !nssv_USES_STD_STRING_VIEW ) -#define nssv_HAVE_ENDS_WITH nssv_HAVE_STARTS_WITH - -// -// Use C++17 std::string_view: -// - -#if nssv_USES_STD_STRING_VIEW - -#include - -// Extensions for std::string: - -#if nssv_CONFIG_CONVERSION_STD_STRING_FREE_FUNCTIONS - -namespace nonstd { - - template< class CharT, class Traits, class Allocator = std::allocator > - std::basic_string - to_string(std::basic_string_view v, Allocator const& a = Allocator()) - { - return std::basic_string(v.begin(), v.end(), a); - } - - template< class CharT, class Traits, class Allocator > - std::basic_string_view - to_string_view(std::basic_string const& s) - { - return std::basic_string_view(s.data(), s.size()); - } - - // Literal operators sv and _sv: - -#if nssv_CONFIG_STD_SV_OPERATOR - - using namespace std::literals::string_view_literals; - -#endif - -#if nssv_CONFIG_USR_SV_OPERATOR - - inline namespace literals { - inline namespace string_view_literals { - - - constexpr std::string_view operator "" _sv(const char* str, size_t len) noexcept // (1) - { - return std::string_view{ str, len }; - } - - constexpr std::u16string_view operator "" _sv(const char16_t* str, size_t len) noexcept // (2) - { - return std::u16string_view{ str, len }; - } - - constexpr std::u32string_view operator "" _sv(const char32_t* str, size_t len) noexcept // (3) - { - return std::u32string_view{ str, len }; - } - - constexpr std::wstring_view operator "" _sv(const wchar_t* str, size_t len) noexcept // (4) - { - return std::wstring_view{ str, len }; - } - - } - } // namespace literals::string_view_literals - -#endif // nssv_CONFIG_USR_SV_OPERATOR - -} // namespace nonstd - -#endif // nssv_CONFIG_CONVERSION_STD_STRING_FREE_FUNCTIONS - -namespace nonstd { - - using std::string_view; - using std::wstring_view; - using std::u16string_view; - using std::u32string_view; - using std::basic_string_view; - - // literal "sv" and "_sv", see above - - using std::operator==; - using std::operator!=; - using std::operator<; - using std::operator<=; - using std::operator>; - using std::operator>=; - - using std::operator<<; - -} // namespace nonstd - -#else // nssv_HAVE_STD_STRING_VIEW - -// -// Before C++17: use string_view lite: -// - -// Compiler versions: -// -// MSVC++ 6.0 _MSC_VER == 1200 nssv_COMPILER_MSVC_VERSION == 60 (Visual Studio 6.0) -// MSVC++ 7.0 _MSC_VER == 1300 nssv_COMPILER_MSVC_VERSION == 70 (Visual Studio .NET 2002) -// MSVC++ 7.1 _MSC_VER == 1310 nssv_COMPILER_MSVC_VERSION == 71 (Visual Studio .NET 2003) -// MSVC++ 8.0 _MSC_VER == 1400 nssv_COMPILER_MSVC_VERSION == 80 (Visual Studio 2005) -// MSVC++ 9.0 _MSC_VER == 1500 nssv_COMPILER_MSVC_VERSION == 90 (Visual Studio 2008) -// MSVC++ 10.0 _MSC_VER == 1600 nssv_COMPILER_MSVC_VERSION == 100 (Visual Studio 2010) -// MSVC++ 11.0 _MSC_VER == 1700 nssv_COMPILER_MSVC_VERSION == 110 (Visual Studio 2012) -// MSVC++ 12.0 _MSC_VER == 1800 nssv_COMPILER_MSVC_VERSION == 120 (Visual Studio 2013) -// MSVC++ 14.0 _MSC_VER == 1900 nssv_COMPILER_MSVC_VERSION == 140 (Visual Studio 2015) -// MSVC++ 14.1 _MSC_VER >= 1910 nssv_COMPILER_MSVC_VERSION == 141 (Visual Studio 2017) -// MSVC++ 14.2 _MSC_VER >= 1920 nssv_COMPILER_MSVC_VERSION == 142 (Visual Studio 2019) - -#if defined(_MSC_VER ) && !defined(__clang__) -# define nssv_COMPILER_MSVC_VER (_MSC_VER ) -# define nssv_COMPILER_MSVC_VERSION (_MSC_VER / 10 - 10 * ( 5 + (_MSC_VER < 1900 ) ) ) -#else -# define nssv_COMPILER_MSVC_VER 0 -# define nssv_COMPILER_MSVC_VERSION 0 -#endif - -#define nssv_COMPILER_VERSION( major, minor, patch ) ( 10 * ( 10 * (major) + (minor) ) + (patch) ) - -#if defined( __apple_build_version__ ) -# define nssv_COMPILER_APPLECLANG_VERSION nssv_COMPILER_VERSION(__clang_major__, __clang_minor__, __clang_patchlevel__) -# define nssv_COMPILER_CLANG_VERSION 0 -#elif defined( __clang__ ) -# define nssv_COMPILER_APPLECLANG_VERSION 0 -# define nssv_COMPILER_CLANG_VERSION nssv_COMPILER_VERSION(__clang_major__, __clang_minor__, __clang_patchlevel__) -#else -# define nssv_COMPILER_APPLECLANG_VERSION 0 -# define nssv_COMPILER_CLANG_VERSION 0 -#endif - -#if defined(__GNUC__) && !defined(__clang__) -# define nssv_COMPILER_GNUC_VERSION nssv_COMPILER_VERSION(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__) -#else -# define nssv_COMPILER_GNUC_VERSION 0 -#endif - -// half-open range [lo..hi): -#define nssv_BETWEEN( v, lo, hi ) ( (lo) <= (v) && (v) < (hi) ) - -// Presence of language and library features: - -#ifdef _HAS_CPP0X -# define nssv_HAS_CPP0X _HAS_CPP0X -#else -# define nssv_HAS_CPP0X 0 -#endif - -// Unless defined otherwise below, consider VC14 as C++11 for variant-lite: - -#if nssv_COMPILER_MSVC_VER >= 1900 -# undef nssv_CPP11_OR_GREATER -# define nssv_CPP11_OR_GREATER 1 -#endif - -#define nssv_CPP11_90 (nssv_CPP11_OR_GREATER_ || nssv_COMPILER_MSVC_VER >= 1500) -#define nssv_CPP11_100 (nssv_CPP11_OR_GREATER_ || nssv_COMPILER_MSVC_VER >= 1600) -#define nssv_CPP11_110 (nssv_CPP11_OR_GREATER_ || nssv_COMPILER_MSVC_VER >= 1700) -#define nssv_CPP11_120 (nssv_CPP11_OR_GREATER_ || nssv_COMPILER_MSVC_VER >= 1800) -#define nssv_CPP11_140 (nssv_CPP11_OR_GREATER_ || nssv_COMPILER_MSVC_VER >= 1900) -#define nssv_CPP11_141 (nssv_CPP11_OR_GREATER_ || nssv_COMPILER_MSVC_VER >= 1910) - -#define nssv_CPP14_000 (nssv_CPP14_OR_GREATER) -#define nssv_CPP17_000 (nssv_CPP17_OR_GREATER) - -// Presence of C++11 language features: - -#define nssv_HAVE_CONSTEXPR_11 nssv_CPP11_140 -#define nssv_HAVE_EXPLICIT_CONVERSION nssv_CPP11_140 -#define nssv_HAVE_INLINE_NAMESPACE nssv_CPP11_140 -#define nssv_HAVE_IS_DEFAULT nssv_CPP11_140 -#define nssv_HAVE_IS_DELETE nssv_CPP11_140 -#define nssv_HAVE_NOEXCEPT nssv_CPP11_140 -#define nssv_HAVE_NULLPTR nssv_CPP11_100 -#define nssv_HAVE_REF_QUALIFIER nssv_CPP11_140 -#define nssv_HAVE_UNICODE_LITERALS nssv_CPP11_140 -#define nssv_HAVE_USER_DEFINED_LITERALS nssv_CPP11_140 -#define nssv_HAVE_WCHAR16_T nssv_CPP11_100 -#define nssv_HAVE_WCHAR32_T nssv_CPP11_100 - -#if ! ( ( nssv_CPP11_OR_GREATER && nssv_COMPILER_CLANG_VERSION ) || nssv_BETWEEN( nssv_COMPILER_CLANG_VERSION, 300, 400 ) ) -# define nssv_HAVE_STD_DEFINED_LITERALS nssv_CPP11_140 -#else -# define nssv_HAVE_STD_DEFINED_LITERALS 0 -#endif - -// Presence of C++14 language features: - -#define nssv_HAVE_CONSTEXPR_14 nssv_CPP14_000 - -// Presence of C++17 language features: - -#define nssv_HAVE_NODISCARD nssv_CPP17_000 - -// Presence of C++ library features: - -#define nssv_HAVE_STD_HASH nssv_CPP11_120 - -// Presence of compiler intrinsics: - -// Providing char-type specializations for compare() and length() that -// use compiler intrinsics can improve compile- and run-time performance. -// -// The challenge is in using the right combinations of builtin availability -// and its constexpr-ness. -// -// | compiler | __builtin_memcmp (constexpr) | memcmp (constexpr) | -// |----------|------------------------------|---------------------| -// | clang | 4.0 (>= 4.0 ) | any (? ) | -// | clang-a | 9.0 (>= 9.0 ) | any (? ) | -// | gcc | any (constexpr) | any (? ) | -// | msvc | >= 14.2 C++17 (>= 14.2 ) | any (? ) | - -#define nssv_HAVE_BUILTIN_VER ( (nssv_CPP17_000 && nssv_COMPILER_MSVC_VERSION >= 142) || nssv_COMPILER_GNUC_VERSION > 0 || nssv_COMPILER_CLANG_VERSION >= 400 || nssv_COMPILER_APPLECLANG_VERSION >= 900 ) -#define nssv_HAVE_BUILTIN_CE ( nssv_HAVE_BUILTIN_VER ) - -#define nssv_HAVE_BUILTIN_MEMCMP ( (nssv_HAVE_CONSTEXPR_14 && nssv_HAVE_BUILTIN_CE) || !nssv_HAVE_CONSTEXPR_14 ) -#define nssv_HAVE_BUILTIN_STRLEN ( (nssv_HAVE_CONSTEXPR_11 && nssv_HAVE_BUILTIN_CE) || !nssv_HAVE_CONSTEXPR_11 ) - -#ifdef __has_builtin -# define nssv_HAVE_BUILTIN( x ) __has_builtin( x ) -#else -# define nssv_HAVE_BUILTIN( x ) 0 -#endif - -#if nssv_HAVE_BUILTIN(__builtin_memcmp) || nssv_HAVE_BUILTIN_VER -# define nssv_BUILTIN_MEMCMP __builtin_memcmp -#else -# define nssv_BUILTIN_MEMCMP memcmp -#endif - -#if nssv_HAVE_BUILTIN(__builtin_strlen) || nssv_HAVE_BUILTIN_VER -# define nssv_BUILTIN_STRLEN __builtin_strlen -#else -# define nssv_BUILTIN_STRLEN strlen -#endif - -// C++ feature usage: - -#if nssv_HAVE_CONSTEXPR_11 -# define nssv_constexpr constexpr -#else -# define nssv_constexpr /*constexpr*/ -#endif - -#if nssv_HAVE_CONSTEXPR_14 -# define nssv_constexpr14 constexpr -#else -# define nssv_constexpr14 /*constexpr*/ -#endif - -#if nssv_HAVE_EXPLICIT_CONVERSION -# define nssv_explicit explicit -#else -# define nssv_explicit /*explicit*/ -#endif - -#if nssv_HAVE_INLINE_NAMESPACE -# define nssv_inline_ns inline -#else -# define nssv_inline_ns /*inline*/ -#endif - -#if nssv_HAVE_NOEXCEPT -# define nssv_noexcept noexcept -#else -# define nssv_noexcept /*noexcept*/ -#endif - -//#if nssv_HAVE_REF_QUALIFIER -//# define nssv_ref_qual & -//# define nssv_refref_qual && -//#else -//# define nssv_ref_qual /*&*/ -//# define nssv_refref_qual /*&&*/ -//#endif - -#if nssv_HAVE_NULLPTR -# define nssv_nullptr nullptr -#else -# define nssv_nullptr NULL -#endif - -#if nssv_HAVE_NODISCARD -# define nssv_nodiscard [[nodiscard]] -#else -# define nssv_nodiscard /*[[nodiscard]]*/ -#endif - -// Additional includes: - -#include -#include -#include -#include -#include // std::char_traits<> - -#if ! nssv_CONFIG_NO_STREAM_INSERTION -# include -#endif - -#if ! nssv_CONFIG_NO_EXCEPTIONS -# include -#endif - -#if nssv_CPP11_OR_GREATER -# include -#endif - -// Clang, GNUC, MSVC warning suppression macros: - -#if defined(__clang__) -# pragma clang diagnostic ignored "-Wreserved-user-defined-literal" -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wuser-defined-literals" -#elif defined(__GNUC__) -# pragma GCC diagnostic push -# pragma GCC diagnostic ignored "-Wliteral-suffix" -#endif // __clang__ - -#if nssv_COMPILER_MSVC_VERSION >= 140 -# define nssv_SUPPRESS_MSGSL_WARNING(expr) [[gsl::suppress(expr)]] -# define nssv_SUPPRESS_MSVC_WARNING(code, descr) __pragma(warning(suppress: code) ) -# define nssv_DISABLE_MSVC_WARNINGS(codes) __pragma(warning(push)) __pragma(warning(disable: codes)) -#else -# define nssv_SUPPRESS_MSGSL_WARNING(expr) -# define nssv_SUPPRESS_MSVC_WARNING(code, descr) -# define nssv_DISABLE_MSVC_WARNINGS(codes) -#endif - -#if defined(__clang__) -# define nssv_RESTORE_WARNINGS() _Pragma("clang diagnostic pop") -#elif defined(__GNUC__) -# define nssv_RESTORE_WARNINGS() _Pragma("GCC diagnostic pop") -#elif nssv_COMPILER_MSVC_VERSION >= 140 -# define nssv_RESTORE_WARNINGS() __pragma(warning(pop )) -#else -# define nssv_RESTORE_WARNINGS() -#endif - -// Suppress the following MSVC (GSL) warnings: -// - C4455, non-gsl : 'operator ""sv': literal suffix identifiers that do not -// start with an underscore are reserved -// - C26472, gsl::t.1 : don't use a static_cast for arithmetic conversions; -// use brace initialization, gsl::narrow_cast or gsl::narow -// - C26481: gsl::b.1 : don't use pointer arithmetic. Use span instead - -nssv_DISABLE_MSVC_WARNINGS(4455 26481 26472) -//nssv_DISABLE_CLANG_WARNINGS( "-Wuser-defined-literals" ) -//nssv_DISABLE_GNUC_WARNINGS( -Wliteral-suffix ) - -namespace nonstd { - namespace sv_lite { - - // - // basic_string_view declaration: - // - - template - < - class CharT, - class Traits = std::char_traits - > - class basic_string_view; - - namespace detail { - - // support constexpr comparison in C++14; - // for C++17 and later, use provided traits: - - template< typename CharT > - inline nssv_constexpr14 int compare(CharT const* s1, CharT const* s2, std::size_t count) - { - while (count-- != 0) - { - if (*s1 < *s2) return -1; - if (*s1 > *s2) return +1; - ++s1; ++s2; - } - return 0; - } - -#if nssv_HAVE_BUILTIN_MEMCMP - - // specialization of compare() for char, see also generic compare() above: - - inline nssv_constexpr14 int compare(char const* s1, char const* s2, std::size_t count) - { - return nssv_BUILTIN_MEMCMP(s1, s2, count); - } - -#endif - -#if nssv_HAVE_BUILTIN_STRLEN - - // specialization of length() for char, see also generic length() further below: - - inline nssv_constexpr std::size_t length(char const* s) - { - return nssv_BUILTIN_STRLEN(s); - } - -#endif - -#if defined(__OPTIMIZE__) - - // gcc, clang provide __OPTIMIZE__ - // Expect tail call optimization to make length() non-recursive: - - template< typename CharT > - inline nssv_constexpr std::size_t length(CharT* s, std::size_t result = 0) - { - return *s == '\0' ? result : length(s + 1, result + 1); - } - -#else // OPTIMIZE - - // non-recursive: - - template< typename CharT > - inline nssv_constexpr14 std::size_t length(CharT* s) - { - std::size_t result = 0; - while (*s++ != '\0') - { - ++result; - } - return result; - } - -#endif // OPTIMIZE - -#if nssv_CPP11_OR_GREATER && ! nssv_CPP17_OR_GREATER -#if defined(__OPTIMIZE__) - - // gcc, clang provide __OPTIMIZE__ - // Expect tail call optimization to make search() non-recursive: - - template< class CharT, class Traits = std::char_traits > - constexpr const CharT* search(basic_string_view haystack, basic_string_view needle) - { - return haystack.starts_with(needle) ? haystack.begin() : - haystack.empty() ? haystack.end() : search(haystack.substr(1), needle); - } - -#else // OPTIMIZE - - // non-recursive: - - template< class CharT, class Traits = std::char_traits > - constexpr const CharT* search(basic_string_view haystack, basic_string_view needle) - { - return std::search(haystack.begin(), haystack.end(), needle.begin(), needle.end()); - } - -#endif // OPTIMIZE -#endif // nssv_CPP11_OR_GREATER && ! nssv_CPP17_OR_GREATER - - } // namespace detail - - // - // basic_string_view: - // - - template - < - class CharT, - class Traits /* = std::char_traits */ - > - class basic_string_view - { - public: - // Member types: - - typedef Traits traits_type; - typedef CharT value_type; - - typedef CharT* pointer; - typedef CharT const* const_pointer; - typedef CharT& reference; - typedef CharT const& const_reference; - - typedef const_pointer iterator; - typedef const_pointer const_iterator; - typedef std::reverse_iterator< const_iterator > reverse_iterator; - typedef std::reverse_iterator< const_iterator > const_reverse_iterator; - - typedef std::size_t size_type; - typedef std::ptrdiff_t difference_type; - - // 24.4.2.1 Construction and assignment: - - nssv_constexpr basic_string_view() nssv_noexcept - : data_(nssv_nullptr) - , size_(0) - {} - -#if nssv_CPP11_OR_GREATER - nssv_constexpr basic_string_view(basic_string_view const& other) nssv_noexcept = default; -#else - nssv_constexpr basic_string_view(basic_string_view const& other) nssv_noexcept - : data_(other.data_) - , size_(other.size_) - {} -#endif - - nssv_constexpr basic_string_view(CharT const* s, size_type count) nssv_noexcept // non-standard noexcept - : data_(s) - , size_(count) - {} - - nssv_constexpr basic_string_view(CharT const* s) nssv_noexcept // non-standard noexcept - : data_(s) -#if nssv_CPP17_OR_GREATER - , size_(Traits::length(s)) -#elif nssv_CPP11_OR_GREATER - , size_(detail::length(s)) -#else - , size_(Traits::length(s)) -#endif - {} - -#if nssv_HAVE_NULLPTR -# if nssv_HAVE_IS_DELETE - nssv_constexpr basic_string_view(std::nullptr_t) nssv_noexcept = delete; -# else - private: nssv_constexpr basic_string_view(std::nullptr_t) nssv_noexcept; public: -# endif -#endif - - // Assignment: - -#if nssv_CPP11_OR_GREATER - nssv_constexpr14 basic_string_view& operator=(basic_string_view const& other) nssv_noexcept = default; -#else - nssv_constexpr14 basic_string_view& operator=(basic_string_view const& other) nssv_noexcept - { - data_ = other.data_; - size_ = other.size_; - return *this; - } -#endif - - // 24.4.2.2 Iterator support: - - nssv_constexpr const_iterator begin() const nssv_noexcept { return data_; } - nssv_constexpr const_iterator end() const nssv_noexcept { return data_ + size_; } - - nssv_constexpr const_iterator cbegin() const nssv_noexcept { return begin(); } - nssv_constexpr const_iterator cend() const nssv_noexcept { return end(); } - - nssv_constexpr const_reverse_iterator rbegin() const nssv_noexcept { return const_reverse_iterator(end()); } - nssv_constexpr const_reverse_iterator rend() const nssv_noexcept { return const_reverse_iterator(begin()); } - - nssv_constexpr const_reverse_iterator crbegin() const nssv_noexcept { return rbegin(); } - nssv_constexpr const_reverse_iterator crend() const nssv_noexcept { return rend(); } - - // 24.4.2.3 Capacity: - - nssv_constexpr size_type size() const nssv_noexcept { return size_; } - nssv_constexpr size_type length() const nssv_noexcept { return size_; } - nssv_constexpr size_type max_size() const nssv_noexcept { return (std::numeric_limits< size_type >::max)(); } - - // since C++20 - nssv_nodiscard nssv_constexpr bool empty() const nssv_noexcept - { - return 0 == size_; - } - - // 24.4.2.4 Element access: - - nssv_constexpr const_reference operator[](size_type pos) const - { - return data_at(pos); - } - - nssv_constexpr14 const_reference at(size_type pos) const - { -#if nssv_CONFIG_NO_EXCEPTIONS - assert(pos < size()); -#else - if (pos >= size()) - { - throw std::out_of_range("nonstd::string_view::at()"); - } -#endif - return data_at(pos); - } - - nssv_constexpr const_reference front() const { return data_at(0); } - nssv_constexpr const_reference back() const { return data_at(size() - 1); } - - nssv_constexpr const_pointer data() const nssv_noexcept { return data_; } - - // 24.4.2.5 Modifiers: - - nssv_constexpr14 void remove_prefix(size_type n) - { - assert(n <= size()); - data_ += n; - size_ -= n; - } - - nssv_constexpr14 void remove_suffix(size_type n) - { - assert(n <= size()); - size_ -= n; - } - - nssv_constexpr14 void swap(basic_string_view& other) nssv_noexcept - { - const basic_string_view tmp(other); - other = *this; - *this = tmp; - } - - // 24.4.2.6 String operations: - - size_type copy(CharT* dest, size_type n, size_type pos = 0) const - { -#if nssv_CONFIG_NO_EXCEPTIONS - assert(pos <= size()); -#else - if (pos > size()) - { - throw std::out_of_range("nonstd::string_view::copy()"); - } -#endif - const size_type rlen = (std::min)(n, size() - pos); - - (void)Traits::copy(dest, data() + pos, rlen); - - return rlen; - } - - nssv_constexpr14 basic_string_view substr(size_type pos = 0, size_type n = npos) const - { -#if nssv_CONFIG_NO_EXCEPTIONS - assert(pos <= size()); -#else - if (pos > size()) - { - throw std::out_of_range("nonstd::string_view::substr()"); - } -#endif - return basic_string_view(data() + pos, (std::min)(n, size() - pos)); - } - - // compare(), 6x: - - nssv_constexpr14 int compare(basic_string_view other) const nssv_noexcept // (1) - { -#if nssv_CPP17_OR_GREATER - if (const int result = Traits::compare(data(), other.data(), (std::min)(size(), other.size()))) -#else - if (const int result = detail::compare(data(), other.data(), (std::min)(size(), other.size()))) -#endif - { - return result; - } - - return size() == other.size() ? 0 : size() < other.size() ? -1 : 1; - } - - nssv_constexpr int compare(size_type pos1, size_type n1, basic_string_view other) const // (2) - { - return substr(pos1, n1).compare(other); - } - - nssv_constexpr int compare(size_type pos1, size_type n1, basic_string_view other, size_type pos2, size_type n2) const // (3) - { - return substr(pos1, n1).compare(other.substr(pos2, n2)); - } - - nssv_constexpr int compare(CharT const* s) const // (4) - { - return compare(basic_string_view(s)); - } - - nssv_constexpr int compare(size_type pos1, size_type n1, CharT const* s) const // (5) - { - return substr(pos1, n1).compare(basic_string_view(s)); - } - - nssv_constexpr int compare(size_type pos1, size_type n1, CharT const* s, size_type n2) const // (6) - { - return substr(pos1, n1).compare(basic_string_view(s, n2)); - } - - // 24.4.2.7 Searching: - - // starts_with(), 3x, since C++20: - - nssv_constexpr bool starts_with(basic_string_view v) const nssv_noexcept // (1) - { - return size() >= v.size() && compare(0, v.size(), v) == 0; - } - - nssv_constexpr bool starts_with(CharT c) const nssv_noexcept // (2) - { - return starts_with(basic_string_view(&c, 1)); - } - - nssv_constexpr bool starts_with(CharT const* s) const // (3) - { - return starts_with(basic_string_view(s)); - } - - // ends_with(), 3x, since C++20: - - nssv_constexpr bool ends_with(basic_string_view v) const nssv_noexcept // (1) - { - return size() >= v.size() && compare(size() - v.size(), npos, v) == 0; - } - - nssv_constexpr bool ends_with(CharT c) const nssv_noexcept // (2) - { - return ends_with(basic_string_view(&c, 1)); - } - - nssv_constexpr bool ends_with(CharT const* s) const // (3) - { - return ends_with(basic_string_view(s)); - } - - // find(), 4x: - - nssv_constexpr size_type find(basic_string_view v, size_type pos = 0) const nssv_noexcept // (1) - { - return assert(v.size() == 0 || v.data() != nssv_nullptr) - , pos >= size() - ? npos : to_pos( -#if nssv_CPP11_OR_GREATER && ! nssv_CPP17_OR_GREATER - detail::search(substr(pos), v) -#else - std::search(cbegin() + pos, cend(), v.cbegin(), v.cend(), Traits::eq) -#endif - ); - } - - nssv_constexpr size_type find(CharT c, size_type pos = 0) const nssv_noexcept // (2) - { - return find(basic_string_view(&c, 1), pos); - } - - nssv_constexpr size_type find(CharT const* s, size_type pos, size_type n) const // (3) - { - return find(basic_string_view(s, n), pos); - } - - nssv_constexpr size_type find(CharT const* s, size_type pos = 0) const // (4) - { - return find(basic_string_view(s), pos); - } - - // rfind(), 4x: - - nssv_constexpr14 size_type rfind(basic_string_view v, size_type pos = npos) const nssv_noexcept // (1) - { - if (size() < v.size()) - { - return npos; - } - - if (v.empty()) - { - return (std::min)(size(), pos); - } - - const_iterator last = cbegin() + (std::min)(size() - v.size(), pos) + v.size(); - const_iterator result = std::find_end(cbegin(), last, v.cbegin(), v.cend(), Traits::eq); - - return result != last ? size_type(result - cbegin()) : npos; - } - - nssv_constexpr14 size_type rfind(CharT c, size_type pos = npos) const nssv_noexcept // (2) - { - return rfind(basic_string_view(&c, 1), pos); - } - - nssv_constexpr14 size_type rfind(CharT const* s, size_type pos, size_type n) const // (3) - { - return rfind(basic_string_view(s, n), pos); - } - - nssv_constexpr14 size_type rfind(CharT const* s, size_type pos = npos) const // (4) - { - return rfind(basic_string_view(s), pos); - } - - // find_first_of(), 4x: - - nssv_constexpr size_type find_first_of(basic_string_view v, size_type pos = 0) const nssv_noexcept // (1) - { - return pos >= size() - ? npos - : to_pos(std::find_first_of(cbegin() + pos, cend(), v.cbegin(), v.cend(), Traits::eq)); - } - - nssv_constexpr size_type find_first_of(CharT c, size_type pos = 0) const nssv_noexcept // (2) - { - return find_first_of(basic_string_view(&c, 1), pos); - } - - nssv_constexpr size_type find_first_of(CharT const* s, size_type pos, size_type n) const // (3) - { - return find_first_of(basic_string_view(s, n), pos); - } - - nssv_constexpr size_type find_first_of(CharT const* s, size_type pos = 0) const // (4) - { - return find_first_of(basic_string_view(s), pos); - } - - // find_last_of(), 4x: - - nssv_constexpr size_type find_last_of(basic_string_view v, size_type pos = npos) const nssv_noexcept // (1) - { - return empty() - ? npos - : pos >= size() - ? find_last_of(v, size() - 1) - : to_pos(std::find_first_of(const_reverse_iterator(cbegin() + pos + 1), crend(), v.cbegin(), v.cend(), Traits::eq)); - } - - nssv_constexpr size_type find_last_of(CharT c, size_type pos = npos) const nssv_noexcept // (2) - { - return find_last_of(basic_string_view(&c, 1), pos); - } - - nssv_constexpr size_type find_last_of(CharT const* s, size_type pos, size_type count) const // (3) - { - return find_last_of(basic_string_view(s, count), pos); - } - - nssv_constexpr size_type find_last_of(CharT const* s, size_type pos = npos) const // (4) - { - return find_last_of(basic_string_view(s), pos); - } - - // find_first_not_of(), 4x: - - nssv_constexpr size_type find_first_not_of(basic_string_view v, size_type pos = 0) const nssv_noexcept // (1) - { - return pos >= size() - ? npos - : to_pos(std::find_if(cbegin() + pos, cend(), not_in_view(v))); - } - - nssv_constexpr size_type find_first_not_of(CharT c, size_type pos = 0) const nssv_noexcept // (2) - { - return find_first_not_of(basic_string_view(&c, 1), pos); - } - - nssv_constexpr size_type find_first_not_of(CharT const* s, size_type pos, size_type count) const // (3) - { - return find_first_not_of(basic_string_view(s, count), pos); - } - - nssv_constexpr size_type find_first_not_of(CharT const* s, size_type pos = 0) const // (4) - { - return find_first_not_of(basic_string_view(s), pos); - } - - // find_last_not_of(), 4x: - - nssv_constexpr size_type find_last_not_of(basic_string_view v, size_type pos = npos) const nssv_noexcept // (1) - { - return empty() - ? npos - : pos >= size() - ? find_last_not_of(v, size() - 1) - : to_pos(std::find_if(const_reverse_iterator(cbegin() + pos + 1), crend(), not_in_view(v))); - } - - nssv_constexpr size_type find_last_not_of(CharT c, size_type pos = npos) const nssv_noexcept // (2) - { - return find_last_not_of(basic_string_view(&c, 1), pos); - } - - nssv_constexpr size_type find_last_not_of(CharT const* s, size_type pos, size_type count) const // (3) - { - return find_last_not_of(basic_string_view(s, count), pos); - } - - nssv_constexpr size_type find_last_not_of(CharT const* s, size_type pos = npos) const // (4) - { - return find_last_not_of(basic_string_view(s), pos); - } - - // Constants: - -#if nssv_CPP17_OR_GREATER - static nssv_constexpr size_type npos = size_type(-1); -#elif nssv_CPP11_OR_GREATER - enum : size_type { npos = size_type(-1) }; -#else - enum { npos = size_type(-1) }; -#endif - - private: - struct not_in_view - { - const basic_string_view v; - - nssv_constexpr explicit not_in_view(basic_string_view v_) : v(v_) {} - - nssv_constexpr bool operator()(CharT c) const - { - return npos == v.find_first_of(c); - } - }; - - nssv_constexpr size_type to_pos(const_iterator it) const - { - return it == cend() ? npos : size_type(it - cbegin()); - } - - nssv_constexpr size_type to_pos(const_reverse_iterator it) const - { - return it == crend() ? npos : size_type(crend() - it - 1); - } - - nssv_constexpr const_reference data_at(size_type pos) const - { -#if nssv_BETWEEN( nssv_COMPILER_GNUC_VERSION, 1, 500 ) - return data_[pos]; -#else - return assert(pos < size()), data_[pos]; -#endif - } - - private: - const_pointer data_; - size_type size_; - - public: -#if nssv_CONFIG_CONVERSION_STD_STRING_CLASS_METHODS - - template< class Allocator > - basic_string_view(std::basic_string const& s) nssv_noexcept - : data_(s.data()) - , size_(s.size()) - {} - -#if nssv_HAVE_EXPLICIT_CONVERSION - - template< class Allocator > - explicit operator std::basic_string() const - { - return to_string(Allocator()); - } - -#endif // nssv_HAVE_EXPLICIT_CONVERSION - -#if nssv_CPP11_OR_GREATER - - template< class Allocator = std::allocator > - std::basic_string - to_string(Allocator const& a = Allocator()) const - { - return std::basic_string(begin(), end(), a); - } - -#else - - std::basic_string - to_string() const - { - return std::basic_string(begin(), end()); - } - - template< class Allocator > - std::basic_string - to_string(Allocator const& a) const - { - return std::basic_string(begin(), end(), a); - } - -#endif // nssv_CPP11_OR_GREATER - -#endif // nssv_CONFIG_CONVERSION_STD_STRING_CLASS_METHODS - }; - - // - // Non-member functions: - // - - // 24.4.3 Non-member comparison functions: - // lexicographically compare two string views (function template): - - template< class CharT, class Traits > - nssv_constexpr bool operator== ( - basic_string_view lhs, - basic_string_view rhs) nssv_noexcept - { - return lhs.size() == rhs.size() && lhs.compare(rhs) == 0; - } - - template< class CharT, class Traits > - nssv_constexpr bool operator!= ( - basic_string_view lhs, - basic_string_view rhs) nssv_noexcept - { - return !(lhs == rhs); - } - - template< class CharT, class Traits > - nssv_constexpr bool operator< ( - basic_string_view lhs, - basic_string_view rhs) nssv_noexcept - { - return lhs.compare(rhs) < 0; - } - - template< class CharT, class Traits > - nssv_constexpr bool operator<= ( - basic_string_view lhs, - basic_string_view rhs) nssv_noexcept - { - return lhs.compare(rhs) <= 0; - } - - template< class CharT, class Traits > - nssv_constexpr bool operator> ( - basic_string_view lhs, - basic_string_view rhs) nssv_noexcept - { - return lhs.compare(rhs) > 0; - } - - template< class CharT, class Traits > - nssv_constexpr bool operator>= ( - basic_string_view lhs, - basic_string_view rhs) nssv_noexcept - { - return lhs.compare(rhs) >= 0; - } - - // Let S be basic_string_view, and sv be an instance of S. - // Implementations shall provide sufficient additional overloads marked - // constexpr and noexcept so that an object t with an implicit conversion - // to S can be compared according to Table 67. - -#if ! nssv_CPP11_OR_GREATER || nssv_BETWEEN( nssv_COMPILER_MSVC_VERSION, 100, 141 ) - -// accommodate for older compilers: - -// == - - template< class CharT, class Traits> - nssv_constexpr bool operator==( - basic_string_view lhs, - CharT const* rhs) nssv_noexcept - { - return lhs.size() == detail::length(rhs) && lhs.compare(rhs) == 0; - } - - template< class CharT, class Traits> - nssv_constexpr bool operator==( - CharT const* lhs, - basic_string_view rhs) nssv_noexcept - { - return detail::length(lhs) == rhs.size() && rhs.compare(lhs) == 0; - } - - template< class CharT, class Traits> - nssv_constexpr bool operator==( - basic_string_view lhs, - std::basic_string rhs) nssv_noexcept - { - return lhs.size() == rhs.size() && lhs.compare(rhs) == 0; - } - - template< class CharT, class Traits> - nssv_constexpr bool operator==( - std::basic_string rhs, - basic_string_view lhs) nssv_noexcept - { - return lhs.size() == rhs.size() && lhs.compare(rhs) == 0; - } - - // != - - template< class CharT, class Traits> - nssv_constexpr bool operator!=( - basic_string_view lhs, - CharT const* rhs) nssv_noexcept - { - return !(lhs == rhs); - } - - template< class CharT, class Traits> - nssv_constexpr bool operator!=( - CharT const* lhs, - basic_string_view rhs) nssv_noexcept - { - return !(lhs == rhs); - } - - template< class CharT, class Traits> - nssv_constexpr bool operator!=( - basic_string_view lhs, - std::basic_string rhs) nssv_noexcept - { - return !(lhs == rhs); - } - - template< class CharT, class Traits> - nssv_constexpr bool operator!=( - std::basic_string rhs, - basic_string_view lhs) nssv_noexcept - { - return !(lhs == rhs); - } - - // < - - template< class CharT, class Traits> - nssv_constexpr bool operator<( - basic_string_view lhs, - CharT const* rhs) nssv_noexcept - { - return lhs.compare(rhs) < 0; - } - - template< class CharT, class Traits> - nssv_constexpr bool operator<( - CharT const* lhs, - basic_string_view rhs) nssv_noexcept - { - return rhs.compare(lhs) > 0; - } - - template< class CharT, class Traits> - nssv_constexpr bool operator<( - basic_string_view lhs, - std::basic_string rhs) nssv_noexcept - { - return lhs.compare(rhs) < 0; - } - - template< class CharT, class Traits> - nssv_constexpr bool operator<( - std::basic_string rhs, - basic_string_view lhs) nssv_noexcept - { - return rhs.compare(lhs) > 0; - } - - // <= - - template< class CharT, class Traits> - nssv_constexpr bool operator<=( - basic_string_view lhs, - CharT const* rhs) nssv_noexcept - { - return lhs.compare(rhs) <= 0; - } - - template< class CharT, class Traits> - nssv_constexpr bool operator<=( - CharT const* lhs, - basic_string_view rhs) nssv_noexcept - { - return rhs.compare(lhs) >= 0; - } - - template< class CharT, class Traits> - nssv_constexpr bool operator<=( - basic_string_view lhs, - std::basic_string rhs) nssv_noexcept - { - return lhs.compare(rhs) <= 0; - } - - template< class CharT, class Traits> - nssv_constexpr bool operator<=( - std::basic_string rhs, - basic_string_view lhs) nssv_noexcept - { - return rhs.compare(lhs) >= 0; - } - - // > - - template< class CharT, class Traits> - nssv_constexpr bool operator>( - basic_string_view lhs, - CharT const* rhs) nssv_noexcept - { - return lhs.compare(rhs) > 0; - } - - template< class CharT, class Traits> - nssv_constexpr bool operator>( - CharT const* lhs, - basic_string_view rhs) nssv_noexcept - { - return rhs.compare(lhs) < 0; - } - - template< class CharT, class Traits> - nssv_constexpr bool operator>( - basic_string_view lhs, - std::basic_string rhs) nssv_noexcept - { - return lhs.compare(rhs) > 0; - } - - template< class CharT, class Traits> - nssv_constexpr bool operator>( - std::basic_string rhs, - basic_string_view lhs) nssv_noexcept - { - return rhs.compare(lhs) < 0; - } - - // >= - - template< class CharT, class Traits> - nssv_constexpr bool operator>=( - basic_string_view lhs, - CharT const* rhs) nssv_noexcept - { - return lhs.compare(rhs) >= 0; - } - - template< class CharT, class Traits> - nssv_constexpr bool operator>=( - CharT const* lhs, - basic_string_view rhs) nssv_noexcept - { - return rhs.compare(lhs) <= 0; - } - - template< class CharT, class Traits> - nssv_constexpr bool operator>=( - basic_string_view lhs, - std::basic_string rhs) nssv_noexcept - { - return lhs.compare(rhs) >= 0; - } - - template< class CharT, class Traits> - nssv_constexpr bool operator>=( - std::basic_string rhs, - basic_string_view lhs) nssv_noexcept - { - return rhs.compare(lhs) <= 0; - } - -#else // newer compilers: - -#define nssv_BASIC_STRING_VIEW_I(T,U) typename std::decay< basic_string_view >::type - -#if defined(_MSC_VER) // issue 40 -# define nssv_MSVC_ORDER(x) , int=x -#else -# define nssv_MSVC_ORDER(x) /*, int=x*/ -#endif - -// == - - template< class CharT, class Traits nssv_MSVC_ORDER(1) > - nssv_constexpr bool operator==( - basic_string_view lhs, - nssv_BASIC_STRING_VIEW_I(CharT, Traits) rhs) nssv_noexcept - { - return lhs.size() == rhs.size() && lhs.compare(rhs) == 0; - } - - template< class CharT, class Traits nssv_MSVC_ORDER(2) > - nssv_constexpr bool operator==( - nssv_BASIC_STRING_VIEW_I(CharT, Traits) lhs, - basic_string_view rhs) nssv_noexcept - { - return lhs.size() == rhs.size() && lhs.compare(rhs) == 0; - } - - // != - - template< class CharT, class Traits nssv_MSVC_ORDER(1) > - nssv_constexpr bool operator!= ( - basic_string_view < CharT, Traits > lhs, - nssv_BASIC_STRING_VIEW_I(CharT, Traits) rhs) nssv_noexcept - { - return !(lhs == rhs); - } - - template< class CharT, class Traits nssv_MSVC_ORDER(2) > - nssv_constexpr bool operator!= ( - nssv_BASIC_STRING_VIEW_I(CharT, Traits) lhs, - basic_string_view < CharT, Traits > rhs) nssv_noexcept - { - return !(lhs == rhs); - } - - // < - - template< class CharT, class Traits nssv_MSVC_ORDER(1) > - nssv_constexpr bool operator< ( - basic_string_view < CharT, Traits > lhs, - nssv_BASIC_STRING_VIEW_I(CharT, Traits) rhs) nssv_noexcept - { - return lhs.compare(rhs) < 0; - } - - template< class CharT, class Traits nssv_MSVC_ORDER(2) > - nssv_constexpr bool operator< ( - nssv_BASIC_STRING_VIEW_I(CharT, Traits) lhs, - basic_string_view < CharT, Traits > rhs) nssv_noexcept - { - return lhs.compare(rhs) < 0; - } - - // <= - - template< class CharT, class Traits nssv_MSVC_ORDER(1) > - nssv_constexpr bool operator<= ( - basic_string_view < CharT, Traits > lhs, - nssv_BASIC_STRING_VIEW_I(CharT, Traits) rhs) nssv_noexcept - { - return lhs.compare(rhs) <= 0; - } - - template< class CharT, class Traits nssv_MSVC_ORDER(2) > - nssv_constexpr bool operator<= ( - nssv_BASIC_STRING_VIEW_I(CharT, Traits) lhs, - basic_string_view < CharT, Traits > rhs) nssv_noexcept - { - return lhs.compare(rhs) <= 0; - } - - // > - - template< class CharT, class Traits nssv_MSVC_ORDER(1) > - nssv_constexpr bool operator> ( - basic_string_view < CharT, Traits > lhs, - nssv_BASIC_STRING_VIEW_I(CharT, Traits) rhs) nssv_noexcept - { - return lhs.compare(rhs) > 0; - } - - template< class CharT, class Traits nssv_MSVC_ORDER(2) > - nssv_constexpr bool operator> ( - nssv_BASIC_STRING_VIEW_I(CharT, Traits) lhs, - basic_string_view < CharT, Traits > rhs) nssv_noexcept - { - return lhs.compare(rhs) > 0; - } - - // >= - - template< class CharT, class Traits nssv_MSVC_ORDER(1) > - nssv_constexpr bool operator>= ( - basic_string_view < CharT, Traits > lhs, - nssv_BASIC_STRING_VIEW_I(CharT, Traits) rhs) nssv_noexcept - { - return lhs.compare(rhs) >= 0; - } - - template< class CharT, class Traits nssv_MSVC_ORDER(2) > - nssv_constexpr bool operator>= ( - nssv_BASIC_STRING_VIEW_I(CharT, Traits) lhs, - basic_string_view < CharT, Traits > rhs) nssv_noexcept - { - return lhs.compare(rhs) >= 0; - } - -#undef nssv_MSVC_ORDER -#undef nssv_BASIC_STRING_VIEW_I - -#endif // compiler-dependent approach to comparisons - - // 24.4.4 Inserters and extractors: - -#if ! nssv_CONFIG_NO_STREAM_INSERTION - - namespace detail { - - template< class Stream > - void write_padding(Stream& os, std::streamsize n) - { - for (std::streamsize i = 0; i < n; ++i) - os.rdbuf()->sputc(os.fill()); - } - - template< class Stream, class View > - Stream& write_to_stream(Stream& os, View const& sv) - { - typename Stream::sentry sentry(os); - - if (!sentry) - return os; - - const std::streamsize length = static_cast(sv.length()); - - // Whether, and how, to pad: - const bool pad = (length < os.width()); - const bool left_pad = pad && (os.flags() & std::ios_base::adjustfield) == std::ios_base::right; - - if (left_pad) - write_padding(os, os.width() - length); - - // Write span characters: - os.rdbuf()->sputn(sv.begin(), length); - - if (pad && !left_pad) - write_padding(os, os.width() - length); - - // Reset output stream width: - os.width(0); - - return os; - } - - } // namespace detail - - template< class CharT, class Traits > - std::basic_ostream& - operator<<( - std::basic_ostream& os, - basic_string_view sv) - { - return detail::write_to_stream(os, sv); - } - -#endif // nssv_CONFIG_NO_STREAM_INSERTION - - // Several typedefs for common character types are provided: - - typedef basic_string_view string_view; - typedef basic_string_view wstring_view; -#if nssv_HAVE_WCHAR16_T - typedef basic_string_view u16string_view; - typedef basic_string_view u32string_view; -#endif - - } -} // namespace nonstd::sv_lite - -// -// 24.4.6 Suffix for basic_string_view literals: -// - -#if nssv_HAVE_USER_DEFINED_LITERALS - -namespace nonstd { - nssv_inline_ns namespace literals { - nssv_inline_ns namespace string_view_literals { - -#if nssv_CONFIG_STD_SV_OPERATOR && nssv_HAVE_STD_DEFINED_LITERALS - - nssv_constexpr nonstd::sv_lite::string_view operator "" sv(const char* str, size_t len) nssv_noexcept // (1) - { - return nonstd::sv_lite::string_view{ str, len }; - } - - nssv_constexpr nonstd::sv_lite::u16string_view operator "" sv(const char16_t* str, size_t len) nssv_noexcept // (2) - { - return nonstd::sv_lite::u16string_view{ str, len }; - } - - nssv_constexpr nonstd::sv_lite::u32string_view operator "" sv(const char32_t* str, size_t len) nssv_noexcept // (3) - { - return nonstd::sv_lite::u32string_view{ str, len }; - } - - nssv_constexpr nonstd::sv_lite::wstring_view operator "" sv(const wchar_t* str, size_t len) nssv_noexcept // (4) - { - return nonstd::sv_lite::wstring_view{ str, len }; - } - -#endif // nssv_CONFIG_STD_SV_OPERATOR && nssv_HAVE_STD_DEFINED_LITERALS - -#if nssv_CONFIG_USR_SV_OPERATOR - - nssv_constexpr nonstd::sv_lite::string_view operator "" _sv(const char* str, size_t len) nssv_noexcept // (1) - { - return nonstd::sv_lite::string_view{ str, len }; - } - - nssv_constexpr nonstd::sv_lite::u16string_view operator "" _sv(const char16_t* str, size_t len) nssv_noexcept // (2) - { - return nonstd::sv_lite::u16string_view{ str, len }; - } - - nssv_constexpr nonstd::sv_lite::u32string_view operator "" _sv(const char32_t* str, size_t len) nssv_noexcept // (3) - { - return nonstd::sv_lite::u32string_view{ str, len }; - } - - nssv_constexpr nonstd::sv_lite::wstring_view operator "" _sv(const wchar_t* str, size_t len) nssv_noexcept // (4) - { - return nonstd::sv_lite::wstring_view{ str, len }; - } - -#endif // nssv_CONFIG_USR_SV_OPERATOR - - } - } -} // namespace nonstd::literals::string_view_literals - -#endif - -// -// Extensions for std::string: -// - -#if nssv_CONFIG_CONVERSION_STD_STRING_FREE_FUNCTIONS - -namespace nonstd { - namespace sv_lite { - - // Exclude MSVC 14 (19.00): it yields ambiguous to_string(): - -#if nssv_CPP11_OR_GREATER && nssv_COMPILER_MSVC_VERSION != 140 - - template< class CharT, class Traits, class Allocator = std::allocator > - std::basic_string - to_string(basic_string_view v, Allocator const& a = Allocator()) - { - return std::basic_string(v.begin(), v.end(), a); - } - -#else - - template< class CharT, class Traits > - std::basic_string - to_string(basic_string_view v) - { - return std::basic_string(v.begin(), v.end()); - } - - template< class CharT, class Traits, class Allocator > - std::basic_string - to_string(basic_string_view v, Allocator const& a) - { - return std::basic_string(v.begin(), v.end(), a); - } - -#endif // nssv_CPP11_OR_GREATER - - template< class CharT, class Traits, class Allocator > - basic_string_view - to_string_view(std::basic_string const& s) - { - return basic_string_view(s.data(), s.size()); - } - - } -} // namespace nonstd::sv_lite - -#endif // nssv_CONFIG_CONVERSION_STD_STRING_FREE_FUNCTIONS - -// -// make types and algorithms available in namespace nonstd: -// - -namespace nonstd { - - using sv_lite::basic_string_view; - using sv_lite::string_view; - using sv_lite::wstring_view; - -#if nssv_HAVE_WCHAR16_T - using sv_lite::u16string_view; -#endif -#if nssv_HAVE_WCHAR32_T - using sv_lite::u32string_view; -#endif - - // literal "sv" - - using sv_lite::operator==; - using sv_lite::operator!=; - using sv_lite::operator<; - using sv_lite::operator<=; - using sv_lite::operator>; - using sv_lite::operator>=; - -#if ! nssv_CONFIG_NO_STREAM_INSERTION - using sv_lite::operator<<; -#endif - -#if nssv_CONFIG_CONVERSION_STD_STRING_FREE_FUNCTIONS - using sv_lite::to_string; - using sv_lite::to_string_view; -#endif - -} // namespace nonstd - -// 24.4.5 Hash support (C++11): - -// Note: The hash value of a string view object is equal to the hash value of -// the corresponding string object. - -#if nssv_HAVE_STD_HASH - -#include - -namespace std { - - template<> - struct hash< nonstd::string_view > - { - public: - std::size_t operator()(nonstd::string_view v) const nssv_noexcept - { - return std::hash()(std::string(v.data(), v.size())); - } - }; - - template<> - struct hash< nonstd::wstring_view > - { - public: - std::size_t operator()(nonstd::wstring_view v) const nssv_noexcept - { - return std::hash()(std::wstring(v.data(), v.size())); - } - }; - - template<> - struct hash< nonstd::u16string_view > - { - public: - std::size_t operator()(nonstd::u16string_view v) const nssv_noexcept - { - return std::hash()(std::u16string(v.data(), v.size())); - } - }; - - template<> - struct hash< nonstd::u32string_view > - { - public: - std::size_t operator()(nonstd::u32string_view v) const nssv_noexcept - { - return std::hash()(std::u32string(v.data(), v.size())); - } - }; - -} // namespace std - -#endif // nssv_HAVE_STD_HASH - -nssv_RESTORE_WARNINGS() - -namespace std { - using string_view = nonstd::string_view; -} - -#endif // nssv_HAVE_STD_STRING_VIEW -#endif // NONSTD_SV_LITE_H_INCLUDED \ No newline at end of file diff --git a/lib/include/ORM/table.hpp b/lib/include/ORM/table.hpp deleted file mode 100644 index 71f49ca..0000000 --- a/lib/include/ORM/table.hpp +++ /dev/null @@ -1,59 +0,0 @@ -/** - * @file table.hpp - * @brief Static functionalities for entities to be treated as tables - * @author Alex Tsvetanov - * @date 2022-09-09 - ***********************************************/ - -#pragma once - -#include -#include - -#include -#include -#include -#include -#include -#include - -#include -#include - -namespace webframe::ORM -{ - template struct DBTable - { - static constexpr std::string_view table_name = name.operator std::string_view(); - }; - - template class Table - { - public: - using tuple_t = decltype(pfr::structure_to_tuple(std::declval())); - - private: - template static size_t _get_index_by_column(const std::string_view column); - - template static T& _tuple_to_struct(T& output, const tuple_t& tuple); - - template static T& _to_struct(T& output, T1 arg); - - template static T& _to_struct(T& output, T1 arg, Ts... args); - - template static tuple_t& _to_tuple(tuple_t& output, T1 arg); - - template static tuple_t& _to_tuple(tuple_t& output, T1 arg, Ts... args); - - public: - template static T to_struct(Ts... args); - - template static tuple_t to_tuple(Ts... args); - - static constexpr size_t get_index_by_column(std::string_view column); - - static T tuple_to_struct(const tuple_t& tuple); - }; -} // namespace webframe::ORM - -#include "../../src/ORM/table.cpp" diff --git a/lib/include/ORM/tools/property.hpp b/lib/include/ORM/tools/property.hpp new file mode 100644 index 0000000..581976c --- /dev/null +++ b/lib/include/ORM/tools/property.hpp @@ -0,0 +1,33 @@ +#pragma once + +#include +#include + +namespace webframe::ORM +{ + namespace details + { + class IProperty {}; + } + + template + requires (details::is_database_wrapped_class && !std::is_base_of_v) + class property : public T, public details::IProperty + { + public: + using db_type = T; + using native_type = T::native_type; + + static inline constexpr std::string_view name() { return column_name.to_sv(); } + + constexpr property(); + + // mimic any constructor T has + template + constexpr property(Ts... args); + + constexpr native_type raw() const { return native_type(*this); } + }; +} // namespace webframe::ORM + +#include diff --git a/lib/include/ORM/tools/rule.hpp b/lib/include/ORM/tools/rule.hpp new file mode 100644 index 0000000..1e15860 --- /dev/null +++ b/lib/include/ORM/tools/rule.hpp @@ -0,0 +1,40 @@ +#pragma once + +#include +#include +#include + +namespace webframe::ORM +{ + template + class Rule + { + public: + T1 a; + T2 b; + + using operand1_t = T1; + static constexpr details::rule_operators operation = op; + using operand2_t = T2; + + constexpr Rule(T1 x, T2 y) : a(x), b(y) { } + + template + constexpr Rule(Rule x) : a(x.a), b(x.b) { } + + constexpr auto operator!() const; + + template + constexpr auto operator&& (Rule) const; + + template + constexpr auto operator|| (Rule) const; + + template + constexpr auto operator^ (Rule) const; + }; + +} // namespace webframe::ORM + +#include + diff --git a/lib/include/ORM/tools/string_literal.hpp b/lib/include/ORM/tools/string_literal.hpp new file mode 100644 index 0000000..0d73c6f --- /dev/null +++ b/lib/include/ORM/tools/string_literal.hpp @@ -0,0 +1,42 @@ +/** + * @file string_literal.hpp + * @brief Single header containing structure that allows to use string as template parameters + * @author Alex Tsvetanov + * @date 2023-06-04 + ***********************************************/ + +#pragma once + +#include +#include + +namespace webframe::ORM { + namespace details { + template + struct string_literal { + constexpr static size_t size = N; + + constexpr string_literal(const char(&str)[N]) { + std::copy_n(str, N, value); + } + + constexpr operator std::string_view() const { + return std::string_view(value); + } + + constexpr std::string_view to_sv() const { + return std::string_view(value); + } + + char value[N]; + }; + } + + namespace literals { + using namespace std::literals::string_view_literals; + template + constexpr decltype(Str) operator ""_sl() { + return Str; + } + } +} \ No newline at end of file diff --git a/lib/include/ORM/utils/concept.hpp b/lib/include/ORM/utils/concept.hpp new file mode 100644 index 0000000..f2d99e0 --- /dev/null +++ b/lib/include/ORM/utils/concept.hpp @@ -0,0 +1,31 @@ +#pragma once + +#include +#include + +namespace webframe::ORM::details +{ + template + class mem_ptr_utils; + + class i_mem_ptr {}; + + template + class mem_ptr_wrapper; + + template + concept is_database_wrapped_class = requires { + typename T::native_type; + }; + + template + concept is_table = requires { + typename T; + { T::entity_name } -> std::same_as; + }; + + template + concept is_table_pointer_to_member_variable_t = + (std::is_member_object_pointer_v && is_table::class_type>) || + (std::is_base_of_v && is_table); +} diff --git a/lib/include/ORM/utils/mem_ptr_utils.hpp b/lib/include/ORM/utils/mem_ptr_utils.hpp new file mode 100644 index 0000000..9702834 --- /dev/null +++ b/lib/include/ORM/utils/mem_ptr_utils.hpp @@ -0,0 +1,11 @@ +#pragma once + +namespace webframe::ORM::details +{ + template + class mem_ptr_utils + { + public: + using class_type = C; + }; +} \ No newline at end of file diff --git a/lib/include/ORM/utils/mem_ptr_wrapper.hpp b/lib/include/ORM/utils/mem_ptr_wrapper.hpp new file mode 100644 index 0000000..d35a5ad --- /dev/null +++ b/lib/include/ORM/utils/mem_ptr_wrapper.hpp @@ -0,0 +1,43 @@ +#pragma once +#include + +namespace webframe::ORM +{ + namespace details { + template + class mem_ptr_wrapper : public i_mem_ptr + { + public: + using variable_type = T; + using class_type = C; + constexpr mem_ptr_wrapper() = default; + template + static constexpr bool equals() + { + if constexpr (!std::is_same_v) + return false; + if constexpr (std::is_same_v) + return ptr2 == ptr; + } + constexpr operator T C::* () { return ptr; } + static constexpr T C::* to_mem_ptr() { return ptr; } + +#define DEFINE_OPERATOR(op) \ + template requires (std::is_convertible_v) \ + constexpr auto operator op(Y a) const;\ + constexpr auto operator op(decltype(Placeholder) a) const; + + DEFINE_OPERATOR(<) + DEFINE_OPERATOR(>) + DEFINE_OPERATOR(==) + DEFINE_OPERATOR(!=) + DEFINE_OPERATOR(<=) + DEFINE_OPERATOR(>=) +#undef DEFINE_OPERATOR + }; + } + + template + constexpr auto P = details::mem_ptr_wrapper(); + +} // namespace webframe::ORM diff --git a/lib/include/ORM/utils/placeholder.hpp b/lib/include/ORM/utils/placeholder.hpp new file mode 100644 index 0000000..19faac2 --- /dev/null +++ b/lib/include/ORM/utils/placeholder.hpp @@ -0,0 +1,39 @@ +#pragma once + +#include +#include +#include + +namespace webframe::ORM +{ + namespace details + { + class IPlaceholder {}; + + template + constexpr bool check_for_placeholder() + { + if constexpr (std::is_base_of_v) + { + return std::is_base_of_v; + } + else if constexpr (std::is_member_object_pointer_v) + { + return std::is_base_of_v::class_type>; + } + else + { + return false; + } + } + + template + concept is_placeholder_t = check_for_placeholder(); + + template + concept is_placeholder = check_for_placeholder(); + + template + concept is_table_pointer_to_member_variable_or_placeholder_t = is_table_pointer_to_member_variable_t || is_placeholder_t; + } // namespace details +} // namespace webframe::ORM diff --git a/lib/include/ORM/utils/query_input_data.hpp b/lib/include/ORM/utils/query_input_data.hpp new file mode 100644 index 0000000..f2b0d90 --- /dev/null +++ b/lib/include/ORM/utils/query_input_data.hpp @@ -0,0 +1,20 @@ +#pragma once + +#include +#include + +namespace webframe::ORM +{ + namespace details + { + template + struct QueryInput : public IPlaceholder + { + static constexpr std::string_view entity_name = "Placeholder"; + property, "query_input"> placeholder; + }; + } // namespace details + + template + static constexpr auto Placeholder = &details::QueryInput::placeholder; +} \ No newline at end of file diff --git a/lib/include/ORM/utils/rule_operators.hpp b/lib/include/ORM/utils/rule_operators.hpp new file mode 100644 index 0000000..50fe1ff --- /dev/null +++ b/lib/include/ORM/utils/rule_operators.hpp @@ -0,0 +1,17 @@ +#pragma once + +namespace webframe::ORM::details +{ + enum rule_operators + { + Less, // < + Greater, // > + Equals, // == + Not_equal, // != + Greater_or_equal, // >= + Less_or_equal, // <= + And, // && + Or, // || + Xor, // ^ + }; +} // namespace details diff --git a/lib/include/ORM/wrappers/db_types.hpp b/lib/include/ORM/wrappers/db_types.hpp new file mode 100644 index 0000000..87b0dab --- /dev/null +++ b/lib/include/ORM/wrappers/db_types.hpp @@ -0,0 +1,144 @@ +#pragma once + +#include +#include +#include +#include +#include + +namespace webframe::ORM +{ + namespace details + { + template + class PrimitiveWrapper; + + template requires (std::is_fundamental_v) + class PrimitiveWrapper + { + T data; + public: + constexpr PrimitiveWrapper() : data() {} + constexpr PrimitiveWrapper(const PrimitiveWrapper& x) : data(x.data) {} + + template requires (!std::is_same_v>) + constexpr PrimitiveWrapper(const Y& x) : data(x) {} + + operator T&() { return data; } + operator const T&() const { return data; } + }; + + template requires (!std::is_fundamental_v) + class PrimitiveWrapper : public T + { + public: + constexpr PrimitiveWrapper() : T() {} + + constexpr PrimitiveWrapper(const PrimitiveWrapper& x) : T(x) {} + + template + constexpr PrimitiveWrapper(Ts... args) : T(args...) {} + }; + + enum db_type + { + variadic_string, + fixed_string, + binary_variadic_string, + binary_fixed_string, + + tiny_string, + medium_string, + long_string, + + tiny_binary, + medium_binary, + long_binary, + + boolean, + bitset, + + tiny_int, + small_int, + medium_int, + integer, + big_int, + + floating_point + }; + template + class db_type_placeholder : public details::PrimitiveWrapper + { + public: + using native_type = cpp_equivalent; + constexpr db_type_placeholder() : details::PrimitiveWrapper() {} + template \ + constexpr db_type_placeholder(Ts... args) : details::PrimitiveWrapper(args...) {} + }; + } // namespace details + +#define COMMA , +#define create_db_type(db_type_name, cpp_equivalent, db_params, db_enum_type, ...) db_params __VA_ARGS__ \ + class db_type_name : public details::PrimitiveWrapper \ + { \ + public: \ + using native_type = cpp_equivalent; \ + static constexpr auto Type = details::db_type::db_enum_type; \ + constexpr db_type_name() : details::PrimitiveWrapper() {} \ + template \ + constexpr db_type_name(Ts... args) : details::PrimitiveWrapper(args...) {} \ + }; + + // String Data Types + create_db_type(CHAR, std::array, template, fixed_string, requires (0 <= size && size <= 255)); + create_db_type(VARCHAR, std::string, template, variadic_string, requires (0 <= size && size <= 65'535)); + + namespace details + { + create_db_type(TEXT, std::string, template, variadic_string, ); + create_db_type(BLOB, std::string, template, variadic_string, ); + } + + template requires (0 <= size && size <= 255) using TINYTEXT = details::TEXT; + template requires (0 <= size && size <= 65'535) using TEXT = details::TEXT; + template requires (0 <= size && size <= 16'777'215) using MEDIUMTEXT = details::TEXT; + template requires (0 <= size && size <= 4'294'967'295) using LONGTEXT = details::TEXT; + + template requires (0 <= size && size <= 255) using TINYBLOB = details::BLOB; + template requires (0 <= size && size <= 65'535) using BLOB = details::BLOB; + template requires (0 <= size && size <= 16'777'215) using MEDIUMBLOB = details::BLOB; + template requires (0 <= size && size <= 4'294'967'295) using LONGBLOB = details::BLOB; + + create_db_type(BINARY, std::bitset, template, binary_fixed_string, requires (0 <= size && size <= 255)); + create_db_type(VARBINARY, std::bitset, template, binary_variadic_string, requires (0 <= size && size <= 65'535)); + + // Numeric Data Types + create_db_type(BOOL, bool, , boolean, ); + create_db_type(BIT, std::bitset, template, bitset, requires (1 <= size && size <= 64)); + + create_db_type(TINYINT, int8_t, , tiny_int, ); + create_db_type(UTINYINT, uint8_t, , tiny_int, ); + + create_db_type(SMALLINT, int16_t, , small_int, ); + create_db_type(USMALLINT, uint16_t, , small_int, ); + + create_db_type(INT, int32_t, , integer, ); + create_db_type(UINT, uint32_t, , integer, ); + + create_db_type(BIGINT, int64_t, , big_int, ); + create_db_type(UBIGINT, uint64_t, , big_int, ); + + create_db_type(FLOAT, float, template, floating_point, requires (0 <= precision && precision <= 24)); + create_db_type(DOUBLE, double, template, floating_point, requires (25 <= precision && precision <= 53)); + + // Date and Time Data Types + create_db_type(DATE, std::string, , variadic_string, ); + create_db_type(DATETIME, std::string, , variadic_string, ); + create_db_type(TIMESTAMP, std::string, , variadic_string, ); + create_db_type(TIME, std::string, , variadic_string, ); + create_db_type(YEAR, std::string, , variadic_string, ); + +#undef create_db_type +#undef COMMA + +} // namespace webframe::ORM diff --git a/lib/pfr/include/pfr.hpp b/lib/pfr/include/pfr.hpp deleted file mode 100644 index 1b7b2a7..0000000 --- a/lib/pfr/include/pfr.hpp +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2016-2023 Antony Polukhin -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef PFR_HPP -#define PFR_HPP - -/// \file pfr.hpp -/// Includes all the Boost.PFR headers - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // PFR_HPP diff --git a/lib/pfr/include/pfr/config.hpp b/lib/pfr/include/pfr/config.hpp deleted file mode 100644 index 0812147..0000000 --- a/lib/pfr/include/pfr/config.hpp +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) 2016-2023 Antony Polukhin -// Copyright (c) 2022 Denis Mikhailov -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef PFR_CONFIG_HPP -#define PFR_CONFIG_HPP -#pragma once - -#if __cplusplus >= 201402L || (defined(_MSC_VER) && defined(_MSVC_LANG) && _MSC_VER > 1900) - #include // to get non standard platform macro definitions (__GLIBCXX__ for example) -#endif - -/// \file pfr/config.hpp -/// Contains all the macros that describe Boost.PFR configuration, like PFR_ENABLED -/// -/// \note This header file doesn't require C++14 Standard and supports all C++ compilers, even pre C++14 compilers (C++11, C++03...). - -// Reminder: -// * MSVC++ 14.2 _MSC_VER == 1927 <- Loophole is known to work (Visual Studio ????) -// * MSVC++ 14.1 _MSC_VER == 1916 <- Loophole is known to NOT work (Visual Studio 2017) -// * MSVC++ 14.0 _MSC_VER == 1900 (Visual Studio 2015) -// * MSVC++ 12.0 _MSC_VER == 1800 (Visual Studio 2013) - -#ifdef PFR_NOT_SUPPORTED - #error Please, do not set PFR_NOT_SUPPORTED value manually, use '-DPFR_ENABLED=0' instead of it -#endif - -#if defined(_MSC_VER) - #if !defined(_MSVC_LANG) || _MSC_VER <= 1900 - #define PFR_NOT_SUPPORTED 1 - #endif -#elif __cplusplus < 201402L - #define PFR_NOT_SUPPORTED 1 -#endif - -#ifndef PFR_USE_LOOPHOLE - #if defined(_MSC_VER) - #if _MSC_VER >= 1927 - #define PFR_USE_LOOPHOLE 1 - #else - #define PFR_USE_LOOPHOLE 0 - #endif - #elif defined(__clang_major__) && __clang_major__ >= 8 - #define PFR_USE_LOOPHOLE 0 - #else - #define PFR_USE_LOOPHOLE 1 - #endif -#endif - -#ifndef PFR_USE_CPP17 - #ifdef __cpp_structured_bindings - #define PFR_USE_CPP17 1 - #elif defined(_MSVC_LANG) - #if _MSVC_LANG >= 201703L - #define PFR_USE_CPP17 1 - #else - #define PFR_USE_CPP17 0 - #endif - #else - #define PFR_USE_CPP17 0 - #endif -#endif - -#if (!PFR_USE_CPP17 && !PFR_USE_LOOPHOLE) - #if (defined(_MSC_VER) && _MSC_VER < 1916) ///< in Visual Studio 2017 v15.9 PFR library with classic engine normally works - #define PFR_NOT_SUPPORTED 1 - #endif -#endif - -#ifndef PFR_USE_STD_MAKE_INTEGRAL_SEQUENCE - // Assume that libstdc++ since GCC-7.3 does not have linear instantiation depth in std::make_integral_sequence - #if defined(__GLIBCXX__) && __GLIBCXX__ >= 20180101 - #define PFR_USE_STD_MAKE_INTEGRAL_SEQUENCE 1 - #elif defined(_MSC_VER) - #define PFR_USE_STD_MAKE_INTEGRAL_SEQUENCE 1 - // # elif other known working lib - #else - #define PFR_USE_STD_MAKE_INTEGRAL_SEQUENCE 0 - #endif -#endif - -#ifndef PFR_HAS_GUARANTEED_COPY_ELISION - #if defined(__cpp_guaranteed_copy_elision) && (!defined(_MSC_VER) || _MSC_VER > 1928) - #define PFR_HAS_GUARANTEED_COPY_ELISION 1 - #else - #define PFR_HAS_GUARANTEED_COPY_ELISION 0 - #endif -#endif - -#ifndef PFR_ENABLE_IMPLICIT_REFLECTION - #if defined(__cpp_lib_is_aggregate) - #define PFR_ENABLE_IMPLICIT_REFLECTION 1 - #else - // There is no way to detect potential ability to be reflectable without std::is_aggregare - #define PFR_ENABLE_IMPLICIT_REFLECTION 0 - #endif -#endif - -#if defined(__has_cpp_attribute) - #if __has_cpp_attribute(maybe_unused) - #define PFR_MAYBE_UNUSED [[maybe_unused]] - #endif -#endif - -#ifndef PFR_MAYBE_UNUSED - #define PFR_MAYBE_UNUSED -#endif - -#ifndef PFR_ENABLED - #ifdef PFR_NOT_SUPPORTED - #define PFR_ENABLED 0 - #else - #define PFR_ENABLED 1 - #endif -#endif - -#undef PFR_NOT_SUPPORTED - -#endif // PFR_CONFIG_HPP diff --git a/lib/pfr/include/pfr/core.hpp b/lib/pfr/include/pfr/core.hpp deleted file mode 100644 index db94b4a..0000000 --- a/lib/pfr/include/pfr/core.hpp +++ /dev/null @@ -1,249 +0,0 @@ -// Copyright (c) 2016-2023 Antony Polukhin -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef PFR_CORE_HPP -#define PFR_CORE_HPP -#pragma once - -#include - -#include - -#include -#include -#include -#include -#include - -#include -#include // metaprogramming stuff - -#include - -/// \file pfr/core.hpp -/// Contains all the basic tuple-like interfaces \forcedlink{get}, \forcedlink{tuple_size}, \forcedlink{tuple_element_t}, and others. -/// -/// \b Synopsis: - -namespace pfr -{ - - /// \brief Returns reference or const reference to a field with index `I` in \aggregate `val`. - /// Overload taking the type `U` returns reference or const reference to a field - /// with provided type `U` in \aggregate `val` if there's only one field of such type in `val`. - /// - /// \b Example: - /// \code - /// struct my_struct { int i, short s; }; - /// my_struct s {10, 11}; - /// - /// assert(pfr::get<0>(s) == 10); - /// pfr::get<1>(s) = 0; - /// - /// assert(pfr::get(s) == 10); - /// pfr::get(s) = 11; - /// \endcode - template constexpr decltype(auto) get(const T& val) noexcept - { - return detail::sequence_tuple::get(detail::tie_as_tuple(val)); - } - - /// \overload get - template - constexpr decltype(auto) get( - T& val -#if !PFR_USE_CPP17 - , - std::enable_if_t::value>* = nullptr -#endif - ) noexcept - { - return detail::sequence_tuple::get(detail::tie_as_tuple(val)); - } - -#if !PFR_USE_CPP17 - /// \overload get - template constexpr auto get(T&, std::enable_if_t::value>* = nullptr) noexcept - { - static_assert(sizeof(T) && false, "====================> Boost.PFR: Calling pfr::get on non const non assignable type is allowed only in C++17"); - return 0; - } -#endif - - /// \overload get - template constexpr auto get(T&& val, std::enable_if_t::value>* = nullptr) noexcept - { - return std::move(detail::sequence_tuple::get(detail::tie_as_tuple(val))); - } - - /// \overload get - template constexpr const U& get(const T& val) noexcept - { - return detail::sequence_tuple::get_by_type_impl(detail::tie_as_tuple(val)); - } - - /// \overload get - template - constexpr U& get( - T& val -#if !PFR_USE_CPP17 - , - std::enable_if_t::value>* = nullptr -#endif - ) noexcept - { - return detail::sequence_tuple::get_by_type_impl(detail::tie_as_tuple(val)); - } - -#if !PFR_USE_CPP17 - /// \overload get - template constexpr U& get(T&, std::enable_if_t::value>* = nullptr) noexcept - { - static_assert(sizeof(T) && false, "====================> Boost.PFR: Calling pfr::get on non const non assignable type is allowed only in C++17"); - return 0; - } -#endif - - /// \overload get - template constexpr U&& get(T&& val, std::enable_if_t::value>* = nullptr) noexcept - { - return std::move(detail::sequence_tuple::get_by_type_impl(detail::tie_as_tuple(val))); - } - - /// \brief `tuple_element` has a member typedef `type` that returns the type of a field with index I in \aggregate T. - /// - /// \b Example: - /// \code - /// std::vector< pfr::tuple_element<0, my_structure>::type > v; - /// \endcode - template using tuple_element = detail::sequence_tuple::tuple_element()))>; - - /// \brief Type of a field with index `I` in \aggregate `T`. - /// - /// \b Example: - /// \code - /// std::vector< pfr::tuple_element_t<0, my_structure> > v; - /// \endcode - template using tuple_element_t = typename tuple_element::type; - - /// \brief Creates a `std::tuple` from fields of an \aggregate `val`. - /// - /// \b Example: - /// \code - /// struct my_struct { int i, short s; }; - /// my_struct s {10, 11}; - /// std::tuple t = pfr::structure_to_tuple(s); - /// assert(get<0>(t) == 10); - /// \endcode - template constexpr auto structure_to_tuple(const T& val) noexcept - { - return detail::make_stdtuple_from_tietuple(detail::tie_as_tuple(val), detail::make_index_sequence>()); - } - - /// \brief std::tie` like function that ties fields of a structure. - /// - /// \returns a `std::tuple` with lvalue and const lvalue references to fields of an \aggregate `val`. - /// - /// \b Example: - /// \code - /// void foo(const int&, const short&); - /// struct my_struct { int i, short s; }; - /// - /// const my_struct const_s{1, 2}; - /// std::apply(foo, pfr::structure_tie(const_s)); - /// - /// my_struct s; - /// pfr::structure_tie(s) = std::tuple{10, 11}; - /// assert(s.s == 11); - /// \endcode - template constexpr auto structure_tie(const T& val) noexcept - { - return detail::make_conststdtiedtuple_from_tietuple(detail::tie_as_tuple(const_cast(val)), detail::make_index_sequence>()); - } - - /// \overload structure_tie - template - constexpr auto structure_tie( - T& val -#if !PFR_USE_CPP17 - , - std::enable_if_t::value>* = nullptr -#endif - ) noexcept - { - return detail::make_stdtiedtuple_from_tietuple(detail::tie_as_tuple(val), detail::make_index_sequence>()); - } - -#if !PFR_USE_CPP17 - /// \overload structure_tie - template constexpr auto structure_tie(T&, std::enable_if_t::value>* = nullptr) noexcept - { - static_assert( - sizeof(T) && false, "====================> Boost.PFR: Calling pfr::structure_tie on non const non assignable type is allowed only in C++17"); - return 0; - } -#endif - - /// \overload structure_tie - template constexpr auto structure_tie(T&&, std::enable_if_t::value>* = nullptr) noexcept - { - static_assert(sizeof(T) && false, "====================> Boost.PFR: Calling pfr::structure_tie on rvalue references is forbidden"); - return 0; - } - - /// Calls `func` for each field of a `value`. - /// - /// \param func must have one of the following signatures: - /// * any_return_type func(U&& field) // field of value is perfect forwarded to function - /// * any_return_type func(U&& field, std::size_t i) - /// * any_return_type func(U&& value, I i) // Here I is an `std::integral_constant` - /// - /// \param value To each field of this variable will be the `func` applied. - /// - /// \b Example: - /// \code - /// struct my_struct { int i, short s; }; - /// int sum = 0; - /// pfr::for_each_field(my_struct{20, 22}, [&sum](const auto& field) { sum += field; }); - /// assert(sum == 42); - /// \endcode - template void for_each_field(T&& value, F&& func) - { - constexpr std::size_t fields_count_val = pfr::detail::fields_count>(); - - ::pfr::detail::for_each_field_dispatcher( - value, - [f = std::forward(func)](auto&& t) mutable { - // MSVC related workaround. Its lambdas do not capture constexprs. - constexpr std::size_t fields_count_val_in_lambda = pfr::detail::fields_count>(); - - ::pfr::detail::for_each_field_impl( - t, std::forward(f), detail::make_index_sequence{}, std::is_rvalue_reference{}); - }, - detail::make_index_sequence{}); - } - - /// \brief std::tie-like function that allows assigning to tied values from aggregates. - /// - /// \returns an object with lvalue references to `args...`; on assignment of an \aggregate value to that - /// object each field of an aggregate is assigned to the corresponding `args...` reference. - /// - /// \b Example: - /// \code - /// auto f() { - /// struct { struct { int x, y } p; short s; } res { { 4, 5 }, 6 }; - /// return res; - /// } - /// auto [p, s] = f(); - /// pfr::tie_from_structure(p, s) = f(); - /// \endcode - template constexpr detail::tie_from_structure_tuple tie_from_structure(Elements&... args) noexcept - { - return detail::tie_from_structure_tuple(args...); - } - -} // namespace pfr - -#endif // PFR_CORE_HPP diff --git a/lib/pfr/include/pfr/detail/cast_to_layout_compatible.hpp b/lib/pfr/include/pfr/detail/cast_to_layout_compatible.hpp deleted file mode 100644 index 8d6e760..0000000 --- a/lib/pfr/include/pfr/detail/cast_to_layout_compatible.hpp +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) 2016-2023 Antony Polukhin -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef PFR_DETAIL_CAST_TO_LAYOUT_COMPATIBLE_HPP -#define PFR_DETAIL_CAST_TO_LAYOUT_COMPATIBLE_HPP -#pragma once - -#include - -#include -#include // metaprogramming stuff -#include - -namespace pfr -{ - namespace detail - { - - template constexpr void static_assert_layout_compatible() noexcept - { - static_assert( - std::alignment_of::value == std::alignment_of::value, - "====================> Boost.PFR: Alignment check failed, probably your structure has user-defined alignment for the whole structure or for " - "some of the fields."); - static_assert( - sizeof(T) == sizeof(U), "====================> Boost.PFR: Size check failed, probably your structure has bitfields or user-defined alignment."); - } - -/// @cond -#ifdef __GNUC__ - #define MAY_ALIAS __attribute__((__may_alias__)) -#else - #define MAY_ALIAS -#endif - /// @endcond - - template MAY_ALIAS const To& cast_to_layout_compatible(const From& val) noexcept - { - MAY_ALIAS const To* const t = reinterpret_cast(std::addressof(val)); - detail::static_assert_layout_compatible(); - return *t; - } - - template MAY_ALIAS const volatile To& cast_to_layout_compatible(const volatile From& val) noexcept - { - MAY_ALIAS const volatile To* const t = reinterpret_cast(std::addressof(val)); - detail::static_assert_layout_compatible(); - return *t; - } - - template MAY_ALIAS volatile To& cast_to_layout_compatible(volatile From& val) noexcept - { - MAY_ALIAS volatile To* const t = reinterpret_cast(std::addressof(val)); - detail::static_assert_layout_compatible(); - return *t; - } - - template MAY_ALIAS To& cast_to_layout_compatible(From& val) noexcept - { - MAY_ALIAS To* const t = reinterpret_cast(std::addressof(val)); - detail::static_assert_layout_compatible(); - return *t; - } - -#ifdef PFR_DETAIL_STRICT_RVALUE_TESTING - template To&& cast_to_layout_compatible(rvalue_t val) noexcept = delete; -#endif - -#undef MAY_ALIAS - - } // namespace detail -} // namespace pfr - -#endif // PFR_DETAIL_CAST_TO_LAYOUT_COMPATIBLE_HPP diff --git a/lib/pfr/include/pfr/detail/config.hpp b/lib/pfr/include/pfr/detail/config.hpp deleted file mode 100644 index 16dee0c..0000000 --- a/lib/pfr/include/pfr/detail/config.hpp +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2016-2023 Antony Polukhin -// Copyright (c) 2022 Denis Mikhailov -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef PFR_DETAIL_CONFIG_HPP -#define PFR_DETAIL_CONFIG_HPP -#pragma once - -#include - -#if !PFR_ENABLED - - #error Boost.PFR library is not supported in your environment. \ - Try one of the possible solutions: \ - 1. try to take away an '-DPFR_ENABLED=0', if it exists \ - 2. enable C++14; \ - 3. enable C++17; \ - 4. update your compiler; \ - or disable this error by '-DPFR_ENABLED=1' if you really know what are you doing. - -#endif // !PFR_ENABLED - -#endif // PFR_DETAIL_CONFIG_HPP diff --git a/lib/pfr/include/pfr/detail/core.hpp b/lib/pfr/include/pfr/detail/core.hpp deleted file mode 100644 index d81eac6..0000000 --- a/lib/pfr/include/pfr/detail/core.hpp +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2016-2023 Antony Polukhin -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef PFR_DETAIL_CORE_HPP -#define PFR_DETAIL_CORE_HPP -#pragma once - -#include - -// Each core provides `pfr::detail::tie_as_tuple` and -// `pfr::detail::for_each_field_dispatcher` functions. -// -// The whole PFR library is build on top of those two functions. -#if PFR_USE_CPP17 - #include -#elif PFR_USE_LOOPHOLE - #include -#else - #include -#endif - -#endif // PFR_DETAIL_CORE_HPP diff --git a/lib/pfr/include/pfr/detail/core14_classic.hpp b/lib/pfr/include/pfr/detail/core14_classic.hpp deleted file mode 100644 index cf5078f..0000000 --- a/lib/pfr/include/pfr/detail/core14_classic.hpp +++ /dev/null @@ -1,681 +0,0 @@ -// Copyright (c) 2016-2023 Antony Polukhin -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef PFR_DETAIL_CORE14_CLASSIC_HPP -#define PFR_DETAIL_CORE14_CLASSIC_HPP -#pragma once - -#include - -#include -#include // metaprogramming stuff - -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef __clang__ - #pragma clang diagnostic push - #pragma clang diagnostic ignored "-Wmissing-braces" - #pragma clang diagnostic ignored "-Wundefined-inline" - #pragma clang diagnostic ignored "-Wundefined-internal" - #pragma clang diagnostic ignored "-Wmissing-field-initializers" -#endif - -namespace pfr -{ - namespace detail - { - - ///////////////////// General utility stuff - - template struct identity - { - typedef T type; - }; - - template constexpr T construct_helper() noexcept - { // adding const here allows to deal with copyable only types - return {}; - } - - template constexpr size_array fields_count_and_type_ids_with_zeros() noexcept; - template constexpr auto flat_array_of_type_ids() noexcept; - - ///////////////////// All the stuff for representing Type as integer and converting integer back to type - namespace typeid_conversions - { - - ///////////////////// Helper constants and typedefs - -#ifdef _MSC_VER - #pragma warning(push) - // '<<': check operator precedence for possible error; use parentheses to clarify precedence - #pragma warning(disable : 4554) -#endif - - constexpr std::size_t native_types_mask = 31; - constexpr std::size_t bits_per_extension = 3; - constexpr std::size_t extension_mask = - (static_cast((1 << bits_per_extension) - 1) << static_cast(sizeof(std::size_t) * 8 - bits_per_extension)); - constexpr std::size_t native_ptr_type = (static_cast(1) << static_cast(sizeof(std::size_t) * 8 - bits_per_extension)); - constexpr std::size_t native_const_ptr_type = - (static_cast(2) << static_cast(sizeof(std::size_t) * 8 - bits_per_extension)); - - constexpr std::size_t native_const_volatile_ptr_type = - (static_cast(3) << static_cast(sizeof(std::size_t) * 8 - bits_per_extension)); - - constexpr std::size_t native_volatile_ptr_type = - (static_cast(4) << static_cast(sizeof(std::size_t) * 8 - bits_per_extension)); - - constexpr std::size_t native_ref_type = (static_cast(5) << static_cast(sizeof(std::size_t) * 8 - bits_per_extension)); - - template using if_extension = std::enable_if_t<(Index & extension_mask) == Extension>*; - - ///////////////////// Helper functions - template constexpr std::size_t type_to_id_extension_apply(std::size_t ext) noexcept - { - constexpr std::size_t native_id = (Unptr & native_types_mask); - constexpr std::size_t extensions = (Unptr & ~native_types_mask); - static_assert( - !((extensions >> bits_per_extension) & native_types_mask), - "====================> Boost.PFR: Too many extensions for a single field (something close to `int************************** p;` is in the " - "POD type)."); - - return (extensions >> bits_per_extension) | native_id | ext; - } - - template using remove_1_ext = size_t_<((Index & ~native_types_mask) << bits_per_extension) | (Index & native_types_mask)>; - -#ifdef _MSC_VER - #pragma warning(pop) -#endif - - ///////////////////// Forward declarations - - template constexpr std::size_t type_to_id(identity) noexcept; - template constexpr std::size_t type_to_id(identity) noexcept; - template constexpr std::size_t type_to_id(identity) noexcept; - template constexpr std::size_t type_to_id(identity) noexcept; - template constexpr std::size_t type_to_id(identity) noexcept; - template constexpr std::size_t type_to_id(identity, std::enable_if_t::value>* = nullptr) noexcept; - template constexpr std::size_t type_to_id(identity, std::enable_if_t::value>* = nullptr) noexcept; - template constexpr std::size_t type_to_id(identity, std::enable_if_t::value>* = nullptr) noexcept; - template - constexpr size_array type_to_id( - identity, std::enable_if_t::value && !std::is_empty::value && !std::is_union::value>* = 0) noexcept; - - template constexpr auto id_to_type(size_t_, if_extension = nullptr) noexcept; - template constexpr auto id_to_type(size_t_, if_extension = nullptr) noexcept; - template constexpr auto id_to_type(size_t_, if_extension = nullptr) noexcept; - template constexpr auto id_to_type(size_t_, if_extension = nullptr) noexcept; - template constexpr auto id_to_type(size_t_, if_extension = nullptr) noexcept; - -///////////////////// Definitions of type_to_id and id_to_type for fundamental types -/// @cond -#define BOOST_MAGIC_GET_REGISTER_TYPE(Type, Index) \ - constexpr std::size_t type_to_id(identity) noexcept \ - { \ - return Index; \ - } \ - constexpr Type id_to_type(size_t_) noexcept \ - { \ - return detail::construct_helper(); \ - } \ - /**/ - /// @endcond - - // Register all base types here - BOOST_MAGIC_GET_REGISTER_TYPE(unsigned char, 1) - BOOST_MAGIC_GET_REGISTER_TYPE(unsigned short, 2) - BOOST_MAGIC_GET_REGISTER_TYPE(unsigned int, 3) - BOOST_MAGIC_GET_REGISTER_TYPE(unsigned long, 4) - BOOST_MAGIC_GET_REGISTER_TYPE(unsigned long long, 5) - BOOST_MAGIC_GET_REGISTER_TYPE(signed char, 6) - BOOST_MAGIC_GET_REGISTER_TYPE(short, 7) - BOOST_MAGIC_GET_REGISTER_TYPE(int, 8) - BOOST_MAGIC_GET_REGISTER_TYPE(long, 9) - BOOST_MAGIC_GET_REGISTER_TYPE(long long, 10) - BOOST_MAGIC_GET_REGISTER_TYPE(char, 11) - BOOST_MAGIC_GET_REGISTER_TYPE(wchar_t, 12) - BOOST_MAGIC_GET_REGISTER_TYPE(char16_t, 13) - BOOST_MAGIC_GET_REGISTER_TYPE(char32_t, 14) - BOOST_MAGIC_GET_REGISTER_TYPE(float, 15) - BOOST_MAGIC_GET_REGISTER_TYPE(double, 16) - BOOST_MAGIC_GET_REGISTER_TYPE(long double, 17) - BOOST_MAGIC_GET_REGISTER_TYPE(bool, 18) - BOOST_MAGIC_GET_REGISTER_TYPE(void*, 19) - BOOST_MAGIC_GET_REGISTER_TYPE(const void*, 20) - BOOST_MAGIC_GET_REGISTER_TYPE(volatile void*, 21) - BOOST_MAGIC_GET_REGISTER_TYPE(const volatile void*, 22) - BOOST_MAGIC_GET_REGISTER_TYPE(std::nullptr_t, 23) - constexpr std::size_t tuple_begin_tag = 24; - constexpr std::size_t tuple_end_tag = 25; - -#undef BOOST_MAGIC_GET_REGISTER_TYPE - - ///////////////////// Definitions of type_to_id and id_to_type for types with extensions and nested types - template constexpr std::size_t type_to_id(identity) noexcept - { - constexpr auto unptr = typeid_conversions::type_to_id(identity{}); - static_assert( - std::is_same::value, - "====================> Boost.PFR: Pointers to user defined types are not supported."); - return typeid_conversions::type_to_id_extension_apply(native_ptr_type); - } - - template constexpr std::size_t type_to_id(identity) noexcept - { - constexpr auto unptr = typeid_conversions::type_to_id(identity{}); - static_assert( - std::is_same::value, - "====================> Boost.PFR: Const pointers to user defined types are not supported."); - return typeid_conversions::type_to_id_extension_apply(native_const_ptr_type); - } - - template constexpr std::size_t type_to_id(identity) noexcept - { - constexpr auto unptr = typeid_conversions::type_to_id(identity{}); - static_assert( - std::is_same::value, - "====================> Boost.PFR: Const volatile pointers to user defined types are not supported."); - return typeid_conversions::type_to_id_extension_apply(native_const_volatile_ptr_type); - } - - template constexpr std::size_t type_to_id(identity) noexcept - { - constexpr auto unptr = typeid_conversions::type_to_id(identity{}); - static_assert( - std::is_same::value, - "====================> Boost.PFR: Volatile pointers to user defined types are not supported."); - return typeid_conversions::type_to_id_extension_apply(native_volatile_ptr_type); - } - - template constexpr std::size_t type_to_id(identity) noexcept - { - constexpr auto unptr = typeid_conversions::type_to_id(identity{}); - static_assert( - std::is_same::value, - "====================> Boost.PFR: References to user defined types are not supported."); - return typeid_conversions::type_to_id_extension_apply(native_ref_type); - } - - template constexpr std::size_t type_to_id(identity, std::enable_if_t::value>*) noexcept - { - return typeid_conversions::type_to_id(identity::type>{}); - } - - template constexpr std::size_t type_to_id(identity, std::enable_if_t::value>*) noexcept - { - static_assert(!std::is_empty::value, "====================> Boost.PFR: Empty classes/structures as members are not supported."); - return 0; - } - - template constexpr std::size_t type_to_id(identity, std::enable_if_t::value>*) noexcept - { - static_assert( - !std::is_union::value, - "====================> Boost.PFR: For safety reasons it is forbidden to reflect unions. See `Reflection of unions` section in the docs for " - "more info."); - return 0; - } - - template - constexpr size_array type_to_id( - identity, std::enable_if_t::value && !std::is_empty::value && !std::is_union::value>*) noexcept - { - constexpr auto t = detail::flat_array_of_type_ids(); - size_array result{{tuple_begin_tag}}; - constexpr bool requires_tuplening = - ((t.count_nonzeros() != 1) || (t.count_nonzeros() == t.count_from_opening_till_matching_parenthis_seq(0, tuple_begin_tag, tuple_end_tag))); - - if (requires_tuplening) - { - for (std::size_t i = 0; i < t.size(); ++i) - { - result.data[i + 1] = t.data[i]; - } - result.data[result.size() - 1] = tuple_end_tag; - } - else - { - for (std::size_t i = 0; i < t.size(); ++i) - { - result.data[i] = t.data[i]; - } - } - return result; - } - - template constexpr auto id_to_type(size_t_, if_extension) noexcept - { - typedef decltype(typeid_conversions::id_to_type(remove_1_ext()))* res_t; - return detail::construct_helper(); - } - - template constexpr auto id_to_type(size_t_, if_extension) noexcept - { - typedef const decltype(typeid_conversions::id_to_type(remove_1_ext()))* res_t; - return detail::construct_helper(); - } - - template constexpr auto id_to_type(size_t_, if_extension) noexcept - { - typedef const volatile decltype(typeid_conversions::id_to_type(remove_1_ext()))* res_t; - return detail::construct_helper(); - } - - template constexpr auto id_to_type(size_t_, if_extension) noexcept - { - typedef volatile decltype(typeid_conversions::id_to_type(remove_1_ext()))* res_t; - return detail::construct_helper(); - } - - template constexpr auto id_to_type(size_t_, if_extension) noexcept - { - static_assert(!Index, "====================> Boost.PFR: References are not supported"); - return nullptr; - } - - } // namespace typeid_conversions - - ///////////////////// Structure that remembers types as integers on a `constexpr operator Type()` call - struct ubiq_val - { - std::size_t* ref_; - - template constexpr void assign(const T& typeids) const noexcept - { - for (std::size_t i = 0; i < T::size(); ++i) - { - ref_[i] = typeids.data[i]; - } - } - - constexpr void assign(std::size_t val) const noexcept - { - ref_[0] = val; - } - - template constexpr operator Type() const noexcept - { - constexpr auto typeids = typeid_conversions::type_to_id(identity{}); - assign(typeids); - return detail::construct_helper(); - } - }; - - ///////////////////// Structure that remembers size of the type on a `constexpr operator Type()` call - struct ubiq_sizes - { - std::size_t& ref_; - - template constexpr operator Type() const noexcept - { - ref_ = sizeof(Type); - return detail::construct_helper(); - } - }; - - ///////////////////// Returns array of (offsets without accounting alignments). Required for keeping places for nested type ids - template constexpr size_array get_type_offsets() noexcept - { - typedef size_array array_t; - array_t sizes{}; - T tmp{ubiq_sizes{sizes.data[I]}...}; - (void)tmp; - - array_t offsets{{0}}; - for (std::size_t i = 1; i < N; ++i) - { - offsets.data[i] = offsets.data[i - 1] + sizes.data[i - 1]; - } - - return offsets; - } - - ///////////////////// Returns array of typeids and zeros if construtor of a type accepts sizeof...(I) parameters - template - constexpr void* flat_type_to_array_of_type_ids(std::size_t* types, std::index_sequence) noexcept - { - static_assert(N <= sizeof(T), "====================> Boost.PFR: Bit fields are not supported."); - - constexpr auto offsets = detail::get_type_offsets(); - T tmp{ubiq_val{types + get(offsets) * 3}...}; - (void)types; - (void)tmp; - (void)offsets; // If type is empty offsets are not used - return nullptr; - } - - ///////////////////// Returns array of typeids and zeros - template constexpr size_array fields_count_and_type_ids_with_zeros() noexcept - { - size_array types{}; - constexpr std::size_t N = detail::fields_count(); - detail::flat_type_to_array_of_type_ids(types.data, detail::make_index_sequence()); - return types; - } - - ///////////////////// Returns array of typeids without zeros - template constexpr auto flat_array_of_type_ids() noexcept - { - constexpr auto types = detail::fields_count_and_type_ids_with_zeros(); - constexpr std::size_t count = types.count_nonzeros(); - size_array res{}; - std::size_t j = 0; - for (std::size_t i = 0; i < decltype(types)::size(); ++i) - { - if (types.data[i]) - { - res.data[j] = types.data[i]; - ++j; - } - } - - return res; - } - - ///////////////////// Convert array of typeids into sequence_tuple::tuple - - template constexpr auto as_flat_tuple_impl(std::index_sequence) noexcept; - - template constexpr sequence_tuple::tuple<> as_flat_tuple_impl(std::index_sequence<>) noexcept - { - return sequence_tuple::tuple<>{}; - } - - template constexpr auto increment_index_sequence(std::index_sequence) noexcept - { - return std::index_sequence{}; - } - - template - constexpr auto prepare_subtuples(size_t_, size_t_, size_t_) noexcept - { - static_assert(SubtupleLength == 0, "====================> Boost.PFR: Internal error while representing nested field as tuple"); - return typeid_conversions::id_to_type(size_t_{}); - } - - template - constexpr auto prepare_subtuples(size_t_, size_t_, size_t_) noexcept - { - static_assert(sizeof(T) == 0, "====================> Boost.PFR: Internal error while representing nested field as tuple"); - return int{}; - } - - template - constexpr auto prepare_subtuples(size_t_, size_t_, size_t_) noexcept - { - static_assert(SubtupleLength > 2, "====================> Boost.PFR: Internal error while representing nested field as tuple"); - constexpr auto seq = detail::make_index_sequence{}; - return detail::as_flat_tuple_impl(detail::increment_index_sequence(seq)); - } - - template constexpr Array remove_subtuples(Array indexes_plus_1, const Array& subtuple_lengths) noexcept - { - for (std::size_t i = 0; i < subtuple_lengths.size(); ++i) - { - if (subtuple_lengths.data[i]) - { - const std::size_t skips_count = subtuple_lengths.data[i]; - for (std::size_t j = i + 1; j < skips_count + i; ++j) - { - indexes_plus_1.data[j] = 0; - } - i += skips_count - 1; - } - } - return indexes_plus_1; - } - - template constexpr size_array resize_dropping_zeros_and_decrementing(size_t_, const Array& a) noexcept - { - size_array result{}; - std::size_t result_indx = 0; - for (std::size_t i = 0; i < a.size(); ++i) - { - if (a.data[i]) - { - result.data[result_indx] = static_cast(a.data[i] - 1); - ++result_indx; - } - } - - return result; - } - - template - constexpr auto as_flat_tuple_impl_drop_helpers(std::index_sequence, std::index_sequence) noexcept - { - constexpr auto a = detail::flat_array_of_type_ids(); - - constexpr size_array subtuples_length{ - {a.count_from_opening_till_matching_parenthis_seq(First, typeid_conversions::tuple_begin_tag, typeid_conversions::tuple_end_tag), - a.count_from_opening_till_matching_parenthis_seq(I, typeid_conversions::tuple_begin_tag, typeid_conversions::tuple_end_tag)...}}; - - constexpr size_array type_indexes_with_subtuple_internals{{1, 1 + I - First...}}; - constexpr auto type_indexes_plus_1_and_zeros_as_skips = detail::remove_subtuples(type_indexes_with_subtuple_internals, subtuples_length); - constexpr auto new_size = size_t_{}; - constexpr auto type_indexes = detail::resize_dropping_zeros_and_decrementing(new_size, type_indexes_plus_1_and_zeros_as_skips); - - typedef sequence_tuple::tuple( - size_t_{}, // id of type - size_t_{}, // index of current id in `a` - size_t_{} // if id of type is tuple, then length of that tuple - ))...> - subtuples_uncleanuped_t; - - return subtuples_uncleanuped_t{}; - } - - template constexpr std::size_t count_skips_in_array(std::size_t begin_index, std::size_t end_index, const Array& a) noexcept - { - std::size_t skips = 0; - for (std::size_t i = begin_index; i < end_index; ++i) - { - if (a.data[i] == typeid_conversions::tuple_begin_tag) - { - const std::size_t this_tuple_size = - a.count_from_opening_till_matching_parenthis_seq(i, typeid_conversions::tuple_begin_tag, typeid_conversions::tuple_end_tag) - 1; - skips += this_tuple_size; - i += this_tuple_size - 1; - } - } - - return skips; - } - - template constexpr auto as_flat_tuple_impl(std::index_sequence) noexcept - { - constexpr auto a = detail::flat_array_of_type_ids(); - constexpr std::size_t count_of_I = sizeof...(I); - - return detail::as_flat_tuple_impl_drop_helpers( - std::index_sequence{}, detail::make_index_sequence<1 + count_of_I - count_skips_in_array(First, First + count_of_I, a)>{}); - } - - template constexpr auto internal_tuple_with_same_alignment() noexcept - { - typedef typename std::remove_cv::type type; - - static_assert( - std::is_trivial::value && std::is_standard_layout::value, - "====================> Boost.PFR: Type can not be reflected without Loophole or C++17, because it's not POD"); - static_assert(!std::is_reference::value, "====================> Boost.PFR: Not applyable"); - constexpr auto res = detail::as_flat_tuple_impl(detail::make_index_sequence())::size()>()); - - return res; - } - - template using internal_tuple_with_same_alignment_t = decltype(detail::internal_tuple_with_same_alignment()); - - ///////////////////// Flattening - struct ubiq_is_flat_refelectable - { - bool& is_flat_refelectable; - - template constexpr operator Type() const noexcept - { - is_flat_refelectable = std::is_fundamental>::value; - return {}; - } - }; - - template constexpr bool is_flat_refelectable(std::index_sequence) noexcept - { - constexpr std::size_t fields = sizeof...(I); - bool result[fields] = {static_cast(I)...}; - const T v{ubiq_is_flat_refelectable{result[I]}...}; - (void)v; - - for (std::size_t i = 0; i < fields; ++i) - { - if (!result[i]) - { - return false; - } - } - - return true; - } - - template constexpr bool is_flat_refelectable(std::index_sequence<>) noexcept - { - return true; ///< all empty structs always flat refelectable - } - - template auto tie_as_flat_tuple(T& lvalue) noexcept - { - static_assert( - !std::is_union::value, - "====================> Boost.PFR: For safety reasons it is forbidden to reflect unions. See `Reflection of unions` section in the docs for " - "more info."); - using type = std::remove_cv_t; - using tuple_type = internal_tuple_with_same_alignment_t; - - offset_based_getter getter; - return pfr::detail::make_flat_tuple_of_references(lvalue, getter, size_t_<0>{}, size_t_{}); - } - - template auto tie_as_tuple(T& val) noexcept - { - static_assert( - !std::is_union::value, - "====================> Boost.PFR: For safety reasons it is forbidden to reflect unions. See `Reflection of unions` section in the docs for " - "more info."); - static_assert( - pfr::detail::is_flat_refelectable(detail::make_index_sequence()>{}), - "====================> Boost.PFR: Not possible in C++14 to represent that type without loosing information. Change type definition or enable " - "C++17"); - return pfr::detail::tie_as_flat_tuple(val); - } - - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - - ///////////////////// Structure that can be converted to copy of anything - struct ubiq_constructor_constexpr_copy - { - std::size_t ignore; - - template constexpr operator Type() const noexcept - { - static_assert( - std::is_trivially_destructible::value, - "====================> Boost.PFR: One of the fields in the type passed to `for_each_field` has non trivial destructor."); - return {}; - } - }; - - ///////////////////// - - template struct is_constexpr_aggregate_initializable - { - template static constexpr void* constexpr_aggregate_initializer() noexcept - { - T2 tmp{ubiq_constructor_constexpr_copy{I2}...}; - (void)tmp; - return nullptr; - } - - template ()> static std::true_type test(long) noexcept; - - static std::false_type test(...) noexcept; - - static constexpr bool value = decltype(test(0)){}; - }; - - template - void for_each_field_in_depth(T& t, F&& f, std::index_sequence, identity...); - - template void for_each_field_in_depth(T& t, F&& f, std::index_sequence<>, identity...); - - template struct next_step - { - T& t; - F& f; - - template operator Field() const - { - pfr::detail::for_each_field_in_depth(t, std::forward(f), IndexSeq{}, identity{}..., identity{}); - - return {}; - } - }; - - template - void for_each_field_in_depth(T& t, F&& f, std::index_sequence, identity...) - { - (void)std::add_const_t>{ - Fields{}..., next_step, Fields...>{t, f}, ubiq_constructor_constexpr_copy{I}...}; - } - - template void for_each_field_in_depth(T& lvalue, F&& f, std::index_sequence<>, identity...) - { - using tuple_type = sequence_tuple::tuple; - - offset_based_getter>, tuple_type> getter; - std::forward(f)(pfr::detail::make_flat_tuple_of_references(lvalue, getter, size_t_<0>{}, size_t_{})); - } - - template - void for_each_field_dispatcher_1(T& t, F&& f, std::index_sequence, std::true_type /*is_flat_refelectable*/) - { - std::forward(f)(pfr::detail::tie_as_flat_tuple(t)); - } - - template - void for_each_field_dispatcher_1(T& t, F&& f, std::index_sequence, std::false_type /*is_flat_refelectable*/) - { - pfr::detail::for_each_field_in_depth(t, std::forward(f), std::index_sequence{}); - } - - template void for_each_field_dispatcher(T& t, F&& f, std::index_sequence) - { - static_assert( - !std::is_union::value, - "====================> Boost.PFR: For safety reasons it is forbidden to reflect unions. See `Reflection of unions` section in the docs for " - "more info."); - static_assert(is_constexpr_aggregate_initializable::value, "====================> Boost.PFR: T must be a constexpr initializable type"); - - constexpr bool is_flat_refelectable_val = detail::is_flat_refelectable(std::index_sequence{}); - detail::for_each_field_dispatcher_1(t, std::forward(f), std::index_sequence{}, std::integral_constant{}); - } - - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -#ifdef __clang__ - #pragma clang diagnostic pop -#endif - - } // namespace detail -} // namespace pfr - -#endif // PFR_DETAIL_CORE14_CLASSIC_HPP diff --git a/lib/pfr/include/pfr/detail/core14_loophole.hpp b/lib/pfr/include/pfr/detail/core14_loophole.hpp deleted file mode 100644 index 1e5b841..0000000 --- a/lib/pfr/include/pfr/detail/core14_loophole.hpp +++ /dev/null @@ -1,189 +0,0 @@ -// Copyright (c) 2017-2018 Alexandr Poltavsky, Antony Polukhin. -// Copyright (c) 2019-2023 Antony Polukhin. -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// The Great Type Loophole (C++14) -// Initial implementation by Alexandr Poltavsky, http://alexpolt.github.io -// -// Description: -// The Great Type Loophole is a technique that allows to exchange type information with template -// instantiations. Basically you can assign and read type information during compile time. -// Here it is used to detect data members of a data type. I described it for the first time in -// this blog post http://alexpolt.github.io/type-loophole.html . -// -// This technique exploits the http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#2118 -// CWG 2118. Stateful metaprogramming via friend injection -// Note: CWG agreed that such techniques should be ill-formed, although the mechanism for prohibiting them is as yet undetermined. - -#ifndef PFR_DETAIL_CORE14_LOOPHOLE_HPP -#define PFR_DETAIL_CORE14_LOOPHOLE_HPP -#pragma once - -#include - -#include -#include - -#include // still needed for enums -#include -#include -#include -#include -#include -#include -#include - -#ifdef __clang__ - #pragma clang diagnostic push - #pragma clang diagnostic ignored "-Wmissing-braces" - #pragma clang diagnostic ignored "-Wundefined-inline" - #pragma clang diagnostic ignored "-Wundefined-internal" - #pragma clang diagnostic ignored "-Wmissing-field-initializers" -#elif defined(__GNUC__) - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wnon-template-friend" -#endif - -namespace pfr -{ - namespace detail - { - - // tag generates friend declarations and helps with overload resolution. - // There are two types: one with the auto return type, which is the way we read types later. - // The second one is used in the detection of instantiations without which we'd get multiple - // definitions. - - template struct tag - { - friend auto loophole(tag); - }; - - // The definitions of friend functions. - template struct fn_def_lref - { - friend auto loophole(tag) - { - // Standard Library containers do not SFINAE on invalid copy constructor. Because of that std::vector> reports that it is - // copyable, which leads to an instantiation error at this place. - // - // To workaround the issue, we check that the type U is movable, and move it in that case. - using no_extents_t = std::remove_all_extents_t; - return static_cast::value, no_extents_t&&, no_extents_t&>>( - pfr::detail::unsafe_declval()); - } - }; - template struct fn_def_rref - { - friend auto loophole(tag) - { - return std::move(pfr::detail::unsafe_declval&>()); - } - }; - - // Those specializations are to avoid multiple definition errors. - template struct fn_def_lref - { - }; - - template struct fn_def_rref - { - }; - - // This has a templated conversion operator which in turn triggers instantiations. - // Important point, using sizeof seems to be more reliable. Also default template - // arguments are "cached" (I think). To fix that I provide a U template parameter to - // the ins functions which do the detection using constexpr friend functions and SFINAE. - template struct loophole_ubiq_lref - { - template static std::size_t ins(...); - template {}))> static char ins(int); - - template (0)) == sizeof(char)>)> - constexpr operator U&() - const&& noexcept; // `const&&` here helps to avoid ambiguity in loophole instantiations. optional_like test validate that behavior. - }; - - template struct loophole_ubiq_rref - { - template static std::size_t ins(...); - template {}))> static char ins(int); - - template (0)) == sizeof(char)>)> - constexpr operator U&&() - const&& noexcept; // `const&&` here helps to avoid ambiguity in loophole instantiations. optional_like test validate that behavior. - }; - - // This is a helper to turn a data structure into a tuple. - template struct loophole_type_list_lref; - - template - struct loophole_type_list_lref> - // Instantiating loopholes: - : sequence_tuple::tuple{}...}, 0)> - { - using type = sequence_tuple::tuple{}))...>; - }; - - template struct loophole_type_list_rref; - - template - struct loophole_type_list_rref> - // Instantiating loopholes: - : sequence_tuple::tuple{}...}, 0)> - { - using type = sequence_tuple::tuple{}))...>; - }; - - // Lazily returns loophole_type_list_{lr}ref. - template struct loophole_type_list_selector - { - using type = loophole_type_list_lref; - }; - - template struct loophole_type_list_selector - { - using type = loophole_type_list_rref; - }; - - template auto tie_as_tuple_loophole_impl(T& lvalue) noexcept - { - using type = std::remove_cv_t>; - using indexes = detail::make_index_sequence()>; - using loophole_type_list = - typename detail::loophole_type_list_selector>::value, type, indexes>::type; - using tuple_type = typename loophole_type_list::type; - - return pfr::detail::make_flat_tuple_of_references(lvalue, offset_based_getter{}, size_t_<0>{}, size_t_{}); - } - - template auto tie_as_tuple(T& val) noexcept - { - static_assert( - !std::is_union::value, - "====================> Boost.PFR: For safety reasons it is forbidden to reflect unions. See `Reflection of unions` section in the docs for " - "more info."); - return pfr::detail::tie_as_tuple_loophole_impl(val); - } - - template void for_each_field_dispatcher(T& t, F&& f, std::index_sequence) - { - static_assert( - !std::is_union::value, - "====================> Boost.PFR: For safety reasons it is forbidden to reflect unions. See `Reflection of unions` section in the docs for " - "more info."); - std::forward(f)(pfr::detail::tie_as_tuple_loophole_impl(t)); - } - - } // namespace detail -} // namespace pfr - -#ifdef __clang__ - #pragma clang diagnostic pop -#elif defined(__GNUC__) - #pragma GCC diagnostic pop -#endif - -#endif // PFR_DETAIL_CORE14_LOOPHOLE_HPP diff --git a/lib/pfr/include/pfr/detail/core17.hpp b/lib/pfr/include/pfr/detail/core17.hpp deleted file mode 100644 index 865d1d0..0000000 --- a/lib/pfr/include/pfr/detail/core17.hpp +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) 2016-2023 Antony Polukhin -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef PFR_DETAIL_CORE17_HPP -#define PFR_DETAIL_CORE17_HPP -#pragma once - -#include -#include -#include -#include - -namespace pfr -{ - namespace detail - { - -#ifndef _MSC_VER // MSVC fails to compile the following code, but compiles the structured bindings in core17_generated.hpp - struct do_not_define_std_tuple_size_for_me - { - bool test1 = true; - }; - - template constexpr bool do_structured_bindings_work() noexcept - { // ******************************************* IN CASE OF ERROR READ THE FOLLOWING LINES IN pfr/detail/core17.hpp FILE: - T val{}; - auto& [a] = val; // ******************************************* IN CASE OF ERROR READ THE FOLLOWING LINES IN pfr/detail/core17.hpp FILE: - - /**************************************************************************** - * - * It looks like your compiler or Standard Library can not handle C++17 - * structured bindings. - * - * Workaround: Define PFR_USE_CPP17 to 0 - * It will disable the C++17 features for Boost.PFR library. - * - * Sorry for the inconvenience caused. - * - ****************************************************************************/ - - return a; - } - - static_assert( - do_structured_bindings_work(), - "====================> Boost.PFR: Your compiler can not handle C++17 structured bindings. Read the above comments for workarounds."); -#endif // #ifndef _MSC_VER - - template constexpr auto tie_as_tuple(T& val) noexcept - { - static_assert( - !std::is_union::value, - "====================> Boost.PFR: For safety reasons it is forbidden to reflect unions. See `Reflection of unions` section in the docs for " - "more info."); - typedef size_t_()> fields_count_tag; - return pfr::detail::tie_as_tuple(val, fields_count_tag{}); - } - - template void for_each_field_dispatcher(T& t, F&& f, std::index_sequence) - { - static_assert( - !std::is_union::value, - "====================> Boost.PFR: For safety reasons it is forbidden to reflect unions. See `Reflection of unions` section in the docs for " - "more info."); - std::forward(f)(detail::tie_as_tuple(t)); - } - - } // namespace detail -} // namespace pfr - -#endif // PFR_DETAIL_CORE17_HPP diff --git a/lib/pfr/include/pfr/detail/core17_generated.hpp b/lib/pfr/include/pfr/detail/core17_generated.hpp deleted file mode 100644 index 02a2ea7..0000000 --- a/lib/pfr/include/pfr/detail/core17_generated.hpp +++ /dev/null @@ -1,5925 +0,0 @@ -// Copyright (c) 2016-2023 Antony Polukhin -// Copyright (c) 2023 Denis Mikhailov -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -//////////////// THIS HEADER IS AUTO GENERATED BY misc/generate_cpp17.py //////////////// -//////////////// MODIFY AND RUN THE misc/generate_cpp17.py INSTEAD OF DIRECTLY MODIFYING THE GENERATED FILE //////////////// -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -#ifndef PFR_DETAIL_CORE17_GENERATED_HPP -#define PFR_DETAIL_CORE17_GENERATED_HPP -#pragma once - -#include -#if !PFR_USE_CPP17 - #error C++17 is required for this header. -#endif - -#include -#include -#include // for std::conditional_t, std::is_reference - -namespace pfr -{ - namespace detail - { - - template constexpr auto make_tuple_of_references(Args&&... args) noexcept - { - return sequence_tuple::tuple{args...}; - } - - template constexpr decltype(auto) add_cv_like(Arg& arg) noexcept - { - if constexpr (std::is_const::value && std::is_volatile::value) - { - return const_cast(arg); - } - else if constexpr (std::is_const::value) - { - return const_cast(arg); - } - else if constexpr (std::is_volatile::value) - { - return const_cast(arg); - } - else - { - return const_cast(arg); - } - } - - // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78939 - template constexpr decltype(auto) workaround_cast(Arg& arg) noexcept - { - using output_arg_t = std::conditional_t(), decltype(detail::add_cv_like(arg)), Sb>; - return const_cast(arg); - } - - template constexpr auto tie_as_tuple(T& /*val*/, size_t_<0>) noexcept - { - return sequence_tuple::tuple<>{}; - } - - template constexpr auto tie_as_tuple(T& val, size_t_<1>, std::enable_if_t>::value>* = nullptr) noexcept - { - auto& [a] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - return ::pfr::detail::make_tuple_of_references(detail::workaround_cast(a)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<1>, std::enable_if_t>::value>* = nullptr) noexcept - { - return ::pfr::detail::make_tuple_of_references(val); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<2>) noexcept - { - auto& [a, b] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - return ::pfr::detail::make_tuple_of_references(detail::workaround_cast(a), detail::workaround_cast(b)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<3>) noexcept - { - auto& [a, b, c] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), detail::workaround_cast(b), detail::workaround_cast(c)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<4>) noexcept - { - auto& [a, b, c, d] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<5>) noexcept - { - auto& [a, b, c, d, e] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<6>) noexcept - { - auto& [a, b, c, d, e, f] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<7>) noexcept - { - auto& [a, b, c, d, e, f, g] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<8>) noexcept - { - auto& [a, b, c, d, e, f, g, h] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<9>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<10>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<11>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<12>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<13>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<14>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<15>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<16>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<17>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<18>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<19>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<20>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<21>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<22>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<23>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<24>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<25>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<26>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<27>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<28>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<29>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<30>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<31>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<32>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<33>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<34>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<35>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<36>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L, M] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<37>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L, M, N] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<38>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L, M, N, P] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N), - detail::workaround_cast(P)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<39>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N), - detail::workaround_cast(P), - detail::workaround_cast(Q)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<40>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N), - detail::workaround_cast(P), - detail::workaround_cast(Q), - detail::workaround_cast(R)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<41>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N), - detail::workaround_cast(P), - detail::workaround_cast(Q), - detail::workaround_cast(R), - detail::workaround_cast(S)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<42>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, U] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N), - detail::workaround_cast(P), - detail::workaround_cast(Q), - detail::workaround_cast(R), - detail::workaround_cast(S), - detail::workaround_cast(U)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<43>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, U, V] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N), - detail::workaround_cast(P), - detail::workaround_cast(Q), - detail::workaround_cast(R), - detail::workaround_cast(S), - detail::workaround_cast(U), - detail::workaround_cast(V)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<44>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, U, V, W] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N), - detail::workaround_cast(P), - detail::workaround_cast(Q), - detail::workaround_cast(R), - detail::workaround_cast(S), - detail::workaround_cast(U), - detail::workaround_cast(V), - detail::workaround_cast(W)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<45>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, U, V, W, X] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N), - detail::workaround_cast(P), - detail::workaround_cast(Q), - detail::workaround_cast(R), - detail::workaround_cast(S), - detail::workaround_cast(U), - detail::workaround_cast(V), - detail::workaround_cast(W), - detail::workaround_cast(X)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<46>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, U, V, W, X, Y] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N), - detail::workaround_cast(P), - detail::workaround_cast(Q), - detail::workaround_cast(R), - detail::workaround_cast(S), - detail::workaround_cast(U), - detail::workaround_cast(V), - detail::workaround_cast(W), - detail::workaround_cast(X), - detail::workaround_cast(Y)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<47>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, U, V, W, X, Y, Z] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N), - detail::workaround_cast(P), - detail::workaround_cast(Q), - detail::workaround_cast(R), - detail::workaround_cast(S), - detail::workaround_cast(U), - detail::workaround_cast(V), - detail::workaround_cast(W), - detail::workaround_cast(X), - detail::workaround_cast(Y), - detail::workaround_cast(Z)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<48>) noexcept - { - auto& [ - a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, - aa - ] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N), - detail::workaround_cast(P), - detail::workaround_cast(Q), - detail::workaround_cast(R), - detail::workaround_cast(S), - detail::workaround_cast(U), - detail::workaround_cast(V), - detail::workaround_cast(W), - detail::workaround_cast(X), - detail::workaround_cast(Y), - detail::workaround_cast(Z), - detail::workaround_cast(aa)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<49>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, U, V, W, X, Y, Z, aa, ab] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N), - detail::workaround_cast(P), - detail::workaround_cast(Q), - detail::workaround_cast(R), - detail::workaround_cast(S), - detail::workaround_cast(U), - detail::workaround_cast(V), - detail::workaround_cast(W), - detail::workaround_cast(X), - detail::workaround_cast(Y), - detail::workaround_cast(Z), - detail::workaround_cast(aa), - detail::workaround_cast(ab)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<50>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, U, V, W, X, Y, Z, aa, ab, ac] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N), - detail::workaround_cast(P), - detail::workaround_cast(Q), - detail::workaround_cast(R), - detail::workaround_cast(S), - detail::workaround_cast(U), - detail::workaround_cast(V), - detail::workaround_cast(W), - detail::workaround_cast(X), - detail::workaround_cast(Y), - detail::workaround_cast(Z), - detail::workaround_cast(aa), - detail::workaround_cast(ab), - detail::workaround_cast(ac)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<51>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, U, V, W, X, Y, Z, aa, ab, ac, ad] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N), - detail::workaround_cast(P), - detail::workaround_cast(Q), - detail::workaround_cast(R), - detail::workaround_cast(S), - detail::workaround_cast(U), - detail::workaround_cast(V), - detail::workaround_cast(W), - detail::workaround_cast(X), - detail::workaround_cast(Y), - detail::workaround_cast(Z), - detail::workaround_cast(aa), - detail::workaround_cast(ab), - detail::workaround_cast(ac), - detail::workaround_cast(ad)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<52>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, U, V, W, X, Y, Z, aa, ab, ac, ad, ae] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N), - detail::workaround_cast(P), - detail::workaround_cast(Q), - detail::workaround_cast(R), - detail::workaround_cast(S), - detail::workaround_cast(U), - detail::workaround_cast(V), - detail::workaround_cast(W), - detail::workaround_cast(X), - detail::workaround_cast(Y), - detail::workaround_cast(Z), - detail::workaround_cast(aa), - detail::workaround_cast(ab), - detail::workaround_cast(ac), - detail::workaround_cast(ad), - detail::workaround_cast(ae)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<53>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, U, V, W, X, Y, Z, aa, ab, ac, ad, ae, af] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N), - detail::workaround_cast(P), - detail::workaround_cast(Q), - detail::workaround_cast(R), - detail::workaround_cast(S), - detail::workaround_cast(U), - detail::workaround_cast(V), - detail::workaround_cast(W), - detail::workaround_cast(X), - detail::workaround_cast(Y), - detail::workaround_cast(Z), - detail::workaround_cast(aa), - detail::workaround_cast(ab), - detail::workaround_cast(ac), - detail::workaround_cast(ad), - detail::workaround_cast(ae), - detail::workaround_cast(af)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<54>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, U, V, W, X, Y, Z, aa, ab, ac, ad, ae, af, ag] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N), - detail::workaround_cast(P), - detail::workaround_cast(Q), - detail::workaround_cast(R), - detail::workaround_cast(S), - detail::workaround_cast(U), - detail::workaround_cast(V), - detail::workaround_cast(W), - detail::workaround_cast(X), - detail::workaround_cast(Y), - detail::workaround_cast(Z), - detail::workaround_cast(aa), - detail::workaround_cast(ab), - detail::workaround_cast(ac), - detail::workaround_cast(ad), - detail::workaround_cast(ae), - detail::workaround_cast(af), - detail::workaround_cast(ag)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<55>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, U, V, W, X, Y, Z, aa, ab, ac, ad, ae, af, ag, ah] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N), - detail::workaround_cast(P), - detail::workaround_cast(Q), - detail::workaround_cast(R), - detail::workaround_cast(S), - detail::workaround_cast(U), - detail::workaround_cast(V), - detail::workaround_cast(W), - detail::workaround_cast(X), - detail::workaround_cast(Y), - detail::workaround_cast(Z), - detail::workaround_cast(aa), - detail::workaround_cast(ab), - detail::workaround_cast(ac), - detail::workaround_cast(ad), - detail::workaround_cast(ae), - detail::workaround_cast(af), - detail::workaround_cast(ag), - detail::workaround_cast(ah)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<56>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, U, V, W, X, Y, Z, aa, ab, ac, ad, ae, af, ag, ah, aj] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N), - detail::workaround_cast(P), - detail::workaround_cast(Q), - detail::workaround_cast(R), - detail::workaround_cast(S), - detail::workaround_cast(U), - detail::workaround_cast(V), - detail::workaround_cast(W), - detail::workaround_cast(X), - detail::workaround_cast(Y), - detail::workaround_cast(Z), - detail::workaround_cast(aa), - detail::workaround_cast(ab), - detail::workaround_cast(ac), - detail::workaround_cast(ad), - detail::workaround_cast(ae), - detail::workaround_cast(af), - detail::workaround_cast(ag), - detail::workaround_cast(ah), - detail::workaround_cast(aj)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<57>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, U, V, W, X, Y, Z, aa, ab, ac, ad, ae, af, ag, ah, aj, ak] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N), - detail::workaround_cast(P), - detail::workaround_cast(Q), - detail::workaround_cast(R), - detail::workaround_cast(S), - detail::workaround_cast(U), - detail::workaround_cast(V), - detail::workaround_cast(W), - detail::workaround_cast(X), - detail::workaround_cast(Y), - detail::workaround_cast(Z), - detail::workaround_cast(aa), - detail::workaround_cast(ab), - detail::workaround_cast(ac), - detail::workaround_cast(ad), - detail::workaround_cast(ae), - detail::workaround_cast(af), - detail::workaround_cast(ag), - detail::workaround_cast(ah), - detail::workaround_cast(aj), - detail::workaround_cast(ak)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<58>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, U, V, W, X, Y, Z, aa, ab, ac, ad, ae, af, ag, ah, aj, ak, al] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N), - detail::workaround_cast(P), - detail::workaround_cast(Q), - detail::workaround_cast(R), - detail::workaround_cast(S), - detail::workaround_cast(U), - detail::workaround_cast(V), - detail::workaround_cast(W), - detail::workaround_cast(X), - detail::workaround_cast(Y), - detail::workaround_cast(Z), - detail::workaround_cast(aa), - detail::workaround_cast(ab), - detail::workaround_cast(ac), - detail::workaround_cast(ad), - detail::workaround_cast(ae), - detail::workaround_cast(af), - detail::workaround_cast(ag), - detail::workaround_cast(ah), - detail::workaround_cast(aj), - detail::workaround_cast(ak), - detail::workaround_cast(al)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<59>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, U, V, W, X, Y, Z, aa, ab, ac, ad, ae, af, ag, ah, aj, ak, al, am] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N), - detail::workaround_cast(P), - detail::workaround_cast(Q), - detail::workaround_cast(R), - detail::workaround_cast(S), - detail::workaround_cast(U), - detail::workaround_cast(V), - detail::workaround_cast(W), - detail::workaround_cast(X), - detail::workaround_cast(Y), - detail::workaround_cast(Z), - detail::workaround_cast(aa), - detail::workaround_cast(ab), - detail::workaround_cast(ac), - detail::workaround_cast(ad), - detail::workaround_cast(ae), - detail::workaround_cast(af), - detail::workaround_cast(ag), - detail::workaround_cast(ah), - detail::workaround_cast(aj), - detail::workaround_cast(ak), - detail::workaround_cast(al), - detail::workaround_cast(am)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<60>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, U, V, W, X, Y, Z, aa, ab, ac, ad, ae, af, ag, ah, aj, ak, al, am, an] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N), - detail::workaround_cast(P), - detail::workaround_cast(Q), - detail::workaround_cast(R), - detail::workaround_cast(S), - detail::workaround_cast(U), - detail::workaround_cast(V), - detail::workaround_cast(W), - detail::workaround_cast(X), - detail::workaround_cast(Y), - detail::workaround_cast(Z), - detail::workaround_cast(aa), - detail::workaround_cast(ab), - detail::workaround_cast(ac), - detail::workaround_cast(ad), - detail::workaround_cast(ae), - detail::workaround_cast(af), - detail::workaround_cast(ag), - detail::workaround_cast(ah), - detail::workaround_cast(aj), - detail::workaround_cast(ak), - detail::workaround_cast(al), - detail::workaround_cast(am), - detail::workaround_cast(an)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<61>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, U, V, W, X, Y, Z, aa, ab, ac, ad, ae, af, ag, ah, aj, ak, al, am, an, ap] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N), - detail::workaround_cast(P), - detail::workaround_cast(Q), - detail::workaround_cast(R), - detail::workaround_cast(S), - detail::workaround_cast(U), - detail::workaround_cast(V), - detail::workaround_cast(W), - detail::workaround_cast(X), - detail::workaround_cast(Y), - detail::workaround_cast(Z), - detail::workaround_cast(aa), - detail::workaround_cast(ab), - detail::workaround_cast(ac), - detail::workaround_cast(ad), - detail::workaround_cast(ae), - detail::workaround_cast(af), - detail::workaround_cast(ag), - detail::workaround_cast(ah), - detail::workaround_cast(aj), - detail::workaround_cast(ak), - detail::workaround_cast(al), - detail::workaround_cast(am), - detail::workaround_cast(an), - detail::workaround_cast(ap)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<62>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, U, V, W, X, Y, Z, aa, ab, ac, ad, ae, af, ag, ah, aj, ak, al, am, an, ap, aq] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N), - detail::workaround_cast(P), - detail::workaround_cast(Q), - detail::workaround_cast(R), - detail::workaround_cast(S), - detail::workaround_cast(U), - detail::workaround_cast(V), - detail::workaround_cast(W), - detail::workaround_cast(X), - detail::workaround_cast(Y), - detail::workaround_cast(Z), - detail::workaround_cast(aa), - detail::workaround_cast(ab), - detail::workaround_cast(ac), - detail::workaround_cast(ad), - detail::workaround_cast(ae), - detail::workaround_cast(af), - detail::workaround_cast(ag), - detail::workaround_cast(ah), - detail::workaround_cast(aj), - detail::workaround_cast(ak), - detail::workaround_cast(al), - detail::workaround_cast(am), - detail::workaround_cast(an), - detail::workaround_cast(ap), - detail::workaround_cast(aq)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<63>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, U, V, W, X, Y, Z, aa, ab, ac, ad, ae, af, ag, ah, aj, ak, al, am, an, ap, aq, ar] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N), - detail::workaround_cast(P), - detail::workaround_cast(Q), - detail::workaround_cast(R), - detail::workaround_cast(S), - detail::workaround_cast(U), - detail::workaround_cast(V), - detail::workaround_cast(W), - detail::workaround_cast(X), - detail::workaround_cast(Y), - detail::workaround_cast(Z), - detail::workaround_cast(aa), - detail::workaround_cast(ab), - detail::workaround_cast(ac), - detail::workaround_cast(ad), - detail::workaround_cast(ae), - detail::workaround_cast(af), - detail::workaround_cast(ag), - detail::workaround_cast(ah), - detail::workaround_cast(aj), - detail::workaround_cast(ak), - detail::workaround_cast(al), - detail::workaround_cast(am), - detail::workaround_cast(an), - detail::workaround_cast(ap), - detail::workaround_cast(aq), - detail::workaround_cast(ar)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<64>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, U, V, W, X, Y, Z, aa, ab, ac, ad, ae, af, ag, ah, aj, ak, al, am, an, ap, aq, ar, as] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N), - detail::workaround_cast(P), - detail::workaround_cast(Q), - detail::workaround_cast(R), - detail::workaround_cast(S), - detail::workaround_cast(U), - detail::workaround_cast(V), - detail::workaround_cast(W), - detail::workaround_cast(X), - detail::workaround_cast(Y), - detail::workaround_cast(Z), - detail::workaround_cast(aa), - detail::workaround_cast(ab), - detail::workaround_cast(ac), - detail::workaround_cast(ad), - detail::workaround_cast(ae), - detail::workaround_cast(af), - detail::workaround_cast(ag), - detail::workaround_cast(ah), - detail::workaround_cast(aj), - detail::workaround_cast(ak), - detail::workaround_cast(al), - detail::workaround_cast(am), - detail::workaround_cast(an), - detail::workaround_cast(ap), - detail::workaround_cast(aq), - detail::workaround_cast(ar), - detail::workaround_cast(as)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<65>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, U, V, W, X, Y, Z, aa, ab, ac, ad, ae, af, ag, ah, aj, ak, al, am, an, ap, aq, ar, as, at] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N), - detail::workaround_cast(P), - detail::workaround_cast(Q), - detail::workaround_cast(R), - detail::workaround_cast(S), - detail::workaround_cast(U), - detail::workaround_cast(V), - detail::workaround_cast(W), - detail::workaround_cast(X), - detail::workaround_cast(Y), - detail::workaround_cast(Z), - detail::workaround_cast(aa), - detail::workaround_cast(ab), - detail::workaround_cast(ac), - detail::workaround_cast(ad), - detail::workaround_cast(ae), - detail::workaround_cast(af), - detail::workaround_cast(ag), - detail::workaround_cast(ah), - detail::workaround_cast(aj), - detail::workaround_cast(ak), - detail::workaround_cast(al), - detail::workaround_cast(am), - detail::workaround_cast(an), - detail::workaround_cast(ap), - detail::workaround_cast(aq), - detail::workaround_cast(ar), - detail::workaround_cast(as), - detail::workaround_cast(at)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<66>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, U, V, W, X, Y, Z, aa, ab, ac, ad, ae, af, ag, ah, aj, ak, al, am, an, ap, aq, ar, as, at, au] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N), - detail::workaround_cast(P), - detail::workaround_cast(Q), - detail::workaround_cast(R), - detail::workaround_cast(S), - detail::workaround_cast(U), - detail::workaround_cast(V), - detail::workaround_cast(W), - detail::workaround_cast(X), - detail::workaround_cast(Y), - detail::workaround_cast(Z), - detail::workaround_cast(aa), - detail::workaround_cast(ab), - detail::workaround_cast(ac), - detail::workaround_cast(ad), - detail::workaround_cast(ae), - detail::workaround_cast(af), - detail::workaround_cast(ag), - detail::workaround_cast(ah), - detail::workaround_cast(aj), - detail::workaround_cast(ak), - detail::workaround_cast(al), - detail::workaround_cast(am), - detail::workaround_cast(an), - detail::workaround_cast(ap), - detail::workaround_cast(aq), - detail::workaround_cast(ar), - detail::workaround_cast(as), - detail::workaround_cast(at), - detail::workaround_cast(au)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<67>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, U, V, W, X, Y, Z, aa, ab, ac, ad, ae, af, ag, ah, aj, ak, al, am, an, ap, aq, ar, as, at, au, av] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N), - detail::workaround_cast(P), - detail::workaround_cast(Q), - detail::workaround_cast(R), - detail::workaround_cast(S), - detail::workaround_cast(U), - detail::workaround_cast(V), - detail::workaround_cast(W), - detail::workaround_cast(X), - detail::workaround_cast(Y), - detail::workaround_cast(Z), - detail::workaround_cast(aa), - detail::workaround_cast(ab), - detail::workaround_cast(ac), - detail::workaround_cast(ad), - detail::workaround_cast(ae), - detail::workaround_cast(af), - detail::workaround_cast(ag), - detail::workaround_cast(ah), - detail::workaround_cast(aj), - detail::workaround_cast(ak), - detail::workaround_cast(al), - detail::workaround_cast(am), - detail::workaround_cast(an), - detail::workaround_cast(ap), - detail::workaround_cast(aq), - detail::workaround_cast(ar), - detail::workaround_cast(as), - detail::workaround_cast(at), - detail::workaround_cast(au), - detail::workaround_cast(av)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<68>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, U, V, W, X, Y, Z, aa, ab, ac, ad, ae, af, ag, ah, aj, ak, al, am, an, ap, aq, ar, as, at, au, av, aw] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N), - detail::workaround_cast(P), - detail::workaround_cast(Q), - detail::workaround_cast(R), - detail::workaround_cast(S), - detail::workaround_cast(U), - detail::workaround_cast(V), - detail::workaround_cast(W), - detail::workaround_cast(X), - detail::workaround_cast(Y), - detail::workaround_cast(Z), - detail::workaround_cast(aa), - detail::workaround_cast(ab), - detail::workaround_cast(ac), - detail::workaround_cast(ad), - detail::workaround_cast(ae), - detail::workaround_cast(af), - detail::workaround_cast(ag), - detail::workaround_cast(ah), - detail::workaround_cast(aj), - detail::workaround_cast(ak), - detail::workaround_cast(al), - detail::workaround_cast(am), - detail::workaround_cast(an), - detail::workaround_cast(ap), - detail::workaround_cast(aq), - detail::workaround_cast(ar), - detail::workaround_cast(as), - detail::workaround_cast(at), - detail::workaround_cast(au), - detail::workaround_cast(av), - detail::workaround_cast(aw)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<69>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, U, V, W, X, Y, Z, aa, ab, ac, ad, ae, af, ag, ah, aj, ak, al, am, an, ap, aq, ar, as, at, au, av, aw, ax] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N), - detail::workaround_cast(P), - detail::workaround_cast(Q), - detail::workaround_cast(R), - detail::workaround_cast(S), - detail::workaround_cast(U), - detail::workaround_cast(V), - detail::workaround_cast(W), - detail::workaround_cast(X), - detail::workaround_cast(Y), - detail::workaround_cast(Z), - detail::workaround_cast(aa), - detail::workaround_cast(ab), - detail::workaround_cast(ac), - detail::workaround_cast(ad), - detail::workaround_cast(ae), - detail::workaround_cast(af), - detail::workaround_cast(ag), - detail::workaround_cast(ah), - detail::workaround_cast(aj), - detail::workaround_cast(ak), - detail::workaround_cast(al), - detail::workaround_cast(am), - detail::workaround_cast(an), - detail::workaround_cast(ap), - detail::workaround_cast(aq), - detail::workaround_cast(ar), - detail::workaround_cast(as), - detail::workaround_cast(at), - detail::workaround_cast(au), - detail::workaround_cast(av), - detail::workaround_cast(aw), - detail::workaround_cast(ax)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<70>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, U, V, W, X, Y, Z, aa, ab, ac, ad, ae, af, ag, ah, aj, ak, al, am, an, ap, aq, ar, as, at, au, av, aw, ax, ay] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N), - detail::workaround_cast(P), - detail::workaround_cast(Q), - detail::workaround_cast(R), - detail::workaround_cast(S), - detail::workaround_cast(U), - detail::workaround_cast(V), - detail::workaround_cast(W), - detail::workaround_cast(X), - detail::workaround_cast(Y), - detail::workaround_cast(Z), - detail::workaround_cast(aa), - detail::workaround_cast(ab), - detail::workaround_cast(ac), - detail::workaround_cast(ad), - detail::workaround_cast(ae), - detail::workaround_cast(af), - detail::workaround_cast(ag), - detail::workaround_cast(ah), - detail::workaround_cast(aj), - detail::workaround_cast(ak), - detail::workaround_cast(al), - detail::workaround_cast(am), - detail::workaround_cast(an), - detail::workaround_cast(ap), - detail::workaround_cast(aq), - detail::workaround_cast(ar), - detail::workaround_cast(as), - detail::workaround_cast(at), - detail::workaround_cast(au), - detail::workaround_cast(av), - detail::workaround_cast(aw), - detail::workaround_cast(ax), - detail::workaround_cast(ay)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<71>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, U, V, W, X, Y, Z, aa, ab, ac, ad, ae, af, ag, ah, aj, ak, al, am, an, ap, aq, ar, as, at, au, av, aw, ax, ay, az] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N), - detail::workaround_cast(P), - detail::workaround_cast(Q), - detail::workaround_cast(R), - detail::workaround_cast(S), - detail::workaround_cast(U), - detail::workaround_cast(V), - detail::workaround_cast(W), - detail::workaround_cast(X), - detail::workaround_cast(Y), - detail::workaround_cast(Z), - detail::workaround_cast(aa), - detail::workaround_cast(ab), - detail::workaround_cast(ac), - detail::workaround_cast(ad), - detail::workaround_cast(ae), - detail::workaround_cast(af), - detail::workaround_cast(ag), - detail::workaround_cast(ah), - detail::workaround_cast(aj), - detail::workaround_cast(ak), - detail::workaround_cast(al), - detail::workaround_cast(am), - detail::workaround_cast(an), - detail::workaround_cast(ap), - detail::workaround_cast(aq), - detail::workaround_cast(ar), - detail::workaround_cast(as), - detail::workaround_cast(at), - detail::workaround_cast(au), - detail::workaround_cast(av), - detail::workaround_cast(aw), - detail::workaround_cast(ax), - detail::workaround_cast(ay), - detail::workaround_cast(az)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<72>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, U, V, W, X, Y, Z, aa, ab, ac, ad, ae, af, ag, ah, aj, ak, al, am, an, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N), - detail::workaround_cast(P), - detail::workaround_cast(Q), - detail::workaround_cast(R), - detail::workaround_cast(S), - detail::workaround_cast(U), - detail::workaround_cast(V), - detail::workaround_cast(W), - detail::workaround_cast(X), - detail::workaround_cast(Y), - detail::workaround_cast(Z), - detail::workaround_cast(aa), - detail::workaround_cast(ab), - detail::workaround_cast(ac), - detail::workaround_cast(ad), - detail::workaround_cast(ae), - detail::workaround_cast(af), - detail::workaround_cast(ag), - detail::workaround_cast(ah), - detail::workaround_cast(aj), - detail::workaround_cast(ak), - detail::workaround_cast(al), - detail::workaround_cast(am), - detail::workaround_cast(an), - detail::workaround_cast(ap), - detail::workaround_cast(aq), - detail::workaround_cast(ar), - detail::workaround_cast(as), - detail::workaround_cast(at), - detail::workaround_cast(au), - detail::workaround_cast(av), - detail::workaround_cast(aw), - detail::workaround_cast(ax), - detail::workaround_cast(ay), - detail::workaround_cast(az), - detail::workaround_cast(aA)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<73>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, U, V, W, X, Y, Z, aa, ab, ac, ad, ae, af, ag, ah, aj, ak, al, am, an, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA, aB] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N), - detail::workaround_cast(P), - detail::workaround_cast(Q), - detail::workaround_cast(R), - detail::workaround_cast(S), - detail::workaround_cast(U), - detail::workaround_cast(V), - detail::workaround_cast(W), - detail::workaround_cast(X), - detail::workaround_cast(Y), - detail::workaround_cast(Z), - detail::workaround_cast(aa), - detail::workaround_cast(ab), - detail::workaround_cast(ac), - detail::workaround_cast(ad), - detail::workaround_cast(ae), - detail::workaround_cast(af), - detail::workaround_cast(ag), - detail::workaround_cast(ah), - detail::workaround_cast(aj), - detail::workaround_cast(ak), - detail::workaround_cast(al), - detail::workaround_cast(am), - detail::workaround_cast(an), - detail::workaround_cast(ap), - detail::workaround_cast(aq), - detail::workaround_cast(ar), - detail::workaround_cast(as), - detail::workaround_cast(at), - detail::workaround_cast(au), - detail::workaround_cast(av), - detail::workaround_cast(aw), - detail::workaround_cast(ax), - detail::workaround_cast(ay), - detail::workaround_cast(az), - detail::workaround_cast(aA), - detail::workaround_cast(aB)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<74>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, U, V, W, X, Y, Z, aa, ab, ac, ad, ae, af, ag, ah, aj, ak, al, am, an, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA, aB, aC] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N), - detail::workaround_cast(P), - detail::workaround_cast(Q), - detail::workaround_cast(R), - detail::workaround_cast(S), - detail::workaround_cast(U), - detail::workaround_cast(V), - detail::workaround_cast(W), - detail::workaround_cast(X), - detail::workaround_cast(Y), - detail::workaround_cast(Z), - detail::workaround_cast(aa), - detail::workaround_cast(ab), - detail::workaround_cast(ac), - detail::workaround_cast(ad), - detail::workaround_cast(ae), - detail::workaround_cast(af), - detail::workaround_cast(ag), - detail::workaround_cast(ah), - detail::workaround_cast(aj), - detail::workaround_cast(ak), - detail::workaround_cast(al), - detail::workaround_cast(am), - detail::workaround_cast(an), - detail::workaround_cast(ap), - detail::workaround_cast(aq), - detail::workaround_cast(ar), - detail::workaround_cast(as), - detail::workaround_cast(at), - detail::workaround_cast(au), - detail::workaround_cast(av), - detail::workaround_cast(aw), - detail::workaround_cast(ax), - detail::workaround_cast(ay), - detail::workaround_cast(az), - detail::workaround_cast(aA), - detail::workaround_cast(aB), - detail::workaround_cast(aC)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<75>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, U, V, W, X, Y, Z, aa, ab, ac, ad, ae, af, ag, ah, aj, ak, al, am, an, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA, aB, aC, aD] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N), - detail::workaround_cast(P), - detail::workaround_cast(Q), - detail::workaround_cast(R), - detail::workaround_cast(S), - detail::workaround_cast(U), - detail::workaround_cast(V), - detail::workaround_cast(W), - detail::workaround_cast(X), - detail::workaround_cast(Y), - detail::workaround_cast(Z), - detail::workaround_cast(aa), - detail::workaround_cast(ab), - detail::workaround_cast(ac), - detail::workaround_cast(ad), - detail::workaround_cast(ae), - detail::workaround_cast(af), - detail::workaround_cast(ag), - detail::workaround_cast(ah), - detail::workaround_cast(aj), - detail::workaround_cast(ak), - detail::workaround_cast(al), - detail::workaround_cast(am), - detail::workaround_cast(an), - detail::workaround_cast(ap), - detail::workaround_cast(aq), - detail::workaround_cast(ar), - detail::workaround_cast(as), - detail::workaround_cast(at), - detail::workaround_cast(au), - detail::workaround_cast(av), - detail::workaround_cast(aw), - detail::workaround_cast(ax), - detail::workaround_cast(ay), - detail::workaround_cast(az), - detail::workaround_cast(aA), - detail::workaround_cast(aB), - detail::workaround_cast(aC), - detail::workaround_cast(aD)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<76>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, U, V, W, X, Y, Z, aa, ab, ac, ad, ae, af, ag, ah, aj, ak, al, am, an, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA, aB, aC, aD, aE] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N), - detail::workaround_cast(P), - detail::workaround_cast(Q), - detail::workaround_cast(R), - detail::workaround_cast(S), - detail::workaround_cast(U), - detail::workaround_cast(V), - detail::workaround_cast(W), - detail::workaround_cast(X), - detail::workaround_cast(Y), - detail::workaround_cast(Z), - detail::workaround_cast(aa), - detail::workaround_cast(ab), - detail::workaround_cast(ac), - detail::workaround_cast(ad), - detail::workaround_cast(ae), - detail::workaround_cast(af), - detail::workaround_cast(ag), - detail::workaround_cast(ah), - detail::workaround_cast(aj), - detail::workaround_cast(ak), - detail::workaround_cast(al), - detail::workaround_cast(am), - detail::workaround_cast(an), - detail::workaround_cast(ap), - detail::workaround_cast(aq), - detail::workaround_cast(ar), - detail::workaround_cast(as), - detail::workaround_cast(at), - detail::workaround_cast(au), - detail::workaround_cast(av), - detail::workaround_cast(aw), - detail::workaround_cast(ax), - detail::workaround_cast(ay), - detail::workaround_cast(az), - detail::workaround_cast(aA), - detail::workaround_cast(aB), - detail::workaround_cast(aC), - detail::workaround_cast(aD), - detail::workaround_cast(aE)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<77>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, U, V, W, X, Y, Z, aa, ab, ac, ad, ae, af, ag, ah, aj, ak, al, am, an, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA, aB, aC, aD, aE, aF] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N), - detail::workaround_cast(P), - detail::workaround_cast(Q), - detail::workaround_cast(R), - detail::workaround_cast(S), - detail::workaround_cast(U), - detail::workaround_cast(V), - detail::workaround_cast(W), - detail::workaround_cast(X), - detail::workaround_cast(Y), - detail::workaround_cast(Z), - detail::workaround_cast(aa), - detail::workaround_cast(ab), - detail::workaround_cast(ac), - detail::workaround_cast(ad), - detail::workaround_cast(ae), - detail::workaround_cast(af), - detail::workaround_cast(ag), - detail::workaround_cast(ah), - detail::workaround_cast(aj), - detail::workaround_cast(ak), - detail::workaround_cast(al), - detail::workaround_cast(am), - detail::workaround_cast(an), - detail::workaround_cast(ap), - detail::workaround_cast(aq), - detail::workaround_cast(ar), - detail::workaround_cast(as), - detail::workaround_cast(at), - detail::workaround_cast(au), - detail::workaround_cast(av), - detail::workaround_cast(aw), - detail::workaround_cast(ax), - detail::workaround_cast(ay), - detail::workaround_cast(az), - detail::workaround_cast(aA), - detail::workaround_cast(aB), - detail::workaround_cast(aC), - detail::workaround_cast(aD), - detail::workaround_cast(aE), - detail::workaround_cast(aF)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<78>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, U, V, W, X, Y, Z, aa, ab, ac, ad, ae, af, ag, ah, aj, ak, al, am, an, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA, aB, aC, aD, aE, aF, aG] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N), - detail::workaround_cast(P), - detail::workaround_cast(Q), - detail::workaround_cast(R), - detail::workaround_cast(S), - detail::workaround_cast(U), - detail::workaround_cast(V), - detail::workaround_cast(W), - detail::workaround_cast(X), - detail::workaround_cast(Y), - detail::workaround_cast(Z), - detail::workaround_cast(aa), - detail::workaround_cast(ab), - detail::workaround_cast(ac), - detail::workaround_cast(ad), - detail::workaround_cast(ae), - detail::workaround_cast(af), - detail::workaround_cast(ag), - detail::workaround_cast(ah), - detail::workaround_cast(aj), - detail::workaround_cast(ak), - detail::workaround_cast(al), - detail::workaround_cast(am), - detail::workaround_cast(an), - detail::workaround_cast(ap), - detail::workaround_cast(aq), - detail::workaround_cast(ar), - detail::workaround_cast(as), - detail::workaround_cast(at), - detail::workaround_cast(au), - detail::workaround_cast(av), - detail::workaround_cast(aw), - detail::workaround_cast(ax), - detail::workaround_cast(ay), - detail::workaround_cast(az), - detail::workaround_cast(aA), - detail::workaround_cast(aB), - detail::workaround_cast(aC), - detail::workaround_cast(aD), - detail::workaround_cast(aE), - detail::workaround_cast(aF), - detail::workaround_cast(aG)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<79>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, U, V, W, X, Y, Z, aa, ab, ac, ad, ae, af, ag, ah, aj, ak, al, am, an, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA, aB, aC, aD, aE, aF, aG, aH] = const_cast< - std::remove_cv_t&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N), - detail::workaround_cast(P), - detail::workaround_cast(Q), - detail::workaround_cast(R), - detail::workaround_cast(S), - detail::workaround_cast(U), - detail::workaround_cast(V), - detail::workaround_cast(W), - detail::workaround_cast(X), - detail::workaround_cast(Y), - detail::workaround_cast(Z), - detail::workaround_cast(aa), - detail::workaround_cast(ab), - detail::workaround_cast(ac), - detail::workaround_cast(ad), - detail::workaround_cast(ae), - detail::workaround_cast(af), - detail::workaround_cast(ag), - detail::workaround_cast(ah), - detail::workaround_cast(aj), - detail::workaround_cast(ak), - detail::workaround_cast(al), - detail::workaround_cast(am), - detail::workaround_cast(an), - detail::workaround_cast(ap), - detail::workaround_cast(aq), - detail::workaround_cast(ar), - detail::workaround_cast(as), - detail::workaround_cast(at), - detail::workaround_cast(au), - detail::workaround_cast(av), - detail::workaround_cast(aw), - detail::workaround_cast(ax), - detail::workaround_cast(ay), - detail::workaround_cast(az), - detail::workaround_cast(aA), - detail::workaround_cast(aB), - detail::workaround_cast(aC), - detail::workaround_cast(aD), - detail::workaround_cast(aE), - detail::workaround_cast(aF), - detail::workaround_cast(aG), - detail::workaround_cast(aH)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<80>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, U, V, W, X, Y, Z, aa, ab, ac, ad, ae, af, ag, ah, aj, ak, al, am, an, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA, aB, aC, aD, aE, aF, aG, aH, aJ] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N), - detail::workaround_cast(P), - detail::workaround_cast(Q), - detail::workaround_cast(R), - detail::workaround_cast(S), - detail::workaround_cast(U), - detail::workaround_cast(V), - detail::workaround_cast(W), - detail::workaround_cast(X), - detail::workaround_cast(Y), - detail::workaround_cast(Z), - detail::workaround_cast(aa), - detail::workaround_cast(ab), - detail::workaround_cast(ac), - detail::workaround_cast(ad), - detail::workaround_cast(ae), - detail::workaround_cast(af), - detail::workaround_cast(ag), - detail::workaround_cast(ah), - detail::workaround_cast(aj), - detail::workaround_cast(ak), - detail::workaround_cast(al), - detail::workaround_cast(am), - detail::workaround_cast(an), - detail::workaround_cast(ap), - detail::workaround_cast(aq), - detail::workaround_cast(ar), - detail::workaround_cast(as), - detail::workaround_cast(at), - detail::workaround_cast(au), - detail::workaround_cast(av), - detail::workaround_cast(aw), - detail::workaround_cast(ax), - detail::workaround_cast(ay), - detail::workaround_cast(az), - detail::workaround_cast(aA), - detail::workaround_cast(aB), - detail::workaround_cast(aC), - detail::workaround_cast(aD), - detail::workaround_cast(aE), - detail::workaround_cast(aF), - detail::workaround_cast(aG), - detail::workaround_cast(aH), - detail::workaround_cast(aJ)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<81>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, U, V, W, X, Y, Z, aa, ab, ac, ad, ae, af, ag, ah, aj, ak, al, am, an, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA, aB, aC, aD, aE, aF, aG, aH, aJ, aK] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N), - detail::workaround_cast(P), - detail::workaround_cast(Q), - detail::workaround_cast(R), - detail::workaround_cast(S), - detail::workaround_cast(U), - detail::workaround_cast(V), - detail::workaround_cast(W), - detail::workaround_cast(X), - detail::workaround_cast(Y), - detail::workaround_cast(Z), - detail::workaround_cast(aa), - detail::workaround_cast(ab), - detail::workaround_cast(ac), - detail::workaround_cast(ad), - detail::workaround_cast(ae), - detail::workaround_cast(af), - detail::workaround_cast(ag), - detail::workaround_cast(ah), - detail::workaround_cast(aj), - detail::workaround_cast(ak), - detail::workaround_cast(al), - detail::workaround_cast(am), - detail::workaround_cast(an), - detail::workaround_cast(ap), - detail::workaround_cast(aq), - detail::workaround_cast(ar), - detail::workaround_cast(as), - detail::workaround_cast(at), - detail::workaround_cast(au), - detail::workaround_cast(av), - detail::workaround_cast(aw), - detail::workaround_cast(ax), - detail::workaround_cast(ay), - detail::workaround_cast(az), - detail::workaround_cast(aA), - detail::workaround_cast(aB), - detail::workaround_cast(aC), - detail::workaround_cast(aD), - detail::workaround_cast(aE), - detail::workaround_cast(aF), - detail::workaround_cast(aG), - detail::workaround_cast(aH), - detail::workaround_cast(aJ), - detail::workaround_cast(aK)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<82>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, U, V, W, X, Y, Z, aa, ab, ac, ad, ae, af, ag, ah, aj, ak, al, am, an, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA, aB, aC, aD, aE, aF, aG, aH, aJ, aK, aL] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N), - detail::workaround_cast(P), - detail::workaround_cast(Q), - detail::workaround_cast(R), - detail::workaround_cast(S), - detail::workaround_cast(U), - detail::workaround_cast(V), - detail::workaround_cast(W), - detail::workaround_cast(X), - detail::workaround_cast(Y), - detail::workaround_cast(Z), - detail::workaround_cast(aa), - detail::workaround_cast(ab), - detail::workaround_cast(ac), - detail::workaround_cast(ad), - detail::workaround_cast(ae), - detail::workaround_cast(af), - detail::workaround_cast(ag), - detail::workaround_cast(ah), - detail::workaround_cast(aj), - detail::workaround_cast(ak), - detail::workaround_cast(al), - detail::workaround_cast(am), - detail::workaround_cast(an), - detail::workaround_cast(ap), - detail::workaround_cast(aq), - detail::workaround_cast(ar), - detail::workaround_cast(as), - detail::workaround_cast(at), - detail::workaround_cast(au), - detail::workaround_cast(av), - detail::workaround_cast(aw), - detail::workaround_cast(ax), - detail::workaround_cast(ay), - detail::workaround_cast(az), - detail::workaround_cast(aA), - detail::workaround_cast(aB), - detail::workaround_cast(aC), - detail::workaround_cast(aD), - detail::workaround_cast(aE), - detail::workaround_cast(aF), - detail::workaround_cast(aG), - detail::workaround_cast(aH), - detail::workaround_cast(aJ), - detail::workaround_cast(aK), - detail::workaround_cast(aL)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<83>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, U, V, W, X, Y, Z, aa, ab, ac, ad, ae, af, ag, ah, aj, ak, al, am, an, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA, aB, aC, aD, aE, aF, aG, aH, aJ, aK, aL, aM] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N), - detail::workaround_cast(P), - detail::workaround_cast(Q), - detail::workaround_cast(R), - detail::workaround_cast(S), - detail::workaround_cast(U), - detail::workaround_cast(V), - detail::workaround_cast(W), - detail::workaround_cast(X), - detail::workaround_cast(Y), - detail::workaround_cast(Z), - detail::workaround_cast(aa), - detail::workaround_cast(ab), - detail::workaround_cast(ac), - detail::workaround_cast(ad), - detail::workaround_cast(ae), - detail::workaround_cast(af), - detail::workaround_cast(ag), - detail::workaround_cast(ah), - detail::workaround_cast(aj), - detail::workaround_cast(ak), - detail::workaround_cast(al), - detail::workaround_cast(am), - detail::workaround_cast(an), - detail::workaround_cast(ap), - detail::workaround_cast(aq), - detail::workaround_cast(ar), - detail::workaround_cast(as), - detail::workaround_cast(at), - detail::workaround_cast(au), - detail::workaround_cast(av), - detail::workaround_cast(aw), - detail::workaround_cast(ax), - detail::workaround_cast(ay), - detail::workaround_cast(az), - detail::workaround_cast(aA), - detail::workaround_cast(aB), - detail::workaround_cast(aC), - detail::workaround_cast(aD), - detail::workaround_cast(aE), - detail::workaround_cast(aF), - detail::workaround_cast(aG), - detail::workaround_cast(aH), - detail::workaround_cast(aJ), - detail::workaround_cast(aK), - detail::workaround_cast(aL), - detail::workaround_cast(aM)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<84>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, U, V, W, X, Y, Z, aa, ab, ac, ad, ae, af, ag, ah, aj, ak, al, am, an, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA, aB, aC, aD, aE, aF, aG, aH, aJ, aK, aL, aM, aN] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N), - detail::workaround_cast(P), - detail::workaround_cast(Q), - detail::workaround_cast(R), - detail::workaround_cast(S), - detail::workaround_cast(U), - detail::workaround_cast(V), - detail::workaround_cast(W), - detail::workaround_cast(X), - detail::workaround_cast(Y), - detail::workaround_cast(Z), - detail::workaround_cast(aa), - detail::workaround_cast(ab), - detail::workaround_cast(ac), - detail::workaround_cast(ad), - detail::workaround_cast(ae), - detail::workaround_cast(af), - detail::workaround_cast(ag), - detail::workaround_cast(ah), - detail::workaround_cast(aj), - detail::workaround_cast(ak), - detail::workaround_cast(al), - detail::workaround_cast(am), - detail::workaround_cast(an), - detail::workaround_cast(ap), - detail::workaround_cast(aq), - detail::workaround_cast(ar), - detail::workaround_cast(as), - detail::workaround_cast(at), - detail::workaround_cast(au), - detail::workaround_cast(av), - detail::workaround_cast(aw), - detail::workaround_cast(ax), - detail::workaround_cast(ay), - detail::workaround_cast(az), - detail::workaround_cast(aA), - detail::workaround_cast(aB), - detail::workaround_cast(aC), - detail::workaround_cast(aD), - detail::workaround_cast(aE), - detail::workaround_cast(aF), - detail::workaround_cast(aG), - detail::workaround_cast(aH), - detail::workaround_cast(aJ), - detail::workaround_cast(aK), - detail::workaround_cast(aL), - detail::workaround_cast(aM), - detail::workaround_cast(aN)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<85>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, U, V, W, X, Y, Z, aa, ab, ac, ad, ae, af, ag, ah, aj, ak, al, am, an, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA, aB, aC, aD, aE, aF, aG, aH, aJ, aK, aL, aM, aN, aP] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N), - detail::workaround_cast(P), - detail::workaround_cast(Q), - detail::workaround_cast(R), - detail::workaround_cast(S), - detail::workaround_cast(U), - detail::workaround_cast(V), - detail::workaround_cast(W), - detail::workaround_cast(X), - detail::workaround_cast(Y), - detail::workaround_cast(Z), - detail::workaround_cast(aa), - detail::workaround_cast(ab), - detail::workaround_cast(ac), - detail::workaround_cast(ad), - detail::workaround_cast(ae), - detail::workaround_cast(af), - detail::workaround_cast(ag), - detail::workaround_cast(ah), - detail::workaround_cast(aj), - detail::workaround_cast(ak), - detail::workaround_cast(al), - detail::workaround_cast(am), - detail::workaround_cast(an), - detail::workaround_cast(ap), - detail::workaround_cast(aq), - detail::workaround_cast(ar), - detail::workaround_cast(as), - detail::workaround_cast(at), - detail::workaround_cast(au), - detail::workaround_cast(av), - detail::workaround_cast(aw), - detail::workaround_cast(ax), - detail::workaround_cast(ay), - detail::workaround_cast(az), - detail::workaround_cast(aA), - detail::workaround_cast(aB), - detail::workaround_cast(aC), - detail::workaround_cast(aD), - detail::workaround_cast(aE), - detail::workaround_cast(aF), - detail::workaround_cast(aG), - detail::workaround_cast(aH), - detail::workaround_cast(aJ), - detail::workaround_cast(aK), - detail::workaround_cast(aL), - detail::workaround_cast(aM), - detail::workaround_cast(aN), - detail::workaround_cast(aP)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<86>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, U, V, W, X, Y, Z, aa, ab, ac, ad, ae, af, ag, ah, aj, ak, al, am, an, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA, aB, aC, aD, aE, aF, aG, aH, aJ, aK, aL, aM, aN, aP, aQ] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N), - detail::workaround_cast(P), - detail::workaround_cast(Q), - detail::workaround_cast(R), - detail::workaround_cast(S), - detail::workaround_cast(U), - detail::workaround_cast(V), - detail::workaround_cast(W), - detail::workaround_cast(X), - detail::workaround_cast(Y), - detail::workaround_cast(Z), - detail::workaround_cast(aa), - detail::workaround_cast(ab), - detail::workaround_cast(ac), - detail::workaround_cast(ad), - detail::workaround_cast(ae), - detail::workaround_cast(af), - detail::workaround_cast(ag), - detail::workaround_cast(ah), - detail::workaround_cast(aj), - detail::workaround_cast(ak), - detail::workaround_cast(al), - detail::workaround_cast(am), - detail::workaround_cast(an), - detail::workaround_cast(ap), - detail::workaround_cast(aq), - detail::workaround_cast(ar), - detail::workaround_cast(as), - detail::workaround_cast(at), - detail::workaround_cast(au), - detail::workaround_cast(av), - detail::workaround_cast(aw), - detail::workaround_cast(ax), - detail::workaround_cast(ay), - detail::workaround_cast(az), - detail::workaround_cast(aA), - detail::workaround_cast(aB), - detail::workaround_cast(aC), - detail::workaround_cast(aD), - detail::workaround_cast(aE), - detail::workaround_cast(aF), - detail::workaround_cast(aG), - detail::workaround_cast(aH), - detail::workaround_cast(aJ), - detail::workaround_cast(aK), - detail::workaround_cast(aL), - detail::workaround_cast(aM), - detail::workaround_cast(aN), - detail::workaround_cast(aP), - detail::workaround_cast(aQ)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<87>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, U, V, W, X, Y, Z, aa, ab, ac, ad, ae, af, ag, ah, aj, ak, al, am, an, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA, aB, aC, aD, aE, aF, aG, aH, aJ, aK, aL, aM, aN, aP, aQ, aR] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N), - detail::workaround_cast(P), - detail::workaround_cast(Q), - detail::workaround_cast(R), - detail::workaround_cast(S), - detail::workaround_cast(U), - detail::workaround_cast(V), - detail::workaround_cast(W), - detail::workaround_cast(X), - detail::workaround_cast(Y), - detail::workaround_cast(Z), - detail::workaround_cast(aa), - detail::workaround_cast(ab), - detail::workaround_cast(ac), - detail::workaround_cast(ad), - detail::workaround_cast(ae), - detail::workaround_cast(af), - detail::workaround_cast(ag), - detail::workaround_cast(ah), - detail::workaround_cast(aj), - detail::workaround_cast(ak), - detail::workaround_cast(al), - detail::workaround_cast(am), - detail::workaround_cast(an), - detail::workaround_cast(ap), - detail::workaround_cast(aq), - detail::workaround_cast(ar), - detail::workaround_cast(as), - detail::workaround_cast(at), - detail::workaround_cast(au), - detail::workaround_cast(av), - detail::workaround_cast(aw), - detail::workaround_cast(ax), - detail::workaround_cast(ay), - detail::workaround_cast(az), - detail::workaround_cast(aA), - detail::workaround_cast(aB), - detail::workaround_cast(aC), - detail::workaround_cast(aD), - detail::workaround_cast(aE), - detail::workaround_cast(aF), - detail::workaround_cast(aG), - detail::workaround_cast(aH), - detail::workaround_cast(aJ), - detail::workaround_cast(aK), - detail::workaround_cast(aL), - detail::workaround_cast(aM), - detail::workaround_cast(aN), - detail::workaround_cast(aP), - detail::workaround_cast(aQ), - detail::workaround_cast(aR)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<88>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, U, V, W, X, Y, Z, aa, ab, ac, ad, ae, af, ag, ah, aj, ak, al, am, an, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA, aB, aC, aD, aE, aF, aG, aH, aJ, aK, aL, aM, aN, aP, aQ, aR, aS] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N), - detail::workaround_cast(P), - detail::workaround_cast(Q), - detail::workaround_cast(R), - detail::workaround_cast(S), - detail::workaround_cast(U), - detail::workaround_cast(V), - detail::workaround_cast(W), - detail::workaround_cast(X), - detail::workaround_cast(Y), - detail::workaround_cast(Z), - detail::workaround_cast(aa), - detail::workaround_cast(ab), - detail::workaround_cast(ac), - detail::workaround_cast(ad), - detail::workaround_cast(ae), - detail::workaround_cast(af), - detail::workaround_cast(ag), - detail::workaround_cast(ah), - detail::workaround_cast(aj), - detail::workaround_cast(ak), - detail::workaround_cast(al), - detail::workaround_cast(am), - detail::workaround_cast(an), - detail::workaround_cast(ap), - detail::workaround_cast(aq), - detail::workaround_cast(ar), - detail::workaround_cast(as), - detail::workaround_cast(at), - detail::workaround_cast(au), - detail::workaround_cast(av), - detail::workaround_cast(aw), - detail::workaround_cast(ax), - detail::workaround_cast(ay), - detail::workaround_cast(az), - detail::workaround_cast(aA), - detail::workaround_cast(aB), - detail::workaround_cast(aC), - detail::workaround_cast(aD), - detail::workaround_cast(aE), - detail::workaround_cast(aF), - detail::workaround_cast(aG), - detail::workaround_cast(aH), - detail::workaround_cast(aJ), - detail::workaround_cast(aK), - detail::workaround_cast(aL), - detail::workaround_cast(aM), - detail::workaround_cast(aN), - detail::workaround_cast(aP), - detail::workaround_cast(aQ), - detail::workaround_cast(aR), - detail::workaround_cast(aS)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<89>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, U, V, W, X, Y, Z, aa, ab, ac, ad, ae, af, ag, ah, aj, ak, al, am, an, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA, aB, aC, aD, aE, aF, aG, aH, aJ, aK, aL, aM, aN, aP, aQ, aR, aS, aU] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N), - detail::workaround_cast(P), - detail::workaround_cast(Q), - detail::workaround_cast(R), - detail::workaround_cast(S), - detail::workaround_cast(U), - detail::workaround_cast(V), - detail::workaround_cast(W), - detail::workaround_cast(X), - detail::workaround_cast(Y), - detail::workaround_cast(Z), - detail::workaround_cast(aa), - detail::workaround_cast(ab), - detail::workaround_cast(ac), - detail::workaround_cast(ad), - detail::workaround_cast(ae), - detail::workaround_cast(af), - detail::workaround_cast(ag), - detail::workaround_cast(ah), - detail::workaround_cast(aj), - detail::workaround_cast(ak), - detail::workaround_cast(al), - detail::workaround_cast(am), - detail::workaround_cast(an), - detail::workaround_cast(ap), - detail::workaround_cast(aq), - detail::workaround_cast(ar), - detail::workaround_cast(as), - detail::workaround_cast(at), - detail::workaround_cast(au), - detail::workaround_cast(av), - detail::workaround_cast(aw), - detail::workaround_cast(ax), - detail::workaround_cast(ay), - detail::workaround_cast(az), - detail::workaround_cast(aA), - detail::workaround_cast(aB), - detail::workaround_cast(aC), - detail::workaround_cast(aD), - detail::workaround_cast(aE), - detail::workaround_cast(aF), - detail::workaround_cast(aG), - detail::workaround_cast(aH), - detail::workaround_cast(aJ), - detail::workaround_cast(aK), - detail::workaround_cast(aL), - detail::workaround_cast(aM), - detail::workaround_cast(aN), - detail::workaround_cast(aP), - detail::workaround_cast(aQ), - detail::workaround_cast(aR), - detail::workaround_cast(aS), - detail::workaround_cast(aU)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<90>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, U, V, W, X, Y, Z, aa, ab, ac, ad, ae, af, ag, ah, aj, ak, al, am, an, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA, aB, aC, aD, aE, aF, aG, aH, aJ, aK, aL, aM, aN, aP, aQ, aR, aS, aU, aV] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N), - detail::workaround_cast(P), - detail::workaround_cast(Q), - detail::workaround_cast(R), - detail::workaround_cast(S), - detail::workaround_cast(U), - detail::workaround_cast(V), - detail::workaround_cast(W), - detail::workaround_cast(X), - detail::workaround_cast(Y), - detail::workaround_cast(Z), - detail::workaround_cast(aa), - detail::workaround_cast(ab), - detail::workaround_cast(ac), - detail::workaround_cast(ad), - detail::workaround_cast(ae), - detail::workaround_cast(af), - detail::workaround_cast(ag), - detail::workaround_cast(ah), - detail::workaround_cast(aj), - detail::workaround_cast(ak), - detail::workaround_cast(al), - detail::workaround_cast(am), - detail::workaround_cast(an), - detail::workaround_cast(ap), - detail::workaround_cast(aq), - detail::workaround_cast(ar), - detail::workaround_cast(as), - detail::workaround_cast(at), - detail::workaround_cast(au), - detail::workaround_cast(av), - detail::workaround_cast(aw), - detail::workaround_cast(ax), - detail::workaround_cast(ay), - detail::workaround_cast(az), - detail::workaround_cast(aA), - detail::workaround_cast(aB), - detail::workaround_cast(aC), - detail::workaround_cast(aD), - detail::workaround_cast(aE), - detail::workaround_cast(aF), - detail::workaround_cast(aG), - detail::workaround_cast(aH), - detail::workaround_cast(aJ), - detail::workaround_cast(aK), - detail::workaround_cast(aL), - detail::workaround_cast(aM), - detail::workaround_cast(aN), - detail::workaround_cast(aP), - detail::workaround_cast(aQ), - detail::workaround_cast(aR), - detail::workaround_cast(aS), - detail::workaround_cast(aU), - detail::workaround_cast(aV)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<91>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, U, V, W, X, Y, Z, aa, ab, ac, ad, ae, af, ag, ah, aj, ak, al, am, an, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA, aB, aC, aD, aE, aF, aG, aH, aJ, aK, aL, aM, aN, aP, aQ, aR, aS, aU, aV, aW] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N), - detail::workaround_cast(P), - detail::workaround_cast(Q), - detail::workaround_cast(R), - detail::workaround_cast(S), - detail::workaround_cast(U), - detail::workaround_cast(V), - detail::workaround_cast(W), - detail::workaround_cast(X), - detail::workaround_cast(Y), - detail::workaround_cast(Z), - detail::workaround_cast(aa), - detail::workaround_cast(ab), - detail::workaround_cast(ac), - detail::workaround_cast(ad), - detail::workaround_cast(ae), - detail::workaround_cast(af), - detail::workaround_cast(ag), - detail::workaround_cast(ah), - detail::workaround_cast(aj), - detail::workaround_cast(ak), - detail::workaround_cast(al), - detail::workaround_cast(am), - detail::workaround_cast(an), - detail::workaround_cast(ap), - detail::workaround_cast(aq), - detail::workaround_cast(ar), - detail::workaround_cast(as), - detail::workaround_cast(at), - detail::workaround_cast(au), - detail::workaround_cast(av), - detail::workaround_cast(aw), - detail::workaround_cast(ax), - detail::workaround_cast(ay), - detail::workaround_cast(az), - detail::workaround_cast(aA), - detail::workaround_cast(aB), - detail::workaround_cast(aC), - detail::workaround_cast(aD), - detail::workaround_cast(aE), - detail::workaround_cast(aF), - detail::workaround_cast(aG), - detail::workaround_cast(aH), - detail::workaround_cast(aJ), - detail::workaround_cast(aK), - detail::workaround_cast(aL), - detail::workaround_cast(aM), - detail::workaround_cast(aN), - detail::workaround_cast(aP), - detail::workaround_cast(aQ), - detail::workaround_cast(aR), - detail::workaround_cast(aS), - detail::workaround_cast(aU), - detail::workaround_cast(aV), - detail::workaround_cast(aW)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<92>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, U, V, W, X, Y, Z, aa, ab, ac, ad, ae, af, ag, ah, aj, ak, al, am, an, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA, aB, aC, aD, aE, aF, aG, aH, aJ, aK, aL, aM, aN, aP, aQ, aR, aS, aU, aV, aW, aX] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N), - detail::workaround_cast(P), - detail::workaround_cast(Q), - detail::workaround_cast(R), - detail::workaround_cast(S), - detail::workaround_cast(U), - detail::workaround_cast(V), - detail::workaround_cast(W), - detail::workaround_cast(X), - detail::workaround_cast(Y), - detail::workaround_cast(Z), - detail::workaround_cast(aa), - detail::workaround_cast(ab), - detail::workaround_cast(ac), - detail::workaround_cast(ad), - detail::workaround_cast(ae), - detail::workaround_cast(af), - detail::workaround_cast(ag), - detail::workaround_cast(ah), - detail::workaround_cast(aj), - detail::workaround_cast(ak), - detail::workaround_cast(al), - detail::workaround_cast(am), - detail::workaround_cast(an), - detail::workaround_cast(ap), - detail::workaround_cast(aq), - detail::workaround_cast(ar), - detail::workaround_cast(as), - detail::workaround_cast(at), - detail::workaround_cast(au), - detail::workaround_cast(av), - detail::workaround_cast(aw), - detail::workaround_cast(ax), - detail::workaround_cast(ay), - detail::workaround_cast(az), - detail::workaround_cast(aA), - detail::workaround_cast(aB), - detail::workaround_cast(aC), - detail::workaround_cast(aD), - detail::workaround_cast(aE), - detail::workaround_cast(aF), - detail::workaround_cast(aG), - detail::workaround_cast(aH), - detail::workaround_cast(aJ), - detail::workaround_cast(aK), - detail::workaround_cast(aL), - detail::workaround_cast(aM), - detail::workaround_cast(aN), - detail::workaround_cast(aP), - detail::workaround_cast(aQ), - detail::workaround_cast(aR), - detail::workaround_cast(aS), - detail::workaround_cast(aU), - detail::workaround_cast(aV), - detail::workaround_cast(aW), - detail::workaround_cast(aX)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<93>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, U, V, W, X, Y, Z, aa, ab, ac, ad, ae, af, ag, ah, aj, ak, al, am, an, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA, aB, aC, aD, aE, aF, aG, aH, aJ, aK, aL, aM, aN, aP, aQ, aR, aS, aU, aV, aW, aX, aY] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N), - detail::workaround_cast(P), - detail::workaround_cast(Q), - detail::workaround_cast(R), - detail::workaround_cast(S), - detail::workaround_cast(U), - detail::workaround_cast(V), - detail::workaround_cast(W), - detail::workaround_cast(X), - detail::workaround_cast(Y), - detail::workaround_cast(Z), - detail::workaround_cast(aa), - detail::workaround_cast(ab), - detail::workaround_cast(ac), - detail::workaround_cast(ad), - detail::workaround_cast(ae), - detail::workaround_cast(af), - detail::workaround_cast(ag), - detail::workaround_cast(ah), - detail::workaround_cast(aj), - detail::workaround_cast(ak), - detail::workaround_cast(al), - detail::workaround_cast(am), - detail::workaround_cast(an), - detail::workaround_cast(ap), - detail::workaround_cast(aq), - detail::workaround_cast(ar), - detail::workaround_cast(as), - detail::workaround_cast(at), - detail::workaround_cast(au), - detail::workaround_cast(av), - detail::workaround_cast(aw), - detail::workaround_cast(ax), - detail::workaround_cast(ay), - detail::workaround_cast(az), - detail::workaround_cast(aA), - detail::workaround_cast(aB), - detail::workaround_cast(aC), - detail::workaround_cast(aD), - detail::workaround_cast(aE), - detail::workaround_cast(aF), - detail::workaround_cast(aG), - detail::workaround_cast(aH), - detail::workaround_cast(aJ), - detail::workaround_cast(aK), - detail::workaround_cast(aL), - detail::workaround_cast(aM), - detail::workaround_cast(aN), - detail::workaround_cast(aP), - detail::workaround_cast(aQ), - detail::workaround_cast(aR), - detail::workaround_cast(aS), - detail::workaround_cast(aU), - detail::workaround_cast(aV), - detail::workaround_cast(aW), - detail::workaround_cast(aX), - detail::workaround_cast(aY)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<94>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, U, V, W, X, Y, Z, aa, ab, ac, ad, ae, af, ag, ah, aj, ak, al, am, an, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA, aB, aC, aD, aE, aF, aG, aH, aJ, aK, aL, aM, aN, aP, aQ, aR, aS, aU, aV, aW, aX, aY, aZ] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N), - detail::workaround_cast(P), - detail::workaround_cast(Q), - detail::workaround_cast(R), - detail::workaround_cast(S), - detail::workaround_cast(U), - detail::workaround_cast(V), - detail::workaround_cast(W), - detail::workaround_cast(X), - detail::workaround_cast(Y), - detail::workaround_cast(Z), - detail::workaround_cast(aa), - detail::workaround_cast(ab), - detail::workaround_cast(ac), - detail::workaround_cast(ad), - detail::workaround_cast(ae), - detail::workaround_cast(af), - detail::workaround_cast(ag), - detail::workaround_cast(ah), - detail::workaround_cast(aj), - detail::workaround_cast(ak), - detail::workaround_cast(al), - detail::workaround_cast(am), - detail::workaround_cast(an), - detail::workaround_cast(ap), - detail::workaround_cast(aq), - detail::workaround_cast(ar), - detail::workaround_cast(as), - detail::workaround_cast(at), - detail::workaround_cast(au), - detail::workaround_cast(av), - detail::workaround_cast(aw), - detail::workaround_cast(ax), - detail::workaround_cast(ay), - detail::workaround_cast(az), - detail::workaround_cast(aA), - detail::workaround_cast(aB), - detail::workaround_cast(aC), - detail::workaround_cast(aD), - detail::workaround_cast(aE), - detail::workaround_cast(aF), - detail::workaround_cast(aG), - detail::workaround_cast(aH), - detail::workaround_cast(aJ), - detail::workaround_cast(aK), - detail::workaround_cast(aL), - detail::workaround_cast(aM), - detail::workaround_cast(aN), - detail::workaround_cast(aP), - detail::workaround_cast(aQ), - detail::workaround_cast(aR), - detail::workaround_cast(aS), - detail::workaround_cast(aU), - detail::workaround_cast(aV), - detail::workaround_cast(aW), - detail::workaround_cast(aX), - detail::workaround_cast(aY), - detail::workaround_cast(aZ)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<95>) noexcept - { - auto& [ - a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, - aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ,aK,aL,aM,aN,aP,aQ,aR,aS,aU,aV,aW,aX,aY,aZ, - ba - ] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N), - detail::workaround_cast(P), - detail::workaround_cast(Q), - detail::workaround_cast(R), - detail::workaround_cast(S), - detail::workaround_cast(U), - detail::workaround_cast(V), - detail::workaround_cast(W), - detail::workaround_cast(X), - detail::workaround_cast(Y), - detail::workaround_cast(Z), - detail::workaround_cast(aa), - detail::workaround_cast(ab), - detail::workaround_cast(ac), - detail::workaround_cast(ad), - detail::workaround_cast(ae), - detail::workaround_cast(af), - detail::workaround_cast(ag), - detail::workaround_cast(ah), - detail::workaround_cast(aj), - detail::workaround_cast(ak), - detail::workaround_cast(al), - detail::workaround_cast(am), - detail::workaround_cast(an), - detail::workaround_cast(ap), - detail::workaround_cast(aq), - detail::workaround_cast(ar), - detail::workaround_cast(as), - detail::workaround_cast(at), - detail::workaround_cast(au), - detail::workaround_cast(av), - detail::workaround_cast(aw), - detail::workaround_cast(ax), - detail::workaround_cast(ay), - detail::workaround_cast(az), - detail::workaround_cast(aA), - detail::workaround_cast(aB), - detail::workaround_cast(aC), - detail::workaround_cast(aD), - detail::workaround_cast(aE), - detail::workaround_cast(aF), - detail::workaround_cast(aG), - detail::workaround_cast(aH), - detail::workaround_cast(aJ), - detail::workaround_cast(aK), - detail::workaround_cast(aL), - detail::workaround_cast(aM), - detail::workaround_cast(aN), - detail::workaround_cast(aP), - detail::workaround_cast(aQ), - detail::workaround_cast(aR), - detail::workaround_cast(aS), - detail::workaround_cast(aU), - detail::workaround_cast(aV), - detail::workaround_cast(aW), - detail::workaround_cast(aX), - detail::workaround_cast(aY), - detail::workaround_cast(aZ), - detail::workaround_cast(ba)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<96>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, U, V, W, X, Y, Z, aa, ab, ac, ad, ae, af, ag, ah, aj, ak, al, am, an, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA, aB, aC, aD, aE, aF, aG, aH, aJ, aK, aL, aM, aN, aP, aQ, aR, aS, aU, aV, aW, aX, aY, aZ, ba, bb] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N), - detail::workaround_cast(P), - detail::workaround_cast(Q), - detail::workaround_cast(R), - detail::workaround_cast(S), - detail::workaround_cast(U), - detail::workaround_cast(V), - detail::workaround_cast(W), - detail::workaround_cast(X), - detail::workaround_cast(Y), - detail::workaround_cast(Z), - detail::workaround_cast(aa), - detail::workaround_cast(ab), - detail::workaround_cast(ac), - detail::workaround_cast(ad), - detail::workaround_cast(ae), - detail::workaround_cast(af), - detail::workaround_cast(ag), - detail::workaround_cast(ah), - detail::workaround_cast(aj), - detail::workaround_cast(ak), - detail::workaround_cast(al), - detail::workaround_cast(am), - detail::workaround_cast(an), - detail::workaround_cast(ap), - detail::workaround_cast(aq), - detail::workaround_cast(ar), - detail::workaround_cast(as), - detail::workaround_cast(at), - detail::workaround_cast(au), - detail::workaround_cast(av), - detail::workaround_cast(aw), - detail::workaround_cast(ax), - detail::workaround_cast(ay), - detail::workaround_cast(az), - detail::workaround_cast(aA), - detail::workaround_cast(aB), - detail::workaround_cast(aC), - detail::workaround_cast(aD), - detail::workaround_cast(aE), - detail::workaround_cast(aF), - detail::workaround_cast(aG), - detail::workaround_cast(aH), - detail::workaround_cast(aJ), - detail::workaround_cast(aK), - detail::workaround_cast(aL), - detail::workaround_cast(aM), - detail::workaround_cast(aN), - detail::workaround_cast(aP), - detail::workaround_cast(aQ), - detail::workaround_cast(aR), - detail::workaround_cast(aS), - detail::workaround_cast(aU), - detail::workaround_cast(aV), - detail::workaround_cast(aW), - detail::workaround_cast(aX), - detail::workaround_cast(aY), - detail::workaround_cast(aZ), - detail::workaround_cast(ba), - detail::workaround_cast(bb)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<97>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, U, V, W, X, Y, Z, aa, ab, ac, ad, ae, af, ag, ah, aj, ak, al, am, an, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA, aB, aC, aD, aE, aF, aG, aH, aJ, aK, aL, aM, aN, aP, aQ, aR, aS, aU, aV, aW, aX, aY, aZ, ba, bb, bc] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N), - detail::workaround_cast(P), - detail::workaround_cast(Q), - detail::workaround_cast(R), - detail::workaround_cast(S), - detail::workaround_cast(U), - detail::workaround_cast(V), - detail::workaround_cast(W), - detail::workaround_cast(X), - detail::workaround_cast(Y), - detail::workaround_cast(Z), - detail::workaround_cast(aa), - detail::workaround_cast(ab), - detail::workaround_cast(ac), - detail::workaround_cast(ad), - detail::workaround_cast(ae), - detail::workaround_cast(af), - detail::workaround_cast(ag), - detail::workaround_cast(ah), - detail::workaround_cast(aj), - detail::workaround_cast(ak), - detail::workaround_cast(al), - detail::workaround_cast(am), - detail::workaround_cast(an), - detail::workaround_cast(ap), - detail::workaround_cast(aq), - detail::workaround_cast(ar), - detail::workaround_cast(as), - detail::workaround_cast(at), - detail::workaround_cast(au), - detail::workaround_cast(av), - detail::workaround_cast(aw), - detail::workaround_cast(ax), - detail::workaround_cast(ay), - detail::workaround_cast(az), - detail::workaround_cast(aA), - detail::workaround_cast(aB), - detail::workaround_cast(aC), - detail::workaround_cast(aD), - detail::workaround_cast(aE), - detail::workaround_cast(aF), - detail::workaround_cast(aG), - detail::workaround_cast(aH), - detail::workaround_cast(aJ), - detail::workaround_cast(aK), - detail::workaround_cast(aL), - detail::workaround_cast(aM), - detail::workaround_cast(aN), - detail::workaround_cast(aP), - detail::workaround_cast(aQ), - detail::workaround_cast(aR), - detail::workaround_cast(aS), - detail::workaround_cast(aU), - detail::workaround_cast(aV), - detail::workaround_cast(aW), - detail::workaround_cast(aX), - detail::workaround_cast(aY), - detail::workaround_cast(aZ), - detail::workaround_cast(ba), - detail::workaround_cast(bb), - detail::workaround_cast(bc)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<98>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, U, V, W, X, Y, Z, aa, ab, ac, ad, ae, af, ag, ah, aj, ak, al, am, an, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA, aB, aC, aD, aE, aF, aG, aH, aJ, aK, aL, aM, aN, aP, aQ, aR, aS, aU, aV, aW, aX, aY, aZ, ba, bb, bc, bd] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N), - detail::workaround_cast(P), - detail::workaround_cast(Q), - detail::workaround_cast(R), - detail::workaround_cast(S), - detail::workaround_cast(U), - detail::workaround_cast(V), - detail::workaround_cast(W), - detail::workaround_cast(X), - detail::workaround_cast(Y), - detail::workaround_cast(Z), - detail::workaround_cast(aa), - detail::workaround_cast(ab), - detail::workaround_cast(ac), - detail::workaround_cast(ad), - detail::workaround_cast(ae), - detail::workaround_cast(af), - detail::workaround_cast(ag), - detail::workaround_cast(ah), - detail::workaround_cast(aj), - detail::workaround_cast(ak), - detail::workaround_cast(al), - detail::workaround_cast(am), - detail::workaround_cast(an), - detail::workaround_cast(ap), - detail::workaround_cast(aq), - detail::workaround_cast(ar), - detail::workaround_cast(as), - detail::workaround_cast(at), - detail::workaround_cast(au), - detail::workaround_cast(av), - detail::workaround_cast(aw), - detail::workaround_cast(ax), - detail::workaround_cast(ay), - detail::workaround_cast(az), - detail::workaround_cast(aA), - detail::workaround_cast(aB), - detail::workaround_cast(aC), - detail::workaround_cast(aD), - detail::workaround_cast(aE), - detail::workaround_cast(aF), - detail::workaround_cast(aG), - detail::workaround_cast(aH), - detail::workaround_cast(aJ), - detail::workaround_cast(aK), - detail::workaround_cast(aL), - detail::workaround_cast(aM), - detail::workaround_cast(aN), - detail::workaround_cast(aP), - detail::workaround_cast(aQ), - detail::workaround_cast(aR), - detail::workaround_cast(aS), - detail::workaround_cast(aU), - detail::workaround_cast(aV), - detail::workaround_cast(aW), - detail::workaround_cast(aX), - detail::workaround_cast(aY), - detail::workaround_cast(aZ), - detail::workaround_cast(ba), - detail::workaround_cast(bb), - detail::workaround_cast(bc), - detail::workaround_cast(bd)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<99>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, U, V, W, X, Y, Z, aa, ab, ac, ad, ae, af, ag, ah, aj, ak, al, am, an, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA, aB, aC, aD, aE, aF, aG, aH, aJ, aK, aL, aM, aN, aP, aQ, aR, aS, aU, aV, aW, aX, aY, aZ, ba, bb, bc, bd, be] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N), - detail::workaround_cast(P), - detail::workaround_cast(Q), - detail::workaround_cast(R), - detail::workaround_cast(S), - detail::workaround_cast(U), - detail::workaround_cast(V), - detail::workaround_cast(W), - detail::workaround_cast(X), - detail::workaround_cast(Y), - detail::workaround_cast(Z), - detail::workaround_cast(aa), - detail::workaround_cast(ab), - detail::workaround_cast(ac), - detail::workaround_cast(ad), - detail::workaround_cast(ae), - detail::workaround_cast(af), - detail::workaround_cast(ag), - detail::workaround_cast(ah), - detail::workaround_cast(aj), - detail::workaround_cast(ak), - detail::workaround_cast(al), - detail::workaround_cast(am), - detail::workaround_cast(an), - detail::workaround_cast(ap), - detail::workaround_cast(aq), - detail::workaround_cast(ar), - detail::workaround_cast(as), - detail::workaround_cast(at), - detail::workaround_cast(au), - detail::workaround_cast(av), - detail::workaround_cast(aw), - detail::workaround_cast(ax), - detail::workaround_cast(ay), - detail::workaround_cast(az), - detail::workaround_cast(aA), - detail::workaround_cast(aB), - detail::workaround_cast(aC), - detail::workaround_cast(aD), - detail::workaround_cast(aE), - detail::workaround_cast(aF), - detail::workaround_cast(aG), - detail::workaround_cast(aH), - detail::workaround_cast(aJ), - detail::workaround_cast(aK), - detail::workaround_cast(aL), - detail::workaround_cast(aM), - detail::workaround_cast(aN), - detail::workaround_cast(aP), - detail::workaround_cast(aQ), - detail::workaround_cast(aR), - detail::workaround_cast(aS), - detail::workaround_cast(aU), - detail::workaround_cast(aV), - detail::workaround_cast(aW), - detail::workaround_cast(aX), - detail::workaround_cast(aY), - detail::workaround_cast(aZ), - detail::workaround_cast(ba), - detail::workaround_cast(bb), - detail::workaround_cast(bc), - detail::workaround_cast(bd), - detail::workaround_cast(be)); - } - - template constexpr auto tie_as_tuple(T& val, size_t_<100>) noexcept - { - auto& [a, b, c, d, e, f, g, h, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, U, V, W, X, Y, Z, aa, ab, ac, ad, ae, af, ag, ah, aj, ak, al, am, an, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA, aB, aC, aD, aE, aF, aG, aH, aJ, aK, aL, aM, aN, aP, aQ, aR, aS, aU, aV, aW, aX, aY, aZ, ba, bb, bc, bd, be, bf] = - const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. - - return ::pfr::detail::make_tuple_of_references( - detail::workaround_cast(a), - detail::workaround_cast(b), - detail::workaround_cast(c), - detail::workaround_cast(d), - detail::workaround_cast(e), - detail::workaround_cast(f), - detail::workaround_cast(g), - detail::workaround_cast(h), - detail::workaround_cast(j), - detail::workaround_cast(k), - detail::workaround_cast(l), - detail::workaround_cast(m), - detail::workaround_cast(n), - detail::workaround_cast(p), - detail::workaround_cast(q), - detail::workaround_cast(r), - detail::workaround_cast(s), - detail::workaround_cast(t), - detail::workaround_cast(u), - detail::workaround_cast(v), - detail::workaround_cast(w), - detail::workaround_cast(x), - detail::workaround_cast(y), - detail::workaround_cast(z), - detail::workaround_cast(A), - detail::workaround_cast(B), - detail::workaround_cast(C), - detail::workaround_cast(D), - detail::workaround_cast(E), - detail::workaround_cast(F), - detail::workaround_cast(G), - detail::workaround_cast(H), - detail::workaround_cast(J), - detail::workaround_cast(K), - detail::workaround_cast(L), - detail::workaround_cast(M), - detail::workaround_cast(N), - detail::workaround_cast(P), - detail::workaround_cast(Q), - detail::workaround_cast(R), - detail::workaround_cast(S), - detail::workaround_cast(U), - detail::workaround_cast(V), - detail::workaround_cast(W), - detail::workaround_cast(X), - detail::workaround_cast(Y), - detail::workaround_cast(Z), - detail::workaround_cast(aa), - detail::workaround_cast(ab), - detail::workaround_cast(ac), - detail::workaround_cast(ad), - detail::workaround_cast(ae), - detail::workaround_cast(af), - detail::workaround_cast(ag), - detail::workaround_cast(ah), - detail::workaround_cast(aj), - detail::workaround_cast(ak), - detail::workaround_cast(al), - detail::workaround_cast(am), - detail::workaround_cast(an), - detail::workaround_cast(ap), - detail::workaround_cast(aq), - detail::workaround_cast(ar), - detail::workaround_cast(as), - detail::workaround_cast(at), - detail::workaround_cast(au), - detail::workaround_cast(av), - detail::workaround_cast(aw), - detail::workaround_cast(ax), - detail::workaround_cast(ay), - detail::workaround_cast(az), - detail::workaround_cast(aA), - detail::workaround_cast(aB), - detail::workaround_cast(aC), - detail::workaround_cast(aD), - detail::workaround_cast(aE), - detail::workaround_cast(aF), - detail::workaround_cast(aG), - detail::workaround_cast(aH), - detail::workaround_cast(aJ), - detail::workaround_cast(aK), - detail::workaround_cast(aL), - detail::workaround_cast(aM), - detail::workaround_cast(aN), - detail::workaround_cast(aP), - detail::workaround_cast(aQ), - detail::workaround_cast(aR), - detail::workaround_cast(aS), - detail::workaround_cast(aU), - detail::workaround_cast(aV), - detail::workaround_cast(aW), - detail::workaround_cast(aX), - detail::workaround_cast(aY), - detail::workaround_cast(aZ), - detail::workaround_cast(ba), - detail::workaround_cast(bb), - detail::workaround_cast(bc), - detail::workaround_cast(bd), - detail::workaround_cast(be), - detail::workaround_cast(bf)); - } - - template constexpr void tie_as_tuple(T& /*val*/, size_t_) noexcept - { - static_assert( - sizeof(T) && false, - "====================> Boost.PFR: Too many fields in a structure T. Regenerate include/pfr/detail/core17_generated.hpp file for appropriate " - "count of fields. For example: `python ./misc/generate_cpp17.py 300 > include/pfr/detail/core17_generated.hpp`"); - } - - } // namespace detail -} // namespace pfr - -#endif // PFR_DETAIL_CORE17_GENERATED_HPP diff --git a/lib/pfr/include/pfr/detail/detectors.hpp b/lib/pfr/include/pfr/detail/detectors.hpp deleted file mode 100644 index d7edad8..0000000 --- a/lib/pfr/include/pfr/detail/detectors.hpp +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) 2016-2023 Antony Polukhin -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef PFR_DETAIL_DETECTORS_HPP -#define PFR_DETAIL_DETECTORS_HPP -#pragma once - -#include - -#include -#include - -namespace pfr -{ - namespace detail - { - ///////////////////// `value` is true if Detector does not compile (SFINAE) - struct can_not_apply - { - }; - - template