Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

msvc: BOOST_PP_VARIADIC_SIZE broken for size larger than 64 #42

Open
timblechmann opened this issue Jan 6, 2022 · 0 comments
Open

msvc: BOOST_PP_VARIADIC_SIZE broken for size larger than 64 #42

timblechmann opened this issue Jan 6, 2022 · 0 comments

Comments

@timblechmann
Copy link

#define BOOST_PP_LIMIT_VARIADIC 256

#include <boost/preprocessor/variadic/size.hpp>

#include <cstddef>

#define VAR_DATA a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, b, b, b, b, b

constexpr size_t sz = BOOST_PP_VARIADIC_SIZE(VAR_DATA);

static_assert(sz == 65);

gives:


<source>(9): error C2065: 'b': undeclared identifier
<source>(9): error C2131: expression did not evaluate to a constant
<source>(9): note: a non-constant (sub-)expression was encountered
<source>(11): error C2131: expression did not evaluate to a constant
<source>(9): note: a non-constant (sub-)expression was encountered

compare: https://godbolt.org/z/bfoETMnad

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant