[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master b380d114 5/9: Preclude UB
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master b380d114 5/9: Preclude UB |
Date: |
Fri, 29 Jul 2022 20:42:33 -0400 (EDT) |
branch: master
commit b380d114fed092f915b2ffca5762187745236f31
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Preclude UB
See these threads:
https://lists.nongnu.org/archive/html/lmi/2022-05/msg00032.html
https://lists.nongnu.org/archive/html/lmi/2022-06/msg00007.html
(why this was UB)
https://lists.nongnu.org/archive/html/lmi/2022-07/msg00103.html
(why this simple change is best)
---
value_cast.hpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/value_cast.hpp b/value_cast.hpp
index 5c237a6d..2ff34984 100644
--- a/value_cast.hpp
+++ b/value_cast.hpp
@@ -237,7 +237,7 @@ To value_cast(From const& from)
}
template<typename To, typename From>
-To value_cast(From const& from, To)
+To value_cast(From const& from, To const&)
{
return value_cast<To,From>(from);
}
- [lmi-commits] [lmi] master updated (a07a61b8 -> 3d6f262f), Greg Chicares, 2022/07/29
- [lmi-commits] [lmi] master 9131e7c6 2/9: Also test polymorphic-ness, Greg Chicares, 2022/07/29
- [lmi-commits] [lmi] master 52e11311 3/9: Print type name with garniture, Greg Chicares, 2022/07/29
- [lmi-commits] [lmi] master 27fbf8ca 8/9: Rewrite unit-test macros to allow invocation with terminal '; ', Greg Chicares, 2022/07/29
- [lmi-commits] [lmi] master 6b384aee 1/9: Explicitly test derivation from class polymorphic_base, Greg Chicares, 2022/07/29
- [lmi-commits] [lmi] master b380d114 5/9: Preclude UB,
Greg Chicares <=
- [lmi-commits] [lmi] master ac56835b 7/9: Remove null statements, Greg Chicares, 2022/07/29
- [lmi-commits] [lmi] master 3d6f262f 9/9: Enable '-Wextra-semi' for clang, Greg Chicares, 2022/07/29
- [lmi-commits] [lmi] master 2ca1e113 6/9: Comment out superfluous semicolons, Greg Chicares, 2022/07/29
- [lmi-commits] [lmi] master cb353f7b 4/9: Assert that a type is not default constructible, Greg Chicares, 2022/07/29