@@ -249,45 +249,61 @@ struct type_1111 {
249249 explicit type_1111 (injected const &&);
250250};
251251
252+ template <kangaru::unqualified_object T>
253+ struct restricted_constructor_function {
254+ constexpr auto operator ()(kangaru::deducer auto deduce1, kangaru::deducer auto ... deduce) const -> T
255+ requires kangaru::raw_constructor_callable<
256+ T,
257+ kangaru::exclude_special_constructors_deducer<T, decltype(deduce1)>,
258+ kangaru::exclude_deducer<T, decltype(deduce)>...
259+ > {
260+ return kangaru::raw_constructor<T>(
261+ kangaru::exclude_special_constructors_for<T>(deduce1),
262+ kangaru::exclude_deduction<T>(deduce)...
263+ );
264+ }
265+ };
266+
252267template <typename T>
253268auto restricted_constructor () {
254- return kangaru::non_empty_constructor::construct <T>{};
269+ return restricted_constructor_function <T>{};
255270}
256271
257272TEST_CASE (" Strict deducer strictly deduce" , " [deducer]" ) {
258273 SECTION (" Strict reference deducer" ) {
259- auto constructor_0000 = restricted_constructor<type_0000>();
260- using constructor_0000_t = decltype (constructor_0000);
261- auto constructor_0001 = restricted_constructor<type_0001>();
262- using constructor_0001_t = decltype (constructor_0001);
263- auto constructor_0010 = restricted_constructor<type_0010>();
264- using constructor_0010_t = decltype (constructor_0010);
265- auto constructor_0011 = restricted_constructor<type_0011>();
266- using constructor_0011_t = decltype (constructor_0011);
267- auto constructor_0100 = restricted_constructor<type_0100>();
268- using constructor_0100_t = decltype (constructor_0100);
269- auto constructor_0101 = restricted_constructor<type_0101>();
270- using constructor_0101_t = decltype (constructor_0101);
271- auto constructor_0110 = restricted_constructor<type_0110>();
272- using constructor_0110_t = decltype (constructor_0110);
273- auto constructor_0111 = restricted_constructor<type_0111>();
274- using constructor_0111_t = decltype (constructor_0111);
275- auto constructor_1000 = restricted_constructor<type_1000>();
276- using constructor_1000_t = decltype (constructor_1000);
277- auto constructor_1001 = restricted_constructor<type_1001>();
278- using constructor_1001_t = decltype (constructor_1001);
279- auto constructor_1010 = restricted_constructor<type_1010>();
280- using constructor_1010_t = decltype (constructor_1010);
281- auto constructor_1011 = restricted_constructor<type_1011>();
282- using constructor_1011_t = decltype (constructor_1011);
283- auto constructor_1100 = restricted_constructor<type_1100>();
284- using constructor_1100_t = decltype (constructor_1100);
285- auto constructor_1101 = restricted_constructor<type_1101>();
286- using constructor_1101_t = decltype (constructor_1101);
287- auto constructor_1110 = restricted_constructor<type_1110>();
288- using constructor_1110_t = decltype (constructor_1110);
289- auto constructor_1111 = restricted_constructor<type_1111>();
290- using constructor_1111_t = decltype (constructor_1111);
274+ using constructor_0000_t = kangaru::constructor_function<type_0000>;
275+ using constructor_0001_t = kangaru::constructor_function<type_0001>;
276+ using constructor_0010_t = kangaru::constructor_function<type_0010>;
277+ using constructor_0011_t = kangaru::constructor_function<type_0011>;
278+ using constructor_0100_t = kangaru::constructor_function<type_0100>;
279+ using constructor_0101_t = kangaru::constructor_function<type_0101>;
280+ using constructor_0110_t = kangaru::constructor_function<type_0110>;
281+ using constructor_0111_t = kangaru::constructor_function<type_0111>;
282+ using constructor_1000_t = kangaru::constructor_function<type_1000>;
283+ using constructor_1001_t = kangaru::constructor_function<type_1001>;
284+ using constructor_1010_t = kangaru::constructor_function<type_1010>;
285+ using constructor_1011_t = kangaru::constructor_function<type_1011>;
286+ using constructor_1100_t = kangaru::constructor_function<type_1100>;
287+ using constructor_1101_t = kangaru::constructor_function<type_1101>;
288+ using constructor_1110_t = kangaru::constructor_function<type_1110>;
289+ using constructor_1111_t = kangaru::constructor_function<type_1111>;
290+
291+ auto constructor_0000 = constructor_0000_t {};
292+ auto constructor_0001 = constructor_0001_t {};
293+ auto constructor_0010 = constructor_0010_t {};
294+ auto constructor_0011 = constructor_0011_t {};
295+ auto constructor_0100 = constructor_0100_t {};
296+ auto constructor_0101 = constructor_0101_t {};
297+ auto constructor_0110 = constructor_0110_t {};
298+ auto constructor_0111 = constructor_0111_t {};
299+ auto constructor_1000 = constructor_1000_t {};
300+ auto constructor_1001 = constructor_1001_t {};
301+ auto constructor_1010 = constructor_1010_t {};
302+ auto constructor_1011 = constructor_1011_t {};
303+ auto constructor_1100 = constructor_1100_t {};
304+ auto constructor_1101 = constructor_1101_t {};
305+ auto constructor_1110 = constructor_1110_t {};
306+ auto constructor_1111 = constructor_1111_t {};
291307
292308 CHECK ((kangaru::detail::deducer::is_nth_parameter_prvalue<constructor_0000_t , 0 , 1 >));
293309 CHECK (not (kangaru::detail::deducer::is_nth_parameter_prvalue<constructor_0001_t , 0 , 1 >));
0 commit comments