https://codereview.appspot.com/583510045/diff/559490043/lily/axis-group-interface.cc
File lily/axis-group-interface.cc (right):

https://codereview.appspot.com/583510045/diff/559490043/lily/axis-group-interface.cc#newcode277
lily/axis-group-interface.cc:277: Interval_t<vsize> rank_span
(rank_span_int[LEFT], rank_span_int[RIGHT]);
A constructor would clean this up.  I tried this:

  template <typename T2>
  Interval_t (Interval_t<T2> const &src) : Interval_t (src[LEFT],
src[RIGHT])
  {
  }

Having that, both of the following compiled:

  Interval_t<vsize> rank_span (g->spanned_rank_interval ());

  Interval_t<vsize> rank_span = g->spanned_rank_interval ();

I also tested Interval_t<unsigned char> and the compiler still properly
warns about conversions.

https://codereview.appspot.com/583510045/

Reply via email to