mrdocs::dom::Value::Value

Constructors

Synopses

Declared in <mrdocs/Dom/Value.hpp>

Construct an undefined value.

Value() noexcept;

Copy‐construct from another value.

Value(Value const& other);

Move‐construct from another value, leaving it undefined.

Value(Value&& other) noexcept;

Construct an array value, taking ownership of the elements.

Value(Array arr) noexcept;

Construct a function value that can be invoked by templates.

Value(Function fn) noexcept;

Construct an empty value with the specified kind.

Value(dom::Kind kind) noexcept;

Construct an object value, taking ownership of the members.

Value(Object obj) noexcept;

Construct a string or safe‐string value, taking ownership.

Value(String str) noexcept;

Construct a single‐character string value.

Value(char c) noexcept;

Construct an integer value.

Value(int64_t v) noexcept;

Construct a null value.

Value(std::nullptr_t v) noexcept;

Construct an array value from raw storage.

Construct a string value from a C string.

Value(char const* s);

Construct an integer value from a floating‐point number by truncation.

template<std::floating_point T>
Value(T v) noexcept;

Construct an integer value from an integral type other than bool or char.

template<std::integral T>
requires (!std::same_as<T, bool>) &&
        (!std::same_as<T, char>)
Value(T v) noexcept;

Construct a boolean value.

template<std::convertible_to<String> Boolean>
Value(Boolean const& b);

Construct a function value from a callable object.

template<class F>
requires function_traits_convertible_to_value<F>
Value(F const& f);

Construct from Optional, using Undefined when empty.

template<class T>
requires std::constructible_from<Value, T>
Value(Optional<T> const& opt);

Construct from std::optional, using Undefined when empty.

template<class T>
requires std::constructible_from<Value, T>
Value(std::optional<T> const& opt);

Construct a string value from a string literal.

template<std::size_t N>
Value(char const(& sz)[N]);

Created with MrDocs