This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] Fix C++14 and up constexpr members in MoveOnly.
ClosedPublic

Authored by zoecarver on May 23 2020, 2:46 PM.

Details

Reviewers
ldionne
Group Reviewers
Restricted Project
Commits
rG37ef15143a5d: [libcxx] Fix C++14 and up constexpr members in MoveOnly.
Summary

a4b8ee6 made all MoveOnly members constexpr but, some members and constructors contain expressions that are only valid in C++14 and later. This patch prefixes those methods and constructors with TEST_CONSTEXPR_CXX14.

Diff Detail

Event Timeline

zoecarver created this revision.May 23 2020, 2:46 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 23 2020, 2:46 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
ldionne requested changes to this revision.May 25 2020, 8:17 AM
ldionne added inline comments.
libcxx/test/support/MoveOnly.h
36–39

I think those should be OK in C++11, no? It's only a single return statement.

39

Same

This revision now requires changes to proceed.May 25 2020, 8:17 AM
zoecarver marked an inline comment as done.May 25 2020, 10:54 AM
zoecarver added inline comments.
libcxx/test/support/MoveOnly.h
36–39

No, unfortunately not. They both call the move constructor which isn't constexpr.

ldionne accepted this revision.May 25 2020, 11:33 AM
This revision is now accepted and ready to land.May 25 2020, 11:33 AM
This revision was automatically updated to reflect the committed changes.