title: Expression: Sequence not ordered
body: <p>I'm trying to find the intersect between 2 strings. I'm using the following code:</p>
  
  <pre><code>std::string a = "asd", b = "afd";
  
  std::string intersect;
  std::set_intersection(a.begin(), a.end(), b.begin(), b.end(), std::back_inserter(intersect));
  </code></pre>
  
  <p>It compiles successfully, but after running the program instant crashes with the following error:</p>
  
  <p><img src="https://i.stack.imgur.com/F9E6v.png" alt="enter image description here"></p>
  
  <p>Any suggestion what is causing this problem?</p>