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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 693 jeremybenn
// PR c++/49107
2
// { dg-options -std=c++0x }
3
 
4
namespace std
5
{
6
  template _Tp&& declval() noexcept;
7
 
8
  struct true_type { static const bool value = true; };
9
  struct false_type { static const bool value = false; };
10
 
11
  template
12
    struct __is_direct_constructible_impl
13
    {
14
      template
15
               = decltype(::new _Tp2(declval<_Arg2>()))>
16
      static true_type __test(int);
17
 
18
      template
19
      static false_type __test(...);
20
 
21
      typedef decltype(__test<_Tp, _Arg>(0)) type;
22
    };
23
 
24
  template
25
    struct __is_direct_constructible_new_safe
26
    : public __is_direct_constructible_impl<_Tp, _Arg>::type
27
    { };
28
 
29
  template
30
    struct pair
31
    {
32
      pair() = default;
33
      constexpr pair(const pair&) = default;
34
 
35
      pair(pair&& __p)
36
      noexcept(__is_direct_constructible_new_safe<_T2,_T2&&>::value);
37
    };
38
}
39
 
40
template 
41
struct Vector3
42
{
43
  typedef typename R_::Ray_3 Ray_3;
44
  Vector3() {}
45
  explicit Vector3(const Ray_3& r);
46
};
47
 
48
template < class R_ > class LineC3
49
{
50
  typedef typename R_::Vector_3 Vector_3;
51
  std::pair x;
52
};
53
 
54
template < class R_ > class RayH3
55
{
56
  typedef typename R_::Vector_3 Vector_3;
57
  std::pair x;
58
};
59
 
60
template 
61
struct Homogeneous_base
62
{
63
  typedef LineC3 Line_3;
64
  typedef RayH3 Ray_3;
65
};
66
 
67
template < typename RT_>
68
struct Simple_homogeneous
69
: public Homogeneous_base< Simple_homogeneous >
70
{
71
  typedef Vector3 > Vector_3;
72
};
73
 
74
int main()
75
{
76
  typedef Simple_homogeneous R;
77
  R::Line_3 l3;
78
}

powered by: WebSVN 2.1.0

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