Skip to content

Conversation

@joka921
Copy link
Member

@joka921 joka921 commented Oct 28, 2025

This commit includes C++17 compatibility fixes for the parser module:

  • Remove noexcept from copy constructors (not allowed in C++17)
  • Add static_assert checks for copyable types
  • Replace emplace_back with push_back where needed for C++17 compatibility
  • Use std::mem_fn for member function pointers in std::visit
  • Add necessary backport headers (concepts.h, three_way_comparison.h)
  • Update CMakeLists.txt to add onlySpatialQuery library
  • Fix structured binding usage with std::get vs get

🤖 Generated with Claude Code

This commit includes C++17 compatibility fixes for the parser module:
- Remove noexcept from copy constructors (not allowed in C++17)
- Add static_assert checks for copyable types
- Replace emplace_back with push_back where needed for C++17 compatibility
- Use std::mem_fn for member function pointers in std::visit
- Add necessary backport headers (concepts.h, three_way_comparison.h)
- Update CMakeLists.txt to add onlySpatialQuery library
- Fix structured binding usage with std::get vs get

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@joka921 joka921 marked this pull request as ready for review October 28, 2025 09:38
Copy link
Member Author

@joka921 joka921 left a comment

Choose a reason for hiding this comment

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

Some comments.

Comment on lines 215 to 230
static_assert(ql::concepts::copyable<Optional>);
static_assert(ql::concepts::copyable<Union>);
static_assert(ql::concepts::copyable<Subquery>);
static_assert(ql::concepts::copyable<TransPath>);
static_assert(ql::concepts::copyable<Bind>);
static_assert(ql::concepts::copyable<BasicGraphPattern>);
static_assert(ql::concepts::copyable<Values>);
static_assert(ql::concepts::copyable<Service>);
static_assert(ql::concepts::copyable<PathQuery>);
static_assert(ql::concepts::copyable<SpatialQuery>);
static_assert(ql::concepts::copyable<TextSearchQuery>);
static_assert(ql::concepts::copyable<Minus>);
static_assert(ql::concepts::copyable<GroupGraphPattern>);
static_assert(ql::concepts::copyable<Describe>);
static_assert(ql::concepts::copyable<Load>);
static_assert(ql::concepts::copyable<NamedCachedResult>);
Copy link
Member Author

Choose a reason for hiding this comment

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

Those can also go (can easily be reinstated for further stuff).

MagicServiceQuery() = default;
MagicServiceQuery(MagicServiceQuery&& other) noexcept = default;
MagicServiceQuery(const MagicServiceQuery& other) noexcept = default;
MagicServiceQuery(const MagicServiceQuery& other) = default;
Copy link
Member Author

Choose a reason for hiding this comment

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

this might in fact throw (it is the copy, not the move operation after all), so the older compiler was right to complain about this.

Signed-off-by: Johannes Kalmbach <[email protected]>
Copy link
Member

@ullingerc ullingerc left a comment

Choose a reason for hiding this comment

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

Looks good

TripleVec additionalTriples) {
for (auto&& [predicate, object] : std::move(predicateObjectPairs)) {
triples.emplace_back(subject, std::move(predicate), std::move(object));
triples.push_back({subject, std::move(predicate), std::move(object)});
Copy link
Member

Choose a reason for hiding this comment

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

Is emplace back really unsupported in c++17? this surprised me

Copy link
Member Author

Choose a reason for hiding this comment

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

It is not emplace_back per se, but in combination with aggregates (structs without an explicit constructor):
std::array<int, 3>(4, 5, 6) (with round parentheses) works only in C++20, and the emplace_back is a consequence of this.

@codecov
Copy link

codecov bot commented Oct 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.07%. Comparing base (3f7a4cc) to head (d178e3e).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2470      +/-   ##
==========================================
- Coverage   91.07%   91.07%   -0.01%     
==========================================
  Files         466      466              
  Lines       39706    39709       +3     
  Branches     5309     5312       +3     
==========================================
  Hits        36164    36164              
  Misses       2034     2034              
- Partials     1508     1511       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sparql-conformance
Copy link

Overview

Number of Tests Passed ✅ Failed ❌ Intended ⚠️ Not tested
525 439 19 67 0

Conformance check passed ✅

No test result changes.

Details: https://qlever.dev/sparql-conformance-ui?cur=d178e3ee1e6d9a7bff01cbda6bc033c558a94d96&prev=3f7a4ccad4f322dbce5c85f517844651b4b189a0

@sonarqubecloud
Copy link

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