Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma once
- #include <progrock/cppx/macro/nargs.h> // CPPX_NARGS, CPPX_CONCAT
- #include <progrock/cppx/macro/invoke.h> // CPPX_INVOKE
- #define CPPX_IS_UNUSED_( name ) \
- (void) name; struct name
- #define CPPX_IS_UNUSED_1( a ) \
- CPPX_IS_UNUSED_( a )
- #define CPPX_IS_UNUSED_2( a, b ) \
- CPPX_IS_UNUSED_1( a ); CPPX_IS_UNUSED_( b )
- #define CPPX_IS_UNUSED_3( a, b, c ) \
- CPPX_IS_UNUSED_2( a, b ); CPPX_IS_UNUSED_( c )
- #define CPPX_IS_UNUSED_4( a, b, c, d ) \
- CPPX_IS_UNUSED_3( a, b, c ); CPPX_IS_UNUSED_( d )
- #define CPPX_IS_UNUSED_5( a, b, c, d, e ) \
- CPPX_IS_UNUSED_4( a, b, c, d ); CPPX_IS_UNUSED_( e )
- #define CPPX_IS_UNUSED( ... ) \
- CPPX_INVOKE( CPPX_CONCAT( CPPX_IS_UNUSED_, CPPX_NARGS( __VA_ARGS__ ) ), ( __VA_ARGS__ ) )
- #define CPPX_IS_INTENTIONALLY_UNUSED CPPX_IS_UNUSED
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement