Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
7a3a5880
Commit
7a3a5880
authored
Aug 10, 2023
by
Shariar Azad Riday
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Address review feedback and refactor additional calls with $pred<>::value
parent
f722e047
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
66 additions
and
56 deletions
+66
-56
libcaf_core/caf/detail/stringification_inspector.hpp
libcaf_core/caf/detail/stringification_inspector.hpp
+1
-1
libcaf_core/caf/detail/type_traits.hpp
libcaf_core/caf/detail/type_traits.hpp
+20
-7
libcaf_core/caf/inspector_access.hpp
libcaf_core/caf/inspector_access.hpp
+4
-4
libcaf_core/caf/intrusive/forward_iterator.hpp
libcaf_core/caf/intrusive/forward_iterator.hpp
+2
-2
libcaf_core/caf/intrusive_ptr.hpp
libcaf_core/caf/intrusive_ptr.hpp
+2
-2
libcaf_core/caf/mailbox_element.hpp
libcaf_core/caf/mailbox_element.hpp
+1
-1
libcaf_core/caf/stateful_actor.hpp
libcaf_core/caf/stateful_actor.hpp
+1
-1
libcaf_core/caf/typed_response_promise.hpp
libcaf_core/caf/typed_response_promise.hpp
+1
-2
libcaf_core/tests/legacy/config_option.cpp
libcaf_core/tests/legacy/config_option.cpp
+1
-1
libcaf_core/tests/legacy/metaprogramming.cpp
libcaf_core/tests/legacy/metaprogramming.cpp
+10
-10
libcaf_test/caf/test/unit_test.hpp
libcaf_test/caf/test/unit_test.hpp
+23
-25
No files found.
libcaf_core/caf/detail/stringification_inspector.hpp
View file @
7a3a5880
...
@@ -219,7 +219,7 @@ public:
...
@@ -219,7 +219,7 @@ public:
static
std
::
string
render
(
const
T
&
x
)
{
static
std
::
string
render
(
const
T
&
x
)
{
if
constexpr
(
std
::
is_same_v
<
std
::
nullptr_t
,
T
>
)
{
if
constexpr
(
std
::
is_same_v
<
std
::
nullptr_t
,
T
>
)
{
return
"null"
;
return
"null"
;
}
else
if
constexpr
(
std
::
is_constructible
<
std
::
string_view
,
T
>::
value
)
{
}
else
if
constexpr
(
std
::
is_constructible
_v
<
std
::
string_view
,
T
>
)
{
if
constexpr
(
std
::
is_pointer_v
<
T
>
)
{
if
constexpr
(
std
::
is_pointer_v
<
T
>
)
{
if
(
x
==
nullptr
)
if
(
x
==
nullptr
)
return
"null"
;
return
"null"
;
...
...
libcaf_core/caf/detail/type_traits.hpp
View file @
7a3a5880
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
static constexpr bool value = sfinae_type::value; \
static constexpr bool value = sfinae_type::value; \
}; \
}; \
template <class T> \
template <class T> \
constexpr bool has_##name##_member_v = has_##name##_member<T>::value
;
constexpr bool has_##name##_member_v = has_##name##_member<T>::value
#define CAF_HAS_ALIAS_TRAIT(name) \
#define CAF_HAS_ALIAS_TRAIT(name) \
template <class T> \
template <class T> \
...
@@ -175,13 +175,14 @@ class is_comparable {
...
@@ -175,13 +175,14 @@ class is_comparable {
using
result_type
=
decltype
(
cmp_help_fun
(
using
result_type
=
decltype
(
cmp_help_fun
(
static_cast
<
T1
*>
(
nullptr
),
static_cast
<
T2
*>
(
nullptr
),
static_cast
<
T1
*>
(
nullptr
),
static_cast
<
T2
*>
(
nullptr
),
static_cast
<
bool
*>
(
nullptr
),
static_cast
<
bool
*>
(
nullptr
),
std
::
integral_constant
<
bool
,
std
::
is_arithmetic
<
T1
>::
value
std
::
integral_constant
<
bool
,
std
::
is_arithmetic
_v
<
T1
>
&&
std
::
is_arithmetic
<
T2
>::
value
>
{}));
&&
std
::
is_arithmetic
_v
<
T2
>
>
{}));
public:
public:
static
constexpr
bool
value
=
std
::
is_same_v
<
bool
,
result_type
>
;
static
constexpr
bool
value
=
std
::
is_same_v
<
bool
,
result_type
>
;
};
};
/// Convenience alias for `is_comparable<T1, T2>::value`.
template
<
class
T1
,
class
T2
>
template
<
class
T1
,
class
T2
>
constexpr
bool
is_comparable_v
=
is_comparable
<
T1
,
T2
>::
value
;
constexpr
bool
is_comparable_v
=
is_comparable
<
T1
,
T2
>::
value
;
...
@@ -465,6 +466,10 @@ struct is_handler_for {
...
@@ -465,6 +466,10 @@ struct is_handler_for {
||
std
::
is_convertible_v
<
F
,
std
::
function
<
void
(
const
T
&
)
>>
;
||
std
::
is_convertible_v
<
F
,
std
::
function
<
void
(
const
T
&
)
>>
;
};
};
/// Convenience alias for `is_handler_for<F, T>::value`.
template
<
class
F
,
class
T
>
constexpr
bool
is_handler_for_v
=
is_handler_for
<
F
,
T
>::
value
;
template
<
class
T
>
template
<
class
T
>
struct
value_type_of
{
struct
value_type_of
{
using
type
=
typename
T
::
value_type
;
using
type
=
typename
T
::
value_type
;
...
@@ -482,8 +487,7 @@ template <class T>
...
@@ -482,8 +487,7 @@ template <class T>
using
is_callable_t
=
typename
std
::
enable_if
<
is_callable_v
<
T
>>::
type
;
using
is_callable_t
=
typename
std
::
enable_if
<
is_callable_v
<
T
>>::
type
;
template
<
class
F
,
class
T
>
template
<
class
F
,
class
T
>
using
is_handler_for_ef
=
using
is_handler_for_ef
=
typename
std
::
enable_if
<
is_handler_for_v
<
F
,
T
>>::
type
;
typename
std
::
enable_if
<
is_handler_for
<
F
,
T
>::
value
>::
type
;
template
<
class
T
>
template
<
class
T
>
struct
strip_reference_wrapper
{
struct
strip_reference_wrapper
{
...
@@ -624,10 +628,14 @@ struct all_constructible<type_list<>, type_list<>> : std::true_type {};
...
@@ -624,10 +628,14 @@ struct all_constructible<type_list<>, type_list<>> : std::true_type {};
template
<
class
T
,
class
...
Ts
,
class
U
,
class
...
Us
>
template
<
class
T
,
class
...
Ts
,
class
U
,
class
...
Us
>
struct
all_constructible
<
type_list
<
T
,
Ts
...
>
,
type_list
<
U
,
Us
...
>>
{
struct
all_constructible
<
type_list
<
T
,
Ts
...
>
,
type_list
<
U
,
Us
...
>>
{
static
constexpr
bool
value
static
constexpr
bool
value
=
std
::
is_constructible
<
T
,
U
>::
value
=
std
::
is_constructible
_v
<
T
,
U
>
&&
all_constructible
<
type_list
<
Ts
...
>
,
type_list
<
Us
...
>>::
value
;
&&
all_constructible
_v
<
type_list
<
Ts
...
>
,
type_list
<
Us
...
>>
;
};
};
/// Convenience alias for `all_constructible<Ts, Us>::value`.
template
<
class
Ts
,
class
Us
>
constexpr
bool
all_constructible_v
=
all_constructible
<
Ts
,
Us
>::
value
;
/// Checks whether T behaves like `std::map`.
/// Checks whether T behaves like `std::map`.
template
<
class
T
>
template
<
class
T
>
struct
is_map_like
{
struct
is_map_like
{
...
@@ -986,6 +994,11 @@ public:
...
@@ -986,6 +994,11 @@ public:
static
constexpr
bool
value
=
sfinae_result
::
value
;
static
constexpr
bool
value
=
sfinae_result
::
value
;
};
};
/// Convenience alias for `accepts_opaque_value<Inspector, T>::value`.
template
<
class
Inspector
,
class
T
>
constexpr
bool
accepts_opaque_value_v
=
accepts_opaque_value
<
Inspector
,
T
>::
value
;
/// Checks whether `T` is primitive, i.e., either an arithmetic type or
/// Checks whether `T` is primitive, i.e., either an arithmetic type or
/// convertible to one of STL's string types.
/// convertible to one of STL's string types.
template
<
class
T
,
bool
IsLoading
>
template
<
class
T
,
bool
IsLoading
>
...
...
libcaf_core/caf/inspector_access.hpp
View file @
7a3a5880
...
@@ -126,13 +126,13 @@ bool load(Inspector& f, T& x, inspector_access_type::list) {
...
@@ -126,13 +126,13 @@ bool load(Inspector& f, T& x, inspector_access_type::list) {
}
}
template
<
class
Inspector
,
class
T
>
template
<
class
Inspector
,
class
T
>
std
::
enable_if_t
<
accepts_opaque_value
<
Inspector
,
T
>::
value
,
bool
>
std
::
enable_if_t
<
accepts_opaque_value
_v
<
Inspector
,
T
>
,
bool
>
load
(
Inspector
&
f
,
T
&
x
,
inspector_access_type
::
none
)
{
load
(
Inspector
&
f
,
T
&
x
,
inspector_access_type
::
none
)
{
return
f
.
opaque_value
(
x
);
return
f
.
opaque_value
(
x
);
}
}
template
<
class
Inspector
,
class
T
>
template
<
class
Inspector
,
class
T
>
std
::
enable_if_t
<!
accepts_opaque_value
<
Inspector
,
T
>::
value
,
bool
>
std
::
enable_if_t
<!
accepts_opaque_value
_v
<
Inspector
,
T
>
,
bool
>
load
(
Inspector
&
,
T
&
,
inspector_access_type
::
none
)
{
load
(
Inspector
&
,
T
&
,
inspector_access_type
::
none
)
{
static_assert
(
static_assert
(
detail
::
assertion_failed_v
<
T
>
,
detail
::
assertion_failed_v
<
T
>
,
...
@@ -219,13 +219,13 @@ bool save(Inspector& f, T& x, inspector_access_type::list) {
...
@@ -219,13 +219,13 @@ bool save(Inspector& f, T& x, inspector_access_type::list) {
}
}
template
<
class
Inspector
,
class
T
>
template
<
class
Inspector
,
class
T
>
std
::
enable_if_t
<
accepts_opaque_value
<
Inspector
,
T
>::
value
,
bool
>
std
::
enable_if_t
<
accepts_opaque_value
_v
<
Inspector
,
T
>
,
bool
>
save
(
Inspector
&
f
,
T
&
x
,
inspector_access_type
::
none
)
{
save
(
Inspector
&
f
,
T
&
x
,
inspector_access_type
::
none
)
{
return
f
.
opaque_value
(
x
);
return
f
.
opaque_value
(
x
);
}
}
template
<
class
Inspector
,
class
T
>
template
<
class
Inspector
,
class
T
>
std
::
enable_if_t
<!
accepts_opaque_value
<
Inspector
,
T
>::
value
,
bool
>
std
::
enable_if_t
<!
accepts_opaque_value
_v
<
Inspector
,
T
>
,
bool
>
save
(
Inspector
&
,
T
&
,
inspector_access_type
::
none
)
{
save
(
Inspector
&
,
T
&
,
inspector_access_type
::
none
)
{
static_assert
(
static_assert
(
detail
::
assertion_failed_v
<
T
>
,
detail
::
assertion_failed_v
<
T
>
,
...
...
libcaf_core/caf/intrusive/forward_iterator.hpp
View file @
7a3a5880
...
@@ -29,8 +29,8 @@ public:
...
@@ -29,8 +29,8 @@ public:
using
const_reference
=
const
value_type
&
;
using
const_reference
=
const
value_type
&
;
using
node_type
=
using
node_type
=
typename
std
::
conditional
<
std
::
is_const_v
<
T
>
,
const
typename
T
::
node_type
,
typename
std
::
conditional
_t
<
std
::
is_const_v
<
T
>
,
const
typename
T
::
node_type
,
typename
T
::
node_type
>::
type
;
typename
T
::
node_type
>
;
using
node_pointer
=
node_type
*
;
using
node_pointer
=
node_type
*
;
...
...
libcaf_core/caf/intrusive_ptr.hpp
View file @
7a3a5880
...
@@ -261,14 +261,14 @@ operator!=(const T* lhs, const intrusive_ptr<U>& rhs) {
...
@@ -261,14 +261,14 @@ operator!=(const T* lhs, const intrusive_ptr<U>& rhs) {
/// @relates intrusive_ptr
/// @relates intrusive_ptr
template
<
class
T
,
class
U
>
template
<
class
T
,
class
U
>
detail
::
enable_if_t
<
detail
::
is_comparable
<
T
*
,
U
*>::
value
,
bool
>
detail
::
enable_if_t
<
detail
::
is_comparable
_v
<
T
*
,
U
*>
,
bool
>
operator
==
(
const
intrusive_ptr
<
T
>&
x
,
const
intrusive_ptr
<
U
>&
y
)
{
operator
==
(
const
intrusive_ptr
<
T
>&
x
,
const
intrusive_ptr
<
U
>&
y
)
{
return
x
.
get
()
==
y
.
get
();
return
x
.
get
()
==
y
.
get
();
}
}
/// @relates intrusive_ptr
/// @relates intrusive_ptr
template
<
class
T
,
class
U
>
template
<
class
T
,
class
U
>
detail
::
enable_if_t
<
detail
::
is_comparable
<
T
*
,
U
*>::
value
,
bool
>
detail
::
enable_if_t
<
detail
::
is_comparable
_v
<
T
*
,
U
*>
,
bool
>
operator
!=
(
const
intrusive_ptr
<
T
>&
x
,
const
intrusive_ptr
<
U
>&
y
)
{
operator
!=
(
const
intrusive_ptr
<
T
>&
x
,
const
intrusive_ptr
<
U
>&
y
)
{
return
x
.
get
()
!=
y
.
get
();
return
x
.
get
()
!=
y
.
get
();
}
}
...
...
libcaf_core/caf/mailbox_element.hpp
View file @
7a3a5880
...
@@ -109,7 +109,7 @@ make_mailbox_element(strong_actor_ptr sender, message_id id,
...
@@ -109,7 +109,7 @@ make_mailbox_element(strong_actor_ptr sender, message_id id,
/// @relates mailbox_element
/// @relates mailbox_element
template
<
class
T
,
class
...
Ts
>
template
<
class
T
,
class
...
Ts
>
std
::
enable_if_t
<!
std
::
is_same
<
typename
std
::
decay
<
T
>::
type
,
message
>::
value
std
::
enable_if_t
<!
std
::
is_same
_v
<
typename
std
::
decay
<
T
>::
type
,
message
>
||
(
sizeof
...(
Ts
)
>
0
),
||
(
sizeof
...(
Ts
)
>
0
),
mailbox_element_ptr
>
mailbox_element_ptr
>
make_mailbox_element
(
strong_actor_ptr
sender
,
message_id
id
,
make_mailbox_element
(
strong_actor_ptr
sender
,
message_id
id
,
...
...
libcaf_core/caf/stateful_actor.hpp
View file @
7a3a5880
...
@@ -46,7 +46,7 @@ public:
...
@@ -46,7 +46,7 @@ public:
template
<
class
...
Ts
>
template
<
class
...
Ts
>
explicit
stateful_actor
(
actor_config
&
cfg
,
Ts
&&
...
xs
)
:
super
(
cfg
)
{
explicit
stateful_actor
(
actor_config
&
cfg
,
Ts
&&
...
xs
)
:
super
(
cfg
)
{
if
constexpr
(
std
::
is_constructible
<
State
,
Ts
&&
...
>::
value
)
if
constexpr
(
std
::
is_constructible
_v
<
State
,
Ts
&&
...
>
)
new
(
&
state
)
State
(
std
::
forward
<
Ts
>
(
xs
)...);
new
(
&
state
)
State
(
std
::
forward
<
Ts
>
(
xs
)...);
else
else
new
(
&
state
)
State
(
this
,
std
::
forward
<
Ts
>
(
xs
)...);
new
(
&
state
)
State
(
this
,
std
::
forward
<
Ts
>
(
xs
)...);
...
...
libcaf_core/caf/typed_response_promise.hpp
View file @
7a3a5880
...
@@ -75,8 +75,7 @@ public:
...
@@ -75,8 +75,7 @@ public:
/// Satisfies the promise by sending a non-error response message.
/// Satisfies the promise by sending a non-error response message.
template
<
class
...
Us
>
template
<
class
...
Us
>
std
::
enable_if_t
<
(
std
::
is_constructible
<
Ts
,
Us
>::
value
&&
...)
>
std
::
enable_if_t
<
(
std
::
is_constructible_v
<
Ts
,
Us
>
&&
...)
>
deliver
(
Us
...
xs
)
{
deliver
(
Us
...
xs
)
{
promise_
.
deliver
(
Ts
{
std
::
forward
<
Us
>
(
xs
)}...);
promise_
.
deliver
(
Ts
{
std
::
forward
<
Us
>
(
xs
)}...);
}
}
...
...
libcaf_core/tests/legacy/config_option.cpp
View file @
7a3a5880
...
@@ -223,7 +223,7 @@ void check_integer_options(std::false_type) {
...
@@ -223,7 +223,7 @@ void check_integer_options(std::false_type) {
// only works with an integral types and double
// only works with an integral types and double
template
<
class
T
>
template
<
class
T
>
void
check_integer_options
()
{
void
check_integer_options
()
{
std
::
integral_constant
<
bool
,
std
::
is_unsigned
<
T
>::
value
>
tk
;
std
::
integral_constant
<
bool
,
std
::
is_unsigned
_v
<
T
>
>
tk
;
check_integer_options
<
T
>
(
tk
);
check_integer_options
<
T
>
(
tk
);
}
}
...
...
libcaf_core/tests/legacy/metaprogramming.cpp
View file @
7a3a5880
...
@@ -231,14 +231,14 @@ private:
...
@@ -231,14 +231,14 @@ private:
};
};
CAF_TEST
(
is_comparable
)
{
CAF_TEST
(
is_comparable
)
{
CHECK
((
is_comparable
<
double
,
std
::
string
>::
value
)
==
false
);
CHECK
((
is_comparable
_v
<
double
,
std
::
string
>
)
==
false
);
CHECK
((
is_comparable
<
foo
,
foo
>::
value
)
==
false
);
CHECK
((
is_comparable
_v
<
foo
,
foo
>
)
==
false
);
CHECK
((
is_comparable
<
bar
,
bar
>::
value
)
==
true
);
CHECK
((
is_comparable
_v
<
bar
,
bar
>
)
==
true
);
CHECK
((
is_comparable
<
double
,
bar
>::
value
)
==
false
);
CHECK
((
is_comparable
_v
<
double
,
bar
>
)
==
false
);
CHECK
((
is_comparable
<
bar
,
double
>::
value
)
==
false
);
CHECK
((
is_comparable
_v
<
bar
,
double
>
)
==
false
);
CHECK
((
is_comparable
<
baz
,
baz
>::
value
)
==
true
);
CHECK
((
is_comparable
_v
<
baz
,
baz
>
)
==
true
);
CHECK
((
is_comparable
<
double
,
baz
>::
value
)
==
false
);
CHECK
((
is_comparable
_v
<
double
,
baz
>
)
==
false
);
CHECK
((
is_comparable
<
baz
,
double
>::
value
)
==
false
);
CHECK
((
is_comparable
_v
<
baz
,
double
>
)
==
false
);
CHECK
((
is_comparable
<
std
::
string
,
baz
>::
value
)
==
false
);
CHECK
((
is_comparable
_v
<
std
::
string
,
baz
>
)
==
false
);
CHECK
((
is_comparable
<
baz
,
std
::
string
>::
value
)
==
false
);
CHECK
((
is_comparable
_v
<
baz
,
std
::
string
>
)
==
false
);
}
}
libcaf_test/caf/test/unit_test.hpp
View file @
7a3a5880
...
@@ -66,12 +66,12 @@ struct compare_visitor {
...
@@ -66,12 +66,12 @@ struct compare_visitor {
struct
equality_operator
{
struct
equality_operator
{
static
constexpr
bool
default_value
=
false
;
static
constexpr
bool
default_value
=
false
;
template
<
class
T
,
class
U
,
template
<
detail
::
enable_if_t
<
((
std
::
is_floating_point_v
<
T
>
class
T
,
class
U
,
&&
std
::
is_convertible_v
<
U
,
double
>
)
detail
::
enable_if_t
<
||
(
std
::
is_floating_point
<
U
>::
value
((
std
::
is_floating_point_v
<
T
>
&&
std
::
is_convertible_v
<
U
,
double
>
)
&&
std
::
is_convertible_v
<
T
,
double
>
)
)
||
(
std
::
is_floating_point_v
<
U
>
&&
std
::
is_convertible_v
<
T
,
double
>
)
)
&&
detail
::
is_comparable
<
T
,
U
>::
value
,
&&
detail
::
is_comparable_v
<
T
,
U
>
,
int
>
int
>
=
0
>
=
0
>
bool
operator
()(
const
T
&
t
,
const
U
&
u
)
const
{
bool
operator
()(
const
T
&
t
,
const
U
&
u
)
const
{
...
@@ -82,21 +82,20 @@ struct equality_operator {
...
@@ -82,21 +82,20 @@ struct equality_operator {
return
dif
<=
max
*
1e-5l
;
return
dif
<=
max
*
1e-5l
;
}
}
template
<
class
T
,
class
U
,
template
<
detail
::
enable_if_t
<!
((
std
::
is_floating_point_v
<
T
>
class
T
,
class
U
,
&&
std
::
is_convertible_v
<
U
,
double
>
)
detail
::
enable_if_t
<
||
(
std
::
is_floating_point
<
U
>::
value
!
((
std
::
is_floating_point_v
<
T
>
&&
std
::
is_convertible_v
<
U
,
double
>
)
&&
std
::
is_convertible_v
<
T
,
double
>
)
)
||
(
std
::
is_floating_point_v
<
U
>
&&
std
::
is_convertible_v
<
T
,
double
>
)
)
&&
detail
::
is_comparable
<
T
,
U
>::
value
,
&&
detail
::
is_comparable_v
<
T
,
U
>
,
int
>
int
>
=
0
>
=
0
>
bool
operator
()(
const
T
&
x
,
const
U
&
y
)
const
{
bool
operator
()(
const
T
&
x
,
const
U
&
y
)
const
{
return
x
==
y
;
return
x
==
y
;
}
}
template
<
template
<
class
T
,
class
U
,
class
T
,
class
U
,
typename
std
::
enable_if
<!
detail
::
is_comparable_v
<
T
,
U
>
>::
type
=
0
>
typename
std
::
enable_if
<!
detail
::
is_comparable
<
T
,
U
>
::
value
,
int
>::
type
=
0
>
bool
operator
()(
const
T
&
,
const
U
&
)
const
{
bool
operator
()(
const
T
&
,
const
U
&
)
const
{
return
default_value
;
return
default_value
;
}
}
...
@@ -108,7 +107,7 @@ struct inequality_operator {
...
@@ -108,7 +107,7 @@ struct inequality_operator {
template
<
class
T
,
class
U
,
template
<
class
T
,
class
U
,
typename
std
::
enable_if
<
(
std
::
is_floating_point_v
<
T
>
typename
std
::
enable_if
<
(
std
::
is_floating_point_v
<
T
>
||
std
::
is_floating_point
<
U
>::
value
)
||
std
::
is_floating_point
<
U
>::
value
)
&&
detail
::
is_comparable
<
T
,
U
>::
value
,
&&
detail
::
is_comparable
_v
<
T
,
U
>
,
int
>::
type
int
>::
type
=
0
>
=
0
>
bool
operator
()(
const
T
&
x
,
const
U
&
y
)
const
{
bool
operator
()(
const
T
&
x
,
const
U
&
y
)
const
{
...
@@ -118,17 +117,16 @@ struct inequality_operator {
...
@@ -118,17 +117,16 @@ struct inequality_operator {
template
<
class
T
,
class
U
,
template
<
class
T
,
class
U
,
typename
std
::
enable_if
<!
std
::
is_floating_point_v
<
T
>
typename
std
::
enable_if
<!
std
::
is_floating_point_v
<
T
>
&&
!
std
::
is_floating_point
<
U
>::
value
&&
!
std
::
is_floating_point
_v
<
U
>
&&
detail
::
is_comparable
<
T
,
U
>::
value
,
&&
detail
::
is_comparable
_v
<
T
,
U
>
,
int
>::
type
int
>::
type
=
0
>
=
0
>
bool
operator
()(
const
T
&
x
,
const
U
&
y
)
const
{
bool
operator
()(
const
T
&
x
,
const
U
&
y
)
const
{
return
x
!=
y
;
return
x
!=
y
;
}
}
template
<
template
<
class
T
,
class
U
,
class
T
,
class
U
,
typename
std
::
enable_if
<!
detail
::
is_comparable_v
<
T
,
U
>
>::
type
=
0
>
typename
std
::
enable_if
<!
detail
::
is_comparable
<
T
,
U
>
::
value
,
int
>::
type
=
0
>
bool
operator
()(
const
T
&
,
const
U
&
)
const
{
bool
operator
()(
const
T
&
,
const
U
&
)
const
{
return
default_value
;
return
default_value
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment