Commit 196e0493 by Jonathan Wakely Committed by Jonathan Wakely

exception (uncaught_exceptions): Add comment.

	* libsupc++/exception (uncaught_exceptions): Add comment. Reorder #if.
	* testsuite/18_support/uncaught_exceptions/uncaught_exceptions.cc:
	Use -std=gnu++1z. Check feature-test macro.

From-SVN: r222523
parent bd1eb5e0
2015-04-28 Jonathan Wakely <jwakely@redhat.com> 2015-04-28 Jonathan Wakely <jwakely@redhat.com>
* libsupc++/exception (uncaught_exceptions): Add comment. Reorder #if.
* testsuite/18_support/uncaught_exceptions/uncaught_exceptions.cc:
Use -std=gnu++1z. Check feature-test macro.
* include/std/type_traits (void_t): Add. * include/std/type_traits (void_t): Add.
* testsuite/20_util/void_t/1.cc: New. * testsuite/20_util/void_t/1.cc: New.
......
...@@ -126,8 +126,9 @@ namespace std ...@@ -126,8 +126,9 @@ namespace std
*/ */
bool uncaught_exception() _GLIBCXX_USE_NOEXCEPT __attribute__ ((__pure__)); bool uncaught_exception() _GLIBCXX_USE_NOEXCEPT __attribute__ ((__pure__));
#if !defined(__STRICT_ANSI__) || __cplusplus > 201402L #if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++98
#define __cpp_lib_uncaught_exceptions 201411 #define __cpp_lib_uncaught_exceptions 201411
/// The number of uncaught exceptions.
int uncaught_exceptions() _GLIBCXX_USE_NOEXCEPT __attribute__ ((__pure__)); int uncaught_exceptions() _GLIBCXX_USE_NOEXCEPT __attribute__ ((__pure__));
#endif #endif
......
...@@ -15,12 +15,18 @@ ...@@ -15,12 +15,18 @@
// with this library; see the file COPYING3. If not see // with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>. // <http://www.gnu.org/licenses/>.
// { dg-options "-std=gnu++11" } // { dg-options "-std=gnu++1z" }
#include <cassert> #include <cassert>
#include <exception> #include <exception>
#include <testsuite_hooks.h> #include <testsuite_hooks.h>
#ifndef __cpp_lib_uncaught_exceptions
# error "Feature-test macro for uncaught_exceptions missing"
#elif __cpp_lib_uncaught_exceptions != 201411
# error "Feature-test macro for uncaught_exceptions has wrong value"
#endif
struct UncaughtVerifier struct UncaughtVerifier
{ {
int expected_count_ = 0; int expected_count_ = 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