Function operator|

Summary

#include <include/type_safe/flag_set.hpp>

(1) template <typename Enum, typename FlagCombo, typename = detail::enable_flag_combo<FlagCombo, Enum>>
    constexpr flag_set< Enum > operator|(const flag_set< Enum > &a, const FlagCombo &b)

(2) template <typename Enum, typename FlagCombo, typename = detail::enable_flag_combo<FlagCombo, Enum>>
    constexpr flag_set< Enum > operator|(const FlagCombo &a, const flag_set< Enum > &b)

Function overload

Synopsis

#include <include/type_safe/flag_set.hpp>

template <typename Enum, typename FlagCombo, typename = detail::enable_flag_combo<FlagCombo, Enum>>
constexpr flag_set< Enum > operator|(const flag_set< Enum > &a, const FlagCombo &b)

Description

Returns
The same as a Op= b. \group bitwise_op Bitwise operations for flag_set
Parameters

2 - \exclude

Source

Lines 705-709 in include/type_safe/flag_set.hpp.

template <typename Enum, typename FlagCombo, typename = detail::enable_flag_combo<FlagCombo, Enum>>
constexpr flag_set<Enum> operator|(const flag_set<Enum>& a, const FlagCombo& b)
{
    return combo(a).bitwise_or(flag_combo<Enum>(b));
}

Synopsis

#include <include/type_safe/flag_set.hpp>

template <typename Enum, typename FlagCombo, typename = detail::enable_flag_combo<FlagCombo, Enum>>
constexpr flag_set< Enum > operator|(const FlagCombo &a, const flag_set< Enum > &b)

Description

\group bitwise_op

Parameters

2 - \exclude

Source

Lines 713-717 in include/type_safe/flag_set.hpp.

template <typename Enum, typename FlagCombo, typename = detail::enable_flag_combo<FlagCombo, Enum>>
constexpr flag_set<Enum> operator|(const FlagCombo& a, const flag_set<Enum>& b)
{
    return b | a;
}





Add Discussion as Guest

Log in