Skip to content

Commit 67118bc

Browse files
Merge pull request #343 from SpM-lab/terasaki/pi
Define `M_PI` as necessary
2 parents aaa56c6 + 8ceaf3b commit 67118bc

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

include/sparseir/freq.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include <stdexcept>
88
#include <type_traits>
99

10+
#include "sparseir/sparseir-fwd.hpp"
1011
#include "sparseir/utils.hpp"
1112

1213
namespace sparseir {

include/sparseir/sparseir-fwd.hpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
#pragma once
22
#include "version.h"
33

4+
45
namespace sparseir {
56

7+
// Some compiler for windows does not support M_PI
8+
// https://learn.microsoft.com/en-us/cpp/c-runtime-library/math-constants?view=msvc-170&redirectedfrom=MSDN
9+
#ifndef M_PI
10+
#define M_PI 3.14159265358979323846
11+
#endif
12+
613
// Forward defitions
714
// class PowerOfTwo;
815
// class ExDouble;

include/sparseir/version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#define SPARSEIR_VERSION_MAJOR 0
22
#define SPARSEIR_VERSION_MINOR 3
3-
#define SPARSEIR_VERSION_PATCH 1
3+
#define SPARSEIR_VERSION_PATCH 2

0 commit comments

Comments
 (0)