fix logical error on detecting std::clamp feature
This commit is contained in:
parent
4bc03d038a
commit
735de4f032
@ -112,10 +112,6 @@
|
|||||||
# define STD_CODECVT_NOT_SUPPORTED
|
# define STD_CODECVT_NOT_SUPPORTED
|
||||||
# endif // _MSC_VER == 1900
|
# endif // _MSC_VER == 1900
|
||||||
|
|
||||||
# if (_MSC_VER < 1910) //VS2017 RTM
|
|
||||||
# define _enable_std_clamp
|
|
||||||
# endif
|
|
||||||
|
|
||||||
#elif defined(__clang__) //Clang
|
#elif defined(__clang__) //Clang
|
||||||
|
|
||||||
#include <iosfwd> //Introduces some implement-specific flags of ISO C++ Library
|
#include <iosfwd> //Introduces some implement-specific flags of ISO C++ Library
|
||||||
@ -195,13 +191,19 @@
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef _MSC_VER
|
//Detects the feature std::clamp
|
||||||
// std::clamp's feature test macro is defined inside <algorithm>
|
|
||||||
# include <algorithm>
|
//Visual C++ 2017 with /std:c++latest provides the std::clamp
|
||||||
# if (!defined(__cpp_lib_clamp)) || (__cpp_lib_clamp < 201603)
|
#if !defined(_MSVC_LANG) || (_MSVC_LANG < 201403L)
|
||||||
# ifndef _enable_std_clamp
|
|
||||||
# define _enable_std_clamp
|
// std::clamp's feature test macro is defined inside <algorithm>
|
||||||
# endif
|
// But nana still avoids introducing <algorithm> on MSVC.
|
||||||
|
# ifndef _MSC_VER
|
||||||
|
# include <algorithm>
|
||||||
|
# endif
|
||||||
|
|
||||||
|
# if ((!defined(__cpp_lib_clamp)) || (__cpp_lib_clamp < 201603)) && (!defined(_enable_std_clamp))
|
||||||
|
# define _enable_std_clamp
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user