title: What is the benefit of std::literals::.. being inline namespaces?
body: <p>In the C++-Standard (eg. N4594) there are two definitions for <code>operator""s</code>:</p>
  
  <p>One for <code>std::chrono::seconds</code> :</p>
  
  <pre><code>namespace std {
  ...
  inline namespace literals {
  inline namespace chrono_literals {
  // 20.15.5.8, suffixes for duration literals
  constexpr chrono::seconds operator "" s(unsigned long long);
  </code></pre>
  
  <p>and one for <code>std::string</code> :</p>
  
  <pre><code>namespace std { 
  ....
  inline namespace literals {
  inline namespace string_literals {
  // 21.3.5, suffix for basic_string literals:
  string operator "" s(const char* str, size_t len);
  </code></pre>
  
  <p>I wonder what is gained from those namespaces (and all the other namespaces inside <code>std::literals</code>), if they are <code>inline</code>.</p>
  
  <p>I thought they were inside separate namespaces so they do not conflict with each other. But when they are <code>inline</code>, this motivation is undone, right? <em>Edit:</em> Because <a href="http://www.stroustrup.com/C++11FAQ.html#inline-namespace" rel="nofollow noreferrer">Bjarne explains</a> the main motivation is "library versioning", but this does not fit here.</p>
  
  <p>I can see that the overloads for "Seconds" and "String" are distinct and therefor do not conflict. But would they conflict if the overloads were the same? Or does take the (<code>inline</code>?) <code>namespace</code> prevents that somehow?</p>
  
  <p>Therefore, what is gained from them being in an <code>inline namespace</code> at all?
  How, as @Columbo points out below, are overloading across inline namespaces resolved, and do they clash?</p>