title: Implementing km/h and m/s with user-defined literals
body: <p>I want to implement two <a href="http://en.cppreference.com/w/cpp/language/user_literal" rel="nofollow">user-defined literals</a>, _kmh for kilometers per hour and _ms for meters per second. I already have two structs for that and the operator "" functions:</p>
  
  <pre><code>constexpr KMH operator "" _ms(long double val) {
      return KMH {static_cast&lt;double&gt;(val * 3.6)};
  }
  constexpr MS operator "" _kmh(long double val) {
      return MS {static_cast&lt;double&gt;(val / 3.6)};
  }
  </code></pre>
  
  <p>I want it to implement it in a way that I can could do something like this:</p>
  
  <pre><code>void func(MS speed) {}
  
  int main() {
      func(10.0_kmh); // this works
      func(10.0_ms); // this does not
  }
  </code></pre>
  
  <p>I can't get the second call to work, because I can't implement it like this:</p>
  
  <pre><code>constexpr KMH operator "" _kmh(long double val) {
      return KMH {static_cast&lt;double&gt;(val)};
  }
  </code></pre>
  
  <p>This obviously gives me the error  </p>
  
  <blockquote>
    <p>error: functions that differ only in their return type cannot be overloaded</p>
  </blockquote>
  
  <p>Is there a way to implement what I want?</p>