|
6 | 6 |
|
7 | 7 | #include "cpp2util.h"
|
8 | 8 |
|
| 9 | +#line 1 "pure2-bugfix-for-deducible-parameters.cpp2" |
9 | 10 |
|
10 | 11 | #line 31 "pure2-bugfix-for-deducible-parameters.cpp2"
|
11 | 12 | template<typename T> class v;
|
12 | 13 |
|
13 | 14 |
|
14 | 15 | //=== Cpp2 type definitions and function declarations ===========================
|
15 | 16 |
|
| 17 | +#line 1 "pure2-bugfix-for-deducible-parameters.cpp2" |
16 | 18 | // Dependent, non-deducible parameters
|
17 | 19 | // are wrapped like non-dependent parameters.
|
18 | 20 | #line 3 "pure2-bugfix-for-deducible-parameters.cpp2"
|
19 | 21 | template<typename T> auto init(cpp2::out<std::integral_constant<cpp2::i32,T::value>> x) -> void;
|
20 |
| -template<typename T> auto init(cpp2::out<std::integral_constant<cpp2::i32,T::value>> x, [[maybe_unused]] T const& param2) -> void; |
| 22 | +template<typename T> auto init(cpp2::out<std::integral_constant<cpp2::i32,T::value>> x, [[maybe_unused]] T const& unnamed_param_2) -> void; |
21 | 23 | template<typename T> [[nodiscard]] auto id(cpp2::in<std::integral_constant<cpp2::i32,T::value>> x) -> auto&&;
|
22 | 24 | template<typename T> auto id(cpp2::in<std::integral_constant<cpp2::i32,T::value>> x, T const& y) -> void;
|
23 | 25 |
|
24 | 26 | auto main() -> int;
|
25 |
| - |
26 | 27 |
|
27 | 28 | #line 31 "pure2-bugfix-for-deducible-parameters.cpp2"
|
28 | 29 | template<typename T> class v {
|
29 | 30 | public: explicit v(T const& x);
|
30 | 31 | #line 32 "pure2-bugfix-for-deducible-parameters.cpp2"
|
31 | 32 | public: auto operator=(T const& x) -> v& ;
|
32 |
| - |
33 | 33 | public: v(v const&) = delete; /* No 'that' constructor, suppress copy */
|
34 | 34 | public: auto operator=(v const&) -> void = delete;
|
| 35 | + |
35 | 36 | #line 33 "pure2-bugfix-for-deducible-parameters.cpp2"
|
36 | 37 | };
|
37 | 38 |
|
38 | 39 |
|
39 | 40 | //=== Cpp2 function definitions =================================================
|
40 | 41 |
|
| 42 | +#line 1 "pure2-bugfix-for-deducible-parameters.cpp2" |
41 | 43 |
|
42 | 44 | #line 3 "pure2-bugfix-for-deducible-parameters.cpp2"
|
43 | 45 | template<typename T> auto init(cpp2::out<std::integral_constant<cpp2::i32,T::value>> x) -> void{x.construct(); }
|
44 |
| -template<typename T> auto init(cpp2::out<std::integral_constant<cpp2::i32,T::value>> x, [[maybe_unused]] T const& param2) -> void{x.construct(); } |
| 46 | +template<typename T> auto init(cpp2::out<std::integral_constant<cpp2::i32,T::value>> x, [[maybe_unused]] T const& unnamed_param_2) -> void{x.construct(); } |
45 | 47 | template<typename T> [[nodiscard]] auto id(cpp2::in<std::integral_constant<cpp2::i32,T::value>> x) -> auto&& { return x; }
|
46 | 48 | template<typename T> auto id(cpp2::in<std::integral_constant<cpp2::i32,T::value>> x, T const& y) -> void{cpp2::Default.expects(&x == &y, ""); }
|
47 | 49 |
|
@@ -81,7 +83,5 @@ auto f = []<typename T>(std::vector<std::vector<T>> const& x) -> void{};
|
81 | 83 | template <typename T> v<T>::v(T const& x){}
|
82 | 84 | #line 32 "pure2-bugfix-for-deducible-parameters.cpp2"
|
83 | 85 | template <typename T> auto v<T>::operator=(T const& x) -> v& {
|
84 |
| - return *this; |
85 |
| -#line 32 "pure2-bugfix-for-deducible-parameters.cpp2" |
86 |
| - } |
| 86 | + return *this; } |
87 | 87 |
|
0 commit comments