Skip to content

Compile error in Visual Studio due to noexcept #20

Closed
@akamyshanov

Description

@akamyshanov

Introduced here: b0e9104
The following states that "Visual Studio 2012 and above have noexcept", however they do not.
"In the ISO C++11 Standard, the noexcept operator is introduced, but support for this feature is not yet present in Visual C++." (http://msdn.microsoft.com/en-us/library/wfa0edys(v=vs.120).aspx)

// Detect whether the compiler supports C++11 noexcept exception specifications.
#if (defined(__GNUC__) && (__GNUC__ >= 4 && __GNUC_MINOR__ >= 7 ) && defined(__GXX_EXPERIMENTAL_CXX0X__))
// GCC 4.7 and following have noexcept
#elif defined(__clang__) && __has_feature(cxx_noexcept)
// Clang 3.0 and above have noexcept
#elif defined(_MSC_VER) && (_MSC_VER >= 1700)
// Visual Studio 2012 and above have noexcept
#else
    #define noexcept    throw()
#endif

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions