C++ Logo

std-discussion

Advanced search

Re: Explicit instantiation declarations and requires clauses

From: Christopher Head <chead_at_[hidden]>
Date: Mon, 21 Oct 2019 22:07:55 -0700
On Sat, 28 Sep 2019 16:53:30 -0700
Christopher Head via Std-Discussion <std-discussion_at_[hidden]>
wrote:

> On Sat, 28 Sep 2019 17:19:20 -0400
> Krystian Stasiowski via Std-Discussion
> <std-discussion_at_[hidden]> wrote:
>
> > Yes on the first part. As for the *why*, I don't know the real
> > intent behind it, but I presume it's because it would suppress
> > implicit instantiation for the specialization, and therefore when
> > naming that specialization, the constraints would never be checked.
> > null
>
> But they would, wouldn’t they? If there’s an explicit instantiation
> declaration, then implicit instantiation of things is inhibited. If
> those things are used, then they must be instantiated in some
> translation unit, typically by an explicit instantiation definition.
> The constraints would be checked there. And if the things are never
> actually used, does anyone care whether the constraints are met?

Is this not a correct interpretation, or is it just that nobody really
cares all that much about using forward declarations?
-- 
Christopher Head

Received on 2019-10-22 00:10:13