arduino / arduino/ArduinoCore-avr

Please support C++17 by default

Open
#435 21 comments 6 reactions 0 assignees View on GitHub
c++1x enhancement
Dominant language
C
Stars
1.5k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

My code contains variable templates that C++11 does not support. So each time I set up Arduino IDE for a new PC/user, I'll have to go to `%AppData%\Local\Arduino15\packages\arduino\hardware\avr\1.8.3\platform.txt` and set the `-std=gnu++17` compiler argument. Isn't C++17 fully compatible with C++11 code? Why is the old C++11 still the default?

### Additional context

#### Additional requests

- https://github.com/arduino/ArduinoCore-avr/issues/435#issuecomment-968286038
- https://github.com/arduino/ArduinoCore-avr/issues/435#issuecomment-1224883325
- https://github.com/arduino/ArduinoCore-avr/issues/435#issuecomment-1523202531

#### Related

- https://github.com/arduino/Arduino/pull/7090
- https://forum.arduino.cc/t/any-plans-to-integrate-the-new-avr-gcc-toolchain-created-by-microchip/1416997

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the AVR core's platform.txt at packages/arduino/hardware/avr/1.8.3 and review the related Arduino pull request #7090 and linked discussion. Determine whether making gnu++17 the default is compatible with existing C++11 AVR code and toolchains; done means the default no longer requires manual platform.txt edits without breaking existing builds.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
build-system, embedded-iot
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.