| Home | Libraries | People | FAQ | More

###### boost::mqtt5::prop::properties::visit (2 of 2 overloads)

Invokes a visitor function on each Property.

###### Synopsis

    template<
        typename Func,
        std::enable_if_t< is_visitor< Func >::value, bool > = true>
    constexpr bool
    visit(
        Func&& func) noexcept(is_nothrow_visitor< Func >::value);

###### Description

This function iterates over Properties and invokes the provided function on each Property, passing both the compile-time constant Property ID and its value. The visitor function should return a boolean value that determines whether iteration continues.

###### Parameters

Name | Description
--- | ---
`func` | The visitor function to invoke. It must accept two arguments: a Property ID and the corresponding Property value.

###### Return Value

`true` if the visitor function returns `true` for all Properties, `false` otherwise.