[Bug c++/101137] std::conjunction result error

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Jun 21 13:14:55 GMT 2021


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101137

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
I get the same behaviour if I replace all uses of std::conjunction with fold
expressions and split up your unreadable long lines into simpler atoms (which
also makes the code much simpler) e.g.

template<typename T>
concept SignedIntegral1 = std::is_integral_v<T> && std::is_signed_v<T>;

template<typename T>
concept SignedIntegralRef1
  = std::is_lvalue_reference_v<T> && SignedIntegral1<T>;


template<typename... T>
concept SignedIntegral
  = ((SignedIntegral1<T> || SignedIntegralRef1<T>) && ...);



I think the problem is a simple typo in your is_signed_integral_convert_copy
trait, you use boost::mp11::mp_first<T2<Args1...>>
                                            ^

Presumably that's supposed to be boost::mp11::mp_first<T2<Args2...>>.
                                                              ^


More information about the Gcc-bugs mailing list