diff --git a/folly/dynamic-inl.h b/folly/dynamic-inl.h index 2b3b2a49916..20a9473328e 100644 --- a/folly/dynamic-inl.h +++ b/folly/dynamic-inl.h @@ -134,16 +134,10 @@ struct FOLLY_EXPORT TypeError : std::runtime_error { const std::string& expected, dynamic::Type actual1, dynamic::Type actual2); - // TODO: noexcept calculation required through gcc-v4.9; remove once upgrading - // to gcc-v5. - TypeError(const TypeError&) noexcept( - std::is_nothrow_copy_constructible::value); - TypeError& operator=(const TypeError&) noexcept( - std::is_nothrow_copy_assignable::value); - TypeError(TypeError&&) noexcept( - std::is_nothrow_move_constructible::value); - TypeError& operator=(TypeError&&) noexcept( - std::is_nothrow_move_assignable::value); + TypeError(const TypeError&) noexcept; + TypeError& operator=(const TypeError&) noexcept; + TypeError(TypeError&&) noexcept; + TypeError& operator=(TypeError&&) noexcept; ~TypeError() override; }; diff --git a/folly/dynamic.cpp b/folly/dynamic.cpp index db249b86f93..5c053cfefb6 100644 --- a/folly/dynamic.cpp +++ b/folly/dynamic.cpp @@ -63,14 +63,10 @@ TypeError::TypeError( dynamic::typeName(actual1), dynamic::typeName(actual2))) {} -TypeError::TypeError(const TypeError&) noexcept( - std::is_nothrow_copy_constructible::value) = default; -TypeError& TypeError::operator=(const TypeError&) noexcept( - std::is_nothrow_copy_assignable::value) = default; -TypeError::TypeError(TypeError&&) noexcept( - std::is_nothrow_move_constructible::value) = default; -TypeError& TypeError::operator=(TypeError&&) noexcept( - std::is_nothrow_move_assignable::value) = default; +TypeError::TypeError(const TypeError&) noexcept = default; +TypeError& TypeError::operator=(const TypeError&) noexcept = default; +TypeError::TypeError(TypeError&&) noexcept = default; +TypeError& TypeError::operator=(TypeError&&) noexcept = default; TypeError::~TypeError() = default; // This is a higher-order preprocessor macro to aid going from runtime