You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// since-cxx11-error-re@#dr2627-f {{non-constant-expression cannot be narrowed from type '__int128' to 'std::int64_t' (aka '{{.+}}') in initializer list}}
74
+
// since-cxx11-note@-2 {{in instantiation of function template specialization 'dr2627::f<65>' requested here}}
75
+
// since-cxx11-note@#dr2627-f {{insert an explicit cast to silence this issue}}
76
+
77
+
template<typename Target, typename Source>
78
+
Target g(Source x) {
79
+
return Target{ x.i }; // #dr2627-g
80
+
}
81
+
82
+
template<typename T, int N>
83
+
structE {
84
+
T i : N;
85
+
};
86
+
87
+
template std::int16_tg(E<int, 16>);
88
+
template std::int16_tg(E<unsigned, 15>);
89
+
template std::int16_tg(E<unsigned, 16>);
90
+
// since-cxx11-error-re@#dr2627-g {{non-constant-expression cannot be narrowed from type 'unsigned int' to '{{.+}}' in initializer list}}
91
+
// since-cxx11-note-re@-2 {{in instantiation of function template specialization 'dr2627::g<{{.+}}, dr2627::E<unsigned int, 16>>' requested here}}
92
+
// since-cxx11-note@#dr2627-g {{insert an explicit cast to silence this issue}}
93
+
template std::uint16_tg(E<unsigned, 16>);
94
+
template std::uint16_tg(E<int, 1>);
95
+
// since-cxx11-error-re@#dr2627-g {{non-constant-expression cannot be narrowed from type 'int' to '{{.+}}' in initializer list}}
96
+
// since-cxx11-note-re@-2 {{in instantiation of function template specialization 'dr2627::g<{{.+}}, dr2627::E<int, 1>>' requested here}}
97
+
// since-cxx11-note@#dr2627-g {{insert an explicit cast to silence this issue}}
98
+
99
+
template boolg(E<unsigned, 1>);
100
+
template boolg(E<int, 1>);
101
+
// since-cxx11-error@#dr2627-g {{non-constant-expression cannot be narrowed from type 'int' to 'bool' in initializer list}}
102
+
// since-cxx11-note@-2 {{in instantiation of function template specialization 'dr2627::g<bool, dr2627::E<int, 1>>' requested here}}
103
+
// since-cxx11-note@#dr2627-g {{insert an explicit cast to silence this issue}}
104
+
#endif
105
+
}
106
+
27
107
namespacedr2628 { // dr2628: no
28
108
// this was reverted for the 16.x release
29
109
// due to regressions, see the issue for more details:
0 commit comments