[Groonga-commit] groonga/grnxx [master] Use noexcept (C++11) instead of GRNXX_NOEXCEPT.

Back to archive index

susumu.yata null+****@clear*****
Wed Dec 5 21:20:13 JST 2012


susumu.yata	2012-12-05 21:20:13 +0900 (Wed, 05 Dec 2012)

  New Revision: d52b37d8f5f64d0aa5a927c8c154d8a4f2cddc84
  https://github.com/groonga/grnxx/commit/d52b37d8f5f64d0aa5a927c8c154d8a4f2cddc84

  Log:
    Use noexcept (C++11) instead of GRNXX_NOEXCEPT.

  Modified files:
    lib/exception.hpp
    lib/features.hpp

  Modified: lib/exception.hpp (+5 -5)
===================================================================
--- lib/exception.hpp    2012-12-05 15:26:00 +0900 (ef5824c)
+++ lib/exception.hpp    2012-12-05 21:20:13 +0900 (831cc3a)
@@ -26,15 +26,15 @@ namespace grnxx {
 
 class Exception : std::exception {
  public:
-  Exception() GRNXX_NOEXCEPT {}
-  virtual ~Exception() GRNXX_NOEXCEPT {}
+  Exception() noexcept {}
+  virtual ~Exception() noexcept {}
 
-  Exception(const Exception &) GRNXX_NOEXCEPT {}
-  Exception &operator=(const Exception &) GRNXX_NOEXCEPT {
+  Exception(const Exception &) noexcept {}
+  Exception &operator=(const Exception &) noexcept {
     return *this;
   }
 
-  virtual const char *what() const GRNXX_NOEXCEPT {
+  virtual const char *what() const noexcept {
     return "";
   }
 

  Modified: lib/features.hpp (+0 -10)
===================================================================
--- lib/features.hpp    2012-12-05 15:26:00 +0900 (a4f8d1d)
+++ lib/features.hpp    2012-12-05 21:20:13 +0900 (7ee71dc)
@@ -124,9 +124,6 @@
 # if GRNXX_CLANG_HAS(cxx_explicit_conversions)
 #  define GRNXX_HAS_EXPLICIT_CONVERSION
 # endif  // GRNXX_CLANG_HAS(cxx_explicit_conversions)
-# if GRNXX_CLANG_HAS(cxx_noexcept)
-#  define GRNXX_HAS_NOEXCEPT
-# endif  // GRNXX_CLANG_HAS(cxx_noexcept)
 #elif defined(GRNXX_GNUC)
 # define GRNXX_HAS_GNUC_BUILTIN_CLZ
 # if GRNXX_GNUC_VERSION >= GRNXX_GNUC_MAKE_VERSION(4, 2, 0)
@@ -137,7 +134,6 @@
 # endif  // GRNXX_GNUC_VERSION >= GRNXX_GNUC_MAKE_VERSION(4, 5, 0)
 # if GRNXX_GNUC_VERSION >= GRNXX_GNUC_MAKE_VERSION(4, 6, 0)
 #  define GRNXX_HAS_CONSTEXPR
-#  define GRNXX_HAS_NOEXCEPT
 # endif  // GRNXX_GNUC_VERSION >= GRNXX_GNUC_MAKE_VERSION(4, 6, 0)
 # if GRNXX_GNUC_VERSION >= GRNXX_GNUC_MAKE_VERSION(4, 7, 0)
 #  define GRNXX_HAS_GNUC_BUILTIN_ATOMIC
@@ -156,12 +152,6 @@
 # define GRNXX_EXPLICIT_CONVERSION
 #endif  // GRNXX_HAS_EXPLICIT_CONVERSION
 
-#ifdef GRNXX_HAS_NOEXCEPT
-# define GRNXX_NOEXCEPT noexcept
-#else  // GRNXX_HAS_NOEXCEPT
-# define GRNXX_NOEXCEPT throw()
-#endif  // GRNXX_HAS_NOEXCEPT
-
 // Source features.
 
 #ifdef _POSIX_C_SOURCE
-------------- next part --------------
HTML����������������������������...
Télécharger 



More information about the Groonga-commit mailing list
Back to archive index