OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [noexcept10.C] - Blame information for rev 709

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// PR c++/49082
2
// { dg-options -std=c++0x }
3
 
4
namespace std { template  T&& declval() noexcept; }
5
 
6
struct Base
7
{
8
  Base(const Base&) noexcept(false);
9
  Base(Base&&) noexcept(false);
10
 ~Base() noexcept(false);
11
};
12
 
13
struct Derived
14
: Base
15
{
16
  // Derived(const Derived&) = default;
17
  // Derived(Derived&&) = default;
18
};
19
 
20
static_assert(!noexcept(Base(std::declval())), "Error");
21
static_assert(!noexcept(Derived(std::declval())), "Error"); // Error
22
 
23
static_assert(!noexcept(Base(std::declval())), "Error");
24
static_assert(!noexcept(Derived(std::declval())), "Error"); // Error
25
 
26
static_assert(!noexcept(std::declval().~Base()), "Error"); // OK
27
static_assert(!noexcept(std::declval().~Derived()), "Error"); // Error

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.