C++ Logo

SG16

Advanced search

Subject: Re: [SG16-Unicode] [isocpp-core] Source file encoding
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2019-08-14 18:02:15


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


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