dynarray icon indicating copy to clipboard operation
dynarray copied to clipboard

Test if `dynarray` instance is empty iff its underlying pointer is empty

Open mosdav opened this issue 6 years ago • 0 comments

The incentive for this is change is the following scenario - after src was moved into dst, src is actually an empty instance

TEST(FaceFeatureVecTests, MoveSemantics)
{
    dynarray<float> src(128);    
    src.fill(42.0f);
    ASSERT_FALSE(src.empty());

    const auto dst = move(src);
    ASSERT_TRUE(src.empty());
}

mosdav avatar May 14 '19 14:05 mosdav