Conversation
- 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
fnc12
commented
Apr 27, 2026
| { storage.template delete_aggregate_function<f>() }; | ||
| }; | ||
|
|
||
| constexpr const int& clamp_int_ref(const int& v, const int& lo, const int& hi) { |
Owner
Author
There was a problem hiding this comment.
fallback to old days compiler
Collaborator
There was a problem hiding this comment.
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>.
Owner
Author
There was a problem hiding this comment.
Collaborator
There was a problem hiding this comment.
:( Would be nice to know the exact gcc-related problem. However skipping the tests is fine and works for now.
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
trueqbit
approved these changes
Apr 28, 2026
Collaborator
trueqbit
left a comment
There was a problem hiding this comment.
I think you still need to:
- Update sqlite_orm.h?
- Restore
#if defined(__GNUC__) && !defined(__clang__) && (__GNUC__ < 12)in tests/user_defined_functions.cpp.
- 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.
…ty and maintainability.
- 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.