title: Problem in debugging templates. Build fails specifically for Linux GCC 7, GCC 6, GCC 5, GCC 4.9 error: template argument 1 is invalid
body: <p>My Travis is only failing for Linux GCC 7, GCC 6, GCC 5, GCC 4.9 with error</p>
  
  <pre><code>libs/astronomy/test/coordinate/equatorial_coord.cpp:22:57: error: template argument 1 is invalid
           RightAscension&lt;double, quantity&lt;bud::plane_angle&gt;&gt;
                                                           ^
  libs/astronomy/test/coordinate/equatorial_coord.cpp:23:39: error: template argument 2 is invalid
                   ra(25.0 * bud::degrees);
  </code></pre>
  
  <p><strong>Here is equatorial_cord.cpp</strong></p>
  
  <pre><code>#define BOOST_TEST_MODULE equatorial_coord_test
  
  #include &lt;iostream&gt;
  #include &lt;boost/units/io.hpp&gt;
  #include &lt;boost/units/quantity.hpp&gt;
  #include &lt;boost/units/systems/angle/degrees.hpp&gt;
  #include &lt;boost/units/systems/si/plane_angle.hpp&gt;
  #include &lt;boost/astronomy/coordinate/coord_sys/equatorial_coord.hpp&gt;
  
  #include &lt;boost/test/unit_test.hpp&gt;
  
  using namespace boost::astronomy::coordinate;
  using namespace boost::units;
  using namespace boost::units::si;
  namespace bud = boost::units::degree;
  namespace bu = boost::units;
  
  BOOST_AUTO_TEST_SUITE(angle)
  
      BOOST_AUTO_TEST_CASE(right_ascension) {
          //Create object of Right Ascension
          RightAscension&lt;double, quantity&lt;bud::plane_angle&gt;&gt;
                  ra(25.0 * bud::degrees);
  
          //Check value
          BOOST_CHECK_CLOSE(ra.get_angle().value(), 25.0, 0.001);
  
          //Quantity stored as expected?
          BOOST_TEST((std::is_same&lt;decltype(ra.get_angle()), quantity&lt;bud::plane_angle&gt;&gt;::value));
      }
  
  BOOST_AUTO_TEST_SUITE_END()
  </code></pre>
  
  <p><strong>which includes and uses Equatorial_coord.hpp</strong></p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;boost/units/io.hpp&gt;
  #include &lt;boost/geometry/core/cs.hpp&gt;
  #include &lt;boost/geometry/geometries/point.hpp&gt;
  #include &lt;boost/units/systems/angle/degrees.hpp&gt;
  #include &lt;boost/units/systems/si/plane_angle.hpp&gt;
  #include &lt;boost/astronomy/coordinate/coord_sys/coord_sys.hpp&gt;
  
  namespace boost {
      namespace astronomy {
          namespace coordinate {
  
              namespace bu = boost::units;
              namespace bg = boost::geometry;
              namespace bud = boost::units::degree;
  
              //Right Ascension
              template
                      &lt;
                              typename CoordinateType = double,
                              typename RightAscensionQuantity = bu::quantity&lt;bu::si::plane_angle, CoordinateType&gt;
                      &gt;
              struct RightAscension {
              private:
                  RightAscensionQuantity ra;
              public:
                  RightAscension(){
                      ra = 0.0 * bu::si::radian;
                  };
  
                  RightAscension(RightAscensionQuantity const&amp; _ra) : ra(_ra) {}
  
                  RightAscensionQuantity get_angle() const{
                      return static_cast&lt;RightAscensionQuantity&gt;(ra);
                  }
  
                  void print() {
                      std::cout &lt;&lt; "Right Ascension: " &lt;&lt; ra;
                  }
              };
  ...
  </code></pre>
  
  <p>It builds perfectly on my machine and I have tried some variation of code but I cannot understand what am I missing that builds are failing specifically for Linux GCC 7, GCC 6, GCC 5, GCC 4.9.</p>
  
  <p>In this project, I have made many headers in a similar fashion but never faced such an issue. I will be grateful for any suggestions.</p>
  
  <p><a href="https://dev.azure.com/lpranam/lpranam/_build/results?buildId=392&amp;view=logs&amp;j=d5b3eaca-5133-5bed-7ece-a6421a4fcca5&amp;t=9b0787b9-d206-5213-01a9-f3ff4bf8b6d6" rel="nofollow noreferrer">https://dev.azure.com/lpranam/lpranam/_build/results?buildId=392&amp;view=logs&amp;j=d5b3eaca-5133-5bed-7ece-a6421a4fcca5&amp;t=9b0787b9-d206-5213-01a9-f3ff4bf8b6d6</a></p>