vcglib
vcglib copied to clipboard
"ScalarType" illegal qualified name in member declaration in vcg/simplex/face/base.h
This is still happening with Visual Studio 2017. It doesn't like (complex/base.h):
class TriMesh
: public MArity4< BaseMeshTypeHolder<typename Container0::value_type::TypesPool>, Container0, Der ,Container1, Der, Container2, Der, Container3, Der>{
public: MArity4< BaseMeshTypeHolder<typename Container0::value_type::TypesPool>, Container0, Der ,Container1, Der, Container2, Der, Container3, Der>{
public:
typedef typename TriMesh::ScalarType ScalarType;
The typedef for ScalarType gives VS error C4596:
error C4596: 'ScalarType': illegal qualified name in member declaration
The rest of the typedefs in TriMesh also make VS barf.
There is a new visual studio flag default in 2017. /permissive- is now the default over /permissive. With this default, code like the above will fail to compile, as it's not supposedly not compatible with the standard.
In my project, I'm in an environment where I can't change the permissive flag. Any suggestions?
Sorry, for the extra comment, but I have tried something like this:
template < class Container0 = DummyContainer, class Container1 = DummyContainer, class Container2 = DummyContainer, class Container3 = DummyContainer >
class TriMesh
: public MArity4< BaseMeshTypeHolder<typename Container0::value_type::TypesPool>, Container0, Der ,Container1, Der, Container2, Der, Container3, Der>{
public:
typedef typename BaseMeshTypeHolder<typename Container0::value_type::TypesPool> CONT;
typedef typename CONT::VertexType::ScalarType ScalarType;
typedef typename CONT::VertContainer VertContainer;
typedef typename CONT::EdgeContainer EdgeContainer;
typedef typename CONT::FaceContainer FaceContainer;
// types for vertex
typedef typename CONT::VertexType VertexType;
typedef typename CONT::VertexPointer VertexPointer;
typedef typename CONT::ConstVertexPointer ConstVertexPointer;
typedef typename VertexType:: CoordType;
typedef typename CONT::VertexIterator VertexIterator;
typedef typename CONT::ConstVertexIterator ConstVertexIterator;
...
VS 17 barfs on CoordType. Complaining it's based on bool, when I was using Coord3f in the typedef for my TriMesh.