Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mockingbirdnest/Principia
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 83feee04addf
Choose a base ref
...
head repository: mockingbirdnest/Principia
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 076ca4b13074
Choose a head ref
  • 3 commits
  • 2 files changed
  • 1 contributor

Commits on Dec 1, 2019

  1. Copy the full SHA
    ccbfd43 View commit details
  2. The cpp too.

    pleroy committed Dec 1, 2019
    Copy the full SHA
    8fb1fc5 View commit details
  3. Merge pull request #2387 from pleroy/Sfinae

    Fix a compilation error found with Clang
    pleroy authored Dec 1, 2019
    Copy the full SHA
    076ca4b View commit details
Showing with 8 additions and 4 deletions.
  1. +6 −2 physics/rigid_motion.hpp
  2. +2 −2 physics/rigid_motion_body.hpp
8 changes: 6 additions & 2 deletions physics/rigid_motion.hpp
Original file line number Diff line number Diff line change
@@ -41,7 +41,9 @@ class RigidMotion final {
AngularVelocity<FromFrame> const& angular_velocity_of_to_frame,
Velocity<FromFrame> const& velocity_of_to_frame_origin);

template<typename = std::enable_if_t<!std::is_same_v<FromFrame, ToFrame>>>
template<typename F = FromFrame,
typename T = ToFrame,
typename = std::enable_if_t<!std::is_same_v<F, T>>>
RigidMotion(
RigidTransformation<FromFrame, ToFrame> const& rigid_transformation,
AngularVelocity<ToFrame> const& angular_velocity_of_from_frame,
@@ -58,7 +60,9 @@ class RigidMotion final {

RigidMotion<ToFrame, FromFrame> Inverse() const;

template<typename = std::enable_if_t<std::is_same_v<FromFrame, ToFrame>>>
template<typename F = FromFrame,
typename T = ToFrame,
typename = std::enable_if_t<std::is_same_v<F, T>>>
static RigidMotion Identity();

private:
4 changes: 2 additions & 2 deletions physics/rigid_motion_body.hpp
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ RigidMotion<FromFrame, ToFrame>::RigidMotion(
velocity_of_to_frame_origin_(velocity_of_to_frame_origin) {}

template<typename FromFrame, typename ToFrame>
template<typename>
template<typename F, typename T, typename>
RigidMotion<FromFrame, ToFrame>::RigidMotion(
RigidTransformation<FromFrame, ToFrame> const& rigid_transformation,
AngularVelocity<ToFrame> const& angular_velocity_of_from_frame,
@@ -78,7 +78,7 @@ RigidMotion<FromFrame, ToFrame>::Inverse() const {
}

template<typename FromFrame, typename ToFrame>
template<typename>
template<typename F, typename T, typename>
RigidMotion<FromFrame, ToFrame> RigidMotion<FromFrame, ToFrame>::Identity() {
return RigidMotion(RigidTransformation<FromFrame, ToFrame>::Identity(),
AngularVelocity<FromFrame>{},