2021-08-06 22:55
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
02:57
Yorlik_ has joined #ste||ar
03:01
Yorlik has quit [Ping timeout: 265 seconds]
04:15
hkaiser has quit [Quit: Bye!]
04:21
tufei_ has quit [Remote host closed the connection]
04:59
K-ballo1 has joined #ste||ar
04:59
K-ballo has quit [Ping timeout: 252 seconds]
04:59
K-ballo1 is now known as K-ballo
12:28
hkaiser has joined #ste||ar
13:35
K-ballo has quit [Ping timeout: 260 seconds]
13:42
K-ballo has joined #ste||ar
13:48
hkaiser has quit [Quit: Bye!]
16:17
diehlpk_work has joined #ste||ar
16:38
<
gonidelis[m] >
are the clauses before `requires` also "requirements"? like "the specialization graph<G>" should be valid or sth?
16:40
<
satacker[m] >
is that `graph<T>` a concept?
16:41
<
gonidelis[m] >
ahhh! very nice
16:41
<
gonidelis[m] >
thanks!
16:41
<
gonidelis[m] >
(yes it is)
16:41
<
gonidelis[m] >
so it's just a bunch of predefined concepts + a newly defined one (requires)
16:41
<
gonidelis[m] >
thanks
16:43
<
gonidelis[m] >
yes of course
16:54
hkaiser has joined #ste||ar
18:34
hkaiser has quit [Quit: Bye!]
19:20
hkaiser has joined #ste||ar
20:44
Yorlik_ has quit [Ping timeout: 256 seconds]
21:04
K-ballo1 has joined #ste||ar
21:04
<
gonidelis[m] >
anyone understand what this line means?
21:04
<
gonidelis[m] >
`{ *in } -> std::same_as<std::iter_reference_t<In>>;`
21:04
<
gonidelis[m] >
i thought `same_as<>` takes two template arguments
21:04
<
hkaiser >
it's concept requiring that whatever *it returns needs to be the same as the reference type exposed by the iterator it
21:05
<
hkaiser >
is_same_as requires two arguments, same_as is a concept as well
21:05
K-ballo has quit [Ping timeout: 260 seconds]
21:05
K-ballo1 is now known as K-ballo
21:05
<
hkaiser >
IOW, if an iterator exposes T as it's reference type, then operator*() should return T
21:32
K-ballo has quit [Ping timeout: 256 seconds]
21:32
K-ballo1 has joined #ste||ar
21:34
K-ballo1 is now known as K-ballo
21:44
<
gonidelis[m] >
makes sense
21:44
<
gonidelis[m] >
thanks
21:47
<
gonidelis[m] >
Hartmut, I cannot find any reference to std::is_same_as
21:48
<
hkaiser >
gonidelis[m]: it's just is_same<T1, T2>, sorry
21:48
<
gonidelis[m] >
I only see same_ss which takes two arguments and this one takes only one. i reckon it's a metafunction?
21:48
<
gonidelis[m] >
oh my god
21:49
<
K-ballo >
sometimes a concept expression can omit one parameter and it is deduced from the context
21:49
<
gonidelis[m] >
but this is not the case here
21:49
<
K-ballo >
this is the case here
21:49
<
K-ballo >
there's two arguments to `std::same_as`, one explicit, one deduced
21:50
<
gonidelis[m] >
so it's not the c++11 <type_traits> std::same_as ?
21:50
<
hkaiser >
same_as is the concept
21:50
<
K-ballo >
same_as is a concept, not a c++11 trait
21:51
<
gonidelis[m] >
ok scratch it
21:51
<
gonidelis[m] >
is_same != same_as
21:51
<
gonidelis[m] >
i just noticed :)
21:52
<
K-ballo >
same_as does subsumption, which the is_same trait simply cant
21:52
<
gonidelis[m] >
alright
21:52
<
gonidelis[m] >
what kind of subsumption? how does it deduce the second arg?
21:53
<
hkaiser >
c++ susumption
21:53
<
K-ballo >
same_as<X, Y> subsumes same_as<Y, X>
21:54
<
K-ballo >
whereas is_same<X, Y> and is_same<Y, X> are distinct and unrelated to each other
21:55
<
gonidelis[m] >
ok yeah
21:55
<
gonidelis[m] >
but still it does not answer how a concept that accepts two arguments (std::same_as) can work with one argument, right?
21:56
<
K-ballo >
it's deduced from context, as said above
21:56
<
gonidelis[m] >
cppref does not mention how.
21:56
<
K-ballo >
in that particular context, giving two explicit arguments would not even be allowed
21:57
<
gonidelis[m] >
neither does the standard
21:57
<
gonidelis[m] >
yes it makes sense semantically
21:58
<
gonidelis[m] >
but how does the compiler not complaining
22:01
<
K-ballo >
the compiler would complain if there were two explicit arguments
22:01
<
gonidelis[m] >
where is that stated?
22:02
<
K-ballo >
in the standard
22:03
<
gonidelis[m] >
i am probably looking at the wrong section
22:03
<
K-ballo >
in the standard for concepts
22:03
<
K-ballo >
type-constraints in this particular context
22:04
<
K-ballo >
it applies to all concepts, not just same_as
22:04
<
gonidelis[m] >
yeah i believe you
22:04
<
gonidelis[m] >
i am just looking to find out where it's stated
22:05
<
gonidelis[m] >
Explicit instantiations, explicit specializations, or partial
22:05
<
gonidelis[m] >
specializations of concepts are not allowed (the meaning of the original
22:05
<
gonidelis[m] >
definition of a constraint cannot be changed).
22:05
<
gonidelis[m] >
partial specializations of concepts are not allowed
22:06
<
gonidelis[m] >
ah!!!
22:06
<
gonidelis[m] >
In a type-constraint, a concept takes one less template argument than its parameter list demands, because the contextually deduced type is implicitly used as the first argument of the concept.
22:06
<
K-ballo >
that does not sound like the standard.. is it in a note?
22:06
<
gonidelis[m] >
yeah that's from cppref
22:07
<
gonidelis[m] >
but I understand now how
22:07
<
gonidelis[m] >
it's the contextualy deduced type
22:07
<
gonidelis[m] >
contextually*
22:07
<
K-ballo >
[temp.param]/4
22:08
<
gonidelis[m] >
may I ask, what is a "type-constraint" ?
22:08
<
K-ballo >
the thing after the ->
22:09
<
gonidelis[m] >
thanks
22:21
<
gonidelis[m] >
type-constrains are types of concepts, right?
22:21
<
gonidelis[m] >
constraints*
22:30
diehlpk_work has quit [Remote host closed the connection]