Result of `BOOST_PP_ARRAY_ELEM` can't be included in vs2017 using `/experimental:preprocessor` option
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
Research direction
Reproduce the shown macro example with VS2017 and /experimental:preprocessor, then inspect <boost/preprocessor/iteration/detail/iter/forward1.hpp> and its use from <boost/function.hpp>. Done means the affected include directives compile under VS2017 while preserving the existing behavior on VS2019.
Written by the indexing model from the issue text.
Description
The following code does not compile under VS2017 using /experimental:preprocessor option:
#include <iostream>
#include <boost/preprocessor.hpp>
#define FOO (1,(<type_traits>))
#define BAR BOOST_PP_ARRAY_ELEM(0, FOO)
#define HOGE_1(x) x
#define HOGE_2(x) HOGE_1(x)
#define HOGE() HOGE_2(BAR)
#define PUYO_1(x) #x
#define PUYO_2(x) PUYO_1(x)
#define PUYO() PUYO_2(BAR)
#include BAR //C2006
#include HOGE() //C2006
int main(){
std::cout << PUYO() << std::endl;
return 0;
}
Both #include BAR and #include HOGE() directives result in C2006 error, yet, PUYO macro could successfully get the string literal formed by BAR.
Switching to vs2019 eliminates this issue.
This issue breaks the usage of <boost/preprocessor/iteration/detail/iter/forward1.hpp> in `<boost/function.hpp>
- Dominant language
- C++
- Stars
- 118
- Forks
- 76
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from boostorg/preprocessor
-
Difficulty 5/5 Over a week Newbie friendliness 38/100
boostorg/preprocessor#65 · 5 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 42/100
boostorg/preprocessor#63 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 58/100
boostorg/preprocessor#58 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
boostorg/preprocessor#55 ·
-
Documentation format Open
Difficulty 5/5 Over a week Newbie friendliness 25/100
boostorg/preprocessor#52 ·
All issues in boostorg/preprocessor
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
games-on-whales/wolf#509 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
bug-unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
NVIDIA/cuda-samples#453 ·