C++ Logo


Advanced search

Re: Explicit instantiation declarations and requires clauses

From: Christopher Head <chead_at_[hidden]>
Date: Sat, 28 Sep 2019 16:53:30 -0700
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?
Christopher Head

Received on 2019-09-28 18:55:49