Skip to content

fix assert ambiguity: use direct bool condition instead of lambda - #194

Closed
igagis-bot wants to merge 1 commit into
cppfw:mainfrom
igagis-bot:fix-assert-ambiguity
Closed

igagis-bot wants to merge 1 commit into
cppfw:mainfrom
igagis-bot:fix-assert-ambiguity

Conversation

@igagis-bot

Copy link
Copy Markdown
Contributor

Apple clang (Xcode 26.6) fails to resolve the overloaded call

utki::assert([this, index]() -> bool { ... }, SL);

in tiling_area.cpp (on_lay_out()), reporting "call to 'assert' is
ambiguous" between the bool and std::function<bool()> overloads.

Pass the condition directly as a bool expression so the call is
unambiguously the bool overload on every compiler. Behavior is
unchanged; the condition is still only enforced in debug builds.

Apple clang (Xcode 26.6) reports the lambda form of utki::assert() with
a by-value local capture as an ambiguous call between the bool and the
std::function<bool()> overloads. Pass the condition directly as a bool
expression to avoid the ambiguity.
@codecov

codecov Bot commented Nov 23, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 28.54%. Comparing base (27ca4f4) to head (6d20729).

Files with missing lines Patch % Lines
src/ruis/widget/group/tiling_area.cpp 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #194   +/-   ##
=======================================
  Coverage   28.53%   28.54%           
=======================================
  Files         239      239           
  Lines        8943     8940    -3     
  Branches     2785     2785           
=======================================
  Hits         2552     2552           
+ Misses       6057     6054    -3     
  Partials      334      334           

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

@igagis-bot

Copy link
Copy Markdown
Contributor Author

Superseded by the root-cause fix in cppfw/utki#33 (SFINAE-constrains the bool-taking assert() overloads in the header). This call-site fix only covers this one file, and turns the lazy condition into an eagerly-evaluated expression (behavior change in release builds).

@igagis-bot igagis-bot closed this Nov 23, 2026
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