Reduced variant of #395 where the requirements are only set when lexical_cast is directly used, i.e. in the pthread case.
However this fails/failed on Appveyor due to date_time using lexical_cast and also src/win32/thread_primitives.cpp including atomic which uses static_assert
So to me #395 looks more correct but I wanted to provide both solutions for you to choose.
Reduced variant of #395 where the requirements are only set when lexical_cast is directly used, i.e. in the pthread case.
However this fails/failed on Appveyor due to
date_time
usinglexical_cast
and alsosrc/win32/thread_primitives.cpp
including atomic which usesstatic_assert
So to me #395 looks more correct but I wanted to provide both solutions for you to choose.