X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=i686-linux-gnu-4.7%2Fusr%2Finclude%2Fc%2B%2B%2F4.7%2Fbits%2Frange_access.h;fp=i686-linux-gnu-4.7%2Fusr%2Finclude%2Fc%2B%2B%2F4.7%2Fbits%2Frange_access.h;h=e1b83bfcfcafdd552f7e617c8a001de6d521faab;hb=94df942c2c7bd3457276fe5b7367623cbb8c1302;hp=0000000000000000000000000000000000000000;hpb=4dd7d9155a920895ff7b1cb6b9c9c676aa62000a;p=cross.git diff --git a/i686-linux-gnu-4.7/usr/include/c++/4.7/bits/range_access.h b/i686-linux-gnu-4.7/usr/include/c++/4.7/bits/range_access.h new file mode 100644 index 0000000..e1b83bf --- /dev/null +++ b/i686-linux-gnu-4.7/usr/include/c++/4.7/bits/range_access.h @@ -0,0 +1,105 @@ +// -*- C++ -*- + +// Copyright (C) 2010 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file bits/range_access.h + * This is an internal header file, included by other library headers. + * Do not attempt to use it directly. @headername{iterator} + */ + +#ifndef _GLIBCXX_RANGE_ACCESS_H +#define _GLIBCXX_RANGE_ACCESS_H 1 + +#pragma GCC system_header + +#ifdef __GXX_EXPERIMENTAL_CXX0X__ + +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + /** + * @brief Return an iterator pointing to the first element of + * the container. + * @param __cont Container. + */ + template + inline auto + begin(_Container& __cont) -> decltype(__cont.begin()) + { return __cont.begin(); } + + /** + * @brief Return an iterator pointing to the first element of + * the const container. + * @param __cont Container. + */ + template + inline auto + begin(const _Container& __cont) -> decltype(__cont.begin()) + { return __cont.begin(); } + + /** + * @brief Return an iterator pointing to one past the last element of + * the container. + * @param __cont Container. + */ + template + inline auto + end(_Container& __cont) -> decltype(__cont.end()) + { return __cont.end(); } + + /** + * @brief Return an iterator pointing to one past the last element of + * the const container. + * @param __cont Container. + */ + template + inline auto + end(const _Container& __cont) -> decltype(__cont.end()) + { return __cont.end(); } + + /** + * @brief Return an iterator pointing to the first element of the array. + * @param __arr Array. + */ + template + inline _Tp* + begin(_Tp (&__arr)[_Nm]) + { return __arr; } + + /** + * @brief Return an iterator pointing to one past the last element + * of the array. + * @param __arr Array. + */ + template + inline _Tp* + end(_Tp (&__arr)[_Nm]) + { return __arr + _Nm; } + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace + +#endif // __GXX_EXPERIMENTAL_CXX0X__ + +#endif // _GLIBCXX_RANGE_ACCESS_H