@@ -1342,6 +1342,9 @@ GLIBCXX_3.4.18 {
# std::this_thread::__sleep_for
_ZNSt11this_thread11__sleep_for*;
+ # std::bad_function_call::what()
+ _ZNKSt17bad_function_call4whatEv;
+
} GLIBCXX_3.4.17;
# Symbols in the support library (libsupc++) have their own tag.
@@ -1,6 +1,6 @@
// <functional> -*- C++ -*-
-// Copyright (C) 2001-2012 Free Software Foundation, Inc.
+// Copyright (C) 2001-2013 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
@@ -1767,6 +1767,8 @@ _GLIBCXX_HAS_NESTED_TYPE(result_type)
{
public:
virtual ~bad_function_call() noexcept;
+
+ const char* what() const noexcept;
};
/**
@@ -1,7 +1,6 @@
// Support for <functional> -*- C++ -*-
-// Copyright (C) 2011
-// Free Software Foundation, Inc.
+// Copyright (C) 2011-2013 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
@@ -29,7 +28,11 @@ namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
- bad_function_call::~bad_function_call() throw() = default;
+ bad_function_call::~bad_function_call() noexcept = default;
+
+ const char*
+ bad_function_call::what() const noexcept
+ { return "bad_function_call"; }
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
@@ -1,7 +1,6 @@
// Support for pointer abstractions -*- C++ -*-
-// Copyright (C) 2011
-// Free Software Foundation, Inc.
+// Copyright (C) 2011-2013 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
@@ -33,7 +32,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
char const*
bad_weak_ptr::what() const noexcept
- { return "std::bad_weak_ptr"; }
+ { return "bad_weak_ptr"; }
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
new file mode 100644
@@ -0,0 +1,33 @@
+// { dg-options "-std=gnu++11" }
+
+// Copyright (C) 2013 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 <functional>
+#include <testsuite_hooks.h>
+
+int main()
+{
+ try
+ {
+ std::function<void()>{}();
+ }
+ catch (const std::exception& e)
+ {
+ VERIFY( e.what() == std::string("bad_function_call") );
+ }
+}
@@ -1,6 +1,6 @@
// { dg-options "-std=gnu++0x" }
-// Copyright (C) 2005, 2006, 2007, 2009, 2012 Free Software Foundation
+// Copyright (C) 2005-2013 Free Software Foundation
//
// 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
@@ -40,10 +40,11 @@ test01()
{
std::shared_ptr<A> a2(wa);
}
- catch (const std::bad_weak_ptr&)
+ catch (const std::bad_weak_ptr& e)
{
// Expected.
- test = true;
+ if (e.what() == std::string("bad_weak_ptr"))
+ test = true;
}
VERIFY( test );