7
7
#include " cpp2util.h"
8
8
9
9
10
- #line 44 "pure2-bugfix-for-dependent-types-and-deducible-parameters.cpp2"
10
+ #line 46 "pure2-bugfix-for-dependent-types-and-deducible-parameters.cpp2"
11
11
template <typename T> class t ;
12
12
13
13
14
- #line 89 "pure2-bugfix-for-dependent-types-and-deducible-parameters.cpp2"
14
+ #line 91 "pure2-bugfix-for-dependent-types-and-deducible-parameters.cpp2"
15
15
template <typename T> class v ;
16
16
17
17
@@ -23,14 +23,14 @@ template<typename T> using identity = T;
23
23
template <typename T, T::value_type V> [[nodiscard]] auto f (cpp2::in<typename T::value_type> x) -> T::value_type;
24
24
25
25
26
- #line 44 "pure2-bugfix-for-dependent-types-and-deducible-parameters.cpp2"
26
+ #line 46 "pure2-bugfix-for-dependent-types-and-deducible-parameters.cpp2"
27
27
template <typename T> class t {
28
28
struct u_x_as_base { T::value_type x; };
29
29
30
- #line 45 "pure2-bugfix-for-dependent-types-and-deducible-parameters.cpp2"
30
+ #line 47 "pure2-bugfix-for-dependent-types-and-deducible-parameters.cpp2"
31
31
public: class u : public u_x_as_base , public T ::type {
32
32
33
- #line 48 "pure2-bugfix-for-dependent-types-and-deducible-parameters.cpp2"
33
+ #line 50 "pure2-bugfix-for-dependent-types-and-deducible-parameters.cpp2"
34
34
};
35
35
public: T::value_type x {0 };
36
36
};
@@ -45,15 +45,15 @@ template<typename T> auto id(cpp2::in<std::integral_constant<cpp2::i32,T::value>
45
45
auto main () -> int;
46
46
47
47
48
- #line 89 "pure2-bugfix-for-dependent-types-and-deducible-parameters.cpp2"
48
+ #line 91 "pure2-bugfix-for-dependent-types-and-deducible-parameters.cpp2"
49
49
template <typename T> class v {
50
50
public: explicit v (T const & x);
51
- #line 90 "pure2-bugfix-for-dependent-types-and-deducible-parameters.cpp2"
51
+ #line 92 "pure2-bugfix-for-dependent-types-and-deducible-parameters.cpp2"
52
52
public: auto operator =(T const & x) -> v& ;
53
53
54
54
public: v(v const &) = delete ; /* No 'that' constructor, suppress copy */
55
55
public: auto operator =(v const &) -> void = delete ;
56
- #line 91 "pure2-bugfix-for-dependent-types-and-deducible-parameters.cpp2"
56
+ #line 93 "pure2-bugfix-for-dependent-types-and-deducible-parameters.cpp2"
57
57
};
58
58
59
59
@@ -65,7 +65,7 @@ template<typename T, T::value_type V> [[nodiscard]] auto f(cpp2::in<typename T::
65
65
cpp2::Default.expects (cpp2::is<typename T::value_type>(x), " " );
66
66
cpp2::deferred_init<typename T::value_type> y;
67
67
y.construct (x);
68
- using z = typename T::value_type;
68
+ using z = T::value_type;
69
69
return { typename T::value_type{x} };
70
70
71
71
// Dependent *template-id*s.
@@ -87,6 +87,8 @@ template<typename T, T::value_type V> [[nodiscard]] auto f(cpp2::in<typename T::
87
87
(void ) typename w::value_type{x};
88
88
using v = w;
89
89
(void ) typename v::value_type{x};
90
+ using a = T::type;
91
+ (void ) typename a::value_type{x};
90
92
91
93
{
92
94
// Test that there's no prefixed `typename` to....
@@ -102,7 +104,7 @@ template<typename T, T::value_type V> [[nodiscard]] auto f(cpp2::in<typename T::
102
104
}
103
105
}
104
106
105
- #line 54 "pure2-bugfix-for-dependent-types-and-deducible-parameters.cpp2"
107
+ #line 56 "pure2-bugfix-for-dependent-types-and-deducible-parameters.cpp2"
106
108
template <typename T> auto init (cpp2::out<std::integral_constant<cpp2::i32 ,T::value>> x) -> void{x.construct (); }
107
109
template <typename T> auto init (cpp2::out<std::integral_constant<cpp2::i32 ,T::value>> x, T const & _) -> void{x.construct (); }
108
110
template <typename T> [[nodiscard]] auto id (cpp2::in<std::integral_constant<cpp2::i32 ,T::value>> x) -> auto&& { return x; }
@@ -138,11 +140,11 @@ auto main() -> int{
138
140
(void ) []<typename T>(cpp2::in<typename T::value_type> x) -> void {(void ) []() -> void {(void ) []() -> void {(void ) []() -> void {}; }; }; };
139
141
}
140
142
141
- #line 90 "pure2-bugfix-for-dependent-types-and-deducible-parameters.cpp2"
143
+ #line 92 "pure2-bugfix-for-dependent-types-and-deducible-parameters.cpp2"
142
144
template <typename T> v<T>::v(T const & x){}
143
- #line 90 "pure2-bugfix-for-dependent-types-and-deducible-parameters.cpp2"
145
+ #line 92 "pure2-bugfix-for-dependent-types-and-deducible-parameters.cpp2"
144
146
template <typename T> auto v<T>::operator =(T const & x) -> v& {
145
147
return *this ;
146
- #line 90 "pure2-bugfix-for-dependent-types-and-deducible-parameters.cpp2"
148
+ #line 92 "pure2-bugfix-for-dependent-types-and-deducible-parameters.cpp2"
147
149
}
148
150
0 commit comments