Skip to content

Commit

Permalink
Rewritten hash semi-intrusive containers to improve compilation times…
Browse files Browse the repository at this point in the history
… and runtime performance. Added experimental "linear_buckets" option.
  • Loading branch information
igaztanaga committed May 4, 2022
1 parent d376c8b commit 3c5c8ce
Show file tree
Hide file tree
Showing 17 changed files with 1,379 additions and 930 deletions.
6 changes: 6 additions & 0 deletions doc/intrusive.qbk
Original file line number Diff line number Diff line change
Expand Up @@ -3886,6 +3886,12 @@ to be inserted in intrusive containers are allocated using `std::vector` or `std

[section:release_notes Release Notes]

[section:release_notes_boost_1_80_00 Boost 1.80 Release]

* Semi-intrusive hash containers rewritten to reduce compilation times and improve runtime performance.

[endsect]

[section:release_notes_boost_1_79_00 Boost 1.79 Release]

* The library now compiles without warnings with GCC's -Wcast-align=strict
Expand Down
31 changes: 0 additions & 31 deletions include/boost/intrusive/detail/exception_disposer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,37 +52,6 @@ class exception_disposer
}
};

template<class Container, class Disposer, class SizeType>
class exception_array_disposer
{
Container *cont_;
Disposer &disp_;
SizeType &constructed_;

exception_array_disposer(const exception_array_disposer&);
exception_array_disposer &operator=(const exception_array_disposer&);

public:

exception_array_disposer
(Container &cont, Disposer &disp, SizeType &constructed)
: cont_(&cont), disp_(disp), constructed_(constructed)
{}

BOOST_INTRUSIVE_FORCEINLINE void release()
{ cont_ = 0; }

~exception_array_disposer()
{
SizeType n = constructed_;
if(cont_){
while(n--){
cont_[n].clear_and_dispose(disp_);
}
}
}
};

} //namespace detail{
} //namespace intrusive{
} //namespace boost{
Expand Down
Loading

0 comments on commit 3c5c8ce

Please sign in to comment.