MCPcopy Create free account
hub / github.com/davisking/dlib / zero_extend_cast

Function zero_extend_cast

dlib/uintn.h:78–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76
77 template <typename T, typename U>
78 T zero_extend_cast(
79 const U val
80 )
81 /*!
82 requires
83 - U and T are integral types
84 ensures
85 - let ut be a typedef for unsigned_type<U>::type
86 - return static_cast<T>(static_cast<ut>(val));
87 !*/
88 {
89 typedef typename unsigned_type<U>::type ut;
90 return static_cast<T>(static_cast<ut>(val));
91 }
92
93}
94

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected