xapian-core  2.1.0
Functions
clamp_cast.h File Reference

Cast a value to a type, clamping out of range values. More...

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

Go to the source code of this file.

Functions

template<typename T , typename U >
clamp_cast (U value)
 Cast a value to a type, clamping out of range values. More...
 

Detailed Description

Cast a value to a type, clamping out of range values.

Definition in file clamp_cast.h.

Function Documentation

◆ clamp_cast()

template<typename T , typename U >
T clamp_cast ( U  value)

Cast a value to a type, clamping out of range values.

Version for const pointers.

Definition at line 37 of file clamp_cast.h.

References U.