(root)/
gcc-13.2.0/
libstdc++-v3/
testsuite/
26_numerics/
reduce/
95833.cc
// { dg-do compile { target c++17 } }
// PR libstdc++/95833 - Incorrect static_assert in std::reduce overload

#include <numeric>

struct A { };
struct B { };

struct binop
{
  template<typename T, typename U>
    A operator()(T&&, U&&) const { return A{}; }
};

B b;
A a = std::reduce(&b, &b + 1, A{}, binop{});