Index: libcxx/include/typeinfo =================================================================== --- libcxx/include/typeinfo +++ libcxx/include/typeinfo @@ -203,18 +203,56 @@ : public exception { public: +#if defined(_LIBCPP_ABI_MICROSOFT) + _LIBCPP_INLINE_VISIBILITY + bad_cast() _NOEXCEPT + { + } + + _LIBCPP_INLINE_VISIBILITY + ~bad_cast() _NOEXCEPT + { + } + + _LIBCPP_INLINE_VISIBILITY + const char * + what() const _NOEXCEPT + { + return "std::bad_cast"; + } +#else bad_cast() _NOEXCEPT; virtual ~bad_cast() _NOEXCEPT; virtual const char* what() const _NOEXCEPT; +#endif }; class _LIBCPP_EXCEPTION_ABI bad_typeid : public exception { public: +#if defined(_LIBCPP_ABI_MICROSOFT) + _LIBCPP_INLINE_VISIBILITY + bad_typeid() _NOEXCEPT + { + } + + _LIBCPP_INLINE_VISIBILITY + ~bad_typeid() _NOEXCEPT + { + } + + _LIBCPP_INLINE_VISIBILITY + const char * + what() const _NOEXCEPT + { + return "std::bad_typeid"; + } +#else bad_typeid() _NOEXCEPT; virtual ~bad_typeid() _NOEXCEPT; virtual const char* what() const _NOEXCEPT; +#endif }; } // std Index: libcxx/src/support/runtime/exception_msvc.ipp =================================================================== --- libcxx/src/support/runtime/exception_msvc.ipp +++ libcxx/src/support/runtime/exception_msvc.ipp @@ -97,34 +97,6 @@ return "bad_array_length"; } -bad_cast::bad_cast() _NOEXCEPT -{ -} - -bad_cast::~bad_cast() _NOEXCEPT -{ -} - -const char * -bad_cast::what() const _NOEXCEPT -{ - return "std::bad_cast"; -} - -bad_typeid::bad_typeid() _NOEXCEPT -{ -} - -bad_typeid::~bad_typeid() _NOEXCEPT -{ -} - -const char * -bad_typeid::what() const _NOEXCEPT -{ - return "std::bad_typeid"; -} - #if defined(_LIBCPP_NO_VCRUNTIME) exception::~exception() _NOEXCEPT {