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)
Mar 11 2024, 11:57 AM
Unknown Object (File)
Dec 20 2023, 7:41 AM
Unknown Object (File)
Sep 30 2023, 7:14 PM
Unknown Object (File)
Sep 21 2023, 10:21 PM
Unknown Object (File)
Jul 6 2023, 9:39 PM
Unknown Object (File)
May 3 2023, 4:11 AM
Unknown Object (File)
Mar 16 2023, 11:26 PM
Unknown Object (File)
Mar 16 2023, 11:26 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 :)