Classes using m_locale must allow locale configuration in their
constructor. Otherwise m_locale was always set to default by
basic_parser<> constructor.
Signed-off-by: Simon Rozman <simon@rozman.si>
The Release testing revealed that compiler might free temporary
std::locale instances sooner than we thought, exposing UaF.
On 64-bit arch, a reference takes 8 bytes, a std::locale copy takes 16
bytes. So duplicating a locale in each parser instance is not such a big
deal to risk an UaF.
Signed-off-by: Simon Rozman <simon@rozman.si>
These files are C++ only. They should either have no extension like
standard C++ headers (which is cumbersome on Windows environments), or
.hpp.
.h is used for C and hybrid C/C++ headers.
Signed-off-by: Simon Rozman <simon@rozman.si>
Using extension-less #include files brought more issues than it was
worth.
Reverts: dfa34420d9ff29932f1e7d06bb98f1f757373bd5
Signed-off-by: Simon Rozman <simon@rozman.si>
Being portable, means having all function implementations in #include
files and functions marked as static. We have no global functions in
this project yet, but it took me quite some head scratching in WinStd
project why all the global functions are missing in the documentation.
Signed-off-by: Simon Rozman <simon@rozman.si>
Thou linker can locate the output .lib file of referenced projects
wherever .lib is just fine, this helps us to gather all .pdb files in
the output folder.
Signed-off-by: Simon Rozman <simon@rozman.si>
As we no longer explicitly set WindowsTargetPlatformVersion property,
AppVeyor Visual Studio 2017 builders assume 8.1 SDK for ARM64 too,
resulting in an unknown platform.
Signed-off-by: Simon Rozman <simon@rozman.si>
MSVC needs them to use correct charset when Language for non-Unicode
programs is set to Windows-1252 or anything different than UTF-8.
Signed-off-by: Simon Rozman <simon@rozman.si>
Build is using precompiled headers in pch.h. Explicitly configure it so
it does not rely on host solution configuration.
Signed-off-by: Simon Rozman <simon@rozman.si>