TerraForge3D  2.3.1
3D Terrain And Landscape Generator

◆ get_impl() [1/6]

template<template< typename U, typename V, typename... Args > class ObjectType = std::map, template< typename U, typename... Args > class ArrayType = std::vector, class StringType = std::string, class BooleanType = bool, class NumberIntegerType = std::int64_t, class NumberUnsignedType = std::uint64_t, class NumberFloatType = double, template< typename U > class AllocatorType = std::allocator, template< typename T, typename SFINAE=void > class JSONSerializer = adl_serializer, class BinaryType = std::vector<std::uint8_t>>
boolean_t nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::get_impl ( boolean_t ) const
inlineprivate

get a boolean (explicit)

Definition at line 20542 of file json.hpp.

20543 {
20544 if (JSON_HEDLEY_LIKELY(is_boolean()))
20545 {
20546 return m_value.boolean;
20547 }
20548
20549 JSON_THROW(type_error::create(302, "type must be boolean, but is " + std::string(type_name()), *this));
20550 }
json_value m_value
the value of the current element
Definition: json.hpp:24928
constexpr bool is_boolean() const noexcept
return whether value is a boolean
Definition: json.hpp:20273
JSON_HEDLEY_RETURNS_NON_NULL const char * type_name() const noexcept
return the type as string
Definition: json.hpp:24883