Opened 3 years ago
Closed 3 years ago
#25255 closed enhancement (wontfix)
Support C++17 code in packages
Reported by: | rws | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-duplicate/invalid/wontfix |
Component: | build | Keywords: | |
Cc: | Merged in: | ||
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
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.
Change History (10)
comment:1 Changed 3 years ago by
- Description modified (diff)
comment:2 Changed 3 years ago by
- Description modified (diff)
comment:3 Changed 3 years ago by
comment:4 Changed 3 years ago by
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.
comment:5 Changed 3 years ago by
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).
comment:6 Changed 3 years ago by
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 https://github.com/pynac/pynac/issues/325
comment:7 Changed 3 years ago by
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.
comment:8 Changed 3 years ago by
- Milestone changed from sage-wishlist to sage-duplicate/invalid/wontfix
- Status changed from new to needs_review
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.
comment:9 Changed 3 years ago by
- Status changed from needs_review to positive_review
comment:10 Changed 3 years ago by
- Resolution set to wontfix
- Status changed from positive_review to closed
closing positively reviewed duplicates
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.