File indexing completed on 2025-01-18 09:38:57
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef BOOST_JSON_DETAIL_IMPL_ARRAY_HPP
0011 #define BOOST_JSON_DETAIL_IMPL_ARRAY_HPP
0012
0013 namespace boost {
0014 namespace json {
0015 namespace detail {
0016
0017 unchecked_array::
0018 ~unchecked_array()
0019 {
0020 if(! data_ ||
0021 sp_.is_not_shared_and_deallocate_is_trivial())
0022 return;
0023 for(unsigned long i = 0;
0024 i < size_; ++i)
0025 data_[i].~value();
0026 }
0027
0028 void
0029 unchecked_array::
0030 relocate(value* dest) noexcept
0031 {
0032 if(size_ > 0)
0033 std::memcpy(
0034 static_cast<void*>(dest),
0035 data_, size_ * sizeof(value));
0036 data_ = nullptr;
0037 }
0038
0039 }
0040 }
0041 }
0042
0043 #endif