1 //===----------------------------------------------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
12 // template<class T> class valarray;
16 // end(const valarray<T>& v);
26 T a[] = {1, 2, 3, 4, 5};
27 const unsigned N = sizeof(a)/sizeof(a[0]);
28 const std::valarray<T> v(a, N);
29 assert(v[v.size()-1] == 5);
30 assert(static_cast<std::size_t>(end(v) - begin(v)) == v.size());