2008-07-16 01:23:23 +02:00
|
|
|
// <chrono> -*- C++ -*-
|
|
|
|
|
2012-08-10 00:45:20 +02:00
|
|
|
// Copyright (C) 2008-2012 Free Software Foundation, Inc.
|
2008-07-16 01:23:23 +02:00
|
|
|
//
|
|
|
|
// 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
|
2009-04-09 17:00:19 +02:00
|
|
|
// Free Software Foundation; either version 3, or (at your option)
|
2008-07-16 01:23:23 +02:00
|
|
|
// 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.
|
|
|
|
|
2009-04-09 17:00:19 +02:00
|
|
|
// 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.
|
2008-07-16 01:23:23 +02:00
|
|
|
|
2009-04-09 17:00:19 +02:00
|
|
|
// 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
|
|
|
|
// <http://www.gnu.org/licenses/>.
|
2008-07-16 01:23:23 +02:00
|
|
|
|
|
|
|
/** @file include/chrono
|
|
|
|
* This is a Standard C++ Library header.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _GLIBCXX_CHRONO
|
|
|
|
#define _GLIBCXX_CHRONO 1
|
|
|
|
|
|
|
|
#pragma GCC system_header
|
|
|
|
|
2012-11-10 18:27:22 +01:00
|
|
|
#if __cplusplus < 201103L
|
2010-02-10 20:14:33 +01:00
|
|
|
# include <bits/c++0x_warning.h>
|
2008-07-16 01:23:23 +02:00
|
|
|
#else
|
|
|
|
|
|
|
|
#include <ratio>
|
|
|
|
#include <type_traits>
|
|
|
|
#include <limits>
|
|
|
|
#include <ctime>
|
|
|
|
|
|
|
|
#ifdef _GLIBCXX_USE_C99_STDINT_TR1
|
|
|
|
|
PR libstdc++/36104 part four
2011-01-30 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/36104 part four
* include/bits/c++config (_GLIBCXX_STD): Remove.
(_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C.
(_GLIBCXX_P): Now _GLIBCXX_STD_A.
(_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL,
_GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove.
(_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL,
_GLIBCXX_INLINE_PROFILE): Remove.
(_GLIBCXX_BEGIN_NAMESPACE(X)): Remove.
(_GLIBCXX_END_NAMESPACE): Remove.
(_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove.
(_GLIBCXX_END_NESTED_NAMESPACE): Remove.
(_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add.
(_GLIBCXX_END_NAMESPACE_ALGO): Add.
(_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add.
(_GLIBCXX_END_NAMESPACE_CONTAINER): Add.
(_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add.
(_GLIBCXX_END_NAMESPACE_VERSION): Add.
(_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL.
(_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL.
(_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY.
* include/*: Use new macros for namespace scope.
* config/*: Same.
* src/*: Same.
* src/Makefile.am (sources): Remove debug_list.cc, add
compatibility-debug_list-2.cc.
(parallel_sources): Remove parallel_list.cc, add
compatibility-parallel_list-2.cc.
(compatibility-parallel_list-2.[o,lo]): New rule.
* src/Makefile.in: Regenerate.
* src/debug_list.cc: Remove.
* src/parallel_list.cc: Remove.
* src/compatibility-list-2.cc: New.
* src/compatibility-debug_list-2.cc: New.
* src/compatibility-parallel_list-2.cc: New.
* doc/doxygen/user.cfg.in: Adjust macros.
* testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros.
* testsuite/20_util/declval/requirements/1_neg.cc: Same.
* testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same.
* testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same.
* testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same.
* testsuite/20_util/forward/c_neg.cc: Same.
* testsuite/20_util/forward/f_neg.cc: Same.
* testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same.
* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same.
* testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same.
* testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same.
* testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same.
* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same.
* testsuite/23_containers/forward_list/capacity/1.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
assign_neg.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
insert_neg.cc: Same.
* testsuite/23_containers/list/capacity/29134.cc: Same.
* testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same.
* testsuite/23_containers/list/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/list/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same.
* testsuite/23_containers/vector/bool/capacity/29134.cc: Same.
* testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same.
* testsuite/25_algorithms/sort/35588.cc: Same.
* testsuite/27_io/ios_base/cons/assign_neg.cc: Same.
* testsuite/27_io/ios_base/cons/copy_neg.cc: Same.
* testsuite/ext/profile/mutex_extensions_neg.cc: Same.
* testsuite/ext/profile/profiler_algos.cc: Same.
* testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same.
* testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same.
* testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same.
* testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same.
* testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same.
From-SVN: r169421
2011-01-30 23:39:36 +01:00
|
|
|
namespace std _GLIBCXX_VISIBILITY(default)
|
|
|
|
{
|
2009-02-21 01:45:21 +01:00
|
|
|
/**
|
|
|
|
* @defgroup chrono Time
|
|
|
|
* @ingroup utilities
|
|
|
|
*
|
|
|
|
* Classes and functions for time.
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
|
|
|
|
/** @namespace std::chrono
|
2012-08-10 00:45:20 +02:00
|
|
|
* @brief ISO C++ 2011 entities sub-namespace for time and date.
|
2009-02-21 01:45:21 +01:00
|
|
|
*/
|
2008-07-16 01:23:23 +02:00
|
|
|
namespace chrono
|
|
|
|
{
|
PR libstdc++/36104 part four
2011-01-30 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/36104 part four
* include/bits/c++config (_GLIBCXX_STD): Remove.
(_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C.
(_GLIBCXX_P): Now _GLIBCXX_STD_A.
(_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL,
_GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove.
(_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL,
_GLIBCXX_INLINE_PROFILE): Remove.
(_GLIBCXX_BEGIN_NAMESPACE(X)): Remove.
(_GLIBCXX_END_NAMESPACE): Remove.
(_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove.
(_GLIBCXX_END_NESTED_NAMESPACE): Remove.
(_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add.
(_GLIBCXX_END_NAMESPACE_ALGO): Add.
(_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add.
(_GLIBCXX_END_NAMESPACE_CONTAINER): Add.
(_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add.
(_GLIBCXX_END_NAMESPACE_VERSION): Add.
(_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL.
(_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL.
(_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY.
* include/*: Use new macros for namespace scope.
* config/*: Same.
* src/*: Same.
* src/Makefile.am (sources): Remove debug_list.cc, add
compatibility-debug_list-2.cc.
(parallel_sources): Remove parallel_list.cc, add
compatibility-parallel_list-2.cc.
(compatibility-parallel_list-2.[o,lo]): New rule.
* src/Makefile.in: Regenerate.
* src/debug_list.cc: Remove.
* src/parallel_list.cc: Remove.
* src/compatibility-list-2.cc: New.
* src/compatibility-debug_list-2.cc: New.
* src/compatibility-parallel_list-2.cc: New.
* doc/doxygen/user.cfg.in: Adjust macros.
* testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros.
* testsuite/20_util/declval/requirements/1_neg.cc: Same.
* testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same.
* testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same.
* testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same.
* testsuite/20_util/forward/c_neg.cc: Same.
* testsuite/20_util/forward/f_neg.cc: Same.
* testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same.
* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same.
* testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same.
* testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same.
* testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same.
* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same.
* testsuite/23_containers/forward_list/capacity/1.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
assign_neg.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
insert_neg.cc: Same.
* testsuite/23_containers/list/capacity/29134.cc: Same.
* testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same.
* testsuite/23_containers/list/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/list/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same.
* testsuite/23_containers/vector/bool/capacity/29134.cc: Same.
* testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same.
* testsuite/25_algorithms/sort/35588.cc: Same.
* testsuite/27_io/ios_base/cons/assign_neg.cc: Same.
* testsuite/27_io/ios_base/cons/copy_neg.cc: Same.
* testsuite/ext/profile/mutex_extensions_neg.cc: Same.
* testsuite/ext/profile/profiler_algos.cc: Same.
* testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same.
* testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same.
* testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same.
* testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same.
* testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same.
From-SVN: r169421
2011-01-30 23:39:36 +01:00
|
|
|
_GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|
|
|
|
2008-07-16 01:23:23 +02:00
|
|
|
template<typename _Rep, typename _Period = ratio<1>>
|
|
|
|
struct duration;
|
|
|
|
|
2010-11-03 02:59:07 +01:00
|
|
|
template<typename _Clock, typename _Dur = typename _Clock::duration>
|
2008-07-16 01:23:23 +02:00
|
|
|
struct time_point;
|
PR libstdc++/36104 part four
2011-01-30 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/36104 part four
* include/bits/c++config (_GLIBCXX_STD): Remove.
(_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C.
(_GLIBCXX_P): Now _GLIBCXX_STD_A.
(_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL,
_GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove.
(_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL,
_GLIBCXX_INLINE_PROFILE): Remove.
(_GLIBCXX_BEGIN_NAMESPACE(X)): Remove.
(_GLIBCXX_END_NAMESPACE): Remove.
(_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove.
(_GLIBCXX_END_NESTED_NAMESPACE): Remove.
(_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add.
(_GLIBCXX_END_NAMESPACE_ALGO): Add.
(_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add.
(_GLIBCXX_END_NAMESPACE_CONTAINER): Add.
(_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add.
(_GLIBCXX_END_NAMESPACE_VERSION): Add.
(_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL.
(_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL.
(_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY.
* include/*: Use new macros for namespace scope.
* config/*: Same.
* src/*: Same.
* src/Makefile.am (sources): Remove debug_list.cc, add
compatibility-debug_list-2.cc.
(parallel_sources): Remove parallel_list.cc, add
compatibility-parallel_list-2.cc.
(compatibility-parallel_list-2.[o,lo]): New rule.
* src/Makefile.in: Regenerate.
* src/debug_list.cc: Remove.
* src/parallel_list.cc: Remove.
* src/compatibility-list-2.cc: New.
* src/compatibility-debug_list-2.cc: New.
* src/compatibility-parallel_list-2.cc: New.
* doc/doxygen/user.cfg.in: Adjust macros.
* testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros.
* testsuite/20_util/declval/requirements/1_neg.cc: Same.
* testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same.
* testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same.
* testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same.
* testsuite/20_util/forward/c_neg.cc: Same.
* testsuite/20_util/forward/f_neg.cc: Same.
* testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same.
* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same.
* testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same.
* testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same.
* testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same.
* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same.
* testsuite/23_containers/forward_list/capacity/1.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
assign_neg.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
insert_neg.cc: Same.
* testsuite/23_containers/list/capacity/29134.cc: Same.
* testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same.
* testsuite/23_containers/list/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/list/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same.
* testsuite/23_containers/vector/bool/capacity/29134.cc: Same.
* testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same.
* testsuite/25_algorithms/sort/35588.cc: Same.
* testsuite/27_io/ios_base/cons/assign_neg.cc: Same.
* testsuite/27_io/ios_base/cons/copy_neg.cc: Same.
* testsuite/ext/profile/mutex_extensions_neg.cc: Same.
* testsuite/ext/profile/profiler_algos.cc: Same.
* testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same.
* testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same.
* testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same.
* testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same.
* testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same.
From-SVN: r169421
2011-01-30 23:39:36 +01:00
|
|
|
|
|
|
|
_GLIBCXX_END_NAMESPACE_VERSION
|
2008-07-16 01:23:23 +02:00
|
|
|
}
|
|
|
|
|
PR libstdc++/36104 part four
2011-01-30 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/36104 part four
* include/bits/c++config (_GLIBCXX_STD): Remove.
(_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C.
(_GLIBCXX_P): Now _GLIBCXX_STD_A.
(_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL,
_GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove.
(_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL,
_GLIBCXX_INLINE_PROFILE): Remove.
(_GLIBCXX_BEGIN_NAMESPACE(X)): Remove.
(_GLIBCXX_END_NAMESPACE): Remove.
(_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove.
(_GLIBCXX_END_NESTED_NAMESPACE): Remove.
(_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add.
(_GLIBCXX_END_NAMESPACE_ALGO): Add.
(_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add.
(_GLIBCXX_END_NAMESPACE_CONTAINER): Add.
(_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add.
(_GLIBCXX_END_NAMESPACE_VERSION): Add.
(_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL.
(_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL.
(_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY.
* include/*: Use new macros for namespace scope.
* config/*: Same.
* src/*: Same.
* src/Makefile.am (sources): Remove debug_list.cc, add
compatibility-debug_list-2.cc.
(parallel_sources): Remove parallel_list.cc, add
compatibility-parallel_list-2.cc.
(compatibility-parallel_list-2.[o,lo]): New rule.
* src/Makefile.in: Regenerate.
* src/debug_list.cc: Remove.
* src/parallel_list.cc: Remove.
* src/compatibility-list-2.cc: New.
* src/compatibility-debug_list-2.cc: New.
* src/compatibility-parallel_list-2.cc: New.
* doc/doxygen/user.cfg.in: Adjust macros.
* testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros.
* testsuite/20_util/declval/requirements/1_neg.cc: Same.
* testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same.
* testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same.
* testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same.
* testsuite/20_util/forward/c_neg.cc: Same.
* testsuite/20_util/forward/f_neg.cc: Same.
* testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same.
* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same.
* testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same.
* testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same.
* testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same.
* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same.
* testsuite/23_containers/forward_list/capacity/1.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
assign_neg.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
insert_neg.cc: Same.
* testsuite/23_containers/list/capacity/29134.cc: Same.
* testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same.
* testsuite/23_containers/list/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/list/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same.
* testsuite/23_containers/vector/bool/capacity/29134.cc: Same.
* testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same.
* testsuite/25_algorithms/sort/35588.cc: Same.
* testsuite/27_io/ios_base/cons/assign_neg.cc: Same.
* testsuite/27_io/ios_base/cons/copy_neg.cc: Same.
* testsuite/ext/profile/mutex_extensions_neg.cc: Same.
* testsuite/ext/profile/profiler_algos.cc: Same.
* testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same.
* testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same.
* testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same.
* testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same.
* testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same.
From-SVN: r169421
2011-01-30 23:39:36 +01:00
|
|
|
_GLIBCXX_BEGIN_NAMESPACE_VERSION
|
2012-10-10 00:31:44 +02:00
|
|
|
|
|
|
|
// 20.11.4.3 specialization of common_type (for duration, sfinae-friendly)
|
|
|
|
|
|
|
|
template<typename _CT, typename _Period1, typename _Period2>
|
|
|
|
struct __duration_common_type_wrapper
|
2008-07-16 01:23:23 +02:00
|
|
|
{
|
2010-11-03 02:59:07 +01:00
|
|
|
private:
|
2012-10-10 00:31:44 +02:00
|
|
|
typedef __static_gcd<_Period1::num, _Period2::num> __gcd_num;
|
|
|
|
typedef __static_gcd<_Period1::den, _Period2::den> __gcd_den;
|
|
|
|
typedef typename _CT::type __cr;
|
2010-11-03 02:59:07 +01:00
|
|
|
typedef ratio<__gcd_num::value,
|
2012-10-10 00:31:44 +02:00
|
|
|
(_Period1::den / __gcd_den::value) * _Period2::den> __r;
|
2010-11-03 02:59:07 +01:00
|
|
|
public:
|
2012-10-10 00:31:44 +02:00
|
|
|
typedef __success_type<chrono::duration<__cr, __r>> type;
|
2008-07-16 01:23:23 +02:00
|
|
|
};
|
2010-11-02 03:35:28 +01:00
|
|
|
|
2012-10-10 00:31:44 +02:00
|
|
|
template<typename _Period1, typename _Period2>
|
|
|
|
struct __duration_common_type_wrapper<__failure_type, _Period1, _Period2>
|
|
|
|
{ typedef __failure_type type; };
|
2010-11-03 02:59:07 +01:00
|
|
|
|
2012-10-10 00:31:44 +02:00
|
|
|
template<typename _Rep1, typename _Period1, typename _Rep2, typename _Period2>
|
|
|
|
struct common_type<chrono::duration<_Rep1, _Period1>,
|
|
|
|
chrono::duration<_Rep2, _Period2>>
|
|
|
|
: public __duration_common_type_wrapper<typename __member_type_wrapper<
|
|
|
|
common_type<_Rep1, _Rep2>>::type, _Period1, _Period2>::type
|
|
|
|
{ };
|
|
|
|
|
|
|
|
// 20.11.4.3 specialization of common_type (for time_point, sfinae-friendly)
|
|
|
|
|
|
|
|
template<typename _CT, typename _Clock>
|
|
|
|
struct __timepoint_common_type_wrapper
|
|
|
|
{
|
|
|
|
typedef __success_type<chrono::time_point<_Clock, typename _CT::type>>
|
|
|
|
type;
|
2008-07-16 01:23:23 +02:00
|
|
|
};
|
2012-10-10 00:31:44 +02:00
|
|
|
|
|
|
|
template<typename _Clock>
|
|
|
|
struct __timepoint_common_type_wrapper<__failure_type, _Clock>
|
|
|
|
{ typedef __failure_type type; };
|
|
|
|
|
|
|
|
template<typename _Clock, typename _Duration1, typename _Duration2>
|
|
|
|
struct common_type<chrono::time_point<_Clock, _Duration1>,
|
|
|
|
chrono::time_point<_Clock, _Duration2>>
|
|
|
|
: public __timepoint_common_type_wrapper<typename __member_type_wrapper<
|
|
|
|
common_type<_Duration1, _Duration2>>::type, _Clock>::type
|
|
|
|
{ };
|
|
|
|
|
PR libstdc++/36104 part four
2011-01-30 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/36104 part four
* include/bits/c++config (_GLIBCXX_STD): Remove.
(_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C.
(_GLIBCXX_P): Now _GLIBCXX_STD_A.
(_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL,
_GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove.
(_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL,
_GLIBCXX_INLINE_PROFILE): Remove.
(_GLIBCXX_BEGIN_NAMESPACE(X)): Remove.
(_GLIBCXX_END_NAMESPACE): Remove.
(_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove.
(_GLIBCXX_END_NESTED_NAMESPACE): Remove.
(_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add.
(_GLIBCXX_END_NAMESPACE_ALGO): Add.
(_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add.
(_GLIBCXX_END_NAMESPACE_CONTAINER): Add.
(_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add.
(_GLIBCXX_END_NAMESPACE_VERSION): Add.
(_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL.
(_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL.
(_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY.
* include/*: Use new macros for namespace scope.
* config/*: Same.
* src/*: Same.
* src/Makefile.am (sources): Remove debug_list.cc, add
compatibility-debug_list-2.cc.
(parallel_sources): Remove parallel_list.cc, add
compatibility-parallel_list-2.cc.
(compatibility-parallel_list-2.[o,lo]): New rule.
* src/Makefile.in: Regenerate.
* src/debug_list.cc: Remove.
* src/parallel_list.cc: Remove.
* src/compatibility-list-2.cc: New.
* src/compatibility-debug_list-2.cc: New.
* src/compatibility-parallel_list-2.cc: New.
* doc/doxygen/user.cfg.in: Adjust macros.
* testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros.
* testsuite/20_util/declval/requirements/1_neg.cc: Same.
* testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same.
* testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same.
* testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same.
* testsuite/20_util/forward/c_neg.cc: Same.
* testsuite/20_util/forward/f_neg.cc: Same.
* testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same.
* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same.
* testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same.
* testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same.
* testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same.
* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same.
* testsuite/23_containers/forward_list/capacity/1.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
assign_neg.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
insert_neg.cc: Same.
* testsuite/23_containers/list/capacity/29134.cc: Same.
* testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same.
* testsuite/23_containers/list/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/list/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same.
* testsuite/23_containers/vector/bool/capacity/29134.cc: Same.
* testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same.
* testsuite/25_algorithms/sort/35588.cc: Same.
* testsuite/27_io/ios_base/cons/assign_neg.cc: Same.
* testsuite/27_io/ios_base/cons/copy_neg.cc: Same.
* testsuite/ext/profile/mutex_extensions_neg.cc: Same.
* testsuite/ext/profile/profiler_algos.cc: Same.
* testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same.
* testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same.
* testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same.
* testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same.
* testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same.
From-SVN: r169421
2011-01-30 23:39:36 +01:00
|
|
|
_GLIBCXX_END_NAMESPACE_VERSION
|
2008-07-16 01:23:23 +02:00
|
|
|
|
2010-11-02 03:35:28 +01:00
|
|
|
namespace chrono
|
2008-07-16 01:23:23 +02:00
|
|
|
{
|
PR libstdc++/36104 part four
2011-01-30 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/36104 part four
* include/bits/c++config (_GLIBCXX_STD): Remove.
(_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C.
(_GLIBCXX_P): Now _GLIBCXX_STD_A.
(_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL,
_GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove.
(_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL,
_GLIBCXX_INLINE_PROFILE): Remove.
(_GLIBCXX_BEGIN_NAMESPACE(X)): Remove.
(_GLIBCXX_END_NAMESPACE): Remove.
(_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove.
(_GLIBCXX_END_NESTED_NAMESPACE): Remove.
(_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add.
(_GLIBCXX_END_NAMESPACE_ALGO): Add.
(_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add.
(_GLIBCXX_END_NAMESPACE_CONTAINER): Add.
(_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add.
(_GLIBCXX_END_NAMESPACE_VERSION): Add.
(_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL.
(_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL.
(_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY.
* include/*: Use new macros for namespace scope.
* config/*: Same.
* src/*: Same.
* src/Makefile.am (sources): Remove debug_list.cc, add
compatibility-debug_list-2.cc.
(parallel_sources): Remove parallel_list.cc, add
compatibility-parallel_list-2.cc.
(compatibility-parallel_list-2.[o,lo]): New rule.
* src/Makefile.in: Regenerate.
* src/debug_list.cc: Remove.
* src/parallel_list.cc: Remove.
* src/compatibility-list-2.cc: New.
* src/compatibility-debug_list-2.cc: New.
* src/compatibility-parallel_list-2.cc: New.
* doc/doxygen/user.cfg.in: Adjust macros.
* testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros.
* testsuite/20_util/declval/requirements/1_neg.cc: Same.
* testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same.
* testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same.
* testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same.
* testsuite/20_util/forward/c_neg.cc: Same.
* testsuite/20_util/forward/f_neg.cc: Same.
* testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same.
* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same.
* testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same.
* testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same.
* testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same.
* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same.
* testsuite/23_containers/forward_list/capacity/1.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
assign_neg.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
insert_neg.cc: Same.
* testsuite/23_containers/list/capacity/29134.cc: Same.
* testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same.
* testsuite/23_containers/list/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/list/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same.
* testsuite/23_containers/vector/bool/capacity/29134.cc: Same.
* testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same.
* testsuite/25_algorithms/sort/35588.cc: Same.
* testsuite/27_io/ios_base/cons/assign_neg.cc: Same.
* testsuite/27_io/ios_base/cons/copy_neg.cc: Same.
* testsuite/ext/profile/mutex_extensions_neg.cc: Same.
* testsuite/ext/profile/profiler_algos.cc: Same.
* testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same.
* testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same.
* testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same.
* testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same.
* testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same.
From-SVN: r169421
2011-01-30 23:39:36 +01:00
|
|
|
_GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|
|
|
|
2009-02-21 01:45:21 +01:00
|
|
|
// Primary template for duration_cast impl.
|
2010-11-03 02:59:07 +01:00
|
|
|
template<typename _ToDur, typename _CF, typename _CR,
|
2010-11-02 03:35:28 +01:00
|
|
|
bool _NumIsOne = false, bool _DenIsOne = false>
|
2008-07-16 01:23:23 +02:00
|
|
|
struct __duration_cast_impl
|
|
|
|
{
|
2010-11-02 03:35:28 +01:00
|
|
|
template<typename _Rep, typename _Period>
|
2010-11-03 02:59:07 +01:00
|
|
|
static constexpr _ToDur
|
2010-11-02 03:35:28 +01:00
|
|
|
__cast(const duration<_Rep, _Period>& __d)
|
|
|
|
{
|
2010-11-03 02:59:07 +01:00
|
|
|
typedef typename _ToDur::rep __to_rep;
|
|
|
|
return _ToDur(static_cast<__to_rep>(static_cast<_CR>(__d.count())
|
2010-11-02 03:35:28 +01:00
|
|
|
* static_cast<_CR>(_CF::num)
|
|
|
|
/ static_cast<_CR>(_CF::den)));
|
|
|
|
}
|
2008-07-16 01:23:23 +02:00
|
|
|
};
|
|
|
|
|
2010-11-03 02:59:07 +01:00
|
|
|
template<typename _ToDur, typename _CF, typename _CR>
|
|
|
|
struct __duration_cast_impl<_ToDur, _CF, _CR, true, true>
|
2008-07-16 01:23:23 +02:00
|
|
|
{
|
2010-11-02 03:35:28 +01:00
|
|
|
template<typename _Rep, typename _Period>
|
2010-11-03 02:59:07 +01:00
|
|
|
static constexpr _ToDur
|
2010-11-02 03:35:28 +01:00
|
|
|
__cast(const duration<_Rep, _Period>& __d)
|
|
|
|
{
|
2010-11-03 02:59:07 +01:00
|
|
|
typedef typename _ToDur::rep __to_rep;
|
|
|
|
return _ToDur(static_cast<__to_rep>(__d.count()));
|
2010-11-02 03:35:28 +01:00
|
|
|
}
|
2008-07-16 01:23:23 +02:00
|
|
|
};
|
|
|
|
|
2010-11-03 02:59:07 +01:00
|
|
|
template<typename _ToDur, typename _CF, typename _CR>
|
|
|
|
struct __duration_cast_impl<_ToDur, _CF, _CR, true, false>
|
2008-07-16 01:23:23 +02:00
|
|
|
{
|
2010-11-02 03:35:28 +01:00
|
|
|
template<typename _Rep, typename _Period>
|
2010-11-03 02:59:07 +01:00
|
|
|
static constexpr _ToDur
|
2010-11-02 03:35:28 +01:00
|
|
|
__cast(const duration<_Rep, _Period>& __d)
|
|
|
|
{
|
2010-11-03 02:59:07 +01:00
|
|
|
typedef typename _ToDur::rep __to_rep;
|
|
|
|
return _ToDur(static_cast<__to_rep>(
|
2010-11-02 03:35:28 +01:00
|
|
|
static_cast<_CR>(__d.count()) / static_cast<_CR>(_CF::den)));
|
|
|
|
}
|
2008-07-16 01:23:23 +02:00
|
|
|
};
|
|
|
|
|
2010-11-03 02:59:07 +01:00
|
|
|
template<typename _ToDur, typename _CF, typename _CR>
|
|
|
|
struct __duration_cast_impl<_ToDur, _CF, _CR, false, true>
|
2008-07-16 01:23:23 +02:00
|
|
|
{
|
2010-11-02 03:35:28 +01:00
|
|
|
template<typename _Rep, typename _Period>
|
2010-11-03 02:59:07 +01:00
|
|
|
static constexpr _ToDur
|
2010-11-02 03:35:28 +01:00
|
|
|
__cast(const duration<_Rep, _Period>& __d)
|
|
|
|
{
|
2010-11-03 02:59:07 +01:00
|
|
|
typedef typename _ToDur::rep __to_rep;
|
|
|
|
return _ToDur(static_cast<__to_rep>(
|
2010-11-02 03:35:28 +01:00
|
|
|
static_cast<_CR>(__d.count()) * static_cast<_CR>(_CF::num)));
|
|
|
|
}
|
2008-07-16 01:23:23 +02:00
|
|
|
};
|
|
|
|
|
chrono (struct __common_rep_type): New.
2009-10-31 Paolo Carlini <paolo.carlini@oracle.com>
* include/std/chrono (struct __common_rep_type): New.
(duration_cast(const duration<>&),
duration<>::duration(const _Rep2&),
duration<>::duration(const duration<>&),
operator*(const duration<>&, const _Rep2&),
operator*(const _Rep1&, const duration<>&),
operator/(const duration<>&, const _Rep2&),
time_point_cast(const time_point<>&)): Implement resolution of
DR 1177 ([Ready] in Santa Cruz), change to not participate to
overload resolution if the constraints are not met.
* testsuite/20_util/duration/cons/1_neg.cc: Adjust dg-errors.
* testsuite/20_util/duration/cons/dr974.cc: Likewise.
* testsuite/20_util/duration/requirements/typedefs_neg1.cc: Adjust
dg-error line numbers.
* testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
* testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
From-SVN: r153787
2009-11-01 01:35:40 +01:00
|
|
|
template<typename _Tp>
|
|
|
|
struct __is_duration
|
|
|
|
: std::false_type
|
|
|
|
{ };
|
|
|
|
|
|
|
|
template<typename _Rep, typename _Period>
|
|
|
|
struct __is_duration<duration<_Rep, _Period>>
|
|
|
|
: std::true_type
|
|
|
|
{ };
|
|
|
|
|
2009-02-21 01:45:21 +01:00
|
|
|
/// duration_cast
|
2010-11-03 02:59:07 +01:00
|
|
|
template<typename _ToDur, typename _Rep, typename _Period>
|
2011-08-11 19:53:05 +02:00
|
|
|
constexpr typename enable_if<__is_duration<_ToDur>::value,
|
|
|
|
_ToDur>::type
|
2008-07-16 01:23:23 +02:00
|
|
|
duration_cast(const duration<_Rep, _Period>& __d)
|
|
|
|
{
|
2010-11-03 02:59:07 +01:00
|
|
|
typedef typename _ToDur::period __to_period;
|
|
|
|
typedef typename _ToDur::rep __to_rep;
|
2012-07-03 21:24:07 +02:00
|
|
|
typedef ratio_divide<_Period, __to_period> __cf;
|
2010-11-03 02:59:07 +01:00
|
|
|
typedef typename common_type<__to_rep, _Rep, intmax_t>::type
|
|
|
|
__cr;
|
|
|
|
typedef __duration_cast_impl<_ToDur, __cf, __cr,
|
|
|
|
__cf::num == 1, __cf::den == 1> __dc;
|
|
|
|
return __dc::__cast(__d);
|
2008-07-16 01:23:23 +02:00
|
|
|
}
|
|
|
|
|
2009-02-21 01:45:21 +01:00
|
|
|
/// treat_as_floating_point
|
2008-07-16 01:23:23 +02:00
|
|
|
template<typename _Rep>
|
2009-07-21 16:48:47 +02:00
|
|
|
struct treat_as_floating_point
|
2008-07-16 01:23:23 +02:00
|
|
|
: is_floating_point<_Rep>
|
|
|
|
{ };
|
|
|
|
|
2009-02-21 01:45:21 +01:00
|
|
|
/// duration_values
|
2008-07-16 01:23:23 +02:00
|
|
|
template<typename _Rep>
|
|
|
|
struct duration_values
|
|
|
|
{
|
2010-11-02 03:35:28 +01:00
|
|
|
static constexpr _Rep
|
|
|
|
zero()
|
|
|
|
{ return _Rep(0); }
|
|
|
|
|
|
|
|
static constexpr _Rep
|
|
|
|
max()
|
|
|
|
{ return numeric_limits<_Rep>::max(); }
|
|
|
|
|
|
|
|
static constexpr _Rep
|
|
|
|
min()
|
2011-06-08 14:12:00 +02:00
|
|
|
{ return numeric_limits<_Rep>::lowest(); }
|
2008-07-16 01:23:23 +02:00
|
|
|
};
|
|
|
|
|
2008-07-31 21:37:21 +02:00
|
|
|
template<typename T>
|
|
|
|
struct __is_ratio
|
|
|
|
: std::false_type
|
|
|
|
{ };
|
|
|
|
|
|
|
|
template<intmax_t _Num, intmax_t _Den>
|
|
|
|
struct __is_ratio<ratio<_Num, _Den>>
|
|
|
|
: std::true_type
|
|
|
|
{ };
|
|
|
|
|
2008-07-16 09:01:23 +02:00
|
|
|
/// duration
|
2008-07-16 01:23:23 +02:00
|
|
|
template<typename _Rep, typename _Period>
|
|
|
|
struct duration
|
|
|
|
{
|
PR libstdc++/36104 part four
2011-01-30 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/36104 part four
* include/bits/c++config (_GLIBCXX_STD): Remove.
(_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C.
(_GLIBCXX_P): Now _GLIBCXX_STD_A.
(_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL,
_GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove.
(_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL,
_GLIBCXX_INLINE_PROFILE): Remove.
(_GLIBCXX_BEGIN_NAMESPACE(X)): Remove.
(_GLIBCXX_END_NAMESPACE): Remove.
(_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove.
(_GLIBCXX_END_NESTED_NAMESPACE): Remove.
(_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add.
(_GLIBCXX_END_NAMESPACE_ALGO): Add.
(_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add.
(_GLIBCXX_END_NAMESPACE_CONTAINER): Add.
(_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add.
(_GLIBCXX_END_NAMESPACE_VERSION): Add.
(_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL.
(_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL.
(_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY.
* include/*: Use new macros for namespace scope.
* config/*: Same.
* src/*: Same.
* src/Makefile.am (sources): Remove debug_list.cc, add
compatibility-debug_list-2.cc.
(parallel_sources): Remove parallel_list.cc, add
compatibility-parallel_list-2.cc.
(compatibility-parallel_list-2.[o,lo]): New rule.
* src/Makefile.in: Regenerate.
* src/debug_list.cc: Remove.
* src/parallel_list.cc: Remove.
* src/compatibility-list-2.cc: New.
* src/compatibility-debug_list-2.cc: New.
* src/compatibility-parallel_list-2.cc: New.
* doc/doxygen/user.cfg.in: Adjust macros.
* testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros.
* testsuite/20_util/declval/requirements/1_neg.cc: Same.
* testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same.
* testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same.
* testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same.
* testsuite/20_util/forward/c_neg.cc: Same.
* testsuite/20_util/forward/f_neg.cc: Same.
* testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same.
* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same.
* testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same.
* testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same.
* testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same.
* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same.
* testsuite/23_containers/forward_list/capacity/1.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
assign_neg.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
insert_neg.cc: Same.
* testsuite/23_containers/list/capacity/29134.cc: Same.
* testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same.
* testsuite/23_containers/list/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/list/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same.
* testsuite/23_containers/vector/bool/capacity/29134.cc: Same.
* testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same.
* testsuite/25_algorithms/sort/35588.cc: Same.
* testsuite/27_io/ios_base/cons/assign_neg.cc: Same.
* testsuite/27_io/ios_base/cons/copy_neg.cc: Same.
* testsuite/ext/profile/mutex_extensions_neg.cc: Same.
* testsuite/ext/profile/profiler_algos.cc: Same.
* testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same.
* testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same.
* testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same.
* testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same.
* testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same.
From-SVN: r169421
2011-01-30 23:39:36 +01:00
|
|
|
typedef _Rep rep;
|
2010-11-03 02:59:07 +01:00
|
|
|
typedef _Period period;
|
2010-11-02 03:35:28 +01:00
|
|
|
|
2008-07-31 21:37:21 +02:00
|
|
|
static_assert(!__is_duration<_Rep>::value, "rep cannot be a duration");
|
2010-11-02 03:35:28 +01:00
|
|
|
static_assert(__is_ratio<_Period>::value,
|
2008-07-31 21:37:21 +02:00
|
|
|
"period must be a specialization of ratio");
|
2010-11-02 03:35:28 +01:00
|
|
|
static_assert(_Period::num > 0, "period must be positive");
|
|
|
|
|
2012-08-10 00:45:20 +02:00
|
|
|
// 20.11.5.1 construction / copy / destroy
|
2012-07-20 11:48:57 +02:00
|
|
|
constexpr duration() = default;
|
2010-11-02 03:35:28 +01:00
|
|
|
|
2012-10-18 10:36:06 +02:00
|
|
|
// NB: Make constexpr implicit. This cannot be explicitly
|
|
|
|
// constexpr, as any UDT that is not a literal type with a
|
|
|
|
// constexpr copy constructor will be ill-formed.
|
|
|
|
duration(const duration&) = default;
|
2011-01-19 03:17:35 +01:00
|
|
|
|
2010-11-02 03:35:28 +01:00
|
|
|
template<typename _Rep2, typename = typename
|
chrono (struct __common_rep_type): New.
2009-10-31 Paolo Carlini <paolo.carlini@oracle.com>
* include/std/chrono (struct __common_rep_type): New.
(duration_cast(const duration<>&),
duration<>::duration(const _Rep2&),
duration<>::duration(const duration<>&),
operator*(const duration<>&, const _Rep2&),
operator*(const _Rep1&, const duration<>&),
operator/(const duration<>&, const _Rep2&),
time_point_cast(const time_point<>&)): Implement resolution of
DR 1177 ([Ready] in Santa Cruz), change to not participate to
overload resolution if the constraints are not met.
* testsuite/20_util/duration/cons/1_neg.cc: Adjust dg-errors.
* testsuite/20_util/duration/cons/dr974.cc: Likewise.
* testsuite/20_util/duration/requirements/typedefs_neg1.cc: Adjust
dg-error line numbers.
* testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
* testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
From-SVN: r153787
2009-11-01 01:35:40 +01:00
|
|
|
enable_if<is_convertible<_Rep2, rep>::value
|
|
|
|
&& (treat_as_floating_point<rep>::value
|
|
|
|
|| !treat_as_floating_point<_Rep2>::value)>::type>
|
2010-11-02 03:35:28 +01:00
|
|
|
constexpr explicit duration(const _Rep2& __rep)
|
2010-11-24 00:47:44 +01:00
|
|
|
: __r(static_cast<rep>(__rep)) { }
|
2008-07-16 01:23:23 +02:00
|
|
|
|
2010-11-02 03:35:28 +01:00
|
|
|
template<typename _Rep2, typename _Period2, typename = typename
|
|
|
|
enable_if<treat_as_floating_point<rep>::value
|
2012-07-03 21:24:07 +02:00
|
|
|
|| (ratio_divide<_Period2, period>::den == 1
|
chrono (struct __common_rep_type): New.
2009-10-31 Paolo Carlini <paolo.carlini@oracle.com>
* include/std/chrono (struct __common_rep_type): New.
(duration_cast(const duration<>&),
duration<>::duration(const _Rep2&),
duration<>::duration(const duration<>&),
operator*(const duration<>&, const _Rep2&),
operator*(const _Rep1&, const duration<>&),
operator/(const duration<>&, const _Rep2&),
time_point_cast(const time_point<>&)): Implement resolution of
DR 1177 ([Ready] in Santa Cruz), change to not participate to
overload resolution if the constraints are not met.
* testsuite/20_util/duration/cons/1_neg.cc: Adjust dg-errors.
* testsuite/20_util/duration/cons/dr974.cc: Likewise.
* testsuite/20_util/duration/requirements/typedefs_neg1.cc: Adjust
dg-error line numbers.
* testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
* testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
From-SVN: r153787
2009-11-01 01:35:40 +01:00
|
|
|
&& !treat_as_floating_point<_Rep2>::value)>::type>
|
2010-11-02 03:35:28 +01:00
|
|
|
constexpr duration(const duration<_Rep2, _Period2>& __d)
|
|
|
|
: __r(duration_cast<duration>(__d).count()) { }
|
2008-07-16 01:23:23 +02:00
|
|
|
|
2008-07-31 21:37:21 +02:00
|
|
|
~duration() = default;
|
|
|
|
duration& operator=(const duration&) = default;
|
|
|
|
|
2012-08-10 00:45:20 +02:00
|
|
|
// 20.11.5.2 observer
|
2010-11-02 03:35:28 +01:00
|
|
|
constexpr rep
|
|
|
|
count() const
|
|
|
|
{ return __r; }
|
|
|
|
|
2012-08-10 00:45:20 +02:00
|
|
|
// 20.11.5.3 arithmetic
|
2010-11-02 03:35:28 +01:00
|
|
|
constexpr duration
|
|
|
|
operator+() const
|
|
|
|
{ return *this; }
|
|
|
|
|
|
|
|
constexpr duration
|
|
|
|
operator-() const
|
|
|
|
{ return duration(-__r); }
|
|
|
|
|
|
|
|
duration&
|
|
|
|
operator++()
|
|
|
|
{
|
|
|
|
++__r;
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
|
|
|
duration
|
|
|
|
operator++(int)
|
|
|
|
{ return duration(__r++); }
|
|
|
|
|
|
|
|
duration&
|
|
|
|
operator--()
|
|
|
|
{
|
|
|
|
--__r;
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
|
|
|
duration
|
|
|
|
operator--(int)
|
|
|
|
{ return duration(__r--); }
|
|
|
|
|
|
|
|
duration&
|
|
|
|
operator+=(const duration& __d)
|
|
|
|
{
|
|
|
|
__r += __d.count();
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
|
|
|
duration&
|
|
|
|
operator-=(const duration& __d)
|
|
|
|
{
|
|
|
|
__r -= __d.count();
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
|
|
|
duration&
|
|
|
|
operator*=(const rep& __rhs)
|
|
|
|
{
|
|
|
|
__r *= __rhs;
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
|
|
|
duration&
|
|
|
|
operator/=(const rep& __rhs)
|
|
|
|
{
|
|
|
|
__r /= __rhs;
|
|
|
|
return *this;
|
|
|
|
}
|
2008-07-16 01:23:23 +02:00
|
|
|
|
2009-07-21 16:48:47 +02:00
|
|
|
// DR 934.
|
|
|
|
template<typename _Rep2 = rep>
|
|
|
|
typename enable_if<!treat_as_floating_point<_Rep2>::value,
|
|
|
|
duration&>::type
|
|
|
|
operator%=(const rep& __rhs)
|
|
|
|
{
|
|
|
|
__r %= __rhs;
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
|
|
|
template<typename _Rep2 = rep>
|
|
|
|
typename enable_if<!treat_as_floating_point<_Rep2>::value,
|
|
|
|
duration&>::type
|
|
|
|
operator%=(const duration& __d)
|
|
|
|
{
|
|
|
|
__r %= __d.count();
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2012-08-10 00:45:20 +02:00
|
|
|
// 20.11.5.4 special values
|
2010-11-02 03:35:28 +01:00
|
|
|
static constexpr duration
|
|
|
|
zero()
|
|
|
|
{ return duration(duration_values<rep>::zero()); }
|
|
|
|
|
|
|
|
static constexpr duration
|
|
|
|
min()
|
|
|
|
{ return duration(duration_values<rep>::min()); }
|
2008-07-16 01:23:23 +02:00
|
|
|
|
2010-11-02 03:35:28 +01:00
|
|
|
static constexpr duration
|
|
|
|
max()
|
|
|
|
{ return duration(duration_values<rep>::max()); }
|
2009-07-21 16:48:47 +02:00
|
|
|
|
|
|
|
private:
|
2010-11-02 03:35:28 +01:00
|
|
|
rep __r;
|
2008-07-16 01:23:23 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
template<typename _Rep1, typename _Period1,
|
2010-11-02 03:35:28 +01:00
|
|
|
typename _Rep2, typename _Period2>
|
2011-08-11 19:53:05 +02:00
|
|
|
constexpr typename common_type<duration<_Rep1, _Period1>,
|
|
|
|
duration<_Rep2, _Period2>>::type
|
2010-11-02 03:35:28 +01:00
|
|
|
operator+(const duration<_Rep1, _Period1>& __lhs,
|
|
|
|
const duration<_Rep2, _Period2>& __rhs)
|
2008-07-16 01:23:23 +02:00
|
|
|
{
|
2010-11-03 02:59:07 +01:00
|
|
|
typedef duration<_Rep1, _Period1> __dur1;
|
|
|
|
typedef duration<_Rep2, _Period2> __dur2;
|
2011-05-25 01:29:19 +02:00
|
|
|
typedef typename common_type<__dur1,__dur2>::type __cd;
|
|
|
|
return __cd(__cd(__lhs).count() + __cd(__rhs).count());
|
2008-07-16 01:23:23 +02:00
|
|
|
}
|
|
|
|
|
2010-11-02 03:35:28 +01:00
|
|
|
template<typename _Rep1, typename _Period1,
|
|
|
|
typename _Rep2, typename _Period2>
|
2011-08-11 19:53:05 +02:00
|
|
|
constexpr typename common_type<duration<_Rep1, _Period1>,
|
|
|
|
duration<_Rep2, _Period2>>::type
|
2010-11-02 03:35:28 +01:00
|
|
|
operator-(const duration<_Rep1, _Period1>& __lhs,
|
|
|
|
const duration<_Rep2, _Period2>& __rhs)
|
2008-07-16 01:23:23 +02:00
|
|
|
{
|
2010-11-03 02:59:07 +01:00
|
|
|
typedef duration<_Rep1, _Period1> __dur1;
|
|
|
|
typedef duration<_Rep2, _Period2> __dur2;
|
2011-05-25 01:29:19 +02:00
|
|
|
typedef typename common_type<__dur1,__dur2>::type __cd;
|
|
|
|
return __cd(__cd(__lhs).count() - __cd(__rhs).count());
|
2008-07-16 01:23:23 +02:00
|
|
|
}
|
|
|
|
|
chrono (struct __common_rep_type): New.
2009-10-31 Paolo Carlini <paolo.carlini@oracle.com>
* include/std/chrono (struct __common_rep_type): New.
(duration_cast(const duration<>&),
duration<>::duration(const _Rep2&),
duration<>::duration(const duration<>&),
operator*(const duration<>&, const _Rep2&),
operator*(const _Rep1&, const duration<>&),
operator/(const duration<>&, const _Rep2&),
time_point_cast(const time_point<>&)): Implement resolution of
DR 1177 ([Ready] in Santa Cruz), change to not participate to
overload resolution if the constraints are not met.
* testsuite/20_util/duration/cons/1_neg.cc: Adjust dg-errors.
* testsuite/20_util/duration/cons/dr974.cc: Likewise.
* testsuite/20_util/duration/requirements/typedefs_neg1.cc: Adjust
dg-error line numbers.
* testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
* testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
From-SVN: r153787
2009-11-01 01:35:40 +01:00
|
|
|
template<typename _Rep1, typename _Rep2, bool =
|
|
|
|
is_convertible<_Rep2,
|
|
|
|
typename common_type<_Rep1, _Rep2>::type>::value>
|
|
|
|
struct __common_rep_type { };
|
|
|
|
|
|
|
|
template<typename _Rep1, typename _Rep2>
|
|
|
|
struct __common_rep_type<_Rep1, _Rep2, true>
|
2010-11-02 03:35:28 +01:00
|
|
|
{ typedef typename common_type<_Rep1, _Rep2>::type type; };
|
chrono (struct __common_rep_type): New.
2009-10-31 Paolo Carlini <paolo.carlini@oracle.com>
* include/std/chrono (struct __common_rep_type): New.
(duration_cast(const duration<>&),
duration<>::duration(const _Rep2&),
duration<>::duration(const duration<>&),
operator*(const duration<>&, const _Rep2&),
operator*(const _Rep1&, const duration<>&),
operator/(const duration<>&, const _Rep2&),
time_point_cast(const time_point<>&)): Implement resolution of
DR 1177 ([Ready] in Santa Cruz), change to not participate to
overload resolution if the constraints are not met.
* testsuite/20_util/duration/cons/1_neg.cc: Adjust dg-errors.
* testsuite/20_util/duration/cons/dr974.cc: Likewise.
* testsuite/20_util/duration/requirements/typedefs_neg1.cc: Adjust
dg-error line numbers.
* testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
* testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
From-SVN: r153787
2009-11-01 01:35:40 +01:00
|
|
|
|
2008-07-16 01:23:23 +02:00
|
|
|
template<typename _Rep1, typename _Period, typename _Rep2>
|
2011-08-11 19:53:05 +02:00
|
|
|
constexpr
|
2011-05-25 01:29:19 +02:00
|
|
|
duration<typename __common_rep_type<_Rep1, _Rep2>::type, _Period>
|
2008-07-16 01:23:23 +02:00
|
|
|
operator*(const duration<_Rep1, _Period>& __d, const _Rep2& __s)
|
|
|
|
{
|
2011-05-25 01:29:19 +02:00
|
|
|
typedef duration<typename common_type<_Rep1, _Rep2>::type, _Period>
|
|
|
|
__cd;
|
|
|
|
return __cd(__cd(__d).count() * __s);
|
2008-07-16 01:23:23 +02:00
|
|
|
}
|
|
|
|
|
2011-08-31 12:29:31 +02:00
|
|
|
template<typename _Rep1, typename _Rep2, typename _Period>
|
2011-08-11 19:53:05 +02:00
|
|
|
constexpr
|
2011-05-25 01:29:19 +02:00
|
|
|
duration<typename __common_rep_type<_Rep2, _Rep1>::type, _Period>
|
chrono (struct __common_rep_type): New.
2009-10-31 Paolo Carlini <paolo.carlini@oracle.com>
* include/std/chrono (struct __common_rep_type): New.
(duration_cast(const duration<>&),
duration<>::duration(const _Rep2&),
duration<>::duration(const duration<>&),
operator*(const duration<>&, const _Rep2&),
operator*(const _Rep1&, const duration<>&),
operator/(const duration<>&, const _Rep2&),
time_point_cast(const time_point<>&)): Implement resolution of
DR 1177 ([Ready] in Santa Cruz), change to not participate to
overload resolution if the constraints are not met.
* testsuite/20_util/duration/cons/1_neg.cc: Adjust dg-errors.
* testsuite/20_util/duration/cons/dr974.cc: Likewise.
* testsuite/20_util/duration/requirements/typedefs_neg1.cc: Adjust
dg-error line numbers.
* testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
* testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
From-SVN: r153787
2009-11-01 01:35:40 +01:00
|
|
|
operator*(const _Rep1& __s, const duration<_Rep2, _Period>& __d)
|
2008-07-16 01:23:23 +02:00
|
|
|
{ return __d * __s; }
|
2010-11-02 03:35:28 +01:00
|
|
|
|
2008-07-16 01:23:23 +02:00
|
|
|
template<typename _Rep1, typename _Period, typename _Rep2>
|
2011-08-11 19:53:05 +02:00
|
|
|
constexpr duration<typename __common_rep_type<_Rep1, typename
|
2009-07-21 16:48:47 +02:00
|
|
|
enable_if<!__is_duration<_Rep2>::value, _Rep2>::type>::type, _Period>
|
|
|
|
operator/(const duration<_Rep1, _Period>& __d, const _Rep2& __s)
|
2008-07-16 01:23:23 +02:00
|
|
|
{
|
2011-05-25 01:29:19 +02:00
|
|
|
typedef duration<typename common_type<_Rep1, _Rep2>::type, _Period>
|
|
|
|
__cd;
|
|
|
|
return __cd(__cd(__d).count() / __s);
|
2009-07-21 16:48:47 +02:00
|
|
|
}
|
2008-07-16 01:23:23 +02:00
|
|
|
|
2011-08-11 19:53:05 +02:00
|
|
|
template<typename _Rep1, typename _Period1,
|
|
|
|
typename _Rep2, typename _Period2>
|
|
|
|
constexpr typename common_type<_Rep1, _Rep2>::type
|
2010-11-02 03:35:28 +01:00
|
|
|
operator/(const duration<_Rep1, _Period1>& __lhs,
|
|
|
|
const duration<_Rep2, _Period2>& __rhs)
|
2008-07-16 01:23:23 +02:00
|
|
|
{
|
2010-11-03 02:59:07 +01:00
|
|
|
typedef duration<_Rep1, _Period1> __dur1;
|
|
|
|
typedef duration<_Rep2, _Period2> __dur2;
|
2011-05-25 01:29:19 +02:00
|
|
|
typedef typename common_type<__dur1,__dur2>::type __cd;
|
|
|
|
return __cd(__lhs).count() / __cd(__rhs).count();
|
2009-07-21 16:48:47 +02:00
|
|
|
}
|
2008-07-16 01:23:23 +02:00
|
|
|
|
2009-07-21 16:48:47 +02:00
|
|
|
// DR 934.
|
|
|
|
template<typename _Rep1, typename _Period, typename _Rep2>
|
2011-08-11 19:53:05 +02:00
|
|
|
constexpr duration<typename __common_rep_type<_Rep1, typename
|
2009-07-21 16:48:47 +02:00
|
|
|
enable_if<!__is_duration<_Rep2>::value, _Rep2>::type>::type, _Period>
|
|
|
|
operator%(const duration<_Rep1, _Period>& __d, const _Rep2& __s)
|
2008-07-16 01:23:23 +02:00
|
|
|
{
|
2011-05-25 01:29:19 +02:00
|
|
|
typedef duration<typename common_type<_Rep1, _Rep2>::type, _Period>
|
|
|
|
__cd;
|
|
|
|
return __cd(__cd(__d).count() % __s);
|
2008-07-16 01:23:23 +02:00
|
|
|
}
|
2009-07-21 16:48:47 +02:00
|
|
|
|
2011-08-11 19:53:05 +02:00
|
|
|
template<typename _Rep1, typename _Period1,
|
|
|
|
typename _Rep2, typename _Period2>
|
|
|
|
constexpr typename common_type<duration<_Rep1, _Period1>,
|
|
|
|
duration<_Rep2, _Period2>>::type
|
2010-11-02 03:35:28 +01:00
|
|
|
operator%(const duration<_Rep1, _Period1>& __lhs,
|
|
|
|
const duration<_Rep2, _Period2>& __rhs)
|
2009-07-21 16:48:47 +02:00
|
|
|
{
|
2010-11-03 02:59:07 +01:00
|
|
|
typedef duration<_Rep1, _Period1> __dur1;
|
|
|
|
typedef duration<_Rep2, _Period2> __dur2;
|
2011-05-25 01:29:19 +02:00
|
|
|
typedef typename common_type<__dur1,__dur2>::type __cd;
|
|
|
|
return __cd(__cd(__lhs).count() % __cd(__rhs).count());
|
2009-07-21 16:48:47 +02:00
|
|
|
}
|
|
|
|
|
2008-07-16 01:23:23 +02:00
|
|
|
// comparisons
|
|
|
|
template<typename _Rep1, typename _Period1,
|
2010-11-02 03:35:28 +01:00
|
|
|
typename _Rep2, typename _Period2>
|
2011-08-11 19:53:05 +02:00
|
|
|
constexpr bool
|
2010-11-02 03:35:28 +01:00
|
|
|
operator==(const duration<_Rep1, _Period1>& __lhs,
|
|
|
|
const duration<_Rep2, _Period2>& __rhs)
|
2008-07-16 01:23:23 +02:00
|
|
|
{
|
2010-11-03 02:59:07 +01:00
|
|
|
typedef duration<_Rep1, _Period1> __dur1;
|
|
|
|
typedef duration<_Rep2, _Period2> __dur2;
|
|
|
|
typedef typename common_type<__dur1,__dur2>::type __ct;
|
2010-11-02 03:35:28 +01:00
|
|
|
return __ct(__lhs).count() == __ct(__rhs).count();
|
2008-07-16 01:23:23 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
template<typename _Rep1, typename _Period1,
|
2010-11-02 03:35:28 +01:00
|
|
|
typename _Rep2, typename _Period2>
|
2011-08-11 19:53:05 +02:00
|
|
|
constexpr bool
|
2010-11-02 03:35:28 +01:00
|
|
|
operator<(const duration<_Rep1, _Period1>& __lhs,
|
|
|
|
const duration<_Rep2, _Period2>& __rhs)
|
2008-07-16 01:23:23 +02:00
|
|
|
{
|
2010-11-03 02:59:07 +01:00
|
|
|
typedef duration<_Rep1, _Period1> __dur1;
|
|
|
|
typedef duration<_Rep2, _Period2> __dur2;
|
|
|
|
typedef typename common_type<__dur1,__dur2>::type __ct;
|
2010-11-02 03:35:28 +01:00
|
|
|
return __ct(__lhs).count() < __ct(__rhs).count();
|
2008-07-16 01:23:23 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
template<typename _Rep1, typename _Period1,
|
2010-11-02 03:35:28 +01:00
|
|
|
typename _Rep2, typename _Period2>
|
2011-08-11 19:53:05 +02:00
|
|
|
constexpr bool
|
2010-11-02 03:35:28 +01:00
|
|
|
operator!=(const duration<_Rep1, _Period1>& __lhs,
|
|
|
|
const duration<_Rep2, _Period2>& __rhs)
|
2008-07-16 01:23:23 +02:00
|
|
|
{ return !(__lhs == __rhs); }
|
|
|
|
|
|
|
|
template<typename _Rep1, typename _Period1,
|
2010-11-02 03:35:28 +01:00
|
|
|
typename _Rep2, typename _Period2>
|
2011-08-11 19:53:05 +02:00
|
|
|
constexpr bool
|
2010-11-02 03:35:28 +01:00
|
|
|
operator<=(const duration<_Rep1, _Period1>& __lhs,
|
|
|
|
const duration<_Rep2, _Period2>& __rhs)
|
2008-07-16 01:23:23 +02:00
|
|
|
{ return !(__rhs < __lhs); }
|
|
|
|
|
|
|
|
template<typename _Rep1, typename _Period1,
|
2010-11-02 03:35:28 +01:00
|
|
|
typename _Rep2, typename _Period2>
|
2011-08-11 19:53:05 +02:00
|
|
|
constexpr bool
|
2010-11-02 03:35:28 +01:00
|
|
|
operator>(const duration<_Rep1, _Period1>& __lhs,
|
|
|
|
const duration<_Rep2, _Period2>& __rhs)
|
2008-07-16 01:23:23 +02:00
|
|
|
{ return __rhs < __lhs; }
|
|
|
|
|
2010-11-02 03:35:28 +01:00
|
|
|
template<typename _Rep1, typename _Period1,
|
|
|
|
typename _Rep2, typename _Period2>
|
2011-08-11 19:53:05 +02:00
|
|
|
constexpr bool
|
2010-11-02 03:35:28 +01:00
|
|
|
operator>=(const duration<_Rep1, _Period1>& __lhs,
|
|
|
|
const duration<_Rep2, _Period2>& __rhs)
|
2008-07-16 01:23:23 +02:00
|
|
|
{ return !(__lhs < __rhs); }
|
|
|
|
|
2009-02-21 01:45:21 +01:00
|
|
|
/// nanoseconds
|
2010-11-02 03:35:28 +01:00
|
|
|
typedef duration<int64_t, nano> nanoseconds;
|
2009-02-21 01:45:21 +01:00
|
|
|
|
|
|
|
/// microseconds
|
2010-11-02 03:35:28 +01:00
|
|
|
typedef duration<int64_t, micro> microseconds;
|
2009-02-21 01:45:21 +01:00
|
|
|
|
|
|
|
/// milliseconds
|
2010-11-02 03:35:28 +01:00
|
|
|
typedef duration<int64_t, milli> milliseconds;
|
|
|
|
|
2009-02-21 01:45:21 +01:00
|
|
|
/// seconds
|
2010-11-02 03:35:28 +01:00
|
|
|
typedef duration<int64_t> seconds;
|
2009-02-21 01:45:21 +01:00
|
|
|
|
|
|
|
/// minutes
|
2010-11-02 03:35:28 +01:00
|
|
|
typedef duration<int, ratio< 60>> minutes;
|
2009-02-21 01:45:21 +01:00
|
|
|
|
|
|
|
/// hours
|
2010-11-02 03:35:28 +01:00
|
|
|
typedef duration<int, ratio<3600>> hours;
|
2008-07-16 01:23:23 +02:00
|
|
|
|
2008-07-16 09:01:23 +02:00
|
|
|
/// time_point
|
2010-11-03 02:59:07 +01:00
|
|
|
template<typename _Clock, typename _Dur>
|
2008-07-16 09:01:23 +02:00
|
|
|
struct time_point
|
2008-07-16 01:23:23 +02:00
|
|
|
{
|
2010-11-03 02:59:07 +01:00
|
|
|
typedef _Clock clock;
|
|
|
|
typedef _Dur duration;
|
|
|
|
typedef typename duration::rep rep;
|
|
|
|
typedef typename duration::period period;
|
2008-07-16 09:01:23 +02:00
|
|
|
|
2010-11-02 03:35:28 +01:00
|
|
|
constexpr time_point() : __d(duration::zero())
|
2008-07-16 09:01:23 +02:00
|
|
|
{ }
|
|
|
|
|
2010-11-02 03:35:28 +01:00
|
|
|
constexpr explicit time_point(const duration& __dur)
|
|
|
|
: __d(__dur)
|
2008-07-16 09:01:23 +02:00
|
|
|
{ }
|
|
|
|
|
|
|
|
// conversions
|
2010-11-03 02:59:07 +01:00
|
|
|
template<typename _Dur2>
|
|
|
|
constexpr time_point(const time_point<clock, _Dur2>& __t)
|
2008-07-16 09:01:23 +02:00
|
|
|
: __d(__t.time_since_epoch())
|
|
|
|
{ }
|
|
|
|
|
|
|
|
// observer
|
2010-11-02 03:35:28 +01:00
|
|
|
constexpr duration
|
2008-07-16 09:01:23 +02:00
|
|
|
time_since_epoch() const
|
|
|
|
{ return __d; }
|
2010-11-02 03:35:28 +01:00
|
|
|
|
2008-07-16 09:01:23 +02:00
|
|
|
// arithmetic
|
|
|
|
time_point&
|
|
|
|
operator+=(const duration& __dur)
|
|
|
|
{
|
|
|
|
__d += __dur;
|
|
|
|
return *this;
|
|
|
|
}
|
2010-11-02 03:35:28 +01:00
|
|
|
|
2008-07-16 09:01:23 +02:00
|
|
|
time_point&
|
|
|
|
operator-=(const duration& __dur)
|
|
|
|
{
|
|
|
|
__d -= __dur;
|
|
|
|
return *this;
|
|
|
|
}
|
2010-11-02 03:35:28 +01:00
|
|
|
|
2008-07-16 09:01:23 +02:00
|
|
|
// special values
|
2010-11-02 03:35:28 +01:00
|
|
|
static constexpr time_point
|
2008-07-16 09:01:23 +02:00
|
|
|
min()
|
|
|
|
{ return time_point(duration::min()); }
|
2010-11-02 03:35:28 +01:00
|
|
|
|
|
|
|
static constexpr time_point
|
2008-07-16 09:01:23 +02:00
|
|
|
max()
|
|
|
|
{ return time_point(duration::max()); }
|
2010-11-02 03:35:28 +01:00
|
|
|
|
2008-07-16 09:01:23 +02:00
|
|
|
private:
|
|
|
|
duration __d;
|
|
|
|
};
|
2010-11-02 03:35:28 +01:00
|
|
|
|
2009-02-21 01:45:21 +01:00
|
|
|
/// time_point_cast
|
2010-11-03 02:59:07 +01:00
|
|
|
template<typename _ToDur, typename _Clock, typename _Dur>
|
2011-08-11 19:53:05 +02:00
|
|
|
constexpr typename enable_if<__is_duration<_ToDur>::value,
|
|
|
|
time_point<_Clock, _ToDur>>::type
|
2010-11-03 02:59:07 +01:00
|
|
|
time_point_cast(const time_point<_Clock, _Dur>& __t)
|
2008-07-16 01:23:23 +02:00
|
|
|
{
|
2010-11-03 02:59:07 +01:00
|
|
|
typedef time_point<_Clock, _ToDur> __time_point;
|
|
|
|
return __time_point(duration_cast<_ToDur>(__t.time_since_epoch()));
|
2008-07-16 01:23:23 +02:00
|
|
|
}
|
|
|
|
|
2010-11-03 02:59:07 +01:00
|
|
|
template<typename _Clock, typename _Dur1,
|
2010-11-02 03:35:28 +01:00
|
|
|
typename _Rep2, typename _Period2>
|
2011-08-11 19:53:05 +02:00
|
|
|
constexpr time_point<_Clock,
|
2010-11-03 02:59:07 +01:00
|
|
|
typename common_type<_Dur1, duration<_Rep2, _Period2>>::type>
|
|
|
|
operator+(const time_point<_Clock, _Dur1>& __lhs,
|
2010-11-02 03:35:28 +01:00
|
|
|
const duration<_Rep2, _Period2>& __rhs)
|
2008-07-16 01:23:23 +02:00
|
|
|
{
|
2010-11-03 02:59:07 +01:00
|
|
|
typedef duration<_Rep2, _Period2> __dur2;
|
|
|
|
typedef typename common_type<_Dur1,__dur2>::type __ct;
|
|
|
|
typedef time_point<_Clock, __ct> __time_point;
|
2011-07-21 05:27:51 +02:00
|
|
|
return __time_point(__lhs.time_since_epoch() + __rhs);
|
2008-07-16 01:23:23 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
template<typename _Rep1, typename _Period1,
|
2010-11-03 02:59:07 +01:00
|
|
|
typename _Clock, typename _Dur2>
|
2011-08-11 19:53:05 +02:00
|
|
|
constexpr time_point<_Clock,
|
2010-11-03 02:59:07 +01:00
|
|
|
typename common_type<duration<_Rep1, _Period1>, _Dur2>::type>
|
2010-11-02 03:35:28 +01:00
|
|
|
operator+(const duration<_Rep1, _Period1>& __lhs,
|
2010-11-03 02:59:07 +01:00
|
|
|
const time_point<_Clock, _Dur2>& __rhs)
|
2011-07-21 05:27:51 +02:00
|
|
|
{
|
|
|
|
typedef duration<_Rep1, _Period1> __dur1;
|
|
|
|
typedef typename common_type<__dur1,_Dur2>::type __ct;
|
|
|
|
typedef time_point<_Clock, __ct> __time_point;
|
|
|
|
return __time_point(__rhs.time_since_epoch() + __lhs);
|
|
|
|
}
|
2008-07-16 01:23:23 +02:00
|
|
|
|
2010-11-03 02:59:07 +01:00
|
|
|
template<typename _Clock, typename _Dur1,
|
2010-11-02 03:35:28 +01:00
|
|
|
typename _Rep2, typename _Period2>
|
2011-08-11 19:53:05 +02:00
|
|
|
constexpr time_point<_Clock,
|
2010-11-03 02:59:07 +01:00
|
|
|
typename common_type<_Dur1, duration<_Rep2, _Period2>>::type>
|
|
|
|
operator-(const time_point<_Clock, _Dur1>& __lhs,
|
2010-11-02 03:35:28 +01:00
|
|
|
const duration<_Rep2, _Period2>& __rhs)
|
2011-07-21 05:27:51 +02:00
|
|
|
{
|
|
|
|
typedef duration<_Rep2, _Period2> __dur2;
|
|
|
|
typedef typename common_type<_Dur1,__dur2>::type __ct;
|
|
|
|
typedef time_point<_Clock, __ct> __time_point;
|
|
|
|
return __time_point(__lhs.time_since_epoch() -__rhs);
|
|
|
|
}
|
2008-07-16 01:23:23 +02:00
|
|
|
|
2010-11-03 02:59:07 +01:00
|
|
|
template<typename _Clock, typename _Dur1, typename _Dur2>
|
2011-08-11 19:53:05 +02:00
|
|
|
constexpr typename common_type<_Dur1, _Dur2>::type
|
2010-11-03 02:59:07 +01:00
|
|
|
operator-(const time_point<_Clock, _Dur1>& __lhs,
|
|
|
|
const time_point<_Clock, _Dur2>& __rhs)
|
2008-07-16 01:23:23 +02:00
|
|
|
{ return __lhs.time_since_epoch() - __rhs.time_since_epoch(); }
|
|
|
|
|
2010-11-03 02:59:07 +01:00
|
|
|
template<typename _Clock, typename _Dur1, typename _Dur2>
|
2011-08-11 19:53:05 +02:00
|
|
|
constexpr bool
|
2010-11-03 02:59:07 +01:00
|
|
|
operator==(const time_point<_Clock, _Dur1>& __lhs,
|
|
|
|
const time_point<_Clock, _Dur2>& __rhs)
|
2008-07-16 01:23:23 +02:00
|
|
|
{ return __lhs.time_since_epoch() == __rhs.time_since_epoch(); }
|
|
|
|
|
2010-11-03 02:59:07 +01:00
|
|
|
template<typename _Clock, typename _Dur1, typename _Dur2>
|
2011-08-11 19:53:05 +02:00
|
|
|
constexpr bool
|
2010-11-03 02:59:07 +01:00
|
|
|
operator!=(const time_point<_Clock, _Dur1>& __lhs,
|
|
|
|
const time_point<_Clock, _Dur2>& __rhs)
|
2008-07-16 01:23:23 +02:00
|
|
|
{ return !(__lhs == __rhs); }
|
|
|
|
|
2010-11-03 02:59:07 +01:00
|
|
|
template<typename _Clock, typename _Dur1, typename _Dur2>
|
2011-08-11 19:53:05 +02:00
|
|
|
constexpr bool
|
2010-11-03 02:59:07 +01:00
|
|
|
operator<(const time_point<_Clock, _Dur1>& __lhs,
|
|
|
|
const time_point<_Clock, _Dur2>& __rhs)
|
2008-07-16 01:23:23 +02:00
|
|
|
{ return __lhs.time_since_epoch() < __rhs.time_since_epoch(); }
|
|
|
|
|
2010-11-03 02:59:07 +01:00
|
|
|
template<typename _Clock, typename _Dur1, typename _Dur2>
|
2011-08-11 19:53:05 +02:00
|
|
|
constexpr bool
|
2010-11-03 02:59:07 +01:00
|
|
|
operator<=(const time_point<_Clock, _Dur1>& __lhs,
|
|
|
|
const time_point<_Clock, _Dur2>& __rhs)
|
2008-07-16 01:23:23 +02:00
|
|
|
{ return !(__rhs < __lhs); }
|
|
|
|
|
2010-11-03 02:59:07 +01:00
|
|
|
template<typename _Clock, typename _Dur1, typename _Dur2>
|
2011-08-11 19:53:05 +02:00
|
|
|
constexpr bool
|
2010-11-03 02:59:07 +01:00
|
|
|
operator>(const time_point<_Clock, _Dur1>& __lhs,
|
|
|
|
const time_point<_Clock, _Dur2>& __rhs)
|
2008-07-16 01:23:23 +02:00
|
|
|
{ return __rhs < __lhs; }
|
|
|
|
|
2010-11-03 02:59:07 +01:00
|
|
|
template<typename _Clock, typename _Dur1, typename _Dur2>
|
2011-08-11 19:53:05 +02:00
|
|
|
constexpr bool
|
2010-11-03 02:59:07 +01:00
|
|
|
operator>=(const time_point<_Clock, _Dur1>& __lhs,
|
|
|
|
const time_point<_Clock, _Dur2>& __rhs)
|
2008-07-16 01:23:23 +02:00
|
|
|
{ return !(__lhs < __rhs); }
|
|
|
|
|
2008-07-16 09:01:23 +02:00
|
|
|
/// system_clock
|
2008-07-16 01:23:23 +02:00
|
|
|
struct system_clock
|
|
|
|
{
|
2008-09-23 19:34:29 +02:00
|
|
|
#ifdef _GLIBCXX_USE_CLOCK_REALTIME
|
2010-11-24 00:47:44 +01:00
|
|
|
typedef chrono::nanoseconds duration;
|
2008-07-16 01:23:23 +02:00
|
|
|
#elif defined(_GLIBCXX_USE_GETTIMEOFDAY)
|
2010-11-24 00:47:44 +01:00
|
|
|
typedef chrono::microseconds duration;
|
2008-07-16 01:23:23 +02:00
|
|
|
#else
|
PR libstdc++/36104 part four
2011-01-30 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/36104 part four
* include/bits/c++config (_GLIBCXX_STD): Remove.
(_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C.
(_GLIBCXX_P): Now _GLIBCXX_STD_A.
(_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL,
_GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove.
(_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL,
_GLIBCXX_INLINE_PROFILE): Remove.
(_GLIBCXX_BEGIN_NAMESPACE(X)): Remove.
(_GLIBCXX_END_NAMESPACE): Remove.
(_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove.
(_GLIBCXX_END_NESTED_NAMESPACE): Remove.
(_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add.
(_GLIBCXX_END_NAMESPACE_ALGO): Add.
(_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add.
(_GLIBCXX_END_NAMESPACE_CONTAINER): Add.
(_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add.
(_GLIBCXX_END_NAMESPACE_VERSION): Add.
(_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL.
(_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL.
(_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY.
* include/*: Use new macros for namespace scope.
* config/*: Same.
* src/*: Same.
* src/Makefile.am (sources): Remove debug_list.cc, add
compatibility-debug_list-2.cc.
(parallel_sources): Remove parallel_list.cc, add
compatibility-parallel_list-2.cc.
(compatibility-parallel_list-2.[o,lo]): New rule.
* src/Makefile.in: Regenerate.
* src/debug_list.cc: Remove.
* src/parallel_list.cc: Remove.
* src/compatibility-list-2.cc: New.
* src/compatibility-debug_list-2.cc: New.
* src/compatibility-parallel_list-2.cc: New.
* doc/doxygen/user.cfg.in: Adjust macros.
* testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros.
* testsuite/20_util/declval/requirements/1_neg.cc: Same.
* testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same.
* testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same.
* testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same.
* testsuite/20_util/forward/c_neg.cc: Same.
* testsuite/20_util/forward/f_neg.cc: Same.
* testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same.
* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same.
* testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same.
* testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same.
* testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same.
* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same.
* testsuite/23_containers/forward_list/capacity/1.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
assign_neg.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
insert_neg.cc: Same.
* testsuite/23_containers/list/capacity/29134.cc: Same.
* testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same.
* testsuite/23_containers/list/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/list/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same.
* testsuite/23_containers/vector/bool/capacity/29134.cc: Same.
* testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same.
* testsuite/25_algorithms/sort/35588.cc: Same.
* testsuite/27_io/ios_base/cons/assign_neg.cc: Same.
* testsuite/27_io/ios_base/cons/copy_neg.cc: Same.
* testsuite/ext/profile/mutex_extensions_neg.cc: Same.
* testsuite/ext/profile/profiler_algos.cc: Same.
* testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same.
* testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same.
* testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same.
* testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same.
* testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same.
From-SVN: r169421
2011-01-30 23:39:36 +01:00
|
|
|
typedef chrono::seconds duration;
|
2008-07-16 01:23:23 +02:00
|
|
|
#endif
|
|
|
|
|
2010-11-24 00:47:44 +01:00
|
|
|
typedef duration::rep rep;
|
|
|
|
typedef duration::period period;
|
|
|
|
typedef chrono::time_point<system_clock, duration> time_point;
|
2008-07-16 01:23:23 +02:00
|
|
|
|
2010-11-02 03:35:28 +01:00
|
|
|
static_assert(system_clock::duration::min()
|
|
|
|
< system_clock::duration::zero(),
|
|
|
|
"a clock's minimum duration cannot be less than its epoch");
|
|
|
|
|
2011-07-21 05:27:51 +02:00
|
|
|
static constexpr bool is_steady = false;
|
2008-07-16 01:23:23 +02:00
|
|
|
|
|
|
|
static time_point
|
2011-12-06 21:03:25 +01:00
|
|
|
now() noexcept;
|
2008-07-16 01:23:23 +02:00
|
|
|
|
|
|
|
// Map to C API
|
|
|
|
static std::time_t
|
2011-12-06 21:03:25 +01:00
|
|
|
to_time_t(const time_point& __t) noexcept
|
2008-07-16 01:23:23 +02:00
|
|
|
{
|
2010-11-03 02:59:07 +01:00
|
|
|
return std::time_t(duration_cast<chrono::seconds>
|
|
|
|
(__t.time_since_epoch()).count());
|
2008-07-16 01:23:23 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static time_point
|
2011-12-06 21:03:25 +01:00
|
|
|
from_time_t(std::time_t __t) noexcept
|
2010-11-02 03:35:28 +01:00
|
|
|
{
|
2010-11-03 02:59:07 +01:00
|
|
|
typedef chrono::time_point<system_clock, seconds> __from;
|
|
|
|
return time_point_cast<system_clock::duration>
|
|
|
|
(__from(chrono::seconds(__t)));
|
2008-07-16 01:23:23 +02:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2008-09-23 19:34:29 +02:00
|
|
|
#ifdef _GLIBCXX_USE_CLOCK_MONOTONIC
|
2011-07-21 05:27:51 +02:00
|
|
|
/// steady_clock
|
|
|
|
struct steady_clock
|
2008-09-23 19:34:29 +02:00
|
|
|
{
|
2010-11-24 00:47:44 +01:00
|
|
|
typedef chrono::nanoseconds duration;
|
PR libstdc++/36104 part four
2011-01-30 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/36104 part four
* include/bits/c++config (_GLIBCXX_STD): Remove.
(_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C.
(_GLIBCXX_P): Now _GLIBCXX_STD_A.
(_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL,
_GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove.
(_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL,
_GLIBCXX_INLINE_PROFILE): Remove.
(_GLIBCXX_BEGIN_NAMESPACE(X)): Remove.
(_GLIBCXX_END_NAMESPACE): Remove.
(_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove.
(_GLIBCXX_END_NESTED_NAMESPACE): Remove.
(_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add.
(_GLIBCXX_END_NAMESPACE_ALGO): Add.
(_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add.
(_GLIBCXX_END_NAMESPACE_CONTAINER): Add.
(_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add.
(_GLIBCXX_END_NAMESPACE_VERSION): Add.
(_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL.
(_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL.
(_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY.
* include/*: Use new macros for namespace scope.
* config/*: Same.
* src/*: Same.
* src/Makefile.am (sources): Remove debug_list.cc, add
compatibility-debug_list-2.cc.
(parallel_sources): Remove parallel_list.cc, add
compatibility-parallel_list-2.cc.
(compatibility-parallel_list-2.[o,lo]): New rule.
* src/Makefile.in: Regenerate.
* src/debug_list.cc: Remove.
* src/parallel_list.cc: Remove.
* src/compatibility-list-2.cc: New.
* src/compatibility-debug_list-2.cc: New.
* src/compatibility-parallel_list-2.cc: New.
* doc/doxygen/user.cfg.in: Adjust macros.
* testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros.
* testsuite/20_util/declval/requirements/1_neg.cc: Same.
* testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same.
* testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same.
* testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same.
* testsuite/20_util/forward/c_neg.cc: Same.
* testsuite/20_util/forward/f_neg.cc: Same.
* testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same.
* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same.
* testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same.
* testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same.
* testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same.
* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same.
* testsuite/23_containers/forward_list/capacity/1.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
assign_neg.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
insert_neg.cc: Same.
* testsuite/23_containers/list/capacity/29134.cc: Same.
* testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same.
* testsuite/23_containers/list/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/list/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same.
* testsuite/23_containers/vector/bool/capacity/29134.cc: Same.
* testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same.
* testsuite/25_algorithms/sort/35588.cc: Same.
* testsuite/27_io/ios_base/cons/assign_neg.cc: Same.
* testsuite/27_io/ios_base/cons/copy_neg.cc: Same.
* testsuite/ext/profile/mutex_extensions_neg.cc: Same.
* testsuite/ext/profile/profiler_algos.cc: Same.
* testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same.
* testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same.
* testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same.
* testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same.
* testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same.
From-SVN: r169421
2011-01-30 23:39:36 +01:00
|
|
|
typedef duration::rep rep;
|
|
|
|
typedef duration::period period;
|
2011-07-21 05:27:51 +02:00
|
|
|
typedef chrono::time_point<steady_clock, duration> time_point;
|
2008-09-23 19:34:29 +02:00
|
|
|
|
2011-07-21 05:27:51 +02:00
|
|
|
static constexpr bool is_steady = true;
|
2008-09-23 19:34:29 +02:00
|
|
|
|
|
|
|
static time_point
|
2011-12-06 21:03:25 +01:00
|
|
|
now() noexcept;
|
2008-09-23 19:34:29 +02:00
|
|
|
};
|
|
|
|
#else
|
2011-07-21 05:27:51 +02:00
|
|
|
typedef system_clock steady_clock;
|
2008-09-23 19:34:29 +02:00
|
|
|
#endif
|
|
|
|
|
2008-07-16 01:23:23 +02:00
|
|
|
typedef system_clock high_resolution_clock;
|
PR libstdc++/36104 part four
2011-01-30 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/36104 part four
* include/bits/c++config (_GLIBCXX_STD): Remove.
(_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C.
(_GLIBCXX_P): Now _GLIBCXX_STD_A.
(_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL,
_GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove.
(_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL,
_GLIBCXX_INLINE_PROFILE): Remove.
(_GLIBCXX_BEGIN_NAMESPACE(X)): Remove.
(_GLIBCXX_END_NAMESPACE): Remove.
(_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove.
(_GLIBCXX_END_NESTED_NAMESPACE): Remove.
(_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add.
(_GLIBCXX_END_NAMESPACE_ALGO): Add.
(_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add.
(_GLIBCXX_END_NAMESPACE_CONTAINER): Add.
(_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add.
(_GLIBCXX_END_NAMESPACE_VERSION): Add.
(_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL.
(_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL.
(_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY.
* include/*: Use new macros for namespace scope.
* config/*: Same.
* src/*: Same.
* src/Makefile.am (sources): Remove debug_list.cc, add
compatibility-debug_list-2.cc.
(parallel_sources): Remove parallel_list.cc, add
compatibility-parallel_list-2.cc.
(compatibility-parallel_list-2.[o,lo]): New rule.
* src/Makefile.in: Regenerate.
* src/debug_list.cc: Remove.
* src/parallel_list.cc: Remove.
* src/compatibility-list-2.cc: New.
* src/compatibility-debug_list-2.cc: New.
* src/compatibility-parallel_list-2.cc: New.
* doc/doxygen/user.cfg.in: Adjust macros.
* testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros.
* testsuite/20_util/declval/requirements/1_neg.cc: Same.
* testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same.
* testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same.
* testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same.
* testsuite/20_util/forward/c_neg.cc: Same.
* testsuite/20_util/forward/f_neg.cc: Same.
* testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same.
* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same.
* testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same.
* testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same.
* testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same.
* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same.
* testsuite/23_containers/forward_list/capacity/1.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
assign_neg.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
insert_neg.cc: Same.
* testsuite/23_containers/list/capacity/29134.cc: Same.
* testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same.
* testsuite/23_containers/list/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/list/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same.
* testsuite/23_containers/vector/bool/capacity/29134.cc: Same.
* testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same.
* testsuite/25_algorithms/sort/35588.cc: Same.
* testsuite/27_io/ios_base/cons/assign_neg.cc: Same.
* testsuite/27_io/ios_base/cons/copy_neg.cc: Same.
* testsuite/ext/profile/mutex_extensions_neg.cc: Same.
* testsuite/ext/profile/profiler_algos.cc: Same.
* testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same.
* testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same.
* testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same.
* testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same.
* testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same.
From-SVN: r169421
2011-01-30 23:39:36 +01:00
|
|
|
|
|
|
|
_GLIBCXX_END_NAMESPACE_VERSION
|
2009-02-21 01:45:21 +01:00
|
|
|
} // namespace chrono
|
|
|
|
|
|
|
|
// @} group chrono
|
PR libstdc++/36104 part four
2011-01-30 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/36104 part four
* include/bits/c++config (_GLIBCXX_STD): Remove.
(_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C.
(_GLIBCXX_P): Now _GLIBCXX_STD_A.
(_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL,
_GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove.
(_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL,
_GLIBCXX_INLINE_PROFILE): Remove.
(_GLIBCXX_BEGIN_NAMESPACE(X)): Remove.
(_GLIBCXX_END_NAMESPACE): Remove.
(_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove.
(_GLIBCXX_END_NESTED_NAMESPACE): Remove.
(_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add.
(_GLIBCXX_END_NAMESPACE_ALGO): Add.
(_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add.
(_GLIBCXX_END_NAMESPACE_CONTAINER): Add.
(_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add.
(_GLIBCXX_END_NAMESPACE_VERSION): Add.
(_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL.
(_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL.
(_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY.
* include/*: Use new macros for namespace scope.
* config/*: Same.
* src/*: Same.
* src/Makefile.am (sources): Remove debug_list.cc, add
compatibility-debug_list-2.cc.
(parallel_sources): Remove parallel_list.cc, add
compatibility-parallel_list-2.cc.
(compatibility-parallel_list-2.[o,lo]): New rule.
* src/Makefile.in: Regenerate.
* src/debug_list.cc: Remove.
* src/parallel_list.cc: Remove.
* src/compatibility-list-2.cc: New.
* src/compatibility-debug_list-2.cc: New.
* src/compatibility-parallel_list-2.cc: New.
* doc/doxygen/user.cfg.in: Adjust macros.
* testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros.
* testsuite/20_util/declval/requirements/1_neg.cc: Same.
* testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same.
* testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same.
* testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same.
* testsuite/20_util/forward/c_neg.cc: Same.
* testsuite/20_util/forward/f_neg.cc: Same.
* testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same.
* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same.
* testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same.
* testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same.
* testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same.
* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same.
* testsuite/23_containers/forward_list/capacity/1.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
assign_neg.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
insert_neg.cc: Same.
* testsuite/23_containers/list/capacity/29134.cc: Same.
* testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same.
* testsuite/23_containers/list/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/list/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same.
* testsuite/23_containers/vector/bool/capacity/29134.cc: Same.
* testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same.
* testsuite/25_algorithms/sort/35588.cc: Same.
* testsuite/27_io/ios_base/cons/assign_neg.cc: Same.
* testsuite/27_io/ios_base/cons/copy_neg.cc: Same.
* testsuite/ext/profile/mutex_extensions_neg.cc: Same.
* testsuite/ext/profile/profiler_algos.cc: Same.
* testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same.
* testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same.
* testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same.
* testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same.
* testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same.
From-SVN: r169421
2011-01-30 23:39:36 +01:00
|
|
|
} // namespace
|
2008-07-16 01:23:23 +02:00
|
|
|
|
|
|
|
#endif //_GLIBCXX_USE_C99_STDINT_TR1
|
|
|
|
|
2012-11-10 18:27:22 +01:00
|
|
|
#endif // C++11
|
2008-07-16 01:23:23 +02:00
|
|
|
|
|
|
|
#endif //_GLIBCXX_CHRONO
|