Skip to content

Commit

Permalink
Add #undef PI
Browse files Browse the repository at this point in the history
Some other libraries define PI, which creates a conflict. This will implicitly resolve this problem. (It can be resolved explicitly, by adding this line of code before include, but that's extremely annoying)
  • Loading branch information
codereptile authored and nholthaus committed Dec 9, 2024
1 parent d607c07 commit baeecac
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions include/units.h
Original file line number Diff line number Diff line change
Expand Up @@ -4168,6 +4168,7 @@ namespace units
* @anchor constantContainers
* @{
*/
#undef PI
using PI = unit<std::ratio<1>, dimensionless::scalar, std::ratio<1>>;

static constexpr const unit_t<PI> pi(1); ///< Ratio of a circle's circumference to its diameter.
Expand Down

0 comments on commit baeecac

Please sign in to comment.