Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build on platforms with "double-double" long double type #659

Merged
merged 1 commit into from
Jul 13, 2021

Conversation

mscastanho
Copy link
Contributor

Since commit 01f3b7d most tests started to fail on platforms that use a
"double-double" for long double, like powerpc64le:

../../../boost/math/tools/precision.hpp:148:137: error: expected primary-expression before ‘long’
  148 | inline constexpr long double epsilon<long double>(const std::true_type&
  BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(long double)) noexcept(long double)

../../../boost/math/tools/precision.hpp:148:137: error: expected ‘)’ before ‘long’
  148 | inline constexpr long double epsilon<long double>(const std::true_type&
  BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(long double)) noexcept(long double)

../../../boost/math/tools/precision.hpp:148:137: error: expected initializer before ‘long’
  148 | inline constexpr long double epsilon<long double>(const std::true_type&
  BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(long double)) noexcept(long double)

Fix this by replacing the noexcept expression with the contents of
BOOST_MATH_NOEXCEPT, which was the intention of commit 01f3b7d.

Since commit 01f3b7d most tests started to fail on platforms that use a
"double-double" for long double, like powerpc64le:

../../../boost/math/tools/precision.hpp:148:137: error: expected primary-expression before ‘long’
  148 | inline constexpr long double epsilon<long double>(const std::true_type&
  BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(long double)) noexcept(long double)

../../../boost/math/tools/precision.hpp:148:137: error: expected ‘)’ before ‘long’
  148 | inline constexpr long double epsilon<long double>(const std::true_type&
  BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(long double)) noexcept(long double)

../../../boost/math/tools/precision.hpp:148:137: error: expected initializer before ‘long’
  148 | inline constexpr long double epsilon<long double>(const std::true_type&
  BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(long double)) noexcept(long double)

Fix this by replacing the noexcept expression with the contents of
BOOST_MATH_NOEXCEPT, which was the intention of commit 01f3b7d.
Copy link
Member

@mborland mborland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jzmaddock This change looks good to me; fixes an error that I introduced.

@ckormanyos
Copy link
Member

Hi @mscastanho this is nice. Thanks for investigating this phenomenon.

@mborland and @jzmaddock I took the liberty of approving the CI run.

@ckormanyos
Copy link
Member

Added note. We are still a long ways away, but work to implement double-double BSL backend is underway in the 2021 GSoC here

@mborland
Copy link
Member

This looks good to go. Should probably make it into #661.

@jzmaddock
Copy link
Collaborator

Being somewhat pedantic: std::is_floating_point<long double>::value is necessarily always true. Merging anyhow.

@jzmaddock jzmaddock merged commit 08e40b8 into boostorg:develop Jul 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants