MCPcopy Create free account
hub / github.com/bytedance/Fastbot_Android / assert_invariant

Function assert_invariant

native/thirdpart/json/json.hpp:15634–15639  ·  view source on GitHub ↗

! @brief checks the class invariants This function asserts the class invariants. It needs to be called at the end of every constructor to make sure that created objects respect the invariant. Furthermore, it has to be called each time the type of a JSON value is changed, because the invariant expresses a relationship between @a m_type and @a m_value. */

Source from the content-addressed store, hash-verified

15632 @a m_type and @a m_value.
15633 */
15634 void assert_invariant() const noexcept
15635 {
15636 assert(m_type != value_t::object or m_value.object != nullptr);
15637 assert(m_type != value_t::array or m_value.array != nullptr);
15638 assert(m_type != value_t::string or m_value.string != nullptr);
15639 }
15640
15641 public:
15642 //////////////////////////

Callers 10

basic_jsonFunction · 0.85
json.hppFile · 0.85
~basic_jsonFunction · 0.85
operator[]Function · 0.85
eraseFunction · 0.85
push_backFunction · 0.85
emplace_backFunction · 0.85
emplaceFunction · 0.85
updateFunction · 0.85
swapFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected