Skip to content

Add subscript operator to constexpr_vector#656

Merged
axic merged 1 commit intomasterfrom
contexpr_vector_subscript
Nov 20, 2020
Merged

Add subscript operator to constexpr_vector#656
axic merged 1 commit intomasterfrom
contexpr_vector_subscript

Conversation

@chfast
Copy link
Copy Markdown
Collaborator

@chfast chfast commented Nov 20, 2020

No description provided.

TEST(constexpr_vector, subscript)
{
constexpr constexpr_vector<int, 4> v = {1, 2, 3};
EXPECT_EQ(v[0], 1);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
EXPECT_EQ(v[0], 1);
EXPECT_EQ(v.size(), 3);
EXPECT_EQ(v[0], 1);

@chfast chfast force-pushed the contexpr_vector_subscript branch from 2e5c981 to 6d3c95f Compare November 20, 2020 19:02
@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 20, 2020

Codecov Report

Merging #656 (6d3c95f) into master (bc60be5) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #656   +/-   ##
=======================================
  Coverage   98.38%   98.38%           
=======================================
  Files          69       69           
  Lines        9712     9724   +12     
=======================================
+ Hits         9555     9567   +12     
  Misses        157      157           
Flag Coverage Δ
spectests 91.47% <ø> (ø)
unittests 98.38% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
lib/fizzy/constexpr_vector.hpp 100.00% <100.00%> (ø)
test/unittests/constexpr_vector_test.cpp 100.00% <100.00%> (ø)

@axic axic merged commit 5a17546 into master Nov 20, 2020
@axic axic deleted the contexpr_vector_subscript branch November 20, 2020 19:38
@gumb0 gumb0 mentioned this pull request Nov 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants