Function combo

Summary

#include <include/type_safe/flag_set.hpp>

(1) template <typename Enum>
    constexpr flag_combo< Enum > combo(const flag_mask< Enum > &mask) noexcept

(2) template <typename Enum>
    constexpr flag_combo< Enum > combo(const flag_set< Enum > &set) noexcept

Function overload

Synopsis

#include <include/type_safe/flag_set.hpp>

template <typename Enum>
constexpr flag_combo< Enum > combo(const flag_mask< Enum > &mask) noexcept

Description

Converts a flag mask to a flag combination.

Returns
The flag combination with the same value as the mask. \notes As you cannot use a mask to set flags in a [ts::flag_set](), you cannot write ~a to set all flags except a directly, you have to be explicit.

Source

Lines 368-372 in include/type_safe/flag_set.hpp.

template <typename Enum>
constexpr flag_combo<Enum> combo(const flag_mask<Enum>& mask) noexcept
{
    return flag_combo<Enum>(mask);
}

Synopsis

#include <include/type_safe/flag_set.hpp>

template <typename Enum>
constexpr flag_combo< Enum > combo(const flag_set< Enum > &set) noexcept

Description

Converts a [ts::flag_set]() to a flag combination.

Returns
The flag combination with the same value as the set.

Source

Lines 615-619 in include/type_safe/flag_set.hpp.

template <typename Enum>
constexpr flag_combo<Enum> combo(const flag_set<Enum>& set) noexcept
{
    return flag_combo<Enum>(detail::get_flag_set_impl::get(set));
}





Add Discussion as Guest

Log in