C++ Logo

STD-DISCUSSION

Advanced search

Subject: Re: Explicit instantiation declarations and requires clauses
From: Christopher Head (chead_at_[hidden])
Date: 2019-09-28 18:53:30


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



STD-DISCUSSION list run by herb.sutter at gmail.com

Older Archives on Google Groups