C++ Logo

std-proposals

Advanced search

Re: [std-proposals] std::arithmetic (concept)

From: Frederick Virchanza Gotham <cauldwell.thomas_at_[hidden]>
Date: Tue, 15 Apr 2025 10:02:14 +0100
On Tuesday, April 15, 2025, Jason McKesson wrote:

>
> There's a reason concepts are the only kind of template that can't be
> specialized. It is *very* important to the integrity of the concepts
> system that there's a single, fixed definition against which all
> constrained templates can be tested. `concept_name<type>` should have
> exactly and only one answer, and that answer must be the same
> everywhere.
>


You would never get a "bad answer" though.

Translation units that don't include "HugeInt.hpp" won't ever make
reference to the class 'HugeInt', and therefore it doesn't matter if the
concept allows for HugeInt in some translation units but not in others.

Received on 2025-04-15 09:02:18