From 3f056ac3fdb9befc0cb56005fcde8508a7afd26d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Tue, 4 Jun 2013 19:50:13 +0200 Subject: [PATCH] GCC 4.5 compatibility: defaulted non-inline function causes linker error. --- src/SceneGraph/AbstractFeature.hpp | 3 ++- src/SceneGraph/FeatureGroup.hpp | 4 +++- src/Shapes/shapeImplementation.cpp | 4 +++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/SceneGraph/AbstractFeature.hpp b/src/SceneGraph/AbstractFeature.hpp index f0da6915e..c824bc75d 100644 --- a/src/SceneGraph/AbstractFeature.hpp +++ b/src/SceneGraph/AbstractFeature.hpp @@ -36,7 +36,8 @@ template AbstractFeature::Abstra object->Containers::template LinkedList>::insert(this); } -template AbstractFeature::~AbstractFeature() = default; +/* `= default` causes linker errors in GCC 4.5 */ +template AbstractFeature::~AbstractFeature() {} template void AbstractFeature::markDirty() {} diff --git a/src/SceneGraph/FeatureGroup.hpp b/src/SceneGraph/FeatureGroup.hpp index 0f2cd1f1f..594fa1302 100644 --- a/src/SceneGraph/FeatureGroup.hpp +++ b/src/SceneGraph/FeatureGroup.hpp @@ -34,7 +34,9 @@ namespace Magnum { namespace SceneGraph { -template AbstractFeatureGroup::AbstractFeatureGroup() = default; +/* `= default` causes linker errors in GCC 4.5 */ +template AbstractFeatureGroup::AbstractFeatureGroup() {} + template AbstractFeatureGroup::~AbstractFeatureGroup() = default; template void AbstractFeatureGroup::add(AbstractFeature* feature) { diff --git a/src/Shapes/shapeImplementation.cpp b/src/Shapes/shapeImplementation.cpp index 1b3b57973..df82bbfdd 100644 --- a/src/Shapes/shapeImplementation.cpp +++ b/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 AbstractShape::AbstractShape() {} + template AbstractShape::~AbstractShape() = default; -template AbstractShape::AbstractShape() = default; template struct AbstractShape<2>; template struct AbstractShape<3>;