why doesn't this compile when using std::max and c++/CLI?
问题 Can anyone please explain why the following will compile int a = aAssignments[i]->Count; int b = fInstanceData->NumRequiredEmpsPerJob[i]; fInstanceData->NumSlotsPerJob[i] = max(a,b); but fInstanceData->NumSlotsPerJob[i] = max((int)(aAssignments[i]->Count), (int)(fInstanceData->NumRequiredEmpsPerJob[i])); //why on earth does this not work? wont? The error it gives is error C2665: 'std::max' : none of the 7 overloads could convert all the argument types The variable aAssigmments is of type