<p dir="ltr">This was actually, probably, the right way to write this code. This is a common idiom when making generic calla to std::swap. The using declaration brings in the std form, but he unqualified call allows a more fitting function to be found via adl if one exists. A test case to demonstrate why this is necessary would've been nice of course (by whoever wrote this code initially)</p>

<p dir="ltr">But perhaps this isn't an issue for begin/end. Maybe they should just be called unqualified, and the standard containers will have their begin/end found by normal adl. Its not like swap where theres a generic fallback implementation.</p>

<div class="gmail_quote">On Jun 3, 2014 12:35 AM, "Rui Ueyama" <<a href="mailto:ruiu@google.com">ruiu@google.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Author: ruiu<br>
Date: Tue Jun  3 02:24:46 2014<br>
New Revision: 210081<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=210081&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=210081&view=rev</a><br>
Log:<br>
Remove unusual use of using.<br>
<br>
Modified:<br>
    lld/trunk/include/lld/ReaderWriter/LinkerScript.h<br>
<br>
Modified: lld/trunk/include/lld/ReaderWriter/LinkerScript.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/ReaderWriter/LinkerScript.h?rev=210081&r1=210080&r2=210081&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/ReaderWriter/LinkerScript.h?rev=210081&r1=210080&r2=210081&view=diff</a><br>

==============================================================================<br>
--- lld/trunk/include/lld/ReaderWriter/LinkerScript.h (original)<br>
+++ lld/trunk/include/lld/ReaderWriter/LinkerScript.h Tue Jun  3 02:24:46 2014<br>
@@ -155,9 +155,7 @@ class Group : public Command {<br>
 public:<br>
   template <class RangeT><br>
   explicit Group(RangeT range) : Command(Kind::Group) {<br>
-    using std::begin;<br>
-    using std::end;<br>
-    std::copy(begin(range), end(range), std::back_inserter(_paths));<br>
+    std::copy(std::begin(range), std::end(range), std::back_inserter(_paths));<br>
   }<br>
<br>
   static bool classof(const Command *c) { return c->getKind() == Kind::Group; }<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>