Browse Source

GCC 4.5 compatibility: defaulted non-inline function causes linker error.

Vladimír Vondruš 13 years ago
parent
commit
3f056ac3fd
  1. 3
      src/SceneGraph/AbstractFeature.hpp
  2. 4
      src/SceneGraph/FeatureGroup.hpp
  3. 4
      src/Shapes/shapeImplementation.cpp

3
src/SceneGraph/AbstractFeature.hpp

@ -36,7 +36,8 @@ template<UnsignedInt dimensions, class T> AbstractFeature<dimensions, T>::Abstra
object->Containers::template LinkedList<AbstractFeature<dimensions, T>>::insert(this);
}
template<UnsignedInt dimensions, class T> AbstractFeature<dimensions, T>::~AbstractFeature() = default;
/* `= default` causes linker errors in GCC 4.5 */
template<UnsignedInt dimensions, class T> AbstractFeature<dimensions, T>::~AbstractFeature() {}
template<UnsignedInt dimensions, class T> void AbstractFeature<dimensions, T>::markDirty() {}

4
src/SceneGraph/FeatureGroup.hpp

@ -34,7 +34,9 @@
namespace Magnum { namespace SceneGraph {
template<UnsignedInt dimensions, class T> AbstractFeatureGroup<dimensions, T>::AbstractFeatureGroup() = default;
/* `= default` causes linker errors in GCC 4.5 */
template<UnsignedInt dimensions, class T> AbstractFeatureGroup<dimensions, T>::AbstractFeatureGroup() {}
template<UnsignedInt dimensions, class T> AbstractFeatureGroup<dimensions, T>::~AbstractFeatureGroup() = default;
template<UnsignedInt dimensions, class T> void AbstractFeatureGroup<dimensions, T>::add(AbstractFeature<dimensions, T>* feature) {

4
src/Shapes/shapeImplementation.cpp

@ -63,8 +63,10 @@ Debug operator<<(Debug debug, ShapeDimensionTraits<3>::Type value) {
return debug << "Shapes::Shape3D::Type::(unknown)";
}
/* `= default` causes linker errors in GCC 4.5 */
template<UnsignedInt dimensions> AbstractShape<dimensions>::AbstractShape() {}
template<UnsignedInt dimensions> AbstractShape<dimensions>::~AbstractShape() = default;
template<UnsignedInt dimensions> AbstractShape<dimensions>::AbstractShape() = default;
template struct AbstractShape<2>;
template struct AbstractShape<3>;

Loading…
Cancel
Save