hkaiser changed the topic of #ste||ar to: STE||AR: Systems Technology, Emergent Parallelism, and Algorithm Research | stellar.cct.lsu.edu | HPX: A cure for performance impaired parallel applications | github.com/STEllAR-GROUP/hpx | Buildbot: http://rostam.cct.lsu.edu/ | Log: http://irclog.cct.lsu.edu/ | GSoC: https://github.com/STEllAR-GROUP/hpx/wiki/Google-Summer-of-Code-%28GSoC%29-2020
Yorlik has joined #ste||ar
hkaiser has quit [Quit: bye]
bita_ has quit [Ping timeout: 246 seconds]
oleg[m] has quit [Quit: Idle for 30+ days]
hkaiser has joined #ste||ar
diehlpk__ has joined #ste||ar
diehlpk__ has quit [Ping timeout: 260 seconds]
hkaiser has quit [Quit: bye]
hkaiser has joined #ste||ar
nikunj97 has joined #ste||ar
nikunj97 has quit [Quit: Leaving]
nikunj97 has joined #ste||ar
Nikunj__ has joined #ste||ar
nikunj97 has quit [Ping timeout: 240 seconds]
bita_ has joined #ste||ar
K-ballo has quit [Quit: K-ballo]
K-ballo has joined #ste||ar
Nikunj__ is now known as nikunj97
<nikunj97> K-ballo, is this "template parameters not deducible in partial specialization" related to incorrect template specialization (i.e. compiler not able to see this as different specialization compared to others) or type deduction error?
<nikunj97> hkaiser ^^
<K-ballo> sounds like you have a template parameter that's not deducible...
<K-ballo> template <typename X, typename T> struct foo<T> {}; // and X?
<nikunj97> I see, I think I know why its coming then
<K-ballo> the compiler should be pointing to the bogus specialization already, no?
<nikunj97> yes, it is
<nikunj97> I wanted to make sure if it was actually due to type deduction and not template specialization
<nikunj97> it is coming from here:
<nikunj97> template <typename Pred, typename Func, typename... Args>
<nikunj97> struct get_param_pack<
<nikunj97> std::enable_if_t<std::__is_invocable<Func, Args...>::value >
<nikunj97> std::enable_if_t<!std::__is_invocable<Pred, Args...>::value>,
<nikunj97> Func(Args...),
<nikunj97> >
<nikunj97> sorry for the __is_invocable, my build of hpx is keeping me from using is_invocable at the moment :P
<K-ballo> ...
<nikunj97> K-ballo, this worked:
<nikunj97> template <typename Pred, typename Func, typename... Args>
<nikunj97> struct get_param_pack<
<nikunj97> Func(Args...),
<nikunj97> Pred(std::result_of<Func(Args...)>),
<nikunj97> std::enable_if_t<std::__is_invocable<Func, Args...>::value>
<nikunj97> >
<nikunj97> I don't understand why it won't take the previous version though
<K-ballo> which one was the non deducible param?
<K-ballo> Pred
<nikunj97> the first one
<nikunj97> yes, Pred came out to be the non deducible parameter
<K-ballo> how were you expecting the compiler to deduce it from `std::__is_invocable<Pred, Args...>::value`?
<nikunj97> the function is not invocable
<K-ballo> no, that's not the question
<nikunj97> that's why I though std::enable_if_t<!std::is_invocable<Pred, Args...>::value> may provide an extra specialization
<K-ballo> presumably this is used like get_param_pack<X, Y, Z...>, how is Pred going to be deduced as X?
<nikunj97> ohh yes, wait. It can't.
<nikunj97> you're right, it is not deducible
<K-ballo> result_of was deprecated btw, in favor of invoke_result
<nikunj97> ohh right, in C++17 right?
<K-ballo> alongside is_invocable, yes
<K-ballo> invoke_result<Func, Args...> = result_of<Func&&(Args&&...)>
<nikunj97> nice, thanks!
<K-ballo> this is not going back into HPX, right?
<nikunj97> not now, in future though
<nikunj97> am I getting something wrong?
<K-ballo> consider using hpx's invoke_result/is_invocable, rather than waiting for hpx to drop c++14 support
<nikunj97> ohh yes, I'll switch them when I integrate them with HPX
<nikunj97> that's what I did last time as well
Yorlik_ has joined #ste||ar
Yorlik has quit [Ping timeout: 240 seconds]
<nikunj97> hkaiser, yt?
<hkaiser> nikunj97: here
<nikunj97> hkaiser, can we work for sfinae functions for now please and think about converting them to template specialization later?
<nikunj97> s/work for/work with
<hkaiser> sure
<hkaiser> the conversion is trivial
<nikunj97> thanks. I've been biting over my head for some reason for days now.
<hkaiser> I can help with that
<nikunj97> ok, I need to know how it is converted then. Because I'm getting something completely wrong.
<nikunj97> Wait, let me add a PR with clean SFINAE functions first with working code, and let us take it from there.
<hkaiser> yes, good move