Skip to content

Warning compiling benchmark with VS 2019 #932

@DArdouin

Description

@DArdouin

Project: benchmark
Configuration: Release x64
Visual studio 2019 16.4.3

Compilation of benchmark gives me the following warning. We are using this method with chars, when the signature is
int tolower ( int c );

Could be fixed by preceding IsTruthyFlagValue function with something like
char tolower(char in) { return static_cast<char>(::tolower(in)); }

Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.24.28314\include\algorithm(1310,24): warning C4244: '=': conversion from 'int' to 'char', possible loss of data
GoogleBenchmark\benchmark\src\commandlineflags.cc(221): message : see reference to function template instantiation '_OutIt std::transform<std::_String_iterator<std::_String_val<std::_Simple_types<_Elem>>>,std::_String_iterator<std::_String_val<std::_Simple_types<_Elem>>>,int(__cdecl *)(int)>(const _InIt,const _InIt,_OutIt,_Fn)' being compiled
with
[
_OutIt=std::_String_iterator<std::_String_val<std::_Simple_types>>,
_Elem=char,
_InIt=std::_String_iterator<std::_String_val<std::_Simple_types>>,
_Fn=int (__cdecl *)(int)
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions