hkaiser changed the topic of #ste||ar to: STE||AR: Systems Technology, Emergent Parallelism, and Algorithm Research | stellar-group.org | HPX: A cure for performance impaired parallel applications | github.com/STEllAR-GROUP/hpx | This channel is logged: irclog.cct.lsu.edu
Yorlik_ has joined #ste||ar
Yorlik__ has quit [Ping timeout: 250 seconds]
hkaiser has quit [Quit: Bye!]
hkaiser has joined #ste||ar
tufei has quit [Quit: Leaving]
jbjnr[m] has quit [Remote host closed the connection]
tufei has joined #ste||ar
hkaiser has quit [Read error: Connection reset by peer]
hkaiser has joined #ste||ar
HHN93 has joined #ste||ar
<HHN93> Can we do if else with std::enable_if in template?
jbjnr[m] has joined #ste||ar
<HHN93> this gives me an ambiguous overload error
<HHN93> but here in notes something similar works, am I doing something wrong?
<hkaiser> HHN93: sure
<hkaiser> enable_if<some_condition> and enable_if<!some_condition>
<hkaiser> or simply use if constexpr()
<HHN93> `enable_if<some_condition> and enable_if<!some_condition>` me an ambiguous overload error
<hkaiser> you're not using the same condition
<HHN93> `enable_if<some_condition> and enable_if<!some_condition>`
<HHN93> do you mean typename = enable_if<condition>?
<HHN93> that gives me ambigous error
<hkaiser> HHN93: your boolean conditions of the enable_if have to create non-overlapping overload sets
<HHN93>          template <typename ExPolicy, typename InIter, typename FwdIter2,
<HHN93>                 typename = std::enable_if_t<
<HHN93>                     !hpx::is_unsequenced_execution_policy_v<ExPolicy>>>
<HHN93> would something like this be right?
<HHN93> the other template has no !
<HHN93>  2585 | using enable_if_t = typename enable_if<_Cond, _Tp>::type;
<HHN93> I get an error like this