🎨 replace alternative operators (and, not, or)
This commit is contained in:
parent
0498202a03
commit
65c4b07451
23 changed files with 352 additions and 352 deletions
|
|
@ -551,7 +551,7 @@ struct pod_serializer
|
|||
template <
|
||||
typename BasicJsonType, typename U = T,
|
||||
typename std::enable_if <
|
||||
not(std::is_pod<U>::value and std::is_class<U>::value), int >::type = 0 >
|
||||
!(std::is_pod<U>::value && std::is_class<U>::value), int >::type = 0 >
|
||||
static void from_json(const BasicJsonType& j, U& t)
|
||||
{
|
||||
using nlohmann::from_json;
|
||||
|
|
@ -559,9 +559,9 @@ struct pod_serializer
|
|||
}
|
||||
|
||||
// special behaviour for pods
|
||||
template <typename BasicJsonType, typename U = T,
|
||||
typename std::enable_if<
|
||||
std::is_pod<U>::value and std::is_class<U>::value, int>::type = 0>
|
||||
template < typename BasicJsonType, typename U = T,
|
||||
typename std::enable_if <
|
||||
std::is_pod<U>::value && std::is_class<U>::value, int >::type = 0 >
|
||||
static void from_json(const BasicJsonType& j, U& t)
|
||||
{
|
||||
std::uint64_t value;
|
||||
|
|
@ -587,16 +587,16 @@ struct pod_serializer
|
|||
template <
|
||||
typename BasicJsonType, typename U = T,
|
||||
typename std::enable_if <
|
||||
not(std::is_pod<U>::value and std::is_class<U>::value), int >::type = 0 >
|
||||
!(std::is_pod<U>::value && std::is_class<U>::value), int >::type = 0 >
|
||||
static void to_json(BasicJsonType& j, const T& t)
|
||||
{
|
||||
using nlohmann::to_json;
|
||||
to_json(j, t);
|
||||
}
|
||||
|
||||
template <typename BasicJsonType, typename U = T,
|
||||
typename std::enable_if<
|
||||
std::is_pod<U>::value and std::is_class<U>::value, int>::type = 0>
|
||||
template < typename BasicJsonType, typename U = T,
|
||||
typename std::enable_if <
|
||||
std::is_pod<U>::value && std::is_class<U>::value, int >::type = 0 >
|
||||
static void to_json(BasicJsonType& j, const T& t) noexcept
|
||||
{
|
||||
auto bytes = static_cast< const unsigned char*>(static_cast<const void*>(&t));
|
||||
|
|
@ -805,7 +805,7 @@ struct is_constructible_patched<T, decltype(void(json(std::declval<T>())))> : st
|
|||
|
||||
TEST_CASE("an incomplete type does not trigger a compiler error in non-evaluated context" * doctest::test_suite("udt"))
|
||||
{
|
||||
static_assert(not is_constructible_patched<json, incomplete>::value, "");
|
||||
static_assert(!is_constructible_patched<json, incomplete>::value, "");
|
||||
}
|
||||
|
||||
namespace
|
||||
|
|
@ -839,5 +839,5 @@ TEST_CASE("Issue #924")
|
|||
TEST_CASE("Issue #1237")
|
||||
{
|
||||
struct non_convertible_type {};
|
||||
static_assert(not std::is_convertible<json, non_convertible_type>::value, "");
|
||||
static_assert(!std::is_convertible<json, non_convertible_type>::value, "");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue