Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.dg/overload/builtin4.C @ 158:494b0b89df80 default tip
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 25 May 2020 18:13:55 +0900 |
parents | 2b5abeee2509 |
children |
line wrap: on
line source
// DR 1512 // PR c++/87699 // { dg-do compile { target c++11 } } using nullptr_t = decltype(nullptr); template<typename T> struct S { operator T(); }; void fn () { S<nullptr_t> s; // Make sure we create a builtin operator overload candidate for == and !=. if (s == s) { } if (s != s) { } // But not for these. if (s > s) { } // { dg-error "no match for" } if (s < s) { } // { dg-error "no match for" } if (s <= s) { } // { dg-error "no match for" } if (s >= s) { } // { dg-error "no match for" } S<int *> r; if (s == r) { } // { dg-error "no match for" } if (s != r) { } // { dg-error "no match for" } if (s > r) { } // { dg-error "no match for" } if (s < r) { } // { dg-error "no match for" } if (s >= r) { } // { dg-error "no match for" } if (s <= r) { } // { dg-error "no match for" } }