Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions include/boost/math/constants/constants.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,17 @@ namespace boost{ namespace math
#endif

} // namespace constants

namespace numbers {
#if __cplusplus > 201400L || _MSVC_LANG > 201400L

template<typename T, typename std::enable_if<std::is_trivially_constructible<T>::value, bool>::type = true>
BOOST_INLINE_VARIABLE constexpr T pi_v = boost::math::constants::pi<T>();

BOOST_INLINE_VARIABLE constexpr double pi = pi_v<double>;

#endif
} // namespace numbers
} // namespace math
} // namespace boost

Expand Down
Loading