[PATCH] D102631: Allow incomplete template types in unique_function arguments
Yevgeny Rouban via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 18 19:21:34 PDT 2021
yrouban accepted this revision.
yrouban added a comment.
This revision is now accepted and ready to land.
lgtm
================
Comment at: llvm/include/llvm/ADT/FunctionExtras.h:92
// because we want to still be able to observe either moves *or* copies.
- template <typename T>
- using AdjustedParamT = typename std::conditional<
- !std::is_reference<T>::value &&
- llvm::is_trivially_copy_constructible<T>::value &&
- llvm::is_trivially_move_constructible<T>::value &&
- IsSizeLessThanThresholdT<T>::value,
- T, T &>::type;
+ template <typename T> struct AdjustedParamT {
+ using type = typename std::conditional<
----------------
If it was defined as a new template //AdjustedParamTBase// then the //AdjustedParamT// could be
template<typename T> using AdjustedParamT = typename AdjustedParamTBase<T>::type;
So we would not need further changes adding '::type' to //AdjustedParamT//.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102631/new/
https://reviews.llvm.org/D102631
More information about the llvm-commits
mailing list