Lines Matching refs:Dst

39 template <typename Dst, typename Src,
40 DstSign IsDstSigned = std::numeric_limits<Dst>::is_signed ?
46 template <typename Dst, typename Src>
47 struct StaticRangeCheck<Dst, Src, DST_SIGNED, SRC_SIGNED> {
48 typedef std::numeric_limits<Dst> DstLimits;
53 (sizeof(Dst) * 8 - 1);
61 template <typename Dst, typename Src>
62 struct StaticRangeCheck<Dst, Src, DST_UNSIGNED, SRC_UNSIGNED> {
63 static const DstRange value = sizeof(Dst) >= sizeof(Src) ?
67 template <typename Dst, typename Src>
68 struct StaticRangeCheck<Dst, Src, DST_SIGNED, SRC_UNSIGNED> {
69 typedef std::numeric_limits<Dst> DstLimits;
74 (sizeof(Dst) * 8 - 1);
80 template <typename Dst, typename Src>
81 struct StaticRangeCheck<Dst, Src, DST_UNSIGNED, SRC_SIGNED> {
100 template <typename Dst,
102 DstSign IsDstSigned = std::numeric_limits<Dst>::is_signed ?
106 DstRange IsSrcRangeContained = StaticRangeCheck<Dst, Src>::value>
113 // Dst range always contains the result: nothing to check.
114 template <typename Dst, typename Src, DstSign IsDstSigned, SrcSign IsSrcSigned>
115 struct RangeCheckImpl<Dst, Src, IsDstSigned, IsSrcSigned, CONTAINS_RANGE> {
122 template <typename Dst, typename Src>
123 struct RangeCheckImpl<Dst, Src, DST_SIGNED, SRC_SIGNED, OVERLAPS_RANGE> {
125 typedef std::numeric_limits<Dst> DstLimits;
137 template <typename Dst, typename Src>
138 struct RangeCheckImpl<Dst, Src, DST_UNSIGNED, SRC_UNSIGNED, OVERLAPS_RANGE> {
140 typedef std::numeric_limits<Dst> DstLimits;
147 template <typename Dst, typename Src>
148 struct RangeCheckImpl<Dst, Src, DST_SIGNED, SRC_UNSIGNED, OVERLAPS_RANGE> {
150 typedef std::numeric_limits<Dst> DstLimits;
151 return sizeof(Dst) > sizeof(Src) ? TYPE_VALID :
158 template <typename Dst, typename Src>
159 struct RangeCheckImpl<Dst, Src, DST_UNSIGNED, SRC_SIGNED, OVERLAPS_RANGE> {
161 typedef std::numeric_limits<Dst> DstLimits;
164 static const size_t kDstMaxExponent = sizeof(Dst) * 8;
176 template <typename Dst, typename Src>
180 COMPILE_ASSERT(std::numeric_limits<Dst>::is_specialized,
182 return RangeCheckImpl<Dst, Src>::Check(value);