Talk:cpp/types/is constructible

The page states that:

Only the validity of the immediate context of the variable definition is considered.

This statement is somewhat unclear, what context does "the immediate context" refer to? The context where std::is_constructible is used, or the context within the instantiation of std::is_constructible? See (old) discussion in on Stackoverflow. (My two cents are that it shouldn't be the context where it is used, since that would require different instantiation with the same template parameters in different contexts.)

A comment from that link also mentions that in the standard

§20.10.4.3/7 says that is_constructible only reflects the public interface

So even if the "immediate context" has access to non-public constructors of a class, std::is_constructible should return false for such constructors, which the statement here does not imply.

211.83.100.166 23:03, 30 October 2018 (PDT)


 * the "immediate context" sentence is just a direct quote from the standard, specifically meta.unary#prop-8.sentence-4, but the standard goes on to explain what it means in detail, see the Note in meta.unary#prop-8. As for private access and friend functions, that's an unrelated, rule, though it appears in the same subclause. Namely, meta.unary#prop-8.sentence-3 --Cubbi (talk) 04:03, 31 October 2018 (PDT)