On Thu, Jun 13, 2019 at 8:52 PM Tam S. B. via Std-Discussion <std-discussion@lists.isocpp.org> wrote:
I don't know previous discussion, but I guess this is a problematic case:

    template<int> struct X;
    constexpr std::vector<std::unique_ptr<int>> V = ...;
    auto f() -> X<*V[0]>;
    *V[0] = 42;
    auto f() -> X<*V[0]>;

Here two declarations of `f()` need to have the same type, but it won't be possible if `*V[0]` doesn't have a constant value.
--
Std-Discussion mailing list
Std-Discussion@lists.isocpp.org
http://lists.isocpp.org/mailman/listinfo.cgi/std-discussion

I don't think that would pose a problem under the current wording of P0784, since *V[0] would not be a constant expression, and in general any lvalue-to-rvalue conversion performed on a non-transient constexpr allocation would be disallowed in a constant expression.

Though, thinking about this raises more questions. I suppose the challenge is to find a way to allow something like:

constexpr std::vector<int> W = ...;
constexpr int x = W[0];

while disallowing your example.

It would be really great if someone who knows what exactly is going on would chime in.
--
Brian Bi