summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMurray Cumming <murrayc@murrayc.com>2017-04-04 18:20:36 +0200
committerMurray Cumming <murrayc@murrayc.com>2017-04-04 18:37:01 +0200
commit5bb736f313177cda71d2d2604660bd92a76c96ba (patch)
tree9113f03203e8d5b8af061d51b5fefac81c74d59a
parentb3f9805acc716e1d4ce2d09b387719376e60052f (diff)
downloadglibmm-5bb736f313177cda71d2d2604660bd92a76c96ba.tar.gz
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
-rw-r--r--glib/src/variant.ccg2
-rw-r--r--glib/src/variant.hg2
2 files changed, 2 insertions, 2 deletions
diff --git a/glib/src/variant.ccg b/glib/src/variant.ccg
index 06923a74..a77e8788 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 5de30dc4..2e6c5ce5 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)