view gcc/testsuite/g++.dg/cpp2a/spaceship-rewrite4.C @ 152:2b5abeee2509

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents 1830386684a0
children
line wrap: on
line source

// { dg-do compile { target c++11 } }

struct iterator;
struct const_iterator {
  const_iterator(const iterator&);
  bool operator==(const const_iterator &ci) const = delete;
};
struct iterator {
  bool operator==(const const_iterator &ci) const {
    return ci == *this;		// { dg-error "deleted" "" { target c++17_down } }
  }				// { dg-warning "reversed" "" { target c++2a } .-1 }
};