Patch to fix exception safety in boost::asio::detail::hash_map.
Related to https://svn.boost.org/trac/boost/ticket/11823
----
Steps to recreate the patch:
1) Original boost sources in the directory:
packages\3rdParty\boost\<version>\src\original\boost_<version>\...
2) Modified sources in:
packages\3rdParty\boost\<version>\src\patched\boost_<version>\...
3) Cygwin console, in folder: packages/3rdParty/boost/<version>/src
4) Patch generated as:
diff -Nru original patched > boost_asio_hash_map_exception_safety.patch
5) This note added to the patch file
diff -Nru original/boost_1_60_0/boost/asio/detail/hash_map.hpp patched/boost_1_60_0/boost/asio/detail/hash_map.hpp
old
|
new
|
|
244 | 244 | { |
245 | 245 | if (num_buckets == num_buckets_) |
246 | 246 | return; |
247 | | num_buckets_ = num_buckets; |
248 | | BOOST_ASIO_ASSERT(num_buckets_ != 0); |
| 247 | BOOST_ASIO_ASSERT(num_buckets != 0); |
249 | 248 | |
250 | 249 | iterator end_iter = values_.end(); |
251 | 250 | |
252 | 251 | // Update number of buckets and initialise all buckets to empty. |
253 | | bucket_type* tmp = new bucket_type[num_buckets_]; |
| 252 | bucket_type* tmp = new bucket_type[num_buckets]; |
254 | 253 | delete[] buckets_; |
255 | 254 | buckets_ = tmp; |
| 255 | num_buckets_ = num_buckets; |
256 | 256 | for (std::size_t i = 0; i < num_buckets_; ++i) |
257 | 257 | buckets_[i].first = buckets_[i].last = end_iter; |
258 | 258 | |