stl_pair.h (__may_be_null_pointer_init): New.
authorDouglas Gregor <doug.gregor@gmail.com>
Sat, 18 Oct 2008 23:02:17 +0000 (23:02 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Sat, 18 Oct 2008 23:02:17 +0000 (23:02 +0000)
commitc393ec5a87f11010629763aa1cc34e1803642633
treeff25247aece9e9b8e144f8ebe19cfb4acc03bbf2
parent3cdf0c6237613202df8fa9f7e27bec61178122d5
stl_pair.h (__may_be_null_pointer_init): New.

2008-10-18  Douglas Gregor  <doug.gregor@gmail.com>

* include/bits/stl_pair.h (__may_be_null_pointer_init): New.
(pair::pair): Eliminate the redundant pair(U1&&, U2&&) constructor.
Add lvalue pair<U1, U2> constructor to handle non-const pair lvalues.
Remove the old variadic constructor, and instead provide several
variadic constructors that avoid failing when attempting to
initialize a pointer from a null pointer constant.
* testsuite/20_util/pair/moveable.cc (test3): Add new tests with
initialization of pointers from the null pointer constant.

From-SVN: r141214
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/stl_pair.h
libstdc++-v3/testsuite/20_util/pair/moveable.cc