Skip to content
Snippets Groups Projects
Commit 51939268 authored by Kenneth Moreland's avatar Kenneth Moreland Committed by Kitware Robot
Browse files

Merge topic 'missing-template-arg-list' into release-2.0


8bd6ebac Fix clang compile issue with a missing tempolate arg list

Acked-by: default avatarKitware Robot <kwrobot@kitware.com>
Acked-by: Vicente Bolea's avatarVicente Bolea <vicente.bolea@kitware.com>
Merge-request: !3275
parents 1652b9f8 8bd6ebac
Branches
Tags
No related merge requests found
Pipeline #421534 failed
## Fix clang compile issue with a missing tempolate arg list
Apparently, starting with LLVM clang version 20, if you use the `template`
keyword to highlight a sub-element, you have to provide a template argument
list. This is true even for a method where the template arguments can be
completely determined by the types of the arguments. Fix this problem by
providing an empty template arg list (so the compiler knows what is
templated but still figures out its own types).
Fixes #830
......@@ -548,7 +548,7 @@ struct VariantCases
// just the one that it currently holds.
return f(storage.V7, std::forward<Args>(args)...);
default:
return VariantCases<NumCases - 8>::template CastAndCall(
return VariantCases<NumCases - 8>::template CastAndCall<>(
index - 8, std::forward<Functor>(f), storage.Remaining, std::forward<Args>(args)...);
}
}
......
......@@ -273,7 +273,7 @@ $for(param_index in range(max_expanded))\
return f(storage.V$(param_index), std::forward<Args>(args)...);
$endfor\
default:
return VariantCases<NumCases - $(max_expanded)>::template CastAndCall(
return VariantCases<NumCases - $(max_expanded)>::template CastAndCall<>(
index - $(max_expanded), std::forward<Functor>(f), storage.Remaining, std::forward<Args>(args)...);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment