This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] PR libstdc++/79195 fix make_array type deduction


This adds indirection through a class template partial specialization
so we don't instantiate common_type<_Types...>::type unless we need
it.

	PR libstdc++/79195
	* include/experimental/array (__make_array_elem): New class template
	and partial specialization.
	(__is_reference_wrapper): Move into __make_array_elem specialization.
	(make_array): Use __make_array_elem to determine element type and move
	static assertion into specialization. Qualify std::forward call.
	(to_array): Add exception specifiation.
	* testsuite/experimental/array/make_array.cc: Test argument types
	without a common type.
	* testsuite/experimental/array/neg.cc: Adjust expected error message.

Tested powerpc64le-linux, committed to trunk (because it's only an
experimental TS feature).

Attachment: patch.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]