With a vector defined as std::vector<std::string>
,
Wondering why the following is valid:
if ( vecMetaData[0] != "Some string" )
{
...
But not this:
switch ( vecMetaData[1] )
{
...
Visual studio complains :
error C2450: switch expression of type 'std::basic_string<_Elem,_Traits,_Ax>' is illegal 1> with 1> [ 1> _Elem=char, 1> _Traits=std::char_traits, 1> _Ax=std::allocator 1> ] 1> No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called