Browse Source

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

Follow-up for 3f056ac3fd. In 4.5 at least
virtual functions were working, in 4.4 even they cause an error.
Vladimír Vondruš 13 years ago
parent
commit
6e07f8e436
  1. 3
      src/SceneGraph/FeatureGroup.hpp
  2. 3
      src/SceneGraph/Object.hpp
  3. 3
      src/Shapes/shapeImplementation.cpp

3
src/SceneGraph/FeatureGroup.hpp

@ -37,7 +37,8 @@ namespace Magnum { namespace SceneGraph {
/* `= 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;
/* `= default` causes linker errors in GCC 4.4 */
template<UnsignedInt dimensions, class T> AbstractFeatureGroup<dimensions, T>::~AbstractFeatureGroup() {}
template<UnsignedInt dimensions, class T> void AbstractFeatureGroup<dimensions, T>::add(AbstractFeature<dimensions, T>* feature) {
features.push_back(feature);

3
src/SceneGraph/Object.hpp

@ -44,7 +44,8 @@ template<UnsignedInt dimensions, class T> AbstractObject<dimensions, T>::~Abstra
template<UnsignedInt dimensions, class T> AbstractTransformation<dimensions, T>::AbstractTransformation() {}
template<UnsignedInt dimensions, class T> AbstractTransformation<dimensions, T>::~AbstractTransformation() {}
template<class Transformation> Object<Transformation>::~Object() = default;
/* `= default` causes linker errors in GCC 4.4 */
template<class Transformation> Object<Transformation>::~Object() {}
template<class Transformation> Scene<Transformation>* Object<Transformation>::scene() {
Object<Transformation>* p(this);

3
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<UnsignedInt dimensions> AbstractShape<dimensions>::AbstractShape() {}
template<UnsignedInt dimensions> AbstractShape<dimensions>::~AbstractShape() = default;
/* `= default` causes linker errors in GCC 4.4 */
template<UnsignedInt dimensions> AbstractShape<dimensions>::~AbstractShape() {}
template struct AbstractShape<2>;
template struct AbstractShape<3>;

Loading…
Cancel
Save