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

Open Beginner friendly
#709 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

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.

Description

enhancement

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

Dominant language
No language data
Stars
173
Forks
704
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

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 arduino/reference-en

All issues in arduino/reference-en

Similar issues

More Documentation issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.