VS2015不会编译我的代码,说命名空间"std“没有成员"clamp",尽管智能感知可以很好地获取它,并告诉我参数和返回值。是的,我已经包含了标题。
#include <Math/Matrix3D.h>
#include <glm.hpp>
#include <gtx/transform.hpp>
#include <Utils/Clock.h>
#include <algorithm>
void somefunc()
{
viewPos.y = std::clamp(viewPos.y, -0.95f, 0.95f);
}发布于 2017-02-01 13:51:07
您必须使用/std:c++latest开关才能将C++17添加到标准中。
https://blogs.msdn.microsoft.com/vcblog/2016/06/07/standards-version-switches-in-the-compiler/
https://stackoverflow.com/questions/41972588
复制相似问题