Replace `M_PI` by `std::numbers::pi`

Open
#441 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
45/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp
Domain
compilers

Research direction

Start by locating the memcheck and polymorphism exercises and checking where they use M_PI, then inspect how those exercises select the C++ standard. Confirm the project's decision on moving them from C++17 to C++20; done means the exercises use std::numbers::pi and build successfully with the chosen standard.

Written by the indexing model from the issue text.

Description

stale

The exercises memcheck and polymorphism use the non-standard M_PI constant, which unfortunately for MSVC requires extra setup. If we would use std::numbers::pi instead from C++20, this special handling would not be necessary. However, it would move the exercises from C++17 to C++20. Would this be fine?

Dominant language
TeX
Stars
313
Forks
104
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 hsf-training/cpluspluscourse

All issues in hsf-training/cpluspluscourse

Similar issues

More Compilers issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.