xapian-core  1.4.25
Functions
min_non_zero.h File Reference

Return the smaller of two numbers which isn't zero. More...

#include <algorithm>
#include <type_traits>
+ Include dependency graph for min_non_zero.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

template<typename T >
constexpr std::enable_if< std::is_unsigned< T >::value, T >::type min_non_zero (const T &a, const T &b)
 Return the smaller of two unsigned integers which isn't zero. More...
 

Detailed Description

Return the smaller of two numbers which isn't zero.

Definition in file min_non_zero.h.

Function Documentation

◆ min_non_zero()

template<typename T >
constexpr std::enable_if<std::is_unsigned<T>::value, T>::type min_non_zero ( const T &  a,
const T &  b 
)

Return the smaller of two unsigned integers which isn't zero.

If both a and b are zero, returns zero.

Definition at line 37 of file min_non_zero.h.

Referenced by GlassVersion::add_document().