Advertisement
Guest User

Untitled

a guest
Nov 25th, 2012
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.84 KB | None | 0 0
  1. #pragma once
  2. #include <progrock/cppx/macro/nargs.h>          // CPPX_NARGS, CPPX_CONCAT
  3. #include <progrock/cppx/macro/invoke.h>         // CPPX_INVOKE
  4.  
  5. #define CPPX_IS_UNUSED_( name ) \
  6.     (void) name; struct name
  7.  
  8. #define CPPX_IS_UNUSED_1( a ) \
  9.     CPPX_IS_UNUSED_( a )
  10.  
  11. #define CPPX_IS_UNUSED_2( a, b ) \
  12.     CPPX_IS_UNUSED_1( a ); CPPX_IS_UNUSED_( b )
  13.  
  14. #define CPPX_IS_UNUSED_3( a, b, c ) \
  15.     CPPX_IS_UNUSED_2( a, b ); CPPX_IS_UNUSED_( c )
  16.  
  17. #define CPPX_IS_UNUSED_4( a, b, c, d ) \
  18.     CPPX_IS_UNUSED_3( a, b, c ); CPPX_IS_UNUSED_( d )
  19.  
  20. #define CPPX_IS_UNUSED_5( a, b, c, d, e ) \
  21.     CPPX_IS_UNUSED_4( a, b, c, d ); CPPX_IS_UNUSED_( e )
  22.  
  23. #define CPPX_IS_UNUSED( ... )      \
  24.     CPPX_INVOKE( CPPX_CONCAT( CPPX_IS_UNUSED_, CPPX_NARGS( __VA_ARGS__ ) ), ( __VA_ARGS__ ) )
  25.  
  26. #define CPPX_IS_INTENTIONALLY_UNUSED    CPPX_IS_UNUSED
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement