You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AuthPropertyIterator inherits from std::iterator. This has been deprecated in C++ 17 and causes MSVC to require a define to ignore and compile user code (which incidentally doesn't work, a separate problem for MS to resolve). This means that code intended to work with the grpc lib does not compile on MSVC with STD C++17 selected duet to deprecation warnings which cannot be ignored or otherwise #define'd away.
Results from attempting to compile a user project in MSVC with STD C++17 selected:
..\grpc\include\grpcpp\impl\codegen\security\auth_context.h(38,19): error C4996: 'std::iterator<std::input_iterator_tag,const grpc::AuthProperty,ptrdiff_t,_Ty *,_Ty &>': warning STL4015: The std::iterator class template (used as a base class to provide typedefs) is deprecated in C++17. (The <iterator> header is NOT deprecated.) The C++ Standard has never required user-defined iterators to derive from std::iterator. To fix this warning, stop deriving from std::iterator and start providing publicly accessible typedefs named iterator_category, value_type, difference_type, pointer, and reference. Note that value_type is required to be non-const, even for constant iterators.
Modifying the AuthPropertyIterator to use typedefs instead:
Appears to fix the compilation error, but this may cause unintended side-effects. For safety, this should be reviewed by the security team to for testing.
The text was updated successfully, but these errors were encountered:
Sorry for commenting here, but any update on this? I've recently also encountered this problem, and the typedef fix seems to work pretty good, so if the security team could test it, to see if there are no issues? Thanks
AuthPropertyIterator inherits from std::iterator. This has been deprecated in C++ 17 and causes MSVC to require a define to ignore and compile user code (which incidentally doesn't work, a separate problem for MS to resolve). This means that code intended to work with the grpc lib does not compile on MSVC with STD C++17 selected duet to deprecation warnings which cannot be ignored or otherwise #define'd away.
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0174r1.html#2.1
Results from attempting to compile a user project in MSVC with STD C++17 selected:
Modifying the AuthPropertyIterator to use typedefs instead:
Appears to fix the compilation error, but this may cause unintended side-effects. For safety, this should be reviewed by the security team to for testing.
The text was updated successfully, but these errors were encountered: