Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Error C2467 when "Disable Language Extensions" is set to "Yes (/Za)" in MSVC 16.8

Open
#84 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
cpp

Research direction

Start with boost/winapi/basic_types.hpp at line 255 and reproduce the error by including <boost/chrono.hpp> in a Win32 project using Visual Studio 2019 v16.8 with Disable Language Extensions set to Yes (/Za). Verify the result against the reported C2467 error; done means the project no longer reports that error under the stated settings.

Written by the indexing model from the issue text.

Description

Visual Studio 2019 v16.8 reports the following error on this line if you include <boost/chrono.hpp> in a Win32 project:

boost-1.74\boost\winapi\basic_types.hpp(255,6): error C2467: illegal declaration of anonymous 'struct'

https://github.com/boostorg/winapi/blob/37607cc3d3ea5145381f65b6fe51eac8bb8f361f/include/boost/winapi/basic_types.hpp#L255

For this .vcxproj, I do have "Disable Language Extensions" set to "Yes (/Za)", which seems to be triggering this issue.
Also: "C++ Language Standard" is set to "Default (ISO C++14 Standard)"
"C Language Standard" is set to "Default (Legacy MSVC)"

Dominant language
C++
Stars
73
Forks
62
PR merge metrics
No merged PRs in 30d

Getting set up

We have not checked this project's setup files yet. Start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from boostorg/winapi

All issues in boostorg/winapi

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.