From 6e07f8e436456c41d0333266a111afb73791ac9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Tue, 4 Jun 2013 20:48:19 +0200 Subject: [PATCH] GCC 4.4 compatibility: defaulted non-inline function causes linker error. Follow-up for 3f056ac3fdb9befc0cb56005fcde8508a7afd26d. In 4.5 at least virtual functions were working, in 4.4 even they cause an error. --- src/SceneGraph/FeatureGroup.hpp | 3 ++- src/SceneGraph/Object.hpp | 3 ++- src/Shapes/shapeImplementation.cpp | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/SceneGraph/FeatureGroup.hpp b/src/SceneGraph/FeatureGroup.hpp index 594fa1302..24f7d8cf8 100644 --- a/src/SceneGraph/FeatureGroup.hpp +++ b/src/SceneGraph/FeatureGroup.hpp @@ -37,7 +37,8 @@ namespace Magnum { namespace SceneGraph { /* `= default` causes linker errors in GCC 4.5 */ template AbstractFeatureGroup::AbstractFeatureGroup() {} -template AbstractFeatureGroup::~AbstractFeatureGroup() = default; +/* `= default` causes linker errors in GCC 4.4 */ +template AbstractFeatureGroup::~AbstractFeatureGroup() {} template void AbstractFeatureGroup::add(AbstractFeature* feature) { features.push_back(feature); diff --git a/src/SceneGraph/Object.hpp b/src/SceneGraph/Object.hpp index 2db462f65..1ebb15e79 100644 --- a/src/SceneGraph/Object.hpp +++ b/src/SceneGraph/Object.hpp @@ -44,7 +44,8 @@ template AbstractObject::~Abstra template AbstractTransformation::AbstractTransformation() {} template AbstractTransformation::~AbstractTransformation() {} -template Object::~Object() = default; +/* `= default` causes linker errors in GCC 4.4 */ +template Object::~Object() {} template Scene* Object::scene() { Object* p(this); diff --git a/src/Shapes/shapeImplementation.cpp b/src/Shapes/shapeImplementation.cpp index df82bbfdd..314dde4f5 100644 --- a/src/Shapes/shapeImplementation.cpp +++ b/src/Shapes/shapeImplementation.cpp @@ -66,7 +66,8 @@ Debug operator<<(Debug debug, ShapeDimensionTraits<3>::Type value) { /* `= default` causes linker errors in GCC 4.5 */ template AbstractShape::AbstractShape() {} -template AbstractShape::~AbstractShape() = default; +/* `= default` causes linker errors in GCC 4.4 */ +template AbstractShape::~AbstractShape() {} template struct AbstractShape<2>; template struct AbstractShape<3>;