To whom it may concernThe following code fails to compile, it requires the two using's to be uncommented to compile. It should compile. the array is found in the std namespace, so via the normal ADL lookup, it should find the begin and end in the std namespace.I know that the std::array is currently defined in the std::tr1 namespace, and is introduced into the std namespace via a using, should this not be the other way round?If the two using's (commented out) are required, it makes generic code as recommended here; http://herbsutter.com/elements-of-modern-c-style/, (section Nonmember begin and end) more difficult to write and slightly counter intuitive (especially when writing generic code).#include <iostream>#include <algorithm>#include <array>#include <iterator>void main(){ std::array<int, 7> abc = { 1, 2, 3, 4, 5, 6, 7 }; //using std::begin; //using std::end; std::copy(begin(abc), end(abc), std::ostream_iterator<int>(std::cout, " "));}
Visual Studio/Team Foundation Server/.NET Framework Tooling version
Steps to reproduce
Product Language
Operating System
Operating System Language
Actual results
Expected results