add SPROUT_AUTO_FORWARD

This commit is contained in:
bolero-MURAKAMI 2014-07-07 18:20:18 +09:00
parent 71144902ff
commit f4d715c6db

View file

@ -29,11 +29,16 @@ namespace sprout {
// SPROUT_FORWARD // SPROUT_FORWARD
// //
#if defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC) #if defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC)
# define SPROUT_FORWARD(TYPE, VALUE) \ # define SPROUT_FORWARD(TYPE, VAR) \
static_cast<decltype(::sprout::forward<TYPE>(VALUE))>(VALUE) static_cast<decltype(::sprout::forward<TYPE>(VAR))>(VAR)
#else #else
# define SPROUT_FORWARD(TYPE, VALUE) \ # define SPROUT_FORWARD(TYPE, VAR) \
::sprout::forward<TYPE>(VALUE) ::sprout::forward<TYPE>(VAR)
#endif #endif
//
// SPROUT_AUTO_FORWARD
//
#define SPROUT_AUTO_FORWARD(VAR) SPROUT_FORWARD(decltype(VAR), VAR)
#endif // #ifndef SPROUT_UTILITY_FORWARD_HPP #endif // #ifndef SPROUT_UTILITY_FORWARD_HPP