mirror of
https://github.com/rbock/sqlpp11.git
synced 2026-01-05 12:40:40 -06:00
Adhere to clang-tidy warning about boolean readability
This commit is contained in:
@@ -27,6 +27,8 @@
|
||||
#ifndef SQLPP11_DATA_TYPES_BOOLEAN_OPERAND_H
|
||||
#define SQLPP11_DATA_TYPES_BOOLEAN_OPERAND_H
|
||||
|
||||
#include <ciso646> // Required for some compilers to use aliases for boolean operators
|
||||
|
||||
#include <sqlpp11/type_traits.h>
|
||||
#include <sqlpp11/alias_operators.h>
|
||||
#include <sqlpp11/serializer.h>
|
||||
@@ -59,7 +61,7 @@ namespace sqlpp
|
||||
|
||||
bool _is_trivial() const
|
||||
{
|
||||
return _t == false;
|
||||
return not _t;
|
||||
}
|
||||
|
||||
_value_t _t;
|
||||
|
||||
@@ -43,26 +43,26 @@ namespace sqlpp
|
||||
template <bool... B>
|
||||
struct all
|
||||
{
|
||||
using type = std::is_same<logic_helper<B...>, logic_helper<(B or true)...>>;
|
||||
using type = std::is_same<logic_helper<B...>, logic_helper<(B, true)...>>;
|
||||
};
|
||||
|
||||
template <bool... B>
|
||||
using all_t = std::is_same<logic_helper<B...>, logic_helper<(B or true)...>>;
|
||||
using all_t = std::is_same<logic_helper<B...>, logic_helper<(B, true)...>>;
|
||||
|
||||
// workaround for msvc bug https://connect.microsoft.com/VisualStudio/Feedback/Details/2086629
|
||||
template <bool... B>
|
||||
struct any
|
||||
{
|
||||
using type =
|
||||
std::integral_constant<bool, not std::is_same<logic_helper<B...>, logic_helper<(B and false)...>>::value>;
|
||||
std::integral_constant<bool, not std::is_same<logic_helper<B...>, logic_helper<(B, false)...>>::value>;
|
||||
};
|
||||
|
||||
template <bool... B>
|
||||
using any_t =
|
||||
std::integral_constant<bool, not std::is_same<logic_helper<B...>, logic_helper<(B and false)...>>::value>;
|
||||
std::integral_constant<bool, not std::is_same<logic_helper<B...>, logic_helper<(B, false)...>>::value>;
|
||||
|
||||
template <bool... B>
|
||||
using none_t = std::is_same<logic_helper<B...>, logic_helper<(B and false)...>>;
|
||||
using none_t = std::is_same<logic_helper<B...>, logic_helper<(B, false)...>>;
|
||||
|
||||
template <bool>
|
||||
struct not_impl;
|
||||
|
||||
Reference in New Issue
Block a user