Skip to content

Commit

Permalink
Default-defined method on extern-templated class not visible (flexibl…
Browse files Browse the repository at this point in the history
…e-collision-library#369)

This addresses a bug unique to versions of GCC prior to 6.3. It loses
methods that are `= default` defined.
  • Loading branch information
SeanCurtis-TRI authored and sherm1 committed Feb 5, 2019
1 parent 9082fd2 commit 8e929da
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion include/fcl/geometry/shape/convex.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class FCL_EXPORT Convex : public ShapeBase<S_>
int num_faces, const std::shared_ptr<const std::vector<int>>& faces);

/// @brief Copy constructor
Convex(const Convex& other) = default;
Convex(const Convex& other);

~Convex() = default;

Expand Down Expand Up @@ -165,6 +165,12 @@ class FCL_EXPORT Convex : public ShapeBase<S_>
Vector3<S> interior_point_;
};

// Workaround for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57728 which
// should be moved back into the class definition once we no longer need to
// support GCC versions prior to 6.3.
template <typename S>
Convex<S>::Convex(const Convex<S>& other) = default;

using Convexf = Convex<float>;
using Convexd = Convex<double>;

Expand Down

0 comments on commit 8e929da

Please sign in to comment.