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

redi@gcc.gnu.org redi@gcc.gnu.org
Tue Jul 24 13:03:00 GMT 2018


Author: redi
Date: Tue Jul 24 13:03:25 2018
New Revision: 262945

URL: https://gcc.gnu.org/viewcvs?rev=262945&root=gcc&view=rev
Log:
Reorder conditions in uses-allocator construction helper

The erased_type condition is only true for code using the Library
Fundamentals TS, so assume it's less common and only check it after
checking for convertibility.

This does mean for types using erased_type the more expensive
convertibility check is done first, but such types are rare.

	* include/bits/uses_allocator.h (__is_erased_or_convertible): Reorder
	conditions. Add comments.
	* testsuite/20_util/uses_allocator/69293_neg.cc: Adjust dg-error line.
	* testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
	* testsuite/20_util/scoped_allocator/69293_neg.cc: Likewise.

Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/include/bits/uses_allocator.h
    trunk/libstdc++-v3/testsuite/20_util/scoped_allocator/69293_neg.cc
    trunk/libstdc++-v3/testsuite/20_util/uses_allocator/69293_neg.cc
    trunk/libstdc++-v3/testsuite/20_util/uses_allocator/cons_neg.cc



More information about the Libstdc++-cvs mailing list