Closed vil02 closed 8 months ago
Hi.
You are right, but Jule also supports C++14 standard. This changes still implements inline
for C++14 standard?
We can create preprocessor define for C++14 standard. If C++14 standard is used, this define represents inline
, if not, represents nothing. So we can have inline
for C++14 standard compilations.
Also, I think we can continue to use inline constexpr
instead of constexpr
if there is no problem (such as compiler errors or etc.) about it.
Thanks for your effort.
This has nothing to do with the version of C++: constexpr
function is inline
in C++11, C++14, C++17 etc. (constexpr
was introduced in C++11).
Right but reference says: constexpr
implies inline
for functions since C++17.
So constexpr
not implies inline
in C++14, by reference.
No.
Please have a look at the cpp reference. There are two statements here:
Oh, yes. Sorry.
I just missed separated part for static
members.
I'll merge your PR. Thanks for your contribution.
No worries. The formatting there is tricky.
Thanks!
Description
While browsing though the C++ code I have noticed that many functions have
inline constexpr
specifiers. According to C++ reference forconstexpr
: A constexpr specifier used in a function or static data member(since C++17) declaration implies inline.Build and tests pass on my end.
Checklist
Screenshots (if any)
Note to reviewers
Make all
inline constexpr
functionsconstexpr
.