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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// { dg-options -std=c++0x }
2
 
3
template
4
struct NonCopyable {
5
  NonCopyable() = default;
6
  NonCopyable(NonCopyable const&);
7
};
8
 
9
template<>
10
NonCopyable::NonCopyable(NonCopyable const&) = delete; // { dg-error "declared" }
11
 
12
template
13
NonCopyable::NonCopyable(NonCopyable const&) = default;
14
 
15
template<>
16
NonCopyable::NonCopyable(NonCopyable const&) = delete; // { dg-error "declared" }
17
 
18
 
19
int main()
20
{
21
  NonCopyable nc_dbl;
22
  NonCopyable nc_dbl_cpy(nc_dbl); // { dg-error "use" }
23
 
24
  NonCopyable nc_int;
25
  NonCopyable nc_int_cpy(nc_int); // { dg-error "use" }
26
 
27
  NonCopyable nc_char;
28
  NonCopyable nc_char_cpy(nc_char);
29
}

powered by: WebSVN 2.1.0

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