Skip to content

Commit 94990bf

Browse files
committedMay 30, 2024
Updates from pull request #4
1 parent a6afcac commit 94990bf

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed
 

‎headers/02-constexpr.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
#include <cmath>
55
using namespace std;
66

7+
// Note: currently, not all compilers mark `acos` as a
8+
// constexpr function in cmath. The following line might
9+
// not compile with `clang++` for example.
710
constexpr double PI1 = acos(-1.0);
811
constexpr double PI2 = 22.0 / 7.0;
912

‎modules/02-constexpr.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
import std;
44
using namespace std;
55

6+
// Note: currently, not all compilers mark `acos` as a
7+
// constexpr function in cmath. The following line might
8+
// not compile with `clang++` for example.
69
constexpr double PI1 = acos(-1.0);
710
constexpr double PI2 = 22.0 / 7.0;
811

0 commit comments

Comments
 (0)
Please sign in to comment.