| 345 | } |
| 346 | |
| 347 | ~variable() { |
| 348 | if (x_) { // nothing to do for empty state |
| 349 | value_allocator_type a(base_type::get_allocator()); |
| 350 | using AT = std::allocator_traits<value_allocator_type>; |
| 351 | for (auto xit = x_, xe = xend(); xit != xe; ++xit) AT::destroy(a, xit); |
| 352 | AT::deallocate(a, x_, nx()); |
| 353 | } |
| 354 | } |
| 355 | |
| 356 | /// Returns the bin index for the passed argument. |
| 357 | int index(value_type x) const noexcept { |