@brief Destroy the basic_node object and its value storage. @sa https://fktn-k.github.io/fkYAML/api/basic_node/destructor/
| 13058 | /// @brief Destroy the basic_node object and its value storage. |
| 13059 | /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/destructor/ |
| 13060 | ~basic_node() noexcept // NOLINT(bugprone-exception-escape) |
| 13061 | { |
| 13062 | if (m_attrs & detail::node_attr_mask::anchoring) { |
| 13063 | if (m_attrs & detail::node_attr_bits::anchor_bit) { |
| 13064 | auto itr = mp_meta->anchor_table.equal_range(m_prop.anchor).first; |
| 13065 | std::advance(itr, detail::node_attr_bits::get_anchor_offset(m_attrs)); |
| 13066 | itr->second.m_value.destroy(itr->second.m_attrs & detail::node_attr_mask::value); |
| 13067 | itr->second.m_attrs = detail::node_attr_bits::default_bits; |
| 13068 | itr->second.mp_meta.reset(); |
| 13069 | } |
| 13070 | } |
| 13071 | else if ((m_attrs & detail::node_attr_bits::null_bit) == 0) { |
| 13072 | m_value.destroy(m_attrs & detail::node_attr_mask::value); |
| 13073 | } |
| 13074 | |
| 13075 | m_attrs = detail::node_attr_bits::default_bits; |
| 13076 | mp_meta.reset(); |
| 13077 | } |
| 13078 | |
| 13079 | public: |
| 13080 | /// @brief Deserialize the first YAML document in the input into a basic_node object. |
nothing calls this directly
no test coverage detected