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
c37e971a
Commit
c37e971a
authored
Aug 08, 2023
by
Shariar Azad Riday
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor is_convertible<>::value to is_convertible_v<>
parent
ba671c7c
Changes
16
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
36 additions
and
37 deletions
+36
-37
libcaf_core/caf/actor_factory.hpp
libcaf_core/caf/actor_factory.hpp
+2
-2
libcaf_core/caf/catch_all.hpp
libcaf_core/caf/catch_all.hpp
+1
-1
libcaf_core/caf/detail/implicit_conversions.hpp
libcaf_core/caf/detail/implicit_conversions.hpp
+1
-1
libcaf_core/caf/detail/init_fun_factory.hpp
libcaf_core/caf/detail/init_fun_factory.hpp
+1
-1
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
+10
-9
libcaf_core/caf/detail/unique_function.hpp
libcaf_core/caf/detail/unique_function.hpp
+2
-2
libcaf_core/caf/exec_main.hpp
libcaf_core/caf/exec_main.hpp
+1
-1
libcaf_core/caf/expected.hpp
libcaf_core/caf/expected.hpp
+1
-1
libcaf_core/caf/intrusive_ptr.hpp
libcaf_core/caf/intrusive_ptr.hpp
+1
-2
libcaf_core/caf/load_inspector_base.hpp
libcaf_core/caf/load_inspector_base.hpp
+1
-1
libcaf_core/caf/optional.hpp
libcaf_core/caf/optional.hpp
+1
-1
libcaf_core/caf/weak_intrusive_ptr.hpp
libcaf_core/caf/weak_intrusive_ptr.hpp
+1
-2
libcaf_core/tests/legacy/typed_spawn.cpp
libcaf_core/tests/legacy/typed_spawn.cpp
+3
-3
libcaf_io/caf/io/typed_broker.hpp
libcaf_io/caf/io/typed_broker.hpp
+4
-4
libcaf_test/caf/test/unit_test.hpp
libcaf_test/caf/test/unit_test.hpp
+5
-5
No files found.
libcaf_core/caf/actor_factory.hpp
View file @
c37e971a
...
@@ -36,7 +36,7 @@ public:
...
@@ -36,7 +36,7 @@ public:
}
}
void
operator
()(
Ts
...
xs
)
{
void
operator
()(
Ts
...
xs
)
{
if
constexpr
(
std
::
is_convertible
<
R
,
Bhvr
>::
value
)
{
if
constexpr
(
std
::
is_convertible
_v
<
R
,
Bhvr
>
)
{
auto
bhvr
=
f_
(
xs
...);
auto
bhvr
=
f_
(
xs
...);
*
bhvr_
=
std
::
move
(
bhvr
.
unbox
());
*
bhvr_
=
std
::
move
(
bhvr
.
unbox
());
}
else
{
}
else
{
...
@@ -59,7 +59,7 @@ public:
...
@@ -59,7 +59,7 @@ public:
}
}
void
operator
()(
Ts
...
xs
)
{
void
operator
()(
Ts
...
xs
)
{
if
constexpr
(
std
::
is_convertible
<
R
,
Bhvr
>::
value
)
{
if
constexpr
(
std
::
is_convertible
_v
<
R
,
Bhvr
>
)
{
auto
bhvr
=
f_
(
ptr_
,
xs
...);
auto
bhvr
=
f_
(
ptr_
,
xs
...);
*
bhvr_
=
std
::
move
(
bhvr
.
unbox
());
*
bhvr_
=
std
::
move
(
bhvr
.
unbox
());
}
else
{
}
else
{
...
...
libcaf_core/caf/catch_all.hpp
View file @
c37e971a
...
@@ -16,7 +16,7 @@ template <class F>
...
@@ -16,7 +16,7 @@ template <class F>
struct
catch_all
{
struct
catch_all
{
using
fun_type
=
std
::
function
<
skippable_result
(
message
&
)
>
;
using
fun_type
=
std
::
function
<
skippable_result
(
message
&
)
>
;
static_assert
(
std
::
is_convertible
<
F
,
fun_type
>::
value
,
static_assert
(
std
::
is_convertible
_v
<
F
,
fun_type
>
,
"catch-all handler must have signature "
"catch-all handler must have signature "
"skippable_result (message&)"
);
"skippable_result (message&)"
);
...
...
libcaf_core/caf/detail/implicit_conversions.hpp
View file @
c37e971a
...
@@ -40,7 +40,7 @@ struct implicit_actor_conversions<actor_control_block, false, false> {
...
@@ -40,7 +40,7 @@ struct implicit_actor_conversions<actor_control_block, false, false> {
template
<
class
T
>
template
<
class
T
>
struct
implicit_conversions
{
struct
implicit_conversions
{
using
type
=
std
::
conditional_t
<
std
::
is_convertible
<
T
,
error
>::
value
,
error
,
using
type
=
std
::
conditional_t
<
std
::
is_convertible
_v
<
T
,
error
>
,
error
,
squash_if_int_t
<
T
>>
;
squash_if_int_t
<
T
>>
;
};
};
...
...
libcaf_core/caf/detail/init_fun_factory.hpp
View file @
c37e971a
...
@@ -125,7 +125,7 @@ public:
...
@@ -125,7 +125,7 @@ public:
using
res_type
=
typename
trait
::
result_type
;
using
res_type
=
typename
trait
::
result_type
;
using
first_arg
=
typename
detail
::
tl_head
<
arg_types
>::
type
;
using
first_arg
=
typename
detail
::
tl_head
<
arg_types
>::
type
;
constexpr
bool
selfptr
=
std
::
is_pointer_v
<
first_arg
>
;
constexpr
bool
selfptr
=
std
::
is_pointer_v
<
first_arg
>
;
constexpr
bool
rets
=
std
::
is_convertible
<
res_type
,
behavior
>::
value
;
constexpr
bool
rets
=
std
::
is_convertible
_v
<
res_type
,
behavior
>
;
using
tuple_type
=
decltype
(
std
::
make_tuple
(
detail
::
spawn_fwd
<
Ts
>
(
xs
)...));
using
tuple_type
=
decltype
(
std
::
make_tuple
(
detail
::
spawn_fwd
<
Ts
>
(
xs
)...));
using
helper
=
init_fun_factory_helper
<
Base
,
F
,
tuple_type
,
rets
,
selfptr
>
;
using
helper
=
init_fun_factory_helper
<
Base
,
F
,
tuple_type
,
rets
,
selfptr
>
;
return
ptr_type
{
new
helper
{
std
::
move
(
f
),
sizeof
...(
Ts
)
>
0
return
ptr_type
{
new
helper
{
std
::
move
(
f
),
sizeof
...(
Ts
)
>
0
...
...
libcaf_core/caf/detail/stringification_inspector.hpp
View file @
c37e971a
...
@@ -152,7 +152,7 @@ public:
...
@@ -152,7 +152,7 @@ public:
template
<
class
T
>
template
<
class
T
>
std
::
enable_if_t
<
has_to_string
<
T
>::
value
std
::
enable_if_t
<
has_to_string
<
T
>::
value
&&
!
std
::
is_convertible
<
T
,
std
::
string_view
>::
value
,
&&
!
std
::
is_convertible
_v
<
T
,
std
::
string_view
>
,
bool
>
bool
>
builtin_inspect
(
const
T
&
x
)
{
builtin_inspect
(
const
T
&
x
)
{
auto
str
=
to_string
(
x
);
auto
str
=
to_string
(
x
);
...
...
libcaf_core/caf/detail/type_traits.hpp
View file @
c37e971a
...
@@ -88,7 +88,7 @@ private:
...
@@ -88,7 +88,7 @@ private:
using
result
=
decltype
(
sfinae
(
std
::
declval
<
const
T
&>
()));
using
result
=
decltype
(
sfinae
(
std
::
declval
<
const
T
&>
()));
public:
public:
static
constexpr
bool
value
=
std
::
is_convertible
<
result
,
std
::
string
>::
value
;
static
constexpr
bool
value
=
std
::
is_convertible
_v
<
result
,
std
::
string
>
;
};
};
template
<
bool
X
>
template
<
bool
X
>
...
@@ -136,9 +136,9 @@ struct is_duration<std::chrono::duration<Period, Rep>> : std::true_type {};
...
@@ -136,9 +136,9 @@ struct is_duration<std::chrono::duration<Period, Rep>> : std::true_type {};
/// convertible to one of STL's string types.
/// convertible to one of STL's string types.
template
<
class
T
>
template
<
class
T
>
struct
is_primitive
{
struct
is_primitive
{
static
constexpr
bool
value
=
std
::
is_convertible
<
T
,
std
::
string
>::
value
static
constexpr
bool
value
=
std
::
is_convertible
_v
<
T
,
std
::
string
>
||
std
::
is_convertible
<
T
,
std
::
u16string
>::
value
||
std
::
is_convertible
_v
<
T
,
std
::
u16string
>
||
std
::
is_convertible
<
T
,
std
::
u32string
>::
value
||
std
::
is_convertible
_v
<
T
,
std
::
u32string
>
||
std
::
is_arithmetic
<
T
>::
value
;
||
std
::
is_arithmetic
<
T
>::
value
;
};
};
...
@@ -449,8 +449,8 @@ CAF_HAS_MEMBER_TRAIT(size);
...
@@ -449,8 +449,8 @@ CAF_HAS_MEMBER_TRAIT(size);
template
<
class
F
,
class
T
>
template
<
class
F
,
class
T
>
struct
is_handler_for
{
struct
is_handler_for
{
static
constexpr
bool
value
static
constexpr
bool
value
=
std
::
is_convertible
<
F
,
std
::
function
<
void
(
T
&
)
>>::
value
=
std
::
is_convertible
_v
<
F
,
std
::
function
<
void
(
T
&
)
>>
||
std
::
is_convertible
<
F
,
std
::
function
<
void
(
const
T
&
)
>>::
value
;
||
std
::
is_convertible
_v
<
F
,
std
::
function
<
void
(
const
T
&
)
>>
;
};
};
template
<
class
T
>
template
<
class
T
>
...
@@ -808,8 +808,9 @@ template <class T, class To>
...
@@ -808,8 +808,9 @@ template <class T, class To>
class
has_convertible_data_member
{
class
has_convertible_data_member
{
private:
private:
template
<
class
U
>
template
<
class
U
>
static
auto
sfinae
(
U
*
x
)
->
std
::
integral_constant
<
static
auto
sfinae
(
U
*
x
)
bool
,
std
::
is_convertible
<
decltype
(
x
->
data
()),
To
*>::
value
>
;
->
std
::
integral_constant
<
bool
,
std
::
is_convertible_v
<
decltype
(
x
->
data
()),
To
*>>
;
template
<
class
U
>
template
<
class
U
>
static
auto
sfinae
(...)
->
std
::
false_type
;
static
auto
sfinae
(...)
->
std
::
false_type
;
...
@@ -917,7 +918,7 @@ struct is_trivial_inspector_value<true, T> {
...
@@ -917,7 +918,7 @@ struct is_trivial_inspector_value<true, T> {
template
<
class
T
>
template
<
class
T
>
struct
is_trivial_inspector_value
<
false
,
T
>
{
struct
is_trivial_inspector_value
<
false
,
T
>
{
static
constexpr
bool
value
=
std
::
is_convertible
<
T
,
std
::
string_view
>::
value
;
static
constexpr
bool
value
=
std
::
is_convertible
_v
<
T
,
std
::
string_view
>
;
};
};
#define CAF_ADD_TRIVIAL_LOAD_INSPECTOR_VALUE(type) \
#define CAF_ADD_TRIVIAL_LOAD_INSPECTOR_VALUE(type) \
...
...
libcaf_core/caf/detail/unique_function.hpp
View file @
c37e971a
...
@@ -85,7 +85,7 @@ public:
...
@@ -85,7 +85,7 @@ public:
template
<
template
<
class
T
,
class
T
,
class
=
typename
std
::
enable_if
<
class
=
typename
std
::
enable_if
<
!
std
::
is_convertible
<
T
,
raw_pointer
>
::
value
!
std
::
is_convertible
_v
<
T
,
raw_pointer
>
&&
std
::
is_same
<
decltype
((
std
::
declval
<
T
&>
())(
std
::
declval
<
Ts
>
()...)),
&&
std
::
is_same
<
decltype
((
std
::
declval
<
T
&>
())(
std
::
declval
<
Ts
>
()...)),
R
>::
value
>::
type
>
R
>::
value
>::
type
>
explicit
unique_function
(
T
f
)
:
unique_function
(
make_wrapper
(
std
::
move
(
f
)))
{
explicit
unique_function
(
T
f
)
:
unique_function
(
make_wrapper
(
std
::
move
(
f
)))
{
...
@@ -129,7 +129,7 @@ public:
...
@@ -129,7 +129,7 @@ public:
template
<
class
Fn
>
template
<
class
Fn
>
void
emplace
(
Fn
fn
)
{
void
emplace
(
Fn
fn
)
{
destroy
();
destroy
();
if
constexpr
(
std
::
is_convertible
<
Fn
,
raw_pointer
>::
value
)
{
if
constexpr
(
std
::
is_convertible
_v
<
Fn
,
raw_pointer
>
)
{
holds_wrapper_
=
false
;
holds_wrapper_
=
false
;
fptr_
=
fn
;
fptr_
=
fn
;
}
else
{
}
else
{
...
...
libcaf_core/caf/exec_main.hpp
View file @
c37e971a
...
@@ -95,7 +95,7 @@ int exec_main(F fun, int argc, char** argv) {
...
@@ -95,7 +95,7 @@ int exec_main(F fun, int argc, char** argv) {
}
}
helper
f
;
helper
f
;
using
result_type
=
decltype
(
f
(
fun
,
system
,
cfg
));
using
result_type
=
decltype
(
f
(
fun
,
system
,
cfg
));
if
constexpr
(
std
::
is_convertible
<
result_type
,
int
>::
value
)
{
if
constexpr
(
std
::
is_convertible
_v
<
result_type
,
int
>
)
{
return
f
(
fun
,
system
,
cfg
);
return
f
(
fun
,
system
,
cfg
);
}
else
{
}
else
{
f
(
fun
,
system
,
cfg
);
f
(
fun
,
system
,
cfg
);
...
...
libcaf_core/caf/expected.hpp
View file @
c37e971a
...
@@ -155,7 +155,7 @@ public:
...
@@ -155,7 +155,7 @@ public:
}
}
template
<
class
U
>
template
<
class
U
>
typename
std
::
enable_if
<
std
::
is_convertible
<
U
,
T
>::
value
,
expected
&>::
type
typename
std
::
enable_if
<
std
::
is_convertible
_v
<
U
,
T
>
,
expected
&>::
type
operator
=
(
U
x
)
{
operator
=
(
U
x
)
{
return
*
this
=
T
{
std
::
move
(
x
)};
return
*
this
=
T
{
std
::
move
(
x
)};
}
}
...
...
libcaf_core/caf/intrusive_ptr.hpp
View file @
c37e971a
...
@@ -87,8 +87,7 @@ public:
...
@@ -87,8 +87,7 @@ public:
template
<
class
Y
>
template
<
class
Y
>
intrusive_ptr
(
intrusive_ptr
<
Y
>
other
)
noexcept
:
ptr_
(
other
.
detach
())
{
intrusive_ptr
(
intrusive_ptr
<
Y
>
other
)
noexcept
:
ptr_
(
other
.
detach
())
{
static_assert
(
std
::
is_convertible
<
Y
*
,
T
*>::
value
,
static_assert
(
std
::
is_convertible_v
<
Y
*
,
T
*>
,
"Y* is not assignable to T*"
);
"Y* is not assignable to T*"
);
}
}
~
intrusive_ptr
()
{
~
intrusive_ptr
()
{
...
...
libcaf_core/caf/load_inspector_base.hpp
View file @
c37e971a
...
@@ -134,7 +134,7 @@ public:
...
@@ -134,7 +134,7 @@ public:
return
false
;
return
false
;
}
}
}
else
{
}
else
{
static_assert
(
std
::
is_convertible
<
setter_result
,
error
>::
value
,
static_assert
(
std
::
is_convertible
_v
<
setter_result
,
error
>
,
"a setter must return caf::error, bool or void"
);
"a setter must return caf::error, bool or void"
);
if
(
dref
().
apply
(
tmp
))
{
if
(
dref
().
apply
(
tmp
))
{
if
(
auto
err
=
set
(
std
::
move
(
tmp
));
!
err
)
{
if
(
auto
err
=
set
(
std
::
move
(
tmp
));
!
err
)
{
...
...
libcaf_core/caf/optional.hpp
View file @
c37e971a
...
@@ -34,7 +34,7 @@ public:
...
@@ -34,7 +34,7 @@ public:
/// Creates an valid instance from `value`.
/// Creates an valid instance from `value`.
template
<
class
U
,
template
<
class
U
,
class
E
class
E
=
typename
std
::
enable_if
<
std
::
is_convertible
<
U
,
T
>
::
value
>::
type
>
=
typename
std
::
enable_if
<
std
::
is_convertible
_v
<
U
,
T
>
>::
type
>
optional
(
U
x
)
:
m_valid
(
false
)
{
optional
(
U
x
)
:
m_valid
(
false
)
{
cr
(
std
::
move
(
x
));
cr
(
std
::
move
(
x
));
}
}
...
...
libcaf_core/caf/weak_intrusive_ptr.hpp
View file @
c37e971a
...
@@ -51,8 +51,7 @@ public:
...
@@ -51,8 +51,7 @@ public:
template
<
class
Y
>
template
<
class
Y
>
weak_intrusive_ptr
(
weak_intrusive_ptr
<
Y
>
other
)
noexcept
weak_intrusive_ptr
(
weak_intrusive_ptr
<
Y
>
other
)
noexcept
:
ptr_
(
other
.
detach
())
{
:
ptr_
(
other
.
detach
())
{
static_assert
(
std
::
is_convertible
<
Y
*
,
T
*>::
value
,
static_assert
(
std
::
is_convertible_v
<
Y
*
,
T
*>
,
"Y* is not assignable to T*"
);
"Y* is not assignable to T*"
);
}
}
~
weak_intrusive_ptr
()
{
~
weak_intrusive_ptr
()
{
...
...
libcaf_core/tests/legacy/typed_spawn.cpp
View file @
c37e971a
...
@@ -28,17 +28,17 @@ using dummy1 = typed_actor<result<void>(int, int), result<double>(double)>;
...
@@ -28,17 +28,17 @@ using dummy1 = typed_actor<result<void>(int, int), result<double>(double)>;
using
dummy2
=
dummy1
::
extend
<
result
<
void
>
(
ok_atom
)
>
;
using
dummy2
=
dummy1
::
extend
<
result
<
void
>
(
ok_atom
)
>
;
static_assert
(
std
::
is_convertible
<
dummy2
,
dummy1
>::
value
,
static_assert
(
std
::
is_convertible
_v
<
dummy2
,
dummy1
>
,
"handle not assignable to narrower definition"
);
"handle not assignable to narrower definition"
);
using
dummy3
=
typed_actor
<
result
<
void
>
(
float
,
int
)
>
;
using
dummy3
=
typed_actor
<
result
<
void
>
(
float
,
int
)
>
;
using
dummy4
=
typed_actor
<
result
<
double
>
(
int
)
>
;
using
dummy4
=
typed_actor
<
result
<
double
>
(
int
)
>
;
using
dummy5
=
dummy4
::
extend_with
<
dummy3
>
;
using
dummy5
=
dummy4
::
extend_with
<
dummy3
>
;
static_assert
(
std
::
is_convertible
<
dummy5
,
dummy3
>::
value
,
static_assert
(
std
::
is_convertible
_v
<
dummy5
,
dummy3
>
,
"handle not assignable to narrower definition"
);
"handle not assignable to narrower definition"
);
static_assert
(
std
::
is_convertible
<
dummy5
,
dummy4
>::
value
,
static_assert
(
std
::
is_convertible
_v
<
dummy5
,
dummy4
>
,
"handle not assignable to narrower definition"
);
"handle not assignable to narrower definition"
);
// -- simple request/response test ---------------------------------------------
// -- simple request/response test ---------------------------------------------
...
...
libcaf_io/caf/io/typed_broker.hpp
View file @
c37e971a
...
@@ -123,13 +123,13 @@ public:
...
@@ -123,13 +123,13 @@ public:
expected
<
connection_handle
>
add_tcp_scribe
(
const
std
::
string
&
host
,
expected
<
connection_handle
>
add_tcp_scribe
(
const
std
::
string
&
host
,
uint16_t
port
)
{
uint16_t
port
)
{
static_assert
(
std
::
is_convertible
<
actor_hdl
,
connection_handler
>::
value
,
static_assert
(
std
::
is_convertible
_v
<
actor_hdl
,
connection_handler
>
,
"Cannot add scribe: broker misses required handlers"
);
"Cannot add scribe: broker misses required handlers"
);
return
super
::
add_tcp_scribe
(
host
,
port
);
return
super
::
add_tcp_scribe
(
host
,
port
);
}
}
connection_handle
add_tcp_scribe
(
network
::
native_socket
fd
)
{
connection_handle
add_tcp_scribe
(
network
::
native_socket
fd
)
{
static_assert
(
std
::
is_convertible
<
actor_hdl
,
connection_handler
>::
value
,
static_assert
(
std
::
is_convertible
_v
<
actor_hdl
,
connection_handler
>
,
"Cannot add scribe: broker misses required handlers"
);
"Cannot add scribe: broker misses required handlers"
);
return
super
::
add_tcp_scribe
(
fd
);
return
super
::
add_tcp_scribe
(
fd
);
}
}
...
@@ -137,13 +137,13 @@ public:
...
@@ -137,13 +137,13 @@ public:
expected
<
std
::
pair
<
accept_handle
,
uint16_t
>>
expected
<
std
::
pair
<
accept_handle
,
uint16_t
>>
add_tcp_doorman
(
uint16_t
port
=
0
,
const
char
*
in
=
nullptr
,
add_tcp_doorman
(
uint16_t
port
=
0
,
const
char
*
in
=
nullptr
,
bool
reuse_addr
=
false
)
{
bool
reuse_addr
=
false
)
{
static_assert
(
std
::
is_convertible
<
actor_hdl
,
accept_handler
>::
value
,
static_assert
(
std
::
is_convertible
_v
<
actor_hdl
,
accept_handler
>
,
"Cannot add doorman: broker misses required handlers"
);
"Cannot add doorman: broker misses required handlers"
);
return
super
::
add_tcp_doorman
(
port
,
in
,
reuse_addr
);
return
super
::
add_tcp_doorman
(
port
,
in
,
reuse_addr
);
}
}
expected
<
accept_handle
>
add_tcp_doorman
(
network
::
native_socket
fd
)
{
expected
<
accept_handle
>
add_tcp_doorman
(
network
::
native_socket
fd
)
{
static_assert
(
std
::
is_convertible
<
actor_hdl
,
accept_handler
>::
value
,
static_assert
(
std
::
is_convertible
_v
<
actor_hdl
,
accept_handler
>
,
"Cannot add doorman: broker misses required handlers"
);
"Cannot add doorman: broker misses required handlers"
);
return
super
::
add_tcp_doorman
(
fd
);
return
super
::
add_tcp_doorman
(
fd
);
}
}
...
...
libcaf_test/caf/test/unit_test.hpp
View file @
c37e971a
...
@@ -68,9 +68,9 @@ struct equality_operator {
...
@@ -68,9 +68,9 @@ struct equality_operator {
template
<
class
T
,
class
U
,
template
<
class
T
,
class
U
,
detail
::
enable_if_t
<
((
std
::
is_floating_point
<
T
>
::
value
detail
::
enable_if_t
<
((
std
::
is_floating_point
<
T
>
::
value
&&
std
::
is_convertible
<
U
,
double
>::
value
)
&&
std
::
is_convertible
_v
<
U
,
double
>
)
||
(
std
::
is_floating_point
<
U
>::
value
||
(
std
::
is_floating_point
<
U
>::
value
&&
std
::
is_convertible
<
T
,
double
>::
value
)
)
&&
std
::
is_convertible
_v
<
T
,
double
>
)
)
&&
detail
::
is_comparable
<
T
,
U
>::
value
,
&&
detail
::
is_comparable
<
T
,
U
>::
value
,
int
>
int
>
=
0
>
=
0
>
...
@@ -84,9 +84,9 @@ struct equality_operator {
...
@@ -84,9 +84,9 @@ struct equality_operator {
template
<
class
T
,
class
U
,
template
<
class
T
,
class
U
,
detail
::
enable_if_t
<!
((
std
::
is_floating_point
<
T
>
::
value
detail
::
enable_if_t
<!
((
std
::
is_floating_point
<
T
>
::
value
&&
std
::
is_convertible
<
U
,
double
>::
value
)
&&
std
::
is_convertible
_v
<
U
,
double
>
)
||
(
std
::
is_floating_point
<
U
>::
value
||
(
std
::
is_floating_point
<
U
>::
value
&&
std
::
is_convertible
<
T
,
double
>::
value
)
)
&&
std
::
is_convertible
_v
<
T
,
double
>
)
)
&&
detail
::
is_comparable
<
T
,
U
>::
value
,
&&
detail
::
is_comparable
<
T
,
U
>::
value
,
int
>
int
>
=
0
>
=
0
>
...
@@ -294,7 +294,7 @@ public:
...
@@ -294,7 +294,7 @@ public:
};
};
using
fwd
=
using
fwd
=
typename
std
::
conditional
<
std
::
is_same_v
<
char
,
T
>
typename
std
::
conditional
<
std
::
is_same_v
<
char
,
T
>
||
std
::
is_convertible
<
T
,
std
::
string
>::
value
||
std
::
is_convertible
_v
<
T
,
std
::
string
>
||
std
::
is_same_v
<
caf
::
term
,
T
>
,
||
std
::
is_same_v
<
caf
::
term
,
T
>
,
simple_fwd_t
,
deep_to_string_t
>::
type
;
simple_fwd_t
,
deep_to_string_t
>::
type
;
fwd
f
;
fwd
f
;
...
...
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