old GCC C++11 specialisation in a different namespace and moving template instantiations after all specialisations
This commit is contained in:
@@ -92,6 +92,7 @@ PyObject * GeometryDefaultExtension<T>::getPyObject(void)
|
||||
THROWM(Base::NotImplementedError,"Python object not implemented for default geometry extension template type. Template Specialisation missing."); // use template specialisation to provide the actual object
|
||||
}
|
||||
|
||||
namespace Part {
|
||||
// ----------------------------- Template specialisations----------------------------------------------------
|
||||
|
||||
//typedef Part::GeometryDefaultExtension<long> GeometryIntExtension;
|
||||
@@ -156,3 +157,14 @@ void GeometryDefaultExtension<double>::Restore(Base::XMLReader &reader)
|
||||
|
||||
value = reader.getAttributeAsFloat("value");
|
||||
}
|
||||
|
||||
|
||||
// instantiate the types so that other translation units (python wrappers) can access template
|
||||
//constructors other than the default.
|
||||
template class GeometryDefaultExtension<long>;
|
||||
template class GeometryDefaultExtension<std::string>;
|
||||
template class GeometryDefaultExtension<bool>;
|
||||
template class GeometryDefaultExtension<double>;
|
||||
|
||||
|
||||
} //namespace Part
|
||||
|
||||
@@ -97,13 +97,6 @@ namespace Part {
|
||||
template <>
|
||||
inline GeometryDefaultExtension<double>::GeometryDefaultExtension():value(0.0f){}
|
||||
|
||||
// instantiate the types so that other translation units (python wrappers) can access template
|
||||
//constructors other than the default.
|
||||
template class GeometryDefaultExtension<long>;
|
||||
template class GeometryDefaultExtension<std::string>;
|
||||
template class GeometryDefaultExtension<bool>;
|
||||
template class GeometryDefaultExtension<double>;
|
||||
|
||||
// Prefer alias to typedef item 9
|
||||
using GeometryIntExtension = GeometryDefaultExtension<long>;
|
||||
using GeometryStringExtension = GeometryDefaultExtension<std::string>;
|
||||
|
||||
Reference in New Issue
Block a user