VirtualBox

Changeset 36767 in vbox


Ignore:
Timestamp:
Apr 20, 2011 5:11:29 PM (14 years ago)
Author:
vboxsync
Message:

iprt/cdefs.h: Added RT_CONCAT, RT_CONCAT3 and RT_CONCAT4 for use with preprocessor based code templates.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/cdefs.h

    r36555 r36767  
    10211021 * @param   str     Argument to expand and stringy. */
    10221022#define RT_XSTR(str)            RT_STR(str)
     1023
     1024/** @def RT_CONCAT
     1025 * Concatenate the expanded arguments without any extra spaces in between.
     1026 *
     1027 * @param   a       The first part.
     1028 * @param   b       The second part.
     1029 */
     1030#define RT_CONCAT(a,b)              RT_CONCAT_HLP(a,b)
     1031/** RT_CONCAT helper, don't use.  */
     1032#define RT_CONCAT_HLP(a,b)          a##b
     1033
     1034/** @def RT_CONCAT
     1035 * Concatenate the expanded arguments without any extra spaces in between.
     1036 *
     1037 * @param   a       The 1st part.
     1038 * @param   b       The 2nd part.
     1039 * @param   c       The 3rd part.
     1040 */
     1041#define RT_CONCAT3(a,b,c)           RT_CONCAT3_HLP(a,b,c)
     1042/** RT_CONCAT3 helper, don't use.  */
     1043#define RT_CONCAT3_HLP(a,b,c)       a##b##c
     1044
     1045/** @def RT_CONCAT
     1046 * Concatenate the expanded arguments without any extra spaces in between.
     1047 *
     1048 * @param   a       The 1st part.
     1049 * @param   b       The 2nd part.
     1050 * @param   c       The 3rd part.
     1051 */
     1052#define RT_CONCAT4(a,b,c,d)         RT_CONCAT4_HLP(a,b,c,d)
     1053/** RT_CONCAT4 helper, don't use.  */
     1054#define RT_CONCAT4_HLP(a,b,c,d)     a##b##c##d
    10231055
    10241056
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette