Re: printf official specs or docs, ISO C99, and C++

On 10/12/17 21:26, James E. King, III via Boost wrote:
> I found https://svn.boost.org/trac10/ticket/10541 today and my guess is
> Boost.Format hasn't been updated to support the ISO C99 extensions, or the
> Microsoft type formats. Before any work is done on this, I'm looking for
> any official C++ documentation related to printf support requirements. For
> example the compatibility section in
> http://www.cplusplus.com/reference/cstdio/printf/ indicates certain
> language levels have requirements.

The C++ standard simply refers to the C standard (see [cstdio.syn]), so
you should look there for the primary specification. I think there are
also a few POSIX extensions, which are widely supported and probably
worth supporting as well. Microsoft extensions like those mentioned in
the ticket are probably less useful because they are not present outside
MSVC. Supporting those extentions encourages non-portable code.

Regardless of the set of features you choose to support, IMO it should
be the same regardless of the compiler/platform/C++ version being targeted.

Re: printf official specs or docs, ISO C99, and C++

> On 10/12/17 21:26, James E. King, III via Boost wrote:
>
>> I found https://svn.boost.org/trac10/ticket/10541 today and my guess is
>> Boost.Format hasn't been updated to support the ISO C99 extensions, or the
>> Microsoft type formats. Before any work is done on this, I'm looking for
>> any official C++ documentation related to printf support requirements.
>> For
>> example the compatibility section in
>> http://www.cplusplus.com/reference/cstdio/printf/ indicates certain
>> language levels have requirements.
>>
>
> The C++ standard simply refers to the C standard (see [cstdio.syn]), so
> you should look there for the primary specification. I think there are also
> a few POSIX extensions, which are widely supported and probably worth
> supporting as well. Microsoft extensions like those mentioned in the ticket
> are probably less useful because they are not present outside MSVC.
> Supporting those extentions encourages non-portable code.
>
> Regardless of the set of features you choose to support, IMO it should be
> the same regardless of the compiler/platform/C++ version being targeted.
>