We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a86d30e commit d967010Copy full SHA for d967010
src/primitive/impl.cppm
@@ -1,6 +1,7 @@
1
module;
2
#include <cstdint>
3
#include <tuple>
4
+#include <type_traits>
5
6
export module mcpplibs.primitives.primitive.impl;
7
@@ -61,8 +62,9 @@ private:
61
62
underlying::traits<std::remove_cv_t<Target>>::rep_type;
63
64
auto const source_rep = underlying::traits<source_value_type>::to_rep(source);
- auto const target_rep = static_cast<target_rep_type>(
65
- static_cast<source_rep_type>(source_rep));
+ auto const target_rep =
66
+ policy::details::safe_numeric_cast<target_rep_type>(
67
+ static_cast<source_rep_type>(source_rep));
68
return underlying::traits<std::remove_cv_t<Target>>::from_rep(target_rep);
69
}
70
0 commit comments