Skip to content

Commit 4f44905

Browse files
committed
Rollback clang's _NonNull attribute, too many warnings in older compilers. Replaced with BOOST_ASSERT null checks and added some corner cases to the test-suite.
1 parent 60d933f commit 4f44905

File tree

4 files changed

+192
-131
lines changed

4 files changed

+192
-131
lines changed

doc/container.qbk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1462,7 +1462,8 @@ use [*Boost.Container]? There are several reasons for that:
14621462
* Updated `basic_string`:
14631463
* Added missing `string_view` members and updated `operator[]` to be able to return the terminating null.
14641464
* Added C++20 `starts_with`/`ends_with` and C++23 `contains` overloads.
1465-
* Added Clang `nullability` checks for `basic_string` methods.
1465+
* Added null pointer checks for `basic_string` methods taking `const CharT*` parameters.
1466+
* Deleted constructor from `std::nullptr_t`.
14661467
* Fixed bugs/issues:
14671468
* [@https://github.com/boostorg/container/issues/323 GitHub #323: ['"flat_tree::try_emplace UB"]].
14681469
* [@https://github.com/boostorg/container/issues/328 GitHub #328: ['"boost::container::deque stores a redundant copy of the allocator, increasing size"]].

include/boost/container/detail/workaround.hpp

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -252,18 +252,4 @@ namespace boost {
252252
#define BOOST_CONTAINER_NOVTABLE
253253
#endif
254254

255-
#if defined(__has_feature)
256-
# if __has_feature(nullability)
257-
# define BOOST_CONTAINER_NONNULL_SUPPORTED
258-
# define BOOST_CONTAINER_NONNULL _Nonnull
259-
# define BOOST_CONTAINER_NULLABLE _Nullable
260-
# endif
261-
#endif
262-
263-
#if !defined(BOOST_CONTAINER_NONNULL_SUPPORTED)
264-
# define BOOST_CONTAINER_NONNULL
265-
# define BOOST_CONTAINER_NULLABLE
266-
# undef BOOST_CONTAINER_NONNULL_SUPPORTED
267-
#endif
268-
269255
#endif //#ifndef BOOST_CONTAINER_DETAIL_WORKAROUND_HPP

0 commit comments

Comments
 (0)