aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@gmail.com>2020-01-02 12:31:03 +0100
committerFelix Morgner <felix.morgner@gmail.com>2020-01-02 12:31:03 +0100
commit61656a5a1b213b919c7361e804c56e83cb3b1985 (patch)
treefc7a2c99fd6900b8804d3b4f2db0de9e20577857 /include
parentde5d0cbb9c58852ff0038be5495fa7e5d656dd1d (diff)
downloadnewtype-61656a5a1b213b919c7361e804c56e83cb3b1985.tar.xz
newtype-61656a5a1b213b919c7361e804c56e83cb3b1985.zip
impl: fix subtractable traits
Diffstat (limited to 'include')
-rw-r--r--include/newtype/impl/type_traits_extensions.hpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/newtype/impl/type_traits_extensions.hpp b/include/newtype/impl/type_traits_extensions.hpp
index 56824e2..d3e6d8b 100644
--- a/include/newtype/impl/type_traits_extensions.hpp
+++ b/include/newtype/impl/type_traits_extensions.hpp
@@ -595,7 +595,7 @@ namespace nt::impl
* @note This specialization forms the case for subtractable T
*/
template<typename T>
- struct is_subtractable<T, std::void_t<decltype(std::declval<T const &>() + std::declval<T const &>())>> : std::true_type
+ struct is_subtractable<T, std::void_t<decltype(std::declval<T const &>() - std::declval<T const &>())>> : std::true_type
{
};
@@ -625,8 +625,8 @@ namespace nt::impl
* @note This specialization forms the case for subtractable T detemining if T is noexcept subtractable
*/
template<typename T>
- struct is_nothrow_subtractable<T, std::void_t<decltype(std::declval<T const &>() + std::declval<T const &>())>>
- : std::bool_constant<noexcept(std::declval<T const &>() + std::declval<T const &>())>
+ struct is_nothrow_subtractable<T, std::void_t<decltype(std::declval<T const &>() - std::declval<T const &>())>>
+ : std::bool_constant<noexcept(std::declval<T const &>() - std::declval<T const &>())>
{
};