AcademySoftwareFoundation / AcademySoftwareFoundation/aswf-docker

g++ 14 defaults to C++ 17

Open
#378 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
189
Forks
42
Avg merge
9h 38m
Merged PRs (30d)
6

Description

In 2026 images:

```
[root@ac15caa7e119 aswf]# echo | g++ -dM -E -x c++ - | grep __cplusplus
#define __cplusplus 201703L
[root@ac15caa7e119 aswf]# echo | g++ -dM -E -x c++ -std=c++20 - | grep __cplusplus
#define __cplusplus 202002L
[root@ac15caa7e119 aswf]# g++ --version
g++ (GCC) 14.2.1 20250110 (Red Hat 14.2.1-11)
```

This is not a problem for Conan builds which set the C++ standard version, but for projects building outside of Conan, they could end up building in C++ 17 mode even in a 2026 container which is supposed to mandate C++ 20.

There doesn't seem to be a simple configuration file / environment variable to set the default C++ mode for g++, perhaps a wrapper around the binary would be needed?

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the reported commands with g++ in the 2026 images and confirm the default __cplusplus value. Then inspect the image build configuration for how the compiler is exposed to projects outside Conan. Done means a supported image configuration makes the default C++ mode C++20, with the behavior verified in the affected images.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, docker
Domain
build-system, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.