view gcc/testsuite/g++.dg/ext/has_nothrow_copy_odr.C @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 04ced10e8804
children
line wrap: on
line source

// PR c++/36870
// { dg-do run }
#include <cassert>

struct S { S (const S&); };

bool f ();

int main ()
{
  assert (__has_nothrow_copy (S) == f ());
}

S::S (const S&) { }

bool f () { return __has_nothrow_copy (S); }