Page MenuHomeFreeBSD

Explicitly set CXXSTD to c++11 for old C++ code using std::auto_ptr<>.
ClosedPublic

Authored by jhb on Nov 29 2022, 7:30 PM.
Tags
None
Referenced Files
F97410099: D37531.diff
Sun, Sep 29, 3:31 AM
Unknown Object (File)
Thu, Sep 5, 5:40 AM
Unknown Object (File)
Sun, Sep 1, 6:59 AM
Unknown Object (File)
Sun, Sep 1, 6:59 AM
Unknown Object (File)
Sun, Sep 1, 6:59 AM
Unknown Object (File)
Sun, Sep 1, 6:49 AM
Unknown Object (File)
Sat, Aug 31, 5:12 PM
Unknown Object (File)
Sat, Aug 31, 4:03 AM
Subscribers

Details

Summary

GCC 12 defaults to C++17 which removes (not just deprecates)
std::auto_ptr<>. Trying to use CXXSTD of c++03 doesn't work with
libc++ headers, but c++11 does.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 48532
Build 45418: arc lint + arc unit

Event Timeline

jhb requested review of this revision.Nov 29 2022, 7:30 PM
jhb created this revision.

Should we look at updating kyua et al to avoid using auto_ptr? (e.g. as a project idea, perhaps)

This revision is now accepted and ready to land.Nov 29 2022, 7:45 PM

I looked and ran away screaming. It wasn't trivial in that you can't just do a giant s/auto_ptr/unique_ptr/. Or rather, it didn't seem like you could do it incrementally as they are all over the place. @brooks definitely has expressed a desire that Someone Else (tm) would drag kyua into the C+11 world.

But sure, we should list it as a project idea in case someone is up for that kind of "fun"

In D37531#853344, @jhb wrote:

But sure, we should list it as a project idea in case someone is up for that kind of "fun"

We attract all sorts, so why not :)