boostorg / boostorg/preprocessor

msvc: `BOOST_PP_VARIADIC_SIZE` broken for size larger than 64

Open
#42 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
118
Forks
76
PR merge metrics
No merged PRs in 30d

Description

```
#define BOOST_PP_LIMIT_VARIADIC 256

#include

#include

#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:
```

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

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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.