C++ Logo


Advanced search

Subject: Re: Wording for P2295 based on P2314
From: Charlie Barto (Charles.Barto_at_[hidden])
Date: 2021-06-22 17:04:50

set? specify?

Determine really had me thinking it was about the user getting information from the compiler, not the other way round.

-----Original Message-----
From: Jens Maurer <Jens.Maurer_at_[hidden]>
Sent: Tuesday, June 22, 2021 2:59 PM
To: sg16_at_[hidden]; Peter Brett <pbrett_at_[hidden]>
Cc: Charlie Barto <Charles.Barto_at_[hidden]>; Corentin <corentin.jabot_at_[hidden]>
Subject: Re: [SG16] Wording for P2295 based on P2314

On 22/06/2021 23.54, Charlie Barto via SG16 wrote:
>> The encoding scheme of a physical source file is determined in an
>> implementation- defined manner. An implementation shall provide a
>> mechanism to determine the encoding of a source file that is independent of its content.
> How does this work if the file is stored in an encoding where, for example, all the characters in the basic source character set had multi-byte representations, or were otherwise different from the "usual" values? Would this be in the form of a new preprocessor mechanism that asked the encoding of some other source file?

"determine" wants to say "expressly specified by the user" (e.g. by command-line flag), but we don't have words to say that in the standard (because the standard has never heard about a command line).

But I agree, we should find a better phrasing than "determine".
Maybe "assert"?

Oh, and the quoted text also needs to fix the ambiguous antecedent for "that is independent": As it stands, it refers to the source file or the encoding, but we want it to apply to "mechanism".


SG16 list run by sg16-owner@lists.isocpp.org