From: Davide Italiano Date: Sun, 6 Nov 2016 20:55:40 +0000 (+0000) Subject: [RandomNumberGenerator] Remove MSVC 2013 compatibility hack. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ef6860ffdf7e613861ea8f099bea54911a7326cf;p=llvm [RandomNumberGenerator] Remove MSVC 2013 compatibility hack. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286083 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Support/RandomNumberGenerator.h b/include/llvm/Support/RandomNumberGenerator.h index 8806bbc141b..1399dab815f 100644 --- a/include/llvm/Support/RandomNumberGenerator.h +++ b/include/llvm/Support/RandomNumberGenerator.h @@ -44,18 +44,8 @@ public: /// Returns a random number in the range [0, Max). result_type operator()(); - // We can only make min/max constexpr if generator_type::min/max are - // constexpr. The MSVC 2013 STL does not make these constexpr, so we have to - // avoid declaring them as constexpr even if the compiler, like clang-cl, - // supports it. -#if defined(_MSC_VER) && _MSC_VER < 1900 -#define STL_CONSTEXPR -#else -#define STL_CONSTEXPR constexpr -#endif - - static STL_CONSTEXPR result_type min() { return generator_type::min(); } - static STL_CONSTEXPR result_type max() { return generator_type::max(); } + static constexpr result_type min() { return generator_type::min(); } + static constexpr result_type max() { return generator_type::max(); } private: /// Seeds and salts the underlying RNG engine.