mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2024-12-23 21:25:49 +00:00
add SPROUT_AUTO_FORWARD
This commit is contained in:
parent
71144902ff
commit
f4d715c6db
1 changed files with 9 additions and 4 deletions
|
@ -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<decltype(::sprout::forward<TYPE>(VALUE))>(VALUE)
|
||||
# define SPROUT_FORWARD(TYPE, VAR) \
|
||||
static_cast<decltype(::sprout::forward<TYPE>(VAR))>(VAR)
|
||||
#else
|
||||
# define SPROUT_FORWARD(TYPE, VALUE) \
|
||||
::sprout::forward<TYPE>(VALUE)
|
||||
# define SPROUT_FORWARD(TYPE, VAR) \
|
||||
::sprout::forward<TYPE>(VAR)
|
||||
#endif
|
||||
|
||||
//
|
||||
// SPROUT_AUTO_FORWARD
|
||||
//
|
||||
#define SPROUT_AUTO_FORWARD(VAR) SPROUT_FORWARD(decltype(VAR), VAR)
|
||||
|
||||
#endif // #ifndef SPROUT_UTILITY_FORWARD_HPP
|
||||
|
|
Loading…
Reference in a new issue