mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2024-12-25 21:35:41 +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
|
// 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
|
||||||
|
|
Loading…
Reference in a new issue