Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Issue 29722755: Issue 6378 - [emscripten] Make DependentString constexpr

Created:
March 14, 2018, 3:50 p.m. by René Jeschke
Modified:
March 19, 2018, 1:49 p.m.
Reviewers:
sergei, Eric, hub
CC:
Oleksandr
Visibility:
Public.

Description

Issue 6378 - [emscripten] Make DependentString constexpr

Patch Set 1 #

Patch Set 2 : Added missing 'constexpr' to data() #

Total comments: 3

Patch Set 3 : Added test case. #

Total comments: 4

Patch Set 4 : More tests, made operator[] and default ctor constexpr. #

Total comments: 1

Patch Set 5 : Made _str constexpr. #

Total comments: 19

Patch Set 6 : More constexprs, test cases. #

Total comments: 2

Patch Set 7 : Seperated test cases. #

Total comments: 7

Patch Set 8 : Even more constexpr and tests. #

Total comments: 2

Patch Set 9 : Removed accidential whitespace. #

Patch Set 10 : Added missing '*'. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+64 lines, -21 lines) Patch
M compiled/String.h View 1 2 3 4 5 6 7 10 chunks +25 lines, -21 lines 0 comments Download
M test/compiled/String.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +39 lines, -0 lines 0 comments Download

Messages

Total messages: 27
René Jeschke
March 14, 2018, 3:54 p.m. (2018-03-14 15:54:08 UTC) #1
sergei
Could you add a couple of tests merely demonstrating that it works in compile time? ...
March 14, 2018, 4:22 p.m. (2018-03-14 16:22:54 UTC) #2
René Jeschke
Will add a test case for this. https://codereview.adblockplus.org/29722755/diff/29722758/compiled/String.h File compiled/String.h (right): https://codereview.adblockplus.org/29722755/diff/29722758/compiled/String.h#newcode227 compiled/String.h:227: explicit DependentString() ...
March 14, 2018, 4:27 p.m. (2018-03-14 16:27:07 UTC) #3
René Jeschke
Added a simple test case.
March 14, 2018, 4:41 p.m. (2018-03-14 16:41:11 UTC) #4
sergei
https://codereview.adblockplus.org/29722755/diff/29722760/test/compiled/String.cpp File test/compiled/String.cpp (right): https://codereview.adblockplus.org/29722755/diff/29722760/test/compiled/String.cpp#newcode29 test/compiled/String.cpp:29: EXPECT_FALSE(s.is_writable()); I wonder whether it should be static_assert too.
March 14, 2018, 4:57 p.m. (2018-03-14 16:57:44 UTC) #5
René Jeschke
https://codereview.adblockplus.org/29722755/diff/29722760/test/compiled/String.cpp File test/compiled/String.cpp (right): https://codereview.adblockplus.org/29722755/diff/29722760/test/compiled/String.cpp#newcode29 test/compiled/String.cpp:29: EXPECT_FALSE(s.is_writable()); On 2018/03/14 16:57:44, sergei wrote: > I wonder ...
March 14, 2018, 5:01 p.m. (2018-03-14 17:01:00 UTC) #6
sergei
https://codereview.adblockplus.org/29722755/diff/29722758/compiled/String.h File compiled/String.h (right): https://codereview.adblockplus.org/29722755/diff/29722758/compiled/String.h#newcode227 compiled/String.h:227: explicit DependentString() On 2018/03/14 16:27:07, René Jeschke wrote: > ...
March 14, 2018, 5:01 p.m. (2018-03-14 17:01:46 UTC) #7
sergei
https://codereview.adblockplus.org/29722755/diff/29722760/test/compiled/String.cpp File test/compiled/String.cpp (right): https://codereview.adblockplus.org/29722755/diff/29722760/test/compiled/String.cpp#newcode29 test/compiled/String.cpp:29: EXPECT_FALSE(s.is_writable()); On 2018/03/14 17:01:00, René Jeschke wrote: > On ...
March 14, 2018, 5:03 p.m. (2018-03-14 17:03:09 UTC) #8
René Jeschke
More tests, made operator[] and default ctor constexpr. https://codereview.adblockplus.org/29722755/diff/29722760/test/compiled/String.cpp File test/compiled/String.cpp (right): https://codereview.adblockplus.org/29722755/diff/29722760/test/compiled/String.cpp#newcode29 test/compiled/String.cpp:29: EXPECT_FALSE(s.is_writable()); ...
March 14, 2018, 5:12 p.m. (2018-03-14 17:12:23 UTC) #9
sergei
constexpr-s are awesome LGTM.
March 14, 2018, 5:22 p.m. (2018-03-14 17:22:47 UTC) #10
hub
LGTM
March 14, 2018, 5:38 p.m. (2018-03-14 17:38:38 UTC) #11
sergei
Could you please rebase it? https://codereview.adblockplus.org/29722755/diff/29722763/compiled/String.h File compiled/String.h (right): https://codereview.adblockplus.org/29722755/diff/29722763/compiled/String.h#newcode301 compiled/String.h:301: inline DependentString operator "" ...
March 15, 2018, 3:58 p.m. (2018-03-15 15:58:37 UTC) #12
René Jeschke
On 2018/03/15 15:58:37, sergei wrote: > Could you please rebase it? > > https://codereview.adblockplus.org/29722755/diff/29722763/compiled/String.h > ...
March 15, 2018, 4:10 p.m. (2018-03-15 16:10:03 UTC) #13
Eric
https://codereview.adblockplus.org/29722755/diff/29723638/compiled/String.h File compiled/String.h (right): https://codereview.adblockplus.org/29722755/diff/29723638/compiled/String.h#newcode84 compiled/String.h:84: ~String() = default; We're not defining copy or move ...
March 15, 2018, 5:05 p.m. (2018-03-15 17:05:01 UTC) #14
René Jeschke
https://codereview.adblockplus.org/29722755/diff/29723638/compiled/String.h File compiled/String.h (right): https://codereview.adblockplus.org/29722755/diff/29723638/compiled/String.h#newcode84 compiled/String.h:84: ~String() = default; On 2018/03/15 17:05:00, Eric wrote: > ...
March 15, 2018, 5:41 p.m. (2018-03-15 17:41:23 UTC) #15
Eric
https://codereview.adblockplus.org/29722755/diff/29723638/compiled/String.h File compiled/String.h (right): https://codereview.adblockplus.org/29722755/diff/29723638/compiled/String.h#newcode84 compiled/String.h:84: ~String() = default; On 2018/03/15 17:41:23, René Jeschke wrote: ...
March 15, 2018, 6:33 p.m. (2018-03-15 18:33:54 UTC) #16
René Jeschke
https://codereview.adblockplus.org/29722755/diff/29723638/test/compiled/String.cpp File test/compiled/String.cpp (right): https://codereview.adblockplus.org/29722755/diff/29723638/test/compiled/String.cpp#newcode24 test/compiled/String.cpp:24: TEST(TestString, checkConstexprCorrectness) On 2018/03/15 18:33:54, Eric wrote: > I ...
March 15, 2018, 7:02 p.m. (2018-03-15 19:02:35 UTC) #17
hub
LGTM
March 16, 2018, 1:24 p.m. (2018-03-16 13:24:22 UTC) #18
sergei
https://codereview.adblockplus.org/29722755/diff/29723638/compiled/String.h File compiled/String.h (right): https://codereview.adblockplus.org/29722755/diff/29723638/compiled/String.h#newcode84 compiled/String.h:84: ~String() = default; On 2018/03/15 18:33:54, Eric wrote: > ...
March 16, 2018, 1:43 p.m. (2018-03-16 13:43:27 UTC) #19
René Jeschke
https://codereview.adblockplus.org/29722755/diff/29723662/compiled/String.h File compiled/String.h (right): https://codereview.adblockplus.org/29722755/diff/29723662/compiled/String.h#newcode143 compiled/String.h:143: bool operator!=(const String& other) const On 2018/03/16 13:43:27, sergei ...
March 16, 2018, 5 p.m. (2018-03-16 17:00:47 UTC) #20
hub
https://codereview.adblockplus.org/29722755/diff/29723662/test/compiled/String.cpp File test/compiled/String.cpp (right): https://codereview.adblockplus.org/29722755/diff/29723662/test/compiled/String.cpp#newcode31 test/compiled/String.cpp:31: static constexpr DependentString s; On 2018/03/16 17:00:47, René Jeschke ...
March 16, 2018, 5:11 p.m. (2018-03-16 17:11:32 UTC) #21
René Jeschke
So, addressed last issues, new (and hopefully final) patch set is up.
March 19, 2018, 1:29 p.m. (2018-03-19 13:29:06 UTC) #22
sergei
LGTM
March 19, 2018, 1:32 p.m. (2018-03-19 13:32:58 UTC) #23
sergei
https://codereview.adblockplus.org/29722755/diff/29727575/test/compiled/String.cpp File test/compiled/String.cpp (right): https://codereview.adblockplus.org/29722755/diff/29727575/test/compiled/String.cpp#newcode13 test/compiled/String.cpp:13: Could you please revert the change.
March 19, 2018, 1:33 p.m. (2018-03-19 13:33:05 UTC) #24
René Jeschke
https://codereview.adblockplus.org/29722755/diff/29727575/test/compiled/String.cpp File test/compiled/String.cpp (right): https://codereview.adblockplus.org/29722755/diff/29727575/test/compiled/String.cpp#newcode13 test/compiled/String.cpp:13: On 2018/03/19 13:33:04, sergei wrote: > Could you please ...
March 19, 2018, 1:39 p.m. (2018-03-19 13:39:55 UTC) #25
sergei
LGTM
March 19, 2018, 1:40 p.m. (2018-03-19 13:40:54 UTC) #26
hub
March 19, 2018, 1:49 p.m. (2018-03-19 13:49:59 UTC) #27
LGTM

Powered by Google App Engine
This is Rietveld