Commit bb9c8658 by Jonathan Wakely Committed by Jonathan Wakely

exception_ptr.h (make_exception_ptr): Add.

2010-05-07  Jonathan Wakely  <jwakely.gcc@gmail.com>

	* libsupc++/exception_ptr.h (make_exception_ptr): Add.
	* testsuite/18_support/exception_ptr/make_exception_ptr.cc: New.

From-SVN: r159144
parent a26cd6b8
2010-05-07 Jonathan Wakely <jwakely.gcc@gmail.com>
* libsupc++/exception_ptr.h (make_exception_ptr): Add.
* testsuite/18_support/exception_ptr/make_exception_ptr.cc: New.
2010-05-06 Jason Merrill <jason@redhat.com>
* config/abi/pre/gnu.ver: Move decltype(nullptr) into CXXABI_1.3.5.
......
......@@ -160,6 +160,14 @@ namespace std
}
}
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 1130. copy_exception name misleading
/// Obtain an exception_ptr pointing to a copy of the supplied object.
template<typename _Ex>
exception_ptr
make_exception_ptr(_Ex __ex) throw()
{ return std::copy_exception<_Ex>(__ex); }
// @} group exceptions
} // namespace std
......
// { dg-options "-std=gnu++0x" }
// { dg-require-atomic-builtins "" }
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
#include <exception>
#include <testsuite_hooks.h>
bool test01()
{
bool test __attribute__((unused)) = true;
std::exception_ptr p = std::make_exception_ptr(0);
VERIFY( !(p == 0) );
}
int main()
{
test01();
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment