Louis Dionne
não lida,14 de jul. de 2017, 16:28:1914/07/2017Faça login para responder ao autor
Faça login para encaminhar
Você não tem permissão para excluir mensagens no grupo
Mostrar mensagem original
Os endereços de e-mail são anônimos para o grupo ou a permissão para ver os endereços de e-mail dos participantes é necessária para ver a mensagem original.
para refle...@isocpp.org, e...@lists.isocpp.org, David Vandevoorde, Peter Bindels
I think we already have a similar problem with the currently proposed
reflexpr (per P0194):
// a.h
using X = reflexpr(int);
void foo(X*);
// a.cc
#include "a.h"
void foo(X*) { }
// b.cc
#include "a.h"
int main() {
foo(nullptr); // does that link?
}
I think this can be clarified by making sure that a type resulting from
`reflexpr` can never appear in the signature of a function with external
linkage, etc.. I think this problem is similar to what we run into when
we try to make lambdas appear in an unevaluated context, and we could
probably apply a similar fix.
For our approach (and the problem you raised with it), we could probably
just mandate that one can't create a `std::meta::type` outside of a
constexpr context, and that a `std::meta::type` can't escape a constexpr
context. Peter’s solution may also work. In any case, I don’t think it’s
a deal breaker at this stage in the design (but we should certainly tackle
this when we get to wording).
Louis
Note: I’m confused why there’s both
refle...@isocpp.org and
e...@lists.isocpp.org
in the recipients of the original message. I’m replying to both, just in case.
> To unsubscribe from this group and stop receiving emails from it, send an email to
reflection+...@isocpp.org.