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



commit a4de5823f43b415359a05710b77f3de9e3d6448d
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 2418798..bcdc3ac 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 4843398..bf5040b 100644
--- a/glib/src/variant.hg
+++ b/glib/src/variant.hg
@@ -202,7 +202,7 @@ public:
     * @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]