Skip to content

Commit 125960f

Browse files
committed
remove free funcction is_empty
1 parent a5dae44 commit 125960f

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

include/boost/multi/array_ref.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ struct array_types : private Layout { // cppcheck-suppress syntaxError ; false
261261

262262
friend constexpr auto size(array_types const& self) noexcept -> size_type { return self.size(); }
263263
friend BOOST_MULTI_HD constexpr auto extension(array_types const& self) noexcept -> extension_type { return self.extension(); }
264-
friend constexpr auto is_empty(array_types const& self) noexcept -> bool { return self.is_empty(); }
264+
// friend constexpr auto is_empty(array_types const& self) noexcept -> bool { return self.is_empty(); }
265265
friend constexpr auto num_elements(array_types const& self) noexcept -> size_type { return self.num_elements(); }
266266

267267
friend constexpr auto extensions(array_types const& self) noexcept -> extensions_type { return self.extensions(); }

test/assignments.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ auto main() -> int { // NOLINT(readability-function-cognitive-complexity,bugpro
171171

172172
BOOST_TEST( vec[9] == val ); // cppcheck-suppress containerOutOfBounds ;
173173
BOOST_TEST( !vec.empty() );
174-
BOOST_TEST( !is_empty(arr) );
174+
BOOST_TEST( !arr.is_empty() );
175175
}
176176
{
177177
std::vector<int> vec(5 * 7L, 99); // NOLINT(fuchsia-default-arguments-calls)

test/move.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ auto main() -> int { // NOLINT(readability-function-cognitive-complexity,bugpro
268268
std::vector<multi::array<int, 2>> Av(10, multi::array<int, 2>({4, 5}, 990)); // std::vector NOLINT(fuchsia-default-arguments-calls)
269269
multi::array<int, 2> arr2(std::move(Av[0]), std::allocator<int>{});
270270

271-
BOOST_TEST( is_empty(Av[0]) );
271+
BOOST_TEST( Av[0].is_empty() );
272272
BOOST_TEST( size(arr2) == 4 );
273273
BOOST_TEST( arr2[1][2] == 990 );
274274
}
@@ -282,7 +282,7 @@ auto main() -> int { // NOLINT(readability-function-cognitive-complexity,bugpro
282282
std::move(begin(Av), end(Av), std::back_inserter(Bv)); // NOLINT(modernize-use-ranges) for C++20
283283

284284
BOOST_TEST( size(Bv) == size(Av) );
285-
BOOST_TEST( is_empty(Av[4]) );
285+
BOOST_TEST( Av[4].is_empty() );
286286
BOOST_TEST( size(Bv[5]) == 4 );
287287
BOOST_TEST( Bv[5][1][2] == 990 );
288288
}
@@ -297,7 +297,7 @@ auto main() -> int { // NOLINT(readability-function-cognitive-complexity,bugpro
297297
std::move(begin(Av), end(Av), std::back_inserter(Bv)); // NOLINT(modernize-use-ranges) for C++20
298298

299299
BOOST_TEST( size(Bv) == size(Av) );
300-
BOOST_TEST( is_empty(Av[4]) );
300+
BOOST_TEST( Av[4].is_empty() );
301301
BOOST_TEST( size(Bv[5]) == 4 );
302302
BOOST_TEST( Bv[5][1][2] == 990 );
303303
}

0 commit comments

Comments
 (0)