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
Unknown Object (File)
Tue, Nov 19, 10:26 PM
Unknown Object (File)
Tue, Nov 19, 10:26 PM
Unknown Object (File)
Tue, Nov 19, 10:26 PM
Unknown Object (File)
Tue, Nov 19, 6:13 AM
Unknown Object (File)
Sat, Nov 16, 11:49 PM
Unknown Object (File)
Tue, Oct 29, 12:57 PM
Unknown Object (File)
Oct 12 2024, 7:49 AM
Unknown Object (File)
Oct 4 2024, 8:47 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 Not Applicable
Unit
Tests Not Applicable

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 :)