C++ Logo


Advanced search

Subject: Re: Explicit instantiation declarations and requires clauses
From: Christopher Head (chead_at_[hidden])
Date: 2019-09-28 12:15:42

On Sat, 28 Sep 2019 12:55:58 -0400
Krystian Stasiowski via Std-Discussion
<std-discussion_at_[hidden]> wrote:

> See http://eel.is/c++draft/temp.names#8

If I understand correctly, you’re saying that I’m right and an explicit
instantiation declaration does require a complete type as its parameter
if the parameter is constrained. That was the first part of my

The second part, which was the real meat of my question, is why the
standard is written this way? As I explained in my first e-mail, it
seems both unnecessary (an explicit instantiation declaration doesn’t
*need* to check that the constraint is satisfied, because it must be
accompanied by an explicit instantiation definitino in some translation
unit, and *that* could check the constraint) and annoying (because if
this were not the case, we could use incomplete types in explicit
instantiation declarations, which would reduce the proliferation of
includes). Is there a good reason for explicit instantiation
declarations to check their constraints?


Christopher Head

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

Older Archives on Google Groups