Merge pull request #73 from arunksaha/constexpr

static constant floating point use constexpr
This commit is contained in:
Jason Turner
2017-06-22 13:49:47 -06:00
committed by GitHub

View File

@@ -16,7 +16,7 @@ namespace my_project {
// if the above macro would be expanded, then the following line would be:
// static const double 3.14159 = 3.14159;
// which leads to a compile-time error. Sometimes such errors are hard to understand.
static const double PI = 3.14159;
static constexpr double PI = 3.14159;
};
}
```