Skip to content

Conversation

@awulkiew
Copy link
Member

This PR adds fixes/workarounds for two problems that cause compilation failures with clang 3.5-3.9:

  1. 3.5 - Class template partial specialization cannot be deduced for boost::variant and parameter pack. The solution to that is to use BOOST_VARIANT_ENUM_PARAMS in specializations. The list of types can be analyzed with variadic templates afterwards.
  2. 3.5-3.9 - The instantiation of std::is_constructible for 2d model::point and 3 parameters causes the compilation error related to the initialization of 2-element array with too many elements. The solution to that is to enable the constructor only if the number of arguments is lesser or equal to Dimension.

See the regression matrix for details.

Note that the error 2 was caused partially by this change to cross_product: #745
in particular by specific std::is_constructible checks for 3 parameters. I think they are incorrect themselves and should be changed. There is a PR for that already: #747

…riant.

Use BOOST_VARIANT_ENUM_PARAMS instead which expands to parameter pack if
C++14 is fully supported.

This is a workaround for compilation errors with clang-3.5. Lists of
template arguments are still processed with variadic templates.
This allows to check if a constructor is implemented with
std::is_constructible without compilation errors with clang-3.5-3.9.
@awulkiew awulkiew added this to the 1.75 milestone Nov 24, 2020
@awulkiew awulkiew changed the title Workarounds for clang 3.5-3.9 Fixes/workarounds for clang 3.5-3.9 Nov 24, 2020
Copy link
Member

@vissarion vissarion left a comment

Choose a reason for hiding this comment

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

Looks OK to me.

@awulkiew awulkiew merged commit 20ce3d5 into boostorg:develop Nov 25, 2020
@barendgehrels
Copy link
Collaborator

Looks OK to me.

Looks OK to me as well - pity that it's necessary, but fine.

@awulkiew
Copy link
Member Author

@barendgehrels Thanks! It isn't entirely necessary but it's an easy fix and allows to compile BG with more compilers.
What do you think about this related fix: #747 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants