summaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite/20_util/common_reference/100894.cc
blob: 5e144768002648b8c46d7682658b1d2dc418f0ec (plain)
1
2
3
4
5
6
7
8
9
// { dg-options "-std=gnu++20" }
// { dg-do compile { target c++20 } }
// PR libstdc++/100894 - common_reference implementation seems to be wrong

#include <type_traits>

struct A {};
struct B { B(A); };
static_assert( std::is_same_v<std::common_reference_t<A&, B&&>, B> );