Skip to content

Commit

Permalink
馃洜 __VA_ARGS__ is fine!!
Browse files Browse the repository at this point in the history
  • Loading branch information
ThePhD committed Jul 1, 2021
1 parent 97ed9af commit 3217fc2
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions include/ztd/text/detail/prologue.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,15 @@

#define ZTD_TEXT_DETAIL_PROLOGUE_I_ 1

#include <type_traits>

#define _FWD(...) static_cast<decltype( __VA_OPT__(,) )&&>( __VA_OPT__(,) )
#define _FWD(...) static_cast<decltype( __VA_ARGS__ )&&>( __VA_ARGS__ )

#if ZTD_TEXT_IS_ON(ZTD_TEXT_COMPILER_GCC_I_)
#define _MOVE(...) static_cast<__typeof( __VA_OPT__(,) )&&>( __VA_OPT__(,) )
#define _MOVE(...) static_cast<__typeof( __VA_ARGS__ )&&>( __VA_ARGS__ )
#else
#define _MOVE(...) static_cast<::std::remove_reference_t<( __VA_OPT__(,) )>&&>( __VA_OPT__(,) )
#include <type_traits>

#define _MOVE(...) static_cast<::std::remove_reference_t<( __VA_ARGS__ )>&&>( __VA_OPT__(,) )
#endif

// clang-format on

0 comments on commit 3217fc2

Please sign in to comment.