1
0
Fork 0
mirror of https://github.com/bolero-MURAKAMI/Sprout synced 2025-08-03 12:49:50 +00:00

partial support (C++11 constexpr) for VC++2015

This commit is contained in:
bolero-MURAKAMI 2016-02-12 21:06:06 +09:00
parent b1b62d9a29
commit e7a79b31ea
5 changed files with 21 additions and 9 deletions

View file

@ -8,7 +8,11 @@
#ifndef SPROUT_CONFIG_COMPILER_VISUALC_HPP
#define SPROUT_CONFIG_COMPILER_VISUALC_HPP
#define SPROUT_NO_CXX11_CONSTEXPR
#if _MSC_FULL_VER < 190023026
# define SPROUT_NO_CXX11_CONSTEXPR
#endif
#define SPROUT_NO_STATIC_CONSTEXPR_INITIALIZATION
#if _MSC_FULL_VER < 180020827
# define SPROUT_NO_CXX11_DEFAULTED_FUNCTIONS
# define SPROUT_NO_CXX11_DELETED_FUNCTIONS

View file

@ -17,11 +17,19 @@
//
#ifndef SPROUT_CONFIG_DISABLE_CONSTEXPR
# define SPROUT_CONSTEXPR constexpr
# define SPROUT_CONSTEXPR_OR_CONST constexpr
# define SPROUT_STATIC_CONSTEXPR static constexpr
# ifndef SPROUT_NO_STATIC_CONSTEXPR_INITIALIZATION
# define SPROUT_CONSTEXPR_OR_CONST constexpr
# define SPROUT_STATIC_CONSTEXPR static constexpr
#
# define SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_INNER(EXPR) = EXPR
# define SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_OUTER(EXPR)
# define SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_INNER(EXPR) = EXPR
# define SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_OUTER(EXPR)
# else
# define SPROUT_CONSTEXPR_OR_CONST const
# define SPROUT_STATIC_CONSTEXPR static const
#
# define SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_INNER(EXPR)
# define SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_OUTER(EXPR) = EXPR
# endif
#else // #ifndef SPROUT_CONFIG_DISABLE_CONSTEXPR
# define SPROUT_CONSTEXPR
# define SPROUT_CONSTEXPR_OR_CONST const