mirror of
https://github.com/ToruNiina/toml11.git
synced 2025-09-17 00:38:08 +08:00
Use is_void<T> instead of is_same<T, void>
The original code incorrectly accepts cv-qualified void types for success.
This commit is contained in:
@@ -32,7 +32,7 @@ struct bad_result_access final : public ::toml::exception
|
||||
template<typename T>
|
||||
struct success
|
||||
{
|
||||
static_assert( ! std::is_same<T, void>::value, "");
|
||||
static_assert( ! std::is_void<T>::value, "");
|
||||
|
||||
using value_type = T;
|
||||
|
||||
@@ -66,7 +66,7 @@ struct success
|
||||
template<typename T>
|
||||
struct success<std::reference_wrapper<T>>
|
||||
{
|
||||
static_assert( ! std::is_same<T, void>::value, "");
|
||||
static_assert( ! std::is_void<T>::value, "");
|
||||
|
||||
using value_type = T;
|
||||
|
||||
|
Reference in New Issue
Block a user