Additional macros (#3106)

This commit is contained in:
Lukasz Czajczyk 2021-02-20 13:19:06 +01:00 committed by GitHub
parent 4b01d5bdc6
commit 0a06a083af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 0 deletions

View File

@ -13,6 +13,7 @@
<define name="BOOST_TYPEOF_REGISTER_TEMPLATE(x, params)" value=""/>
<define name="BOOST_PP_LIST_FOR_EACH(macro, data, list)" value=""/>
<define name="BOOST_PP_CAT(a, b)" value=""/>
<define name="BOOST_PP_REPEAT(a,b,c)" value=""/>
<!-- https://www.boost.org/doc/libs/master/doc/html/foreach.html -->
<define name="BOOST_FOREACH(A,B)" value="for (A: B)"/>
<!-- https://www.boost.org/doc/libs/master/libs/config/doc/html/boost_config/boost_macro_reference.html -->
@ -63,6 +64,8 @@
<define name="BOOST_AUTO_TEST_CASE(...)" value="void BOOST_AUTO_TEST_CASE_run(__VA_ARGS__)"/>
<define name="BOOST_FIXTURE_TEST_CASE(...)" value="void BOOST_FIXTURE_TEST_CASE_run(__VA_ARGS__)"/>
<define name="BOOST_PYTHON_MODULE(str)" value="void BOOST_PYTHON_MODULE_definition(str)"/>
<define name="BOOST_SCOPED_ENUM_DECLARE_BEGIN(x)" value=""/>
<define name="BOOST_SCOPED_ENUM_DECLARE_END(x)" value=""/>
<!-- ########## Boost containers ########## -->
<!-- boost containers that are similar to std containers -->
<container id="boostArray" startPattern="boost :: array|scoped_array &lt;" inherits="stdArray"/>

View File

@ -81,3 +81,15 @@ void throwexception2(int * buf)
BOOST_THROW_EXCEPTION(std::bad_alloc());
*buf = 0;
}
void macros()
{
#define DECL(z, n, text) text ## n = n;
BOOST_PP_REPEAT(5, DECL, int x)
BOOST_SCOPED_ENUM_DECLARE_BEGIN(future_errc)
{
no_state
}
BOOST_SCOPED_ENUM_DECLARE_END(future_errc)
}