Open Lastique opened 7 months ago
BTW, there is boost/core/snprintf.hpp
in Boost.Core with snprintf
emulation.
I suspect that nobody is using the plain MinGW (as opposed to mingw-w64) anymore, but I have no way to know for sure.
For the time being I've removed (the old) MinGW from my Appveyor. We'll see if anyone (apart from you) notices.
BTW, there is
boost/core/snprintf.hpp
in Boost.Core withsnprintf
emulation.
Yeah, there was an snprintf.hpp
here too, before I removed it. :-)
using msvc and C++20 the same issues with _snprintf
D:\T60\git\boost_\libs\system\include\boost/system/detail/snprintf.hpp(22): error C2039: '_snprintf': is not a member of 'std'
D:\Program Files (x86)\Microsoft Visual Studio\2019\EnterprisePreview\VC\Tools\MSVC\14.29.30133\include\functional(31): note: see declaration of 'std'
D:\T60\git\boost_\libs\system\include\boost/system/detail/snprintf.hpp(22): error C2873: '_snprintf': symbol cannot be used in a using-declaration
D:\T60\git\boost_\libs\system\include\boost/system/detail/append_int.hpp(23): error C2039: '_snprintf': is not a member of 'boost::system::detail'
D:\T60\git\boost_\libs\system\include\boost/system/detail/append_int.hpp(17): note: see declaration of 'boost::system::detail'
D:\T60\git\boost_\libs\system\include\boost/system/detail/system_category_message_win32.hpp(33): error C2039: '_snprintf': is not a member of 'boost::system::detail'
D:\T60\git\boost_\libs\system\include\boost/system/detail/system_category_message_win32.hpp(28): note: see declaration of 'boost::system::detail'
D:\T60\git\boost_\libs\system\include\boost/system/detail/interop_category.hpp(58): error C2039: '_snprintf': is not a member of 'boost::system::detail'
D:\T60\git\boost_\libs\system\include\boost/system/detail/interop_category.hpp(24): note: see declaration of 'boost::system::detail'
D:\T60\git\boost_\libs\system\include\boost/system/detail/error_code.hpp(266): error C2039: '_snprintf': is not a member of 'boost::system::detail'
D:\T60\git\boost_\libs\system\include\boost/system/detail/std_category.hpp(25): note: see declaration of 'boost::system::detail'
D:\T60\git\boost_\libs\system\include\boost/system/detail/error_code.hpp(272): error C2039: '_snprintf': is not a member of 'boost::system::detail'
D:\T60\git\boost_\libs\system\include\boost/system/detail/std_category.hpp(25): note: see declaration of 'boost::system::detail'
D:\T60\git\boost_\libs\system\include\boost/system/detail/error_category_impl.hpp(61): error C2039: '_snprintf': is not a member of 'boost::system::detail'
D:\T60\git\boost_\libs\system\include\boost/system/detail/std_category.hpp(25): note: see declaration of 'boost::system::detail'
D:\T60\git\boost_\libs\system\include\boost/system/detail/error_category_impl.hpp(67): error C2039: '_snprintf': is not a member of 'boost::system::detail'
D:\T60\git\boost_\libs\system\include\boost/system/detail/std_category.hpp(25): note: see declaration of 'boost::system::detail'
@marakew This looks like snprintf
is defined as a macro somewhere and gets replaced to _snprintf
. Boost.System doesn't do this, and I'm fairly sure MSVC standard library also doesn't, so you should review your library dependencies and report this to the developers of the offending library.
In any case, this is not the issue that was reported here.
i think remove "using std::snprintf;" solve this
there non sense use std::snprintf inside boost::system::detail
D:\T60\git\boost_\libs\system\include\boost/system/detail/snprintf.hpp(22): error C2039: '_snprintf': is not a member of 'std'
You have #define snprintf _snprintf
somewhere. This is no longer needed on a recent MSVC (VS2015 and later) and needs to be removed.
drop "using std::snprintf" will be better solution
drop "using std::snprintf" will be better solution
This is not a solution at all. Any std::snprintf
or boost::core::snprintf
calls will remain broken.
not and how this was work before commit mention above ?
It will be more convenient for me because it will avoid bug reports such as yours, so I may well do that, but it's not a better solution overall, because you'll keep encountering these issues in other libraries until you fix your code to remove the #define.
not and how this was work before commit mention above ?
As long as you have the define
, it didn't work and it won't work except by accident. Removing the define
is the only solution.
Note that snprintf
and _snprintf
are not equivalent. So the correctness of the define
is questionable to begin with.
Looks like 44582f3c3cc73c1a28919ad030de1106cade3e64 and possibly some other recent commits broke MinGW32 builds of Boost.Filesystem:
https://ci.appveyor.com/project/Lastique/filesystem/builds/48983852/job/2cgottx8b8ckwac0?fullLog=true#L376
Is this platform no longer supported?