libstdc++: Make __gnu_test:uneq_allocator(int) constructor explicit.
Presence implicit conversion from int to it's allocator, makes constructing
string from rvalue of same string type and int ambiguous, as none of following
candidates is better:
basic_string(basic_string&&, allocator_type)
// conversion from int to allocator for second argument
basic_string(const basic_string&, int, allocator_type)
// reference adjustment for first argument
This makes __gnu_test:uneq_allocator(int) constructor explicit, to avoid
above issues.
libstdc++-v3/ChangeLog:
* testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc
(__gnu_test::uneq_allocator(int)): Declare as explicit.
* testsuite/std/memory/indirect/ctor.cc: Construct uneq_allocator
from int explicitly.
* testsuite/std/memory/polymorphic/ctor.cc: Likewise.
* testsuite/std/memory/polymorphic/ctor_poly.cc: Likewise.
* testsuite/util/testsuite_allocator.h: Likewise.
Reviewed-by: Jonathan Wakely <jwakely@redhat.com> Signed-off-by: Tomasz Kamiński <tkaminsk@redhat.com>