gRP C auth_context.h с использованием std :: iterator выдает устаревшее предупреждение с последним компилятором VC ++ - PullRequest
0 голосов
/ 28 января 2020

Компиляция одного из моих проектов, использующих gRP C, с последним компилятором Visual Studio 2019 16.5 preview 2 приводит к появлению этого предупреждения:

1>D:\...\grpcpp\impl\codegen\security\auth_context.h(38,19): warning C4996: 'std::iterator<std::input_iterator_tag,const grpc::AuthProperty,ptrdiff_t,const grpc::AuthProperty *,const grpc::AuthProperty &>': 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. You can define _SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING or _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS to acknowledge that you have received this warning.

Перед отправкой отчета об ошибке я подумал, что проверьте здесь, знают ли разработчики gRP C об этом?

1 Ответ

0 голосов
/ 29 января 2020

gRP C в настоящее время не поддерживает C ++ 17. В настоящее время мы используем C ++ 11. Возможно, вам следует использовать все необходимые флаги, чтобы ваш компилятор применял семантику C ++ 11.

...