Skip to content

Commit

Permalink
Update _MSC_FULL_VER check for constexpr handling
Browse files Browse the repository at this point in the history
Previously the code was comparing against 190024210 (VS2015 Update 3).
Update it to instead compare against 190024315, the last pre-release build
before C++14 constexpr support got added; this fixes compilation using
pre-release MSVC compilers between 24210 and 24315.

Fixes #6642.
  • Loading branch information
JosephTremoulet committed Sep 15, 2016
1 parent f4b86dd commit 5eb0cac
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/inc/debugreturn.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@

#else // !_PREFAST_

// This is disabled in VS2015 Update 3 and earlier because only C++11 constexpr is supported,
// which doesn't allow the use of 'if' statements within the body of a constexpr function.
#if defined(_DEBUG) && (!defined(_MSC_FULL_VER) || _MSC_FULL_VER > 190024210)
// This is disabled in build 190024315 (a pre-release build after VS 2015 Update 3) and
// earlier because those builds only support C++11 constexpr, which doesn't allow the
// use of 'if' statements within the body of a constexpr function. Later builds support
// C++14 constexpr.
#if defined(_DEBUG) && (!defined(_MSC_FULL_VER) || _MSC_FULL_VER > 190024315)

// Code to generate a compile-time error if return statements appear where they
// shouldn't.
Expand Down

0 comments on commit 5eb0cac

Please sign in to comment.