C++ Logo

sg16

Advanced search

Re: [SG16-Unicode] [isocpp-core] Source file encoding

From: Niall Douglas <s_sourceforge_at_[hidden]>
Date: Thu, 15 Aug 2019 00:02:15 +0100
On 14/08/2019 20:50, Thiago Macieira wrote:
> On Wednesday, 14 August 2019 09:00:43 PDT Steve Downey wrote:
>>> #pragma encoding <encoding> switches encoding from the #pragma onwards.
>>>
>> For the rest of that source file. A push/pop mechanism so you can't cause
>> errors in the file doing the inclusion.
>
> You make it for the file in question, not the translation unit. That means it
> won't affect #includes and terminates at the end of your #inclusion.

I'd like a #pragma encoding binary, which means do no interpretation of
the following as text at all.

Useful for a poor man's std::embed, I reckon. Especially for C.

Niall

Received on 2019-08-15 01:02:16