[glibmm/glibmm-2-50] C++11: Variant: Replace throw(std::bad_cast) with noexcept(false).



commit 6c2db230815098902b69e3ff4483cf4ecdeb2dba
Author: Murray Cumming <murrayc murrayc com>
Date:   Tue Apr 4 18:20:36 2017 +0200

    C++11: Variant: Replace throw(std::bad_cast) with noexcept(false).
    
    This is necessary for C++17 which completely removes dynamic
    exception specifications.
    See https://bugzilla.redhat.com/show_bug.cgi?id=1438766

 glib/src/variant.ccg |    2 +-
 glib/src/variant.hg  |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/glib/src/variant.ccg b/glib/src/variant.ccg
index 06923a7..a77e878 100644
--- a/glib/src/variant.ccg
+++ b/glib/src/variant.ccg
@@ -194,7 +194,7 @@ VariantContainerBase::get_child(VariantBase& child, gsize index) const
 // VariantContainerBase has no method variant_type()
 template <>
 VariantContainerBase
-VariantBase::cast_dynamic<VariantContainerBase>(const VariantBase& v) throw(std::bad_cast)
+VariantBase::cast_dynamic<VariantContainerBase>(const VariantBase& v) noexcept(false)
 {
   if (!v.gobj())
     return VariantContainerBase();
diff --git a/glib/src/variant.hg b/glib/src/variant.hg
index 5de30dc..2e6c5ce 100644
--- a/glib/src/variant.hg
+++ b/glib/src/variant.hg
@@ -225,7 +225,7 @@ _DEPRECATE_IFDEF_END
     * @throws std::bad_cast if the Variant was not of the expected type.
     */
    template<class V_CastTo>
-   static V_CastTo cast_dynamic(const VariantBase& v) throw(std::bad_cast);
+   static V_CastTo cast_dynamic(const VariantBase& v) noexcept(false);
 
    _IGNORE(g_variant_dict_new)
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]