pstore2
Functions
unsigned_cast.hpp File Reference

unsigned_cast() (and its runtime-checked version) allow for simple integral unsigned casts. More...

#include "pstore/support/error.hpp"
Include dependency graph for unsigned_cast.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

template<typename SrcT , typename DestT = std::make_unsigned_t<typename std::remove_cv_t<SrcT>>, typename = typename std::enable_if<std::is_integral<SrcT>::value && std::is_unsigned<DestT>::value>::type>
constexpr DestT pstore::unsigned_cast (SrcT const value) noexcept
 
template<typename SrcT , typename DestT = std::make_unsigned_t<typename std::remove_cv_t<SrcT>>, typename = typename std::enable_if<std::is_integral<SrcT>::value && std::is_unsigned<DestT>::value>::type>
constexpr DestT pstore::checked_unsigned_cast (SrcT const value)
 

Detailed Description

unsigned_cast() (and its runtime-checked version) allow for simple integral unsigned casts.