Skip to content

added cpp23#1482

Open
fnc12 wants to merge 13 commits intodevfrom
ci-update
Open

added cpp23#1482
fnc12 wants to merge 13 commits intodevfrom
ci-update

Conversation

@fnc12
Copy link
Copy Markdown
Owner

@fnc12 fnc12 commented Apr 27, 2026

No description provided.

@fnc12 fnc12 requested a review from trueqbit April 27, 2026 10:52
fnc12 added 7 commits April 27, 2026 17:03
- Added 'build-local/' to .gitignore to exclude local build artifacts.
- Updated tests in 'iterate.cpp' to conditionally compile with C++20 concepts and aliases.
- Introduced a new 'clamp_int_ref' function in 'function_static_tests.cpp' for better compatibility with different compilers and improved test coverage.
- Simplified the type declaration for `quoted_type` in `function_static_tests.cpp` to improve code clarity and maintainability.
- Updated the `iterate.cpp` test to conditionally compile with C++20 ranges.
- Modified references to `clamp_int_ref` in `function_static_tests.cpp` to use address-of operator for better compatibility across compilers.
- Updated `iterate.cpp` to conditionally compile sections based on Clang version for better compatibility with C++20 features.
- Refactored references to `clamp_int_ref` in `function_static_tests.cpp` to use a pointer for improved cross-compiler compatibility and clarity.
- Modified preprocessor directives in `statement_serializer.h` and `sqlite_orm.h` to ensure compatibility with C++20 ranges based on Clang version.
- Updated `function_static_tests.cpp` to skip tests for GCC versions below 12, improving compatibility and clarity in function pointer usage.
Gate alias/ranges static iterator checks for older clang and skip NTTP-based quoted scalar cases on gcc-11 where function template arguments are unsupported.

Made-with: Cursor
Skip storage_iterate_mapped_ref static assertions on older clang where table-reference iterate overloads are unavailable.

Made-with: Cursor
Comment thread dev/statement_serializer.h Outdated
{ storage.template delete_aggregate_function<f>() };
};

constexpr const int& clamp_int_ref(const int& v, const int& lo, const int& hi) {
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fallback to old days compiler

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to unused in the meantime...

Do you have a reproducible example that we can try on godbolt? Because a simpler fallback could be taking the address of the instantiated template function: &std::clamp<int> instead of skipping the tests
Or if a global function is required just create a function pointer variable explicitly: constexpr auto clamp_int = &std::clamp<int>.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:( Would be nice to know the exact gcc-related problem. However skipping the tests is fine and works for now.

Copy link
Copy Markdown
Collaborator

@trueqbit trueqbit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As per comments.

fnc12 added 2 commits April 28, 2026 19:33
Introduce SQLITE_ORM_CPP20_VIEWS_SUPPORTED with compiler quirks for clang<=15, switch dynamic_set serialization to views capability checks, and replace ad-hoc compiler guards/skip paths in tests with capability-based and pointer-based clamp handling.

Made-with: Cursor
Keep pointer-based clamp handling but skip the two NTTP-sensitive static sections on gcc<12 where std::clamp remains unsupported as a template argument.

Made-with: Cursor
@fnc12 fnc12 requested a review from trueqbit April 28, 2026 15:40
Copy link
Copy Markdown
Collaborator

@trueqbit trueqbit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you still need to:

  • Update sqlite_orm.h?
  • Restore #if defined(__GNUC__) && !defined(__clang__) && (__GNUC__ < 12) in tests/user_defined_functions.cpp.

Comment thread tests/user_defined_functions.cpp
Comment thread tests/user_defined_functions.cpp
Comment thread tests/user_defined_functions.cpp
Comment thread tests/user_defined_functions.cpp
fnc12 added 3 commits April 28, 2026 23:48
- Skip NTTP-sensitive sections for `std::clamp` in tests when using GCC versions below 12, ensuring compatibility with older compilers.
- Adjusted function references to use direct function names instead of pointers for better clarity and maintainability in quoted scalar tests.
- Updated `config.h` and `cxx_compiler_quirks.h` to conditionally define `SQLITE_ORM_CPP20_VIEWS_SUPPORTED` based on the presence of `SQLITE_ORM_BROKEN_CPP20_VIEWS` for better compatibility with Clang versions.
- Ensured that the definition of `SQLITE_ORM_CPP20_VIEWS_SUPPORTED` is only active when the necessary conditions are met, improving overall code robustness.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants