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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|needs-reduction             |
                 CC|                            |marxin at gcc dot gnu.org

--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Reduced to:

cat pr104788.ii
template <int __v>
struct integral_constant {
  static constexpr int value = __v;
};
using true_type = integral_constant<true>;
using false_type = integral_constant<false>;
template <typename _Tp>
struct __success_type {
  typedef _Tp type;
};
template <typename>
using __void_t = void;
template <typename _Tp, typename _Up = _Tp &&>
_Up __declval(int);
template <typename _Tp>
auto declval() -> decltype(__declval<_Tp>(0));
template <typename _Tp>
struct remove_cv {
  using type = _Tp;
};
template <bool, bool, typename...>
struct __result_of_impl;
struct __result_of_other_impl {
  template <typename _Fn, typename... _Args>
  static __success_type<decltype(_Fn()(_Args()...))> _S_test(int);
};
template <typename _Functor, typename... _ArgTypes>
struct __result_of_impl<false, false, _Functor, _ArgTypes...>
    : __result_of_other_impl {
  typedef decltype(_S_test<_Functor, _ArgTypes...>(0)) type;
};
template <typename _Functor, typename... _ArgTypes>
struct __invoke_result : __result_of_impl<false_type::value, false_type::value,
                                          _Functor, _ArgTypes...>::type {};
template <typename _Default>
struct __detector {
  using type = _Default;
};
template <typename _Default, template <typename> class>
using __detected_or = __detector<_Default>;
template <typename _Default, template <typename> class _Op>
using __detected_or_t = __detected_or<_Default, _Op>::type;
template <typename, typename, typename = void>
struct __is_invocable_impl;
template <typename _Result, typename _Ret>
struct __is_invocable_impl<_Result, _Ret, __void_t<typename _Result::type>>
    : true_type {};
template <typename _Fn, typename... _Args>
using invoke_result_t = __invoke_result<_Fn, _Args...>::type;
template <typename _Fn, typename... _ArgTypes>
struct is_invocable
    : __is_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, void> {};
template <typename _Tp, typename _Up>
constexpr bool is_same_v = __is_same(_Tp, _Up);
template <typename _Fn, typename... _Args>
constexpr bool is_invocable_v = is_invocable<_Fn, _Args...>::value;
template <typename _Tp>
using remove_cvref_t = remove_cv<_Tp>::type;
template <typename, typename _Yp>
using __cond_res = decltype(declval<_Yp()>()());
template <typename...>
struct common_reference;
template <typename... _Tp>
using common_reference_t = common_reference<_Tp...>::type;
template <typename _Tp1, typename _Tp2>
struct common_reference<_Tp1, _Tp2> {
  using type = __cond_res<int, _Tp2>;
};
namespace __detail {
template <typename _Tp, typename _Up>
concept __same_as = is_same_v<_Tp, _Up>;
}
template <typename _Tp, typename _Up>
concept same_as = __detail::__same_as<_Up, _Tp>;
template <typename _Tp, typename _Up>
concept common_reference_with =
    same_as<common_reference_t<_Tp, _Up>, common_reference_t<_Tp, _Up>>;
namespace __detail {
  template <typename _Tp>
  using __cref = _Tp;
  template <typename _Tp, typename _Up>
  concept __weakly_eq_cmp_with = requires(_Tp __t, _Up __u) {
    __u != __t;
  };
}  // namespace __detail
template <typename _Tp>
concept equality_comparable = __detail::__weakly_eq_cmp_with<_Tp, _Tp>;
template <typename _Tp, typename _Up>
concept equality_comparable_with =
    common_reference_with<__detail::__cref<_Tp>, __detail::__cref<_Up>> &&
    equality_comparable<
        common_reference_t<__detail::__cref<_Tp>, __detail::__cref<_Up>>>;
template <typename _Tp, typename _Up>
concept totally_ordered_with = equality_comparable_with<
    _Tp, common_reference_t<__detail::__cref<_Tp>, __detail::__cref<_Up>>>;
template <typename _Fn, typename... _Args>
concept invocable = is_invocable_v<_Fn, _Args...>;
template <typename _Fn, typename... _Args>
concept regular_invocable = invocable<_Fn, _Args...>;
template <typename _Fn, typename... _Args>
concept predicate = regular_invocable<_Fn, _Args...>;
template <typename _Rel, typename _Tp, typename _Up>
concept relation = predicate<_Rel, _Up, _Tp>;
template <typename _Rel, typename _Tp, typename _Up>
concept strict_weak_order = relation<_Rel, _Tp, _Up>;
template <typename>
struct iterator_traits;
struct identity {
  template <typename _Tp>
  _Tp operator()(_Tp);
};
struct less {
  template <typename _Tp, typename _Up>
  requires totally_ordered_with<_Tp, _Up>
  bool operator()(_Tp, _Up);
};
namespace __detail {
template <typename _Tp>
concept __dereferenceable = requires(_Tp __t) {
  __t;
};
}  // namespace __detail
template <__detail::__dereferenceable _Tp>
using iter_reference_t = decltype(*_Tp());
namespace __detail {
template <typename _Tp>
using __iter_value_t = _Tp ::value_type;
}
template <typename _Tp>
using iter_value_t = __detail::__iter_value_t<_Tp>;
namespace __detail {
template <typename _In>
concept __indirectly_readable_impl = common_reference_with<_In, _In>;
}
template <typename _In>
concept indirectly_readable = __detail::__indirectly_readable_impl<_In>;
template <indirectly_readable _Tp>
using iter_common_reference_t = common_reference_t<_Tp, iter_value_t<_Tp>>;
template <typename _Iter>
concept random_access_iterator = requires(_Iter __n) {
  __n;
};
template <typename _Fn, typename _Iter>
concept indirectly_regular_unary_invocable =
    common_reference_with<invoke_result_t<_Fn, _Iter>,
                          invoke_result_t<_Fn, _Iter>>;
template <typename _Fn, typename _I1, typename _I2 = _I1>
concept indirect_strict_weak_order =
    strict_weak_order<_Fn, iter_common_reference_t<_I1>, _I2>;
template <typename _Fn, typename... _Is>
using indirect_result_t = invoke_result_t<_Fn, iter_reference_t<_Is>...>;
template <indirectly_readable _Iter,
          indirectly_regular_unary_invocable<_Iter> _Proj>
struct projected {
  using value_type = remove_cvref_t<indirect_result_t<_Proj, _Iter>>;
};
template <typename _Iter, typename _Rel, typename _Proj = identity>
concept sortable = indirect_strict_weak_order<_Rel, projected<_Iter, _Proj>>;
namespace ranges::__cust_access {
  template <typename _Tp>
  auto __begin(_Tp __t) {
    return __t.begin();
  }
}  // namespace ranges::__cust_access
namespace __detail {
template <typename _Tp>
using __range_iter_t = decltype(ranges::__cust_access::__begin(_Tp()));
}
template <typename _Tp>
struct iterator_traits<_Tp *> {
  using reference = _Tp;
};
template <typename _Iterator>
struct __normal_iterator {
  iterator_traits<_Iterator>::reference operator*();
};
template <typename _Tp>
struct allocator {
  typedef _Tp value_type;
};
struct __allocator_traits_base {
  template <typename _Tp>
  using __pointer = _Tp;
};
template <typename _Alloc>
struct allocator_traits : __allocator_traits_base {
  typedef _Alloc::value_type value_type;
  using pointer = __detected_or_t<value_type *, __pointer>;
};
template <typename _Alloc>
struct __alloc_traits {
  struct rebind {
    typedef allocator_traits<_Alloc> other;
  };
};
namespace ranges {
template <typename _Tp>
using iterator_t = __detail::__range_iter_t<_Tp>;
template <typename _Tp>
concept random_access_range = random_access_iterator<_Tp>;
struct {
  template <random_access_range _Range, typename _Comp = less>
  requires sortable<iterator_t<_Range>, _Comp> _Range operator()(_Range);
} sort;
}  // namespace ranges
template <typename _Alloc>
struct _Vector_base {
  typedef __alloc_traits<_Alloc>::rebind::other ::pointer pointer;
};
template <typename _Tp, typename _Alloc = allocator<_Tp>>
struct vector {
  __normal_iterator<typename _Vector_base<_Alloc>::pointer> begin();
};
struct OpenFoamReader {
  OpenFoamReader() {
    struct Connection {
      auto operator<=>(const Connection &) const = default;
    };
    vector<Connection> connections;
    ranges::sort(connections);
  }
};

Reply via email to