cast: remove unused 'validate' cast
This commit is contained in:
parent
46645e4430
commit
2a16ac4163
14
cast.hpp
14
cast.hpp
@ -11,7 +11,6 @@
|
|||||||
|
|
||||||
#include "concepts.hpp"
|
#include "concepts.hpp"
|
||||||
#include "debug/assert.hpp"
|
#include "debug/assert.hpp"
|
||||||
#include "debug/validate.hpp"
|
|
||||||
#include "platform.hpp"
|
#include "platform.hpp"
|
||||||
|
|
||||||
#include <string_view>
|
#include <string_view>
|
||||||
@ -213,19 +212,6 @@ namespace cruft::cast {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
|
||||||
/// Cast from SrcT to DstT, performing sanity checks on the src and dst
|
|
||||||
/// values before returning the result.
|
|
||||||
template <typename DstT, typename SrcT>
|
|
||||||
DstT sanity (SrcT src)
|
|
||||||
{
|
|
||||||
cruft::debug::sanity (src);
|
|
||||||
DstT dst = static_cast<DstT> (src);
|
|
||||||
cruft::debug::sanity (dst);
|
|
||||||
return dst;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// Convert from SrcT to DstT by reinterpreting the bits that make up SrcT.
|
/// Convert from SrcT to DstT by reinterpreting the bits that make up SrcT.
|
||||||
/// Effectively a reinterpret_cast of SrcT but without the undefined
|
/// Effectively a reinterpret_cast of SrcT but without the undefined
|
||||||
/// behaviour.
|
/// behaviour.
|
||||||
|
Loading…
Reference in New Issue
Block a user