boostorg / format

Boost.org format module
http://boost.org/libs/format
Boost Software License 1.0
25 stars 51 forks source link

Add support for Microsoft extensions on argument-type: 'w', 'I', 'I32', 'I64' #44

Closed jeking3 closed 7 years ago

jeking3 commented 7 years ago

Argument types in format specifications are ignored by boost::format because the argument type is carried through the conversion by operator %. This change allows boost::format to parse through format strings with Microsoft specific argument types without throwing an exception.

With-Commit-String values are from msvc-14.1 using default en_US locale.

String Data Pre-Commit With-Commit-String
%wc | '5' | boost::bad_format_string: format-string is ill-formed | 5
%Id | 12345 | boost::bad_format_string: format-string is ill-formed | 12345
%I32d | 12345 | boost::bad_format_string: format-string is ill-formed | 12345
%I64d | 1234567890123 | boost::bad_format_string: format-string is ill-formed | 1234567890123

This closes #35

jeking3 commented 7 years ago

Travis is moving at snails pace today and this passes the CI build in my fork, so I'm going to merge it.