Skip to content

[C++] Enable MSVC's new preprocessor to handle C++20 grammar such as __VA_OPT__ #50978

Description

@HuaHuaY

Describe the enhancement requested

And we can try to remove the compile flag /wd5105.

Reference: #50252 (comment)

cc @raulcd

Component(s)

C++

Activity

  1. HuaHuaY commented on Aug 25, 2026

    @HuaHuaY
    ContributorAuthor

    I found that we can't do this because boost 1.88 can't be compiled with /Zc:preprocessor. Reference: boostorg/multiprecision#677, boostorg/multiprecision#667.

    We can fix this issue after we upgrade boost to 1.89.

  2. changed the title [-][C++] Enable MSVC's new preprocesser to handle C++20 grammar such as `__VA_OPT__`[/-] [+][C++] Enable MSVC's new preprocessor to handle C++20 grammar such as `__VA_OPT__`[/+] on Aug 25, 2026
  3. kou commented on Aug 25, 2026

    @kou
    Member

    How about specifying /Zc:preprocessor globally and specifying /Zc:preprocessor- (trailing - is important to disable this feature) only for compilation units that use boost/multiprecion when Boost_VERSION is less than 1.89?

  4. HuaHuaY commented on Aug 26, 2026

    @HuaHuaY
    ContributorAuthor

    How about specifying /Zc:preprocessor globally and specifying /Zc:preprocessor- (trailing - is important to disable this feature) only for compilation units that use boost/multiprecion when Boost_VERSION is less than 1.89?

    I can accept this approach. I will leave a TODO reminder that the latter flag can be fixed after upgrading to Boost 1.89. I will update the PR soon.

  5. added a commit that references this issue on Sep 8, 2026
  6. added a commit that references this issue on Sep 21, 2026
  7. added this to the 26.0.0 milestone on Sep 21, 2026
  8. kou commented on Sep 21, 2026

    @kou
    Member

    Issue resolved by pull request 50979
    #50979

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions