Skip to content

Commit

Permalink
#276: traits: work around difference with clang and gcc
Browse files Browse the repository at this point in the history
  • Loading branch information
lifflander committed Jun 13, 2023
1 parent cc20c21 commit 59b93d6
Showing 1 changed file with 28 additions and 28 deletions.
56 changes: 28 additions & 28 deletions src/vt/utils/fntraits/fntraits.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ struct ObjFuncTraitsImpl;
template <typename Obj, typename Return, typename Msg>
struct ObjFuncTraitsImpl<
std::enable_if_t<
(std::is_convertible<Msg, vt::Message>::value or
std::is_convertible<Msg, vt::ShortMessage>::value or
std::is_convertible<Msg, vt::EpochMessage>::value or
std::is_convertible<Msg, vt::PayloadMessage>::value)
(std::is_convertible<Msg*, vt::Message*>::value or
std::is_convertible<Msg*, vt::ShortMessage*>::value or
std::is_convertible<Msg*, vt::EpochMessage*>::value or
std::is_convertible<Msg*, vt::PayloadMessage*>::value)
and
std::is_pointer<Obj>::value
>,
Expand Down Expand Up @@ -118,10 +118,10 @@ struct ObjFuncTraitsImpl<
template <typename Obj, typename Return, typename Msg>
struct ObjFuncTraitsImpl<
std::enable_if_t<
std::is_convertible<Msg, vt::Message>::value or
std::is_convertible<Msg, vt::ShortMessage>::value or
std::is_convertible<Msg, vt::EpochMessage>::value or
std::is_convertible<Msg, vt::PayloadMessage>::value
std::is_convertible<Msg*, vt::Message*>::value or
std::is_convertible<Msg*, vt::ShortMessage*>::value or
std::is_convertible<Msg*, vt::EpochMessage*>::value or
std::is_convertible<Msg*, vt::PayloadMessage*>::value
>,
Return(Obj::*)(Msg*)
> {
Expand Down Expand Up @@ -171,10 +171,10 @@ struct ObjFuncTraitsImpl<
template <typename Return, typename Msg>
struct ObjFuncTraitsImpl<
std::enable_if_t<
std::is_convertible<Msg, vt::Message>::value or
std::is_convertible<Msg, vt::ShortMessage>::value or
std::is_convertible<Msg, vt::EpochMessage>::value or
std::is_convertible<Msg, vt::PayloadMessage>::value
std::is_convertible<Msg*, vt::Message*>::value or
std::is_convertible<Msg*, vt::ShortMessage*>::value or
std::is_convertible<Msg*, vt::EpochMessage*>::value or
std::is_convertible<Msg*, vt::PayloadMessage*>::value
>,
Return(*)(Msg*)
> {
Expand Down Expand Up @@ -228,10 +228,10 @@ struct FunctorTraitsImpl;
template <typename FunctorT, typename Return, typename Msg>
struct FunctorTraitsImpl<
std::enable_if_t<
std::is_convertible<Msg, vt::Message>::value or
std::is_convertible<Msg, vt::ShortMessage>::value or
std::is_convertible<Msg, vt::EpochMessage>::value or
std::is_convertible<Msg, vt::PayloadMessage>::value
std::is_convertible<Msg*, vt::Message*>::value or
std::is_convertible<Msg*, vt::ShortMessage*>::value or
std::is_convertible<Msg*, vt::EpochMessage*>::value or
std::is_convertible<Msg*, vt::PayloadMessage*>::value
>,
FunctorT,
Return(FunctorT::*)(Msg*)
Expand Down Expand Up @@ -285,10 +285,10 @@ struct FunctorTraitsImpl<
template <typename FunctorT, typename Return, typename Msg>
struct FunctorTraitsImpl<
std::enable_if_t<
std::is_convertible<Msg, vt::Message>::value or
std::is_convertible<Msg, vt::ShortMessage>::value or
std::is_convertible<Msg, vt::EpochMessage>::value or
std::is_convertible<Msg, vt::PayloadMessage>::value
std::is_convertible<Msg*, vt::Message*>::value or
std::is_convertible<Msg*, vt::ShortMessage*>::value or
std::is_convertible<Msg*, vt::EpochMessage*>::value or
std::is_convertible<Msg*, vt::PayloadMessage*>::value
>,
FunctorT,
Return(FunctorT::*)(Msg*) const
Expand Down Expand Up @@ -347,10 +347,10 @@ struct CBTraitsImpl;
template <typename Msg>
struct CBTraitsImpl<
std::enable_if_t<
std::is_convertible<Msg, vt::Message>::value or
std::is_convertible<Msg, vt::ShortMessage>::value or
std::is_convertible<Msg, vt::EpochMessage>::value or
std::is_convertible<Msg, vt::PayloadMessage>::value
std::is_convertible<Msg*, vt::Message*>::value or
std::is_convertible<Msg*, vt::ShortMessage*>::value or
std::is_convertible<Msg*, vt::EpochMessage*>::value or
std::is_convertible<Msg*, vt::PayloadMessage*>::value
>,
Msg
> {
Expand All @@ -369,10 +369,10 @@ template <typename Arg, typename... Args>
struct CBTraitsImpl<
std::enable_if_t<
not (
std::is_convertible<Arg, vt::Message>::value or
std::is_convertible<Arg, vt::ShortMessage>::value or
std::is_convertible<Arg, vt::EpochMessage>::value or
std::is_convertible<Arg, vt::PayloadMessage>::value
std::is_convertible<Arg*, vt::Message*>::value or
std::is_convertible<Arg*, vt::ShortMessage*>::value or
std::is_convertible<Arg*, vt::EpochMessage*>::value or
std::is_convertible<Arg*, vt::PayloadMessage*>::value
)
>,
Arg,
Expand Down

0 comments on commit 59b93d6

Please sign in to comment.