c++问题在线等(PCL库编译)# Programming - 葵花宝典
R*6
1 楼
以下是函数重载参数匹配问题。看起来,3会用1,4会用2。visual studio 2015编译器
同意3用1,却不同意4用2。作为人类,我彻底蒙圈了,参数cord和maxp没给呀,3用1为
啥就对了?
static Pointer New(const Point3D& size, const Point3D&
spacing=Point3D(1,1,1), const Point3D& origin=Point3D >(0,0,0))
static Pointer New(const Point3D& size, const Point3D&
spacing, const Point3D& origin, const OrientationMatrixType& matrix)
static Pointer New(const Point3D& minp, const Point3D& maxp,
const Point3D& spacing=Point3D(1,1,1), const Point3D
& origin=Point3D(0,0,0))
static Pointer New(const Point3D& minp, const Point3D& maxp,
const Point3D& spacing, const Point3D& origin, const
OrientationMatrixType& matrix)
/*1*/ static Pointer New(const typename BufferType::Pointer& ptr, const
Point3D& buffer_coord, const Point3D& minp, const Point3D&
maxp, const Point3D& spacing=Point3D(1,1,1), const Point3D<
double>& origin=Point3D(0,0,0))
/*2*/ static Pointer New(const typename BufferType::Pointer& ptr, const
Point3D& buffer_coord, const Point3D& minp, const Point3D&
maxp, const Point3D& spacing, const Point3D& origin, const
OrientationMatrixType& matrix)
/*3*/ static Pointer New(ValueType* ptr, bool own, const Point3D&
size, const Point3D& minp=Point3D(0,0,0), const Point3D&
spacing=Point3D(1,1,1), const Point3D& origin=Point3D >(0,0,0))
{
typename BufferType::Pointer buffer = BufferType::New(ptr, size.x(),
size.y(), size.z(), own);
return New(buffer, minp, spacing, origin);
}
/*4*/ static Pointer New(ValueType* ptr, bool own, const Point3D&
size, const Point3D& minp, const Point3D& spacing, const
Point3D& origin, const OrientationMatrixType& matrix)
{
typename BufferType::Pointer buffer = BufferType::New(ptr, size.x(),
size.y(), size.z(), own);
return New(buffer, minp, spacing, origin, matrix);
}
同意3用1,却不同意4用2。作为人类,我彻底蒙圈了,参数cord和maxp没给呀,3用1为
啥就对了?
static Pointer New(const Point3D
spacing=Point3D
static Pointer New(const Point3D
spacing, const Point3D
static Pointer New(const Point3D
const Point3D
& origin=Point3D
static Pointer New(const Point3D
const Point3D
OrientationMatrixType& matrix)
/*1*/ static Pointer New(const typename BufferType::Pointer& ptr, const
Point3D
maxp, const Point3D
double>& origin=Point3D
/*2*/ static Pointer New(const typename BufferType::Pointer& ptr, const
Point3D
maxp, const Point3D
OrientationMatrixType& matrix)
/*3*/ static Pointer New(ValueType* ptr, bool own, const Point3D
size, const Point3D
spacing=Point3D
{
typename BufferType::Pointer buffer = BufferType::New(ptr, size.x(),
size.y(), size.z(), own);
return New(buffer, minp, spacing, origin);
}
/*4*/ static Pointer New(ValueType* ptr, bool own, const Point3D
size, const Point3D
Point3D
{
typename BufferType::Pointer buffer = BufferType::New(ptr, size.x(),
size.y(), size.z(), own);
return New(buffer, minp, spacing, origin, matrix);
}