<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hi all,</p>
    <p>using Clang 3.9.1 on Ubuntu 14.04, I have trouble compiling with
      the checked STL version.</p>
    <p>Error message:</p>
    <pre style="box-sizing: border-box; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 11.9px; margin-top: 0px; margin-bottom: 16px; word-wrap: normal; padding: 16px; overflow: auto; line-height: 1.45; background-color: rgb(246, 248, 250); border-radius: 3px; color: rgb(36, 41, 46); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"><code style="box-sizing: border-box; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 11.9px; padding: 0px; margin: 0px; background: transparent; border-radius: 3px; word-break: normal; white-space: pre; border: 0px; display: inline; overflow: visible; line-height: inherit; word-wrap: normal;">/usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/debug/array:86:52: 
error: too many arguments to function call, expected single argument '__other', have 2 arguments</code></pre>
    <p>with debug flags <br>
    </p>
    <pre style="box-sizing: border-box; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 11.9px; margin-top: 0px; margin-bottom: 16px; word-wrap: normal; padding: 16px; overflow: auto; line-height: 1.45; background-color: rgb(246, 248, 250); border-radius: 3px; color: rgb(36, 41, 46); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"><code style="box-sizing: border-box; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 11.9px; padding: 0px; margin: 0px; background: transparent; border-radius: 3px; word-break: normal; white-space: pre; border: 0px; display: inline; overflow: visible; line-height: inherit; word-wrap: normal;">-O2 -DDEBUG -g -ggdb3 -D_GLIBCXX_DEBUG</code></pre>
    <p>that is, with the checked STL implementation.<br>
    </p>
    <p>The problem is the swap function:</p>
    <pre style="box-sizing: border-box; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 11.9px; margin-top: 0px; margin-bottom: 0px; word-wrap: normal; padding: 16px; overflow: auto; line-height: 1.45; background-color: rgb(246, 248, 250); border-radius: 3px; word-break: normal; color: rgb(36, 41, 46); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"><span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">void</span>
<span class="pl-en" style="box-sizing: border-box; color: rgb(111, 66, 193);">swap</span>(array& __other)
<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">noexcept</span>(noexcept(swap(std::declval<_Tp&>(), std::declval<_Tp&>())))
{ <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">std::swap_ranges</span>(<span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">begin</span>(), <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">end</span>(), __other.<span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">begin</span>()); }</pre>
    <p><br>
    </p>
    <p>The issue was discussed here:
      <a class="moz-txt-link-freetext" href="https://github.com/greg7mdp/sparsepp/issues/61">https://github.com/greg7mdp/sparsepp/issues/61</a><br>
      where <a moz-do-not-send="true"
        href="https://github.com/greg7mdp">greg7mdp</a> suggested that
      the problem might be a missing `std` in front of the swap() call:<br>
    </p>
    <pre style="box-sizing: border-box; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 11.9px; margin-top: 0px; margin-bottom: 0px !important; word-wrap: normal; padding: 16px; overflow: auto; line-height: 1.45; background-color: rgb(246, 248, 250); border-radius: 3px; color: rgb(36, 41, 46); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"><code style="box-sizing: border-box; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 11.9px; padding: 0px; margin: 0px; background: transparent; border-radius: 3px; word-break: normal; white-space: pre; border: 0px; display: inline; overflow: visible; line-height: inherit; word-wrap: normal;">void
swap(array& __other)
noexcept(noexcept(<u><b>std::</b></u>swap(std::declval<_Tp&>(), std::declval<_Tp&>())))
{ std::swap_ranges(begin(), end(), __other.begin()); }</code></pre>
    <p><br>
    </p>
    <p>Please let me know if this is a bug in libc++, or an issue with
      sparsepp, where the problem manifests.<br>
    </p>
    <p>Thanks<br>
      Lucas<br>
    </p>
  </body>
</html>