r276298 - in /trunk/libstdc++-v3: ChangeLog inc...

redi@gcc.gnu.org redi@gcc.gnu.org
Mon Sep 30 11:52:00 GMT 2019


Author: redi
Date: Mon Sep 30 11:52:08 2019
New Revision: 276298

URL: https://gcc.gnu.org/viewcvs?rev=276298&root=gcc&view=rev
Log:
Implement LWG 3255 for std::span constructors

Also fix the constraints on span(Container&) and span(const Container&)
constructors so that they aren't used for const spans or const arrays.

	* include/std/span (span(element_type(&)[N]))
	(span(array<value_type, N>&), span(const array<value_type, N>&)):
	Deduce array element type to allow safe const conversions (LWG 3255).
	[!_GLIBCXX_P1394] (span(Container&), span(const Container&)): Use
	remove_cv_t on arguments to __is_std_span and __is_std_array.
	* testsuite/23_containers/span/lwg3255.cc: New test.

Added:
    trunk/libstdc++-v3/testsuite/23_containers/span/lwg3255.cc
Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/include/std/span



More information about the Libstdc++-cvs mailing list