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

Support C++17 code in packages #25255

Closed
rwst opened this issue Apr 27, 2018 · 9 comments
Closed

Support C++17 code in packages #25255

rwst opened this issue Apr 27, 2018 · 9 comments

Comments

@rwst
Copy link

rwst commented Apr 27, 2018

This is at the moment a ticket for a nonexisting defect, as no standard package uses C++17 code at the moment.

The compiler situation is that C++17 is fully supported by clang++-4 --std=c++17 and g++-7 --std=c++17. So, compiler-wise Sage could support it without raising requirements (currently at g++-4.8) by building g++ if system has g++<7. But for full support libstdc++-gcc7 or libc++-4 is needed too, so g++-7 would be the system requirement.

How much is gcc-7 already in the wild?

Another issue is that with g++-5 I think and clang++-4 the register keyword became deprecated and will be removed with C++17 where it will cause a compiler error. This affects at least Singular and Giac.

Component: build

Issue created by migration from https://trac.sagemath.org/ticket/25255

@rwst

This comment has been minimized.

@rwst

This comment has been minimized.

@jdemeyer
Copy link

comment:3

What is this ticket about? The description reads more like a comment than an actual issue to be solved. If the ticket cannot be made more concrete, I suggest closing it. We can always open a ticket whenever a real problem occurs.

@rwst
Copy link
Author

rwst commented Apr 28, 2018

comment:4

I have an implementation of commutative matching (needed to fix #25168) in the works that depends on std::optional. This ticket is useful to define the amount of changes needed for it, and for reference. Even if we won't fix #25168 in the near future I'm playing with a project that needs the matching algorithm too, and which I'll release in an experimental branch.

@rwst
Copy link
Author

rwst commented Apr 28, 2018

comment:5

Note also that #25168 is more an enhancement as the old behaviour will stay for backward compatibility (in principle it's good to have many different types of matching algorithms).

@rwst
Copy link
Author

rwst commented Apr 28, 2018

comment:6

Actually, even Python2.7 (not 3.4) has register in its headers (unicodeobject.h and stringobject.h), and so C++17 code must not include Python.h. Interesting, I opened pynac/pynac#325

@jdemeyer
Copy link

comment:7

A Trac ticket is about a concrete issue to be fixed. The stuff you are talking about fits more on a mailing list, wiki or something like that.

@rwst
Copy link
Author

rwst commented May 5, 2018

comment:8

I agree. I just replaced std::optional usage with that of https://github.com/martinmoene/optional-lite and no longer have a need for C++17.

@videlec
Copy link
Contributor

videlec commented May 18, 2018

comment:10

closing positively reviewed duplicates

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

No branches or pull requests

3 participants