| 3585 | |
| 3586 | template <typename T> |
| 3587 | TOML_PURE_INLINE_GETTER |
| 3588 | bool is() const noexcept |
| 3589 | { |
| 3590 | using type = impl::remove_cvref<impl::unwrap_node<T>>; |
| 3591 | static_assert(toml::is_value<type> || toml::is_container<type>, |
| 3592 | "The template type argument of node::is() must be one of:" TOML_SA_UNWRAPPED_NODE_TYPE_LIST); |
| 3593 | |
| 3594 | if constexpr (std::is_same_v<type, table>) |
| 3595 | return is_table(); |
| 3596 | else if constexpr (std::is_same_v<type, array>) |
| 3597 | return is_array(); |
| 3598 | else if constexpr (std::is_same_v<type, std::string>) |
| 3599 | return is_string(); |
| 3600 | else if constexpr (std::is_same_v<type, int64_t>) |
| 3601 | return is_integer(); |
| 3602 | else if constexpr (std::is_same_v<type, double>) |
| 3603 | return is_floating_point(); |
| 3604 | else if constexpr (std::is_same_v<type, bool>) |
| 3605 | return is_boolean(); |
| 3606 | else if constexpr (std::is_same_v<type, date>) |
| 3607 | return is_date(); |
| 3608 | else if constexpr (std::is_same_v<type, time>) |
| 3609 | return is_time(); |
| 3610 | else if constexpr (std::is_same_v<type, date_time>) |
| 3611 | return is_date_time(); |
| 3612 | } |
| 3613 | |
| 3614 | TOML_PURE_GETTER |
| 3615 | virtual table* as_table() noexcept = 0; |
nothing calls this directly
no test coverage detected