arduino / arduino/reference-en

`constexpr` should be mentioned and discussed on the `const` page

Open Beginner friendly
#709 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
No language data
Stars
173
Forks
704
PR merge metrics
No merged PRs in 30d

Description

`constexpr` is preferred over `const` for C++ compile-time constants, and should be mentioned and discussed here:

https://www.arduino.cc/reference/en/language/variables/variable-scope--qualifiers/const/

Here's some of the differences to be aware of:
https://stackoverflow.com/questions/13346879/const-vs-constexpr-on-variables/13347355#13347355

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the Arduino Reference const page linked in the issue, then read the linked comparison of const and constexpr. Update that page to mention and discuss constexpr for C++ compile-time constants, with the relevant differences covered; completion is a clear, published documentation change on that page.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
62/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.