Page MenuHomePhabricator

[cpp] move to C++17
ClosedPublic

Authored by majcosta on Sat, Nov 21, 09:01.

Details

Reviewers
Fabien
deadalnix
Group Reviewers
Restricted Project
Commits
rABC1541dc4c01d3: [cpp] move to C++17
Summary

Debian buster ships with gcc 7/8 which is all green according to:
https://gcc.gnu.org/projects/cxx-status.html

Depends on D8492 and D8495

edit: backported some changes from Core PR18591 regarding implicit conversion between Span types

Test Plan
ninja all check
test_runner.py --extended

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

@bot gitian-linux gitian-osx gitian-win

Fabien requested changes to this revision.Sat, Nov 21, 10:07

You are missing the documentation update and maybe a release note.
Also what about clang ?

This revision now requires changes to proceed.Sat, Nov 21, 10:07

updated CppCheck, documentation, assumptions.h and added a small release note entry

@bot gitian-linux gitian-osx gitian-win

deadalnix added inline comments.
src/test/util_tests.cpp
2147 ↗(On Diff #25944)

Why?

src/test/util_tests.cpp
2147 ↗(On Diff #25944)

I was getting the error below and using string_view seemed to fix it:

Candidate function (the implicit copy assignment operator) not viable: no known conversion from 'Span<typename std::remove_pointer<decltype(std::declval<basic_string<char>>().data())>::type>' to 'const Span<const char>' for 1st argument

BUT, I've checked and it seems like Core has probably ran into similar issues when going into C++17, I'll backport their solution, if it exists.

deadalnix added inline comments.
doc/release-notes.md
8 ↗(On Diff #25951)

Remove

Fabien added inline comments.
src/span.h
28 ↗(On Diff #25951)

fix layout

This revision is now accepted and ready to land.Sun, Nov 22, 20:58
This revision was automatically updated to reflect the committed changes.