From 2485f8fe039152359286f008a3acbba03c6167a5 Mon Sep 17 00:00:00 2001 From: Ken Matsui <26405363+ken-matsui@users.noreply.github.com> Date: Sat, 18 Jan 2025 22:20:46 -0500 Subject: [PATCH] Use is_void instead of is_same The original code incorrectly accepts cv-qualified void types for success. --- include/toml11/result.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/toml11/result.hpp b/include/toml11/result.hpp index e847c4b..f16959e 100644 --- a/include/toml11/result.hpp +++ b/include/toml11/result.hpp @@ -32,7 +32,7 @@ struct bad_result_access final : public ::toml::exception template struct success { - static_assert( ! std::is_same::value, ""); + static_assert( ! std::is_void::value, ""); using value_type = T; @@ -66,7 +66,7 @@ struct success template struct success> { - static_assert( ! std::is_same::value, ""); + static_assert( ! std::is_void::value, ""); using value_type = T;