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

disable using c++ 20 iota-view and always use boost #10432

Merged
merged 1 commit into from Jun 1, 2020

Conversation

tjhei
Copy link
Member

@tjhei tjhei commented May 31, 2020

gcc-10 does not contain the iterator typedef, which makes the usage
somewhat incompatible to what we want. For now, disable the c++20
support.

see #10426

gcc-10 does not contain the ``iterator`` typedef, which makes the usage
somewhat incompatible to what we want. For now, disable the c++20
support.

see dealii#10426
@tamiko
Copy link
Member

tamiko commented May 31, 2020

I agree that this should be the way forward for now. I had multiple compilation failures (not just step-69) with our use of std::iota_view in the library. On second inspection - I had only step-69 failing so far.

@tamiko
Copy link
Member

tamiko commented May 31, 2020

I think the main issue we faced is the fact that iota_view<...>::end() does return an object of type iota_view<...>::sentinel and not iota_view<...>::iterator.

@Rombur Rombur merged commit b78e7ea into dealii:master Jun 1, 2020
@masterleinad
Copy link
Member

masterleinad commented Jun 1, 2020

std::iota_view::iterator is exposition-only and private in a reference implementation, see https://github.com/cplusplus/draft/releases/download/n4861/n4861.pdf [[range.iota.overview]]. I don't think it was necessary to disable it here, it will just not change in the future.

@bangerth
Copy link
Member

bangerth commented Jun 1, 2020

We can revisit the whole issue in a couple of years when there are good C++20 implementations around.

@bangerth
Copy link
Member

bangerth commented Jun 1, 2020

That said, do we ever use the iterator type? I thought #10426 explicitly got rid of it.

@masterleinad
Copy link
Member

That said, do we ever use the iterator type? I thought #10426 explicitly got rid of it.

Correct, that was the only thing not working with gcc-10 (which makes sense if I read the standard correctly). If we really want this class to be forward-compatible, I would prefer to actually try to use std::ranges::iota_view if we can.

@bangerth
Copy link
Member

bangerth commented Jun 1, 2020

And we were -- it worked, with the exception of that one place which you fixed :-)

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.

None yet

5 participants