From f4d715c6dbdaa29ede1161f2e0ec4a1c17223101 Mon Sep 17 00:00:00 2001 From: bolero-MURAKAMI Date: Mon, 7 Jul 2014 18:20:18 +0900 Subject: [PATCH] add SPROUT_AUTO_FORWARD --- sprout/utility/forward.hpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/sprout/utility/forward.hpp b/sprout/utility/forward.hpp index be6c90a4..30376c79 100644 --- a/sprout/utility/forward.hpp +++ b/sprout/utility/forward.hpp @@ -29,11 +29,16 @@ namespace sprout { // SPROUT_FORWARD // #if defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC) -# define SPROUT_FORWARD(TYPE, VALUE) \ - static_cast(VALUE))>(VALUE) +# define SPROUT_FORWARD(TYPE, VAR) \ + static_cast(VAR))>(VAR) #else -# define SPROUT_FORWARD(TYPE, VALUE) \ - ::sprout::forward(VALUE) +# define SPROUT_FORWARD(TYPE, VAR) \ + ::sprout::forward(VAR) #endif +// +// SPROUT_AUTO_FORWARD +// +#define SPROUT_AUTO_FORWARD(VAR) SPROUT_FORWARD(decltype(VAR), VAR) + #endif // #ifndef SPROUT_UTILITY_FORWARD_HPP