[Bug c++/104008] [11/12 Regression] New g++ folly compile error since r11-7931-ga2531859bf5bf6cf
marxin at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Feb 22 10:03:40 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104008
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |NEW
Summary|[11/12 Regression] New g++ |[11/12 Regression] New g++
|folly compile error with |folly compile error since
|gcc 11.x. Bisected to |r11-7931-ga2531859bf5bf6cf
|PR99445 c++: Alias template |
|in pack expansion |
Keywords|needs-reduction |
--- Comment #7 from Martin Liška <marxin at gcc dot gnu.org> ---
Confirmed, started with r11-7931-ga2531859bf5bf6cf.
Test-case:
template <typename...> struct conjunction;
template <typename...> struct disjunction;
template <typename, typename> struct is_same;
template <bool> struct enable_if;
template <bool _Cond> using enable_if_t = typename enable_if<_Cond>::type;
struct B;
struct __uniq_ptr_impl {
struct _Ptr {
using type = B *;
};
using pointer = _Ptr::type;
};
struct unique_ptr {
using pointer = __uniq_ptr_impl::pointer;
unique_ptr(pointer);
};
template <typename, typename... _Args> unique_ptr make_unique(_Args... __args)
{
return new B(__args...);
}
template <typename T, typename... Ts>
using IsOneOf = disjunction<is_same<T, Ts>...>;
template <typename...> class any_badge;
struct badge {
badge(any_badge<>);
badge();
};
template <typename...> struct any_badge {
template <typename... OtherHolders,
enable_if_t<conjunction<IsOneOf<OtherHolders>...>::value>>
any_badge();
};
struct B {
B(badge);
unique_ptr b_ = make_unique<B>(badge{});
};
More information about the Gcc-bugs
mailing list