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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 693 jeremybenn
// PR c++/50391
2
// { dg-options -std=c++0x }
3
 
4
#include 
5
 
6
template
7
  struct single
8
  {
9
    Tp elem;  // { dg-error "incomplete type" }
10
 
11
    constexpr single(const Tp& e)
12
    : elem(e) { }   // { dg-error "invalid field" }
13
 
14
    single(single&& s) // { dg-error "not a member" }
15
    noexcept(std::is_nothrow_move_constructible::value)
16
    : elem(s.elem) { } // { dg-error "invalid field|no member" }
17
  };
18
 
19
template
20
  constexpr single::type>
21
  make_single(Tp&& x)
22
  {
23
    return single::type>(x);
24
  }
25
 
26
class Blob;  // { dg-error "forward declaration" }
27
 
28
void
29
foo(Blob *b)
30
{
31
  make_single(*b);
32
}
33
 
34
// { dg-prune-output "include" }

powered by: WebSVN 2.1.0

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