Templated usings Can't Select Template Functions to use as Parameters in Visual Studio

前端 未结 2 529
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-27 18:09

This is about as simplified as I could make a toy example that still hit the bug:

struct Vector3f64 {
  double x;
  double y;
  double z;
};

struct Vector3f32 {         


        
2条回答
  •  离开以前
    2021-01-27 18:18

    As workaround, you might simply do:

    template 
    auto func(const T& dir)
    -> decltype(VectorVolume(dir.x, dir.y, dir.z))
    {
        return VectorVolume(dir.x, dir.y, dir.z);
    }
    

提交回复
热议问题