Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

soci/soci-platform.h(47) conflict with boost/system/detail/system_category_win32.hpp(52) #714

Closed
sinall opened this issue Feb 18, 2019 · 2 comments

Comments

@sinall
Copy link

sinall commented Feb 18, 2019

I met error when upgrading boost to 1.69.0:

1>d:.conan\9b4b5d\1\include\boost\system\detail\system_category_win32.hpp(52): error C2039: '_snprintf': is not a member of 'std'
1> d:.conan\9b4b5d\1\include\boost\move\detail\iterator_traits.hpp(29): note: see declaration of 'std'

<system_category_win32.hpp> is a new file introduced in boost-system-1.69.0. It is included in <boost/system/error_code.hpp>.

VC2015 has snprintf in , so could it be changed to below?

// Define if you have the snprintf variants.
#if _MSC_VER < 1900
#define snprintf _snprintf
#endif

Workaround:

#include <soci/soci.h>
#undef snprintf

The <soci/soci.h> includes "soci/soci-platform.h", so those definitions impact a lot of source files.

@myd7349
Copy link
Contributor

myd7349 commented Mar 13, 2019

Hi! @sinall I think this issue has been fixed in #717 .

@mloskot
Copy link
Contributor

mloskot commented Mar 13, 2019

Yes, it's been fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants