kumi v3.1.0
Exquisite Epidote
 
Loading...
Searching...
No Matches

◆ bit_or() [1/2]

template<product_type T>
constexpr auto kumi::bit_or ( T &&  t)
inlineconstexpr

Computes the bitwise OR of all elements.

Parameters
tProduct type to operate on
Returns
The value of get<0>(t) | ... | get<N-1>(t)

Helper type

namespace kumi::result
{
template<product_type T> struct bit_or;
template<product_type T>
using bit_or_t = typename bit_or<T>::type;
}

Computes the return type of a call to kumi::bit_or

Example

#include <kumi/kumi.hpp>
#include <iostream>
int main()
{
auto t = kumi::tuple{1,short{8},' ', 4ULL};
std::cout << kumi::bit_or(t, 0) << "\n";
std::cout << kumi::bit_or(t) << "\n";
}
constexpr auto bit_or(T &&t, Value init)
Computes the bitwise OR of all elements.
Definition reduce.hpp:412
Fixed-size collection of heterogeneous values.
Definition tuple.hpp:37