This file is part of the <ext/Preprocessor> library API, and can be directly included by user programs.
ext/ preprocessor/ tuple/ foreachi.bi | This file is part of the <ext/Preprocessor> library API, and can be directly included by user programs. |
License | Copyright © 2009, FreeBASIC Extended Library Development Group Copyright © 2002, Paul Mensonides |
Macros | |
fbextPP_TupleForEachI | repeatedly expands the user-defined macro m, passing it, in order, each element stored in the tuple tuple of size size along with the element’s position in the tuple. |
Copyright © 2009, FreeBASIC Extended Library Development Group Copyright © 2002, Paul Mensonides
Distributed under the Boost Software License, Version 1.0. See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
Distributed under the FreeBASIC Extended Library Group license. See accompanying file LICENSE.txt or copy at http://code.google.com- /p- /fb-extended-lib- /wiki- /License
# define fbextPP_TupleForEachI( size, tuple, m ) _fbextPP_TupleForEachI__##size (m, fbextPP_TupleRemParens(size, tuple))
repeatedly expands the user-defined macro m, passing it, in order, each element stored in the tuple tuple of size size along with the element’s position in the tuple.
For example, if size is `3`, tuple is `(a,b,c)` and m is the name of the macro,
# define M(n, elem) [elem##n]
then this macro expands to `[a0] [b1] [c2]`.
size | is the count of elements in the tuple. |
tuple | is the tuple which stores the element to retrieve. |
m | is the name of the user-defined macro to expand. |
repeatedly expands the user-defined macro m, passing it, in order, each element stored in the tuple tuple of size size along with the element’s position in the tuple.
# define fbextPP_TupleForEachI( size, tuple, m ) _fbextPP_TupleForEachI__##size (m, fbextPP_TupleRemParens(size, tuple))