add SPROUT_DEPRECATED

This commit is contained in:
bolero-MURAKAMI 2014-02-21 00:25:55 +09:00
parent 06bd554967
commit 2867cd79ef
20 changed files with 43 additions and 1 deletions

View file

@ -51,8 +51,10 @@ namespace sprout {
//
// convert_array
// [[deprecated]]
//
template<typename T, typename Converter, typename... Types>
SPROUT_DEPRECATED
inline SPROUT_CONSTEXPR sprout::array<T, sizeof...(Types)>
convert_array(Converter&& conv, Types&&... args) {
return sprout::make_array<T>(sprout::forward<Converter>(conv)(sprout::forward<Types>(args))...);

View file

@ -19,6 +19,7 @@
#define SPROUT_NO_CXX11_USER_DEFINED_LITERALS
#define SPROUT_NO_CXX11_DELEGATING_CONSTRUCTORS
#define SPROUT_NO_CXX11_UNICODE_LITERALS
#define SPROUT_NO_CXX11_ATTRIBUTES
#define SPROUT_NO_CXX14_CONSTEXPR
#define SPROUT_NO_CXX14_VARIABLE_TEMPLATES

View file

@ -44,6 +44,10 @@
# define SPROUT_NO_CXX11_UNICODE_LITERALS
#endif
#if !__has_feature(cxx_attributes)
# define SPROUT_NO_CXX11_ATTRIBUTES
#endif
#if !__has_feature(cxx_relaxed_constexpr)
# define SPROUT_NO_CXX14_CONSTEXPR
#endif

View file

@ -17,6 +17,7 @@
#define SPROUT_NO_CXX11_USER_DEFINED_LITERALS
#define SPROUT_NO_CXX11_DELEGATING_CONSTRUCTORS
#define SPROUT_NO_CXX11_UNICODE_LITERALS
#define SPROUT_NO_CXX11_ATTRIBUTES
#define SPROUT_NO_CXX14_CONSTEXPR
#define SPROUT_NO_CXX14_VARIABLE_TEMPLATES

View file

@ -17,6 +17,7 @@
#define SPROUT_NO_CXX11_USER_DEFINED_LITERALS
#define SPROUT_NO_CXX11_DELEGATING_CONSTRUCTORS
#define SPROUT_NO_CXX11_UNICODE_LITERALS
#define SPROUT_NO_CXX11_ATTRIBUTES
#define SPROUT_NO_CXX14_CONSTEXPR
#define SPROUT_NO_CXX14_VARIABLE_TEMPLATES

View file

@ -17,6 +17,7 @@
#define SPROUT_NO_CXX11_USER_DEFINED_LITERALS
#define SPROUT_NO_CXX11_DELEGATING_CONSTRUCTORS
#define SPROUT_NO_CXX11_UNICODE_LITERALS
#define SPROUT_NO_CXX11_ATTRIBUTES
#define SPROUT_NO_CXX14_CONSTEXPR
#define SPROUT_NO_CXX14_VARIABLE_TEMPLATES

View file

@ -44,6 +44,10 @@
# define SPROUT_NO_CXX11_UNICODE_LITERALS
#endif
#if ((__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)) && defined(__GXX_EXPERIMENTAL_CXX0X__))
# define SPROUT_NO_CXX11_ATTRIBUTES
#endif
#if ((__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) && defined(__GXX_EXPERIMENTAL_CXX0X__))
# define SPROUT_HAS_CONSTEXPR_CMATH_FUNCTION
#endif

View file

@ -17,6 +17,7 @@
#define SPROUT_NO_CXX11_USER_DEFINED_LITERALS
#define SPROUT_NO_CXX11_DELEGATING_CONSTRUCTORS
#define SPROUT_NO_CXX11_UNICODE_LITERALS
#define SPROUT_NO_CXX11_ATTRIBUTES
#define SPROUT_NO_CXX14_CONSTEXPR
#define SPROUT_NO_CXX14_VARIABLE_TEMPLATES

View file

@ -35,6 +35,9 @@
#ifndef SPROUT_NO_CXX11_UNICODE_LITERALS
# define SPROUT_HAS_UNICODE_LITERALS
#endif
#ifndef SPROUT_NO_CXX11_ATTRIBUTES
# define SPROUT_HAS_ATTRIBUTES
#endif
#ifndef SPROUT_NO_CXX14_VARIABLE_TEMPLATES
# define SPROUT_HAS_VARIABLE_TEMPLATES

View file

@ -17,6 +17,7 @@
#define SPROUT_NO_CXX11_USER_DEFINED_LITERALS
#define SPROUT_NO_CXX11_DELEGATING_CONSTRUCTORS
#define SPROUT_NO_CXX11_UNICODE_LITERALS
#define SPROUT_NO_CXX11_ATTRIBUTES
#define SPROUT_NO_CXX14_CONSTEXPR
#define SPROUT_NO_CXX14_VARIABLE_TEMPLATES

View file

@ -17,6 +17,7 @@
#define SPROUT_NO_CXX11_USER_DEFINED_LITERALS
#define SPROUT_NO_CXX11_DELEGATING_CONSTRUCTORS
#define SPROUT_NO_CXX11_UNICODE_LITERALS
#define SPROUT_NO_CXX11_ATTRIBUTES
#define SPROUT_NO_CXX14_CONSTEXPR
#define SPROUT_NO_CXX14_VARIABLE_TEMPLATES

View file

@ -35,6 +35,9 @@
#ifdef SPROUT_NO_CXX11_UNICODE_LITERALS
# define SPROUT_NO_UNICODE_LITERALS
#endif
#ifdef SPROUT_NO_CXX11_ATTRIBUTES
# define SPROUT_NO_ATTRIBUTES
#endif
#ifdef SPROUT_NO_CXX14_VARIABLE_TEMPLATES
# define SPROUT_NO_VARIABLE_TEMPLATES

View file

@ -18,6 +18,7 @@
# define SPROUT_NO_CXX11_USER_DEFINED_LITERALS
# define SPROUT_NO_CXX11_DELEGATING_CONSTRUCTORS
# define SPROUT_NO_CXX11_UNICODE_LITERALS
# define SPROUT_NO_CXX11_ATTRIBUTES
# define SPROUT_NO_CXX14_CONSTEXPR
# define SPROUT_NO_CXX14_VARIABLE_TEMPLATES

View file

@ -17,6 +17,7 @@
#define SPROUT_NO_CXX11_USER_DEFINED_LITERALS
#define SPROUT_NO_CXX11_DELEGATING_CONSTRUCTORS
#define SPROUT_NO_CXX11_UNICODE_LITERALS
#define SPROUT_NO_CXX11_ATTRIBUTES
#define SPROUT_NO_CXX14_CONSTEXPR
#define SPROUT_NO_CXX14_VARIABLE_TEMPLATES

View file

@ -17,6 +17,7 @@
#define SPROUT_NO_CXX11_USER_DEFINED_LITERALS
#define SPROUT_NO_CXX11_DELEGATING_CONSTRUCTORS
#define SPROUT_NO_CXX11_UNICODE_LITERALS
#define SPROUT_NO_CXX11_ATTRIBUTES
#define SPROUT_NO_CXX14_CONSTEXPR
#define SPROUT_NO_CXX14_VARIABLE_TEMPLATES

View file

@ -21,6 +21,7 @@
#define SPROUT_NO_CXX11_USER_DEFINED_LITERALS
#define SPROUT_NO_CXX11_DELEGATING_CONSTRUCTORS
#define SPROUT_NO_CXX11_UNICODE_LITERALS
#define SPROUT_NO_CXX11_ATTRIBUTES
#define SPROUT_NO_CXX14_CONSTEXPR
#define SPROUT_NO_CXX14_VARIABLE_TEMPLATES

View file

@ -19,6 +19,7 @@
#define SPROUT_NO_CXX11_USER_DEFINED_LITERALS
#define SPROUT_NO_CXX11_DELEGATING_CONSTRUCTORS
#define SPROUT_NO_CXX11_UNICODE_LITERALS
#define SPROUT_NO_CXX11_ATTRIBUTES
#define SPROUT_NO_CXX14_CONSTEXPR
#define SPROUT_NO_CXX14_VARIABLE_TEMPLATES

View file

@ -75,6 +75,17 @@
# define SPROUT_DELETED_FUNCTION_DECL ;
#endif // #ifndef SPROUT_CONFIG_DISABLE_DELETED_FUNCTIONS
//
// SPROUT_DEPRECATED
//
#if defined(__GNUC__) || defined(__clang__)
# define SPROUT_DEPRECATED __attribute__((deprecated))
#elif defined(_MSC_VER)
# define SPROUT_DEPRECATED) __declspec(deprecated)
#else
# define SPROUT_DEPRECATED
#endif
//
// SPROUT_USE_EXPLICIT_CONVERSION_OPERATORS
// SPROUT_EXPLICIT_CONVERSION

View file

@ -16,8 +16,10 @@
namespace sprout {
//
// to_string_array
// [[deprecated]]
//
template<typename T, typename... Types>
SPROUT_DEPRECATED
inline SPROUT_CONSTEXPR sprout::array<T, sizeof...(Types)>
to_string_array(Types&&... args) {
return sprout::convert_array<T>(sprout::to_string_value(), sprout::forward<Types>(args)...);

View file

@ -16,8 +16,9 @@
namespace sprout {
//
// to_string_value
// [[deprecated]]
//
struct to_string_value {
struct SPROUT_DEPRECATED to_string_value {
public:
template<typename T>
SPROUT_CONSTEXPR decltype(sprout::to_string(std::declval<T>()))