Skip to content

Commit 4cfff92

Browse files
committed
fix(guard): bypass std::invoke in tuple callable guards
Problem - MSVC still failed on named tuple-bound guard macros after replacing std::apply. - The remaining failure came from std::invoke during tuple-expanded callable guard invocation. Implementation - Changed the guard tuple expansion helper to call the predicate directly. - Kept the tuple expansion path and guard semantics unchanged. Tests - Rebuilt with clang++ targeting x86_64-pc-windows-msvc. - Ran the Guard.* test suite and related guard coverage successfully. Notes - Follow-up compatibility fix for MSVC. - No API or behavior changes intended.
1 parent ef72326 commit 4cfff92

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

include/ptn/pattern/modifiers/guard.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,8 +328,8 @@ namespace ptn::pat::mod {
328328
Pred &&pred,
329329
Tuple &&tuple,
330330
std::index_sequence<I...>) {
331-
return std::invoke(std::forward<Pred>(pred),
332-
std::get<I>(std::forward<Tuple>(tuple))...);
331+
return std::forward<Pred>(pred)(
332+
std::get<I>(std::forward<Tuple>(tuple))...);
333333
}
334334

335335
template <typename Pred, typename Tuple>

0 commit comments

Comments
 (0)