[libcxx-commits] [PATCH] D60393: Force is_invocable template parameters to be complete types
Zoe Carver via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Apr 7 20:13:41 PDT 2019
zoecarver marked 3 inline comments as done.
zoecarver added inline comments.
================
Comment at: include/__tree:973
#ifndef _LIBCPP_CXX03_LANG
- _LIBCPP_DIAGNOSE_WARNING(!std::__invokable<_Compare const&, _Tp const&, _Tp const&>::value,
+ _LIBCPP_DIAGNOSE_WARNING(!std::__flexible_invokable<_Compare const&, _Tp const&, _Tp const&>::value,
"the specified comparator type does not provide a const call operator")
----------------
Adding a check using `__complete_type` might help fix [[ https://bugs.llvm.org/show_bug.cgi?id=41360 | this issue (41360) ]].
================
Comment at: include/type_traits:4451
+ using type = typename conditional<
+ is_function<__pure_type>::value,
+ true_type,
----------------
Is there a better way to include function types?
================
Comment at: include/type_traits:4504
{
+ static_assert(__valid_invokable_type<_Ret, _Fp, _Args...>::value,
+ "_Ret, _Fp and all _Args must be complete types, void, or unbounded arrays");
----------------
I am not sure if it is better to `static_assert` this or to make it affect `value`.
Repository:
rCXX libc++
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60393/new/
https://reviews.llvm.org/D60393
More information about the libcxx-commits
mailing list