Skip to content

Conversation

@bryan-lipinski
Copy link
Contributor

Fix for #1069

checked_array_iterator is a Microsoft extension to the C++ Standard Library. In order to build cpprestsdk using other libraries such as libc++, the extension needs to be gated with a Microsoft specific macro. In this case _ITERATOR_DEBUG_LEVEL is the preferred macro for using checked iterators (As _SECURE_SCL is marked deprecated) .

I've validated this builds using MSVC and clang.cl.exe/libc++.

Note: The CMake file sets _SCL_SECURE_NO_WARNINGS which disables the warning that the code in question is attempting to fix.

elseif(WIN32)
add_definitions(-DUNICODE -D_UNICODE -DWIN32 -D_SCL_SECURE_NO_WARNINGS)

@BillyONeal
Copy link
Member

The one Pipelines failure was a spurious network issue. Looks good to me, thanks for your contribution!

@BillyONeal BillyONeal merged commit fac2ff7 into microsoft:master Mar 20, 2019
@bryan-lipinski bryan-lipinski deleted the user/bryanli/1069-fix-win-libc++-build branch March 20, 2019 02:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants