title: "built-in" functions in C++
body: <p>I'm beginner at C++ so if the answer is obvious it possibly is the one I'm looking for. I was reading the second response in <a href="https://stackoverflow.com/questions/286481/why-doesnt-a-swap-exchange-operator-exist-in-imperative-or-oo-languages-like?rq=1">this thread</a> and got confused.</p>
  
  <pre><code>#include &lt;algorithm&gt;
  #include &lt;cassert&gt;
  
  int
  main()
  {
      using std::swap;
      int a(3), b(5);
      swap(a, b);
      assert(a == 5 &amp;&amp; b == 3);
  }
  </code></pre>
  
  <p>What I don't get is "This is just a defined function. What I meant was, why it is not directly built-in" but there was no need to <code>include</code> a new library so isn't it built-in? Does the std library automatically get imported (if yes, why doesn't the namespace automatically get set to std)?</p>