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)
Thu, Dec 5, 10:38 AM
Unknown Object (File)
Wed, Nov 27, 9:27 AM
Unknown Object (File)
Nov 19 2024, 10:26 PM
Unknown Object (File)
Nov 19 2024, 10:26 PM
Unknown Object (File)
Nov 19 2024, 10:26 PM
Unknown Object (File)
Nov 19 2024, 6:13 AM
Unknown Object (File)
Nov 16 2024, 11:49 PM
Unknown Object (File)
Oct 29 2024, 12:57 PM
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 :)