file
ArgLists.hArgLists provides metaprogramming macros for working with VA_ARGS lists.
MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Defines
- #define PP_REVERSE_SEQUENCE_N()
- Creates a comma separated reverse sequence from 127 to 0.
- #define ___PP_NUM_ARGS(...)
- Returns the number of arguments passed in the parameter pack.
- #define PP_NUM_ARGS(...)
- Returns the number of arguments passed in the
__VA_ARGS__
parameter pack. - #define PP_NTH_ARG(N, ...)
- Returns the Nth argument from the
__VA_ARGS__
parameter pack. - #define APPEND_TO_LIST(what, ...)
- Appends a space followed by
what
to each element of the__VA_ARGS__
parameter pack. - #define DELIMIT_LIST(what, ...)
- Applies a different delimiter to the list elements of the
__VA_ARGS__
parameter pack. - #define APPLY_TO_LIST(what, ...)
- Calls
what
on the arguments in the parameter pack. - #define APPEND_EACH_TO_LIST(what, ...)
- Appends the Nth element in
what
to the Nth element in the__VA_ARGS__
parameter pack. - #define SELECTOR_LIST(N)
- Returns a numeric token (number prefixed by underscore, eg
_1
) representing the given number. - #define EMPTY(...)
- Converts any list of arguments into an empty list.
- #define DEFER(...)
- Defers the preprocessing of the list of arguments one step.
- #define EXPAND(...)
- Expands the list of arguments.
- #define COMMA(...)
- Converts the list of arguments into a single comma.
- #define CONTAINS_COMMA(...)
- Determines if the list of arguments contains a comma (contains more than one element)
- #define X_AS_COMMA(_head, x, ...)
- Determines if the list of arguments contains a comma (contains more than one element)
- #define CONTAINS_COMMA_RESULT(x, _, result, ...)
- Determines if the list of arguments contains a comma (contains more than one element)
- #define FIRST(...)
- Returns the first element from the list.
- #define FIRST_IMPL(first, ...)
- Returns the first element from the list.
- #define SECOND(...)
- Returns the second element from the list.
- #define SECOND_IMPL(first, second, ...)
- Returns the second element from the list.
- #define REMOVE_FIRST(...)
- Removes the first element from the list, and returns the remaining elements.
- #define REMOVE_FIRST_IMPL(first, ...)
- Removes the first element from the list, and returns the remaining elements.