From: Paolo Carlini Date: Sat, 12 Jul 2008 10:16:16 +0000 (+0000) Subject: date_time: Remove, per N2549, in WP. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d5740f0288bbe9ea79a7e92be9a0aee8d225986e;p=gcc.git date_time: Remove, per N2549, in WP. 2008-07-12 Paolo Carlini * include/std/date_time: Remove, per N2549, in WP. * src/date_time.cc: Likewise. * config/abi/pre/gnu.ver: Remove symbols. * include/Makefile.am: Remove date_time in std headers. * src/Makefile.am: Remove date_time.cc to source files. * include/Makefile.in: Regenerate. * src/Makefile.in: Likewise. * testsuite/31_date_time/headers/date_time/types_std.cc: Remove. * testsuite/31_date_time/headers/date_time/std_c++0x_neg.cc: Likewise. * testsuite/31_date_time/headers/date_time/functions_std.cc: Likewise. * testsuite/31_date_time/headers/date_time/synopsis.cc: Likewise. * testsuite/31_date_time/nanoseconds/requirements/traits.cc: Likewise. * testsuite/31_date_time/nanoseconds/requirements/duration.cc: Likewise. * testsuite/31_date_time/system_time/requirements: Likewise. * testsuite/31_date_time/system_time/requirements/traits.cc: Likewise. * testsuite/17_intro/headers/c++200x/all.cc: Adjust. * testsuite/17_intro/headers/c++200x/all_multiple_inclusion.cc: Adjust. From-SVN: r137736 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 7eb7732d828..dc9437e5a94 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,23 @@ +2008-07-12 Paolo Carlini + + * include/std/date_time: Remove, per N2549, in WP. + * src/date_time.cc: Likewise. + * config/abi/pre/gnu.ver: Remove symbols. + * include/Makefile.am: Remove date_time in std headers. + * src/Makefile.am: Remove date_time.cc to source files. + * include/Makefile.in: Regenerate. + * src/Makefile.in: Likewise. + * testsuite/31_date_time/headers/date_time/types_std.cc: Remove. + * testsuite/31_date_time/headers/date_time/std_c++0x_neg.cc: Likewise. + * testsuite/31_date_time/headers/date_time/functions_std.cc: Likewise. + * testsuite/31_date_time/headers/date_time/synopsis.cc: Likewise. + * testsuite/31_date_time/nanoseconds/requirements/traits.cc: Likewise. + * testsuite/31_date_time/nanoseconds/requirements/duration.cc: Likewise. + * testsuite/31_date_time/system_time/requirements: Likewise. + * testsuite/31_date_time/system_time/requirements/traits.cc: Likewise. + * testsuite/17_intro/headers/c++200x/all.cc: Adjust. + * testsuite/17_intro/headers/c++200x/all_multiple_inclusion.cc: Adjust. + 2008-07-10 Johannes Singler * include/parallel/balanced_quicksort.h: diff --git a/libstdc++-v3/config/abi/pre/gnu.ver b/libstdc++-v3/config/abi/pre/gnu.ver index 4578ce513fc..8327d10511f 100644 --- a/libstdc++-v3/config/abi/pre/gnu.ver +++ b/libstdc++-v3/config/abi/pre/gnu.ver @@ -882,17 +882,6 @@ GLIBCXX_3.4.11 { _ZSt20__throw_system_errorPKc; _ZSt20__throw_system_errori; - # date_time - _ZSt15get_system_timev; - - _ZNSt11nanoseconds16seconds_per_tickE; - _ZNSt11nanoseconds16ticks_per_secondE; - _ZNSt11nanoseconds12is_subsecondE; - - _ZNSt11system_time16seconds_per_tickE; - _ZNSt11system_time16ticks_per_secondE; - _ZNSt11system_time12is_subsecondE; - # char16_t and char32_t _ZNSt14numeric_limitsIu8char*; diff --git a/libstdc++-v3/include/Makefile.am b/libstdc++-v3/include/Makefile.am index 89ac735b218..5d8358b42eb 100644 --- a/libstdc++-v3/include/Makefile.am +++ b/libstdc++-v3/include/Makefile.am @@ -34,7 +34,6 @@ std_headers = \ ${std_srcdir}/c++0x_warning.h \ ${std_srcdir}/complex \ ${std_srcdir}/condition_variable \ - ${std_srcdir}/date_time \ ${std_srcdir}/deque \ ${std_srcdir}/fstream \ ${std_srcdir}/functional \ diff --git a/libstdc++-v3/include/Makefile.in b/libstdc++-v3/include/Makefile.in index c85c8bd233f..5820f2612a4 100644 --- a/libstdc++-v3/include/Makefile.in +++ b/libstdc++-v3/include/Makefile.in @@ -287,7 +287,6 @@ std_headers = \ ${std_srcdir}/c++0x_warning.h \ ${std_srcdir}/complex \ ${std_srcdir}/condition_variable \ - ${std_srcdir}/date_time \ ${std_srcdir}/deque \ ${std_srcdir}/fstream \ ${std_srcdir}/functional \ diff --git a/libstdc++-v3/include/std/date_time b/libstdc++-v3/include/std/date_time deleted file mode 100644 index 2ad95169715..00000000000 --- a/libstdc++-v3/include/std/date_time +++ /dev/null @@ -1,245 +0,0 @@ -// -*- C++ -*- - -// Copyright (C) 2008 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 2, 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. - -// You should have received a copy of the GNU General Public License -// along with this library; see the file COPYING. If not, write to -// the Free Software Foundation, 51 Franklin Street, Fifth Floor, -// Boston, MA 02110-1301, USA. - -// As a special exception, you may use this file as part of a free software -// library without restriction. Specifically, if other files instantiate -// templates or use macros or inline functions from this file, or you compile -// this file and link it with other files to produce an executable, this -// file does not by itself cause the resulting executable to be covered by -// the GNU General Public License. This exception does not however -// invalidate any other reasons why the executable file might be covered by -// the GNU General Public License. - -/** @file date_time - * This is a Standard C++ Library header. - */ - -#ifndef _GLIBCXX_DATE_TIME -#define _GLIBCXX_DATE_TIME 1 - -#pragma GCC system_header - -#ifndef __GXX_EXPERIMENTAL_CXX0X__ -# include -#else - -#include - -namespace std -{ - // duration types - - /// nanoseconds - class nanoseconds - { - public: - - // traits information - typedef long long tick_type; - static const tick_type ticks_per_second = 1000L * 1000 * 1000; - static const tick_type seconds_per_tick = 0; - static const bool is_subsecond = true; - - // construct/copy/destroy - nanoseconds(long long __ns = 0) : _M_ns(__ns) { } - - // modifiers - template - nanoseconds& - operator+=(const _RhsDuration& __d); - - template - nanoseconds& - operator-=(const _RhsDuration& __d); - - nanoseconds& - operator*=(long __multiplier); - - nanoseconds& - operator/=(long __divisor); - - // observers - tick_type count() const { return _M_ns; } - - // operations - nanoseconds operator-() const { return nanoseconds(-_M_ns); } - - private: - tick_type _M_ns; - }; - - class microseconds; - class milliseconds; - class seconds; - class minutes; - class hours; - - /// timepoint type - class system_time - { - public: - - // traits information - typedef nanoseconds::tick_type tick_type; - static const tick_type ticks_per_second = nanoseconds::ticks_per_second; - static const tick_type seconds_per_tick = 0; - static const bool is_subsecond = true; - - // create/copy/destroy - - system_time() : _M_sec(0), _M_nsec(0) { } - - explicit system_time(time_t __s, nanoseconds __ns = 0) - : _M_sec(__s), _M_nsec(__ns.count()) { } - - time_t - seconds_since_epoch() const { return _M_sec; } - - nanoseconds - nanoseconds_since_epoch() const - { - return nanoseconds(_M_nsec + _M_sec * ticks_per_second); - } - - // comparison functions - - bool - operator==(const system_time& __rhs) const - { - const tick_type __ns = _M_nsec + _M_sec * ticks_per_second; - const tick_type __xns = __rhs._M_nsec + __rhs._M_sec * ticks_per_second; - return __ns == __xns; - } - - bool - operator!=(const system_time& __rhs) const - { - return !(*this == __rhs); - } - - bool - operator<(const system_time& __rhs) const - { - const tick_type __ns = _M_nsec + _M_sec * ticks_per_second; - const tick_type __xns = __rhs._M_nsec + __rhs._M_sec * ticks_per_second; - return __ns < __xns; - } - - bool - operator<=(const system_time& __rhs) const - { - return !(__rhs < *this); - } - - bool - operator>(const system_time& __rhs) const - { - return __rhs < *this; - } - - bool - operator>=(const system_time& __rhs) const - { - return !(*this < __rhs); - } - - // arithmetic functions - nanoseconds - operator-(const system_time& __rhs) const - { - const tick_type __ns = _M_nsec + _M_sec * ticks_per_second; - const tick_type __xns = __rhs._M_nsec + __rhs._M_sec * ticks_per_second; - return nanoseconds(__ns - __xns); - } - - template - system_time - operator+(const _Duration& __td) const; - - template - system_time& - operator+=(const _Duration& __td); - - template - system_time - operator-(const _Duration& __td) const; - - template - system_time& - operator-=(const _Duration& __td); - - public: - std::time_t _M_sec; - tick_type _M_nsec; - }; - - // non-member functions - system_time - get_system_time(); - - template - system_time - operator+(const _Duration& __td, const system_time& __rhs); - - template - bool - operator==(const _LhsDuration& __lhs, const _RhsDuration& __rhs); - template - bool - operator!=(const _LhsDuration& __lhs, const _RhsDuration& __rhs); - - template - bool - operator<(const _LhsDuration& __lhs, const _RhsDuration& __rhs); - template - bool - operator<=(const _LhsDuration& __lhs, const _RhsDuration& __rhs); - template - bool - operator>(const _LhsDuration& __lhs, const _RhsDuration& __rhs); - template - bool - operator>=(const _LhsDuration& __lhs, const _RhsDuration& __rhs); - - template - struct __finest_duration; - - template - typename __finest_duration<_LhsDuration, _RhsDuration>::type - operator+(const _LhsDuration& __lhs, const _RhsDuration& __rhs); - template - typename __finest_duration<_LhsDuration, _RhsDuration>::type - operator-(const _LhsDuration& __lhs, const _RhsDuration& __rhs); - - template - _Duration - operator*(_Duration __lhs, long __rhs); - template - _Duration - operator*(long __lhs, _Duration __rhs); - - template - _Duration - operator/(_Duration __lhs, long __rhs); -} - -#endif // __GXX_EXPERIMENTAL_CXX0X__ - -#endif // _GLIBCXX_DATE_TIME diff --git a/libstdc++-v3/src/Makefile.am b/libstdc++-v3/src/Makefile.am index f5d99c63525..8d2cbf5e14b 100644 --- a/libstdc++-v3/src/Makefile.am +++ b/libstdc++-v3/src/Makefile.am @@ -143,7 +143,6 @@ sources = \ compatibility.cc \ complex_io.cc \ ctype.cc \ - date_time.cc \ debug.cc \ functexcept.cc \ hash.cc \ @@ -268,11 +267,6 @@ limits_c++0x.lo: limits_c++0x.cc limits_c++0x.o: limits_c++0x.cc $(CXXCOMPILE) -std=gnu++0x -c $< -date_time.lo: date_time.cc - $(LTCXXCOMPILE) -std=gnu++0x -c $< -date_time.o: date_time.cc - $(CXXCOMPILE) -std=gnu++0x -c $< - atomic.lo: atomic.cc $(LTCXXCOMPILE) -x c++ -std=gnu++0x -c $< atomic.o: atomic.cc diff --git a/libstdc++-v3/src/Makefile.in b/libstdc++-v3/src/Makefile.in index 508a399e7e8..f0e98973d3f 100644 --- a/libstdc++-v3/src/Makefile.in +++ b/libstdc++-v3/src/Makefile.in @@ -74,20 +74,20 @@ toolexeclibLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(toolexeclib_LTLIBRARIES) am__libstdc___la_SOURCES_DIST = atomic.cc bitmap_allocator.cc \ pool_allocator.cc mt_allocator.cc codecvt.cc compatibility.cc \ - complex_io.cc ctype.cc date_time.cc debug.cc functexcept.cc \ - hash.cc hash_c++0x.cc globals_io.cc hashtable.cc \ - hashtable_c++0x.cc ios.cc ios_failure.cc ios_init.cc \ - ios_locale.cc limits.cc limits_c++0x.cc list.cc debug_list.cc \ - locale.cc locale_init.cc locale_facets.cc localename.cc \ - stdexcept.cc strstream.cc system_error.cc tree.cc \ - allocator-inst.cc concept-inst.cc fstream-inst.cc ext-inst.cc \ - ios-inst.cc iostream-inst.cc istream-inst.cc istream.cc \ - locale-inst.cc misc-inst.cc ostream-inst.cc sstream-inst.cc \ - streambuf-inst.cc streambuf.cc string-inst.cc valarray-inst.cc \ - wlocale-inst.cc wstring-inst.cc mutex.cc condition_variable.cc \ - atomicity.cc codecvt_members.cc collate_members.cc \ - ctype_members.cc messages_members.cc monetary_members.cc \ - numeric_members.cc time_members.cc basic_file.cc c++locale.cc \ + complex_io.cc ctype.cc debug.cc functexcept.cc hash.cc \ + hash_c++0x.cc globals_io.cc hashtable.cc hashtable_c++0x.cc \ + ios.cc ios_failure.cc ios_init.cc ios_locale.cc limits.cc \ + limits_c++0x.cc list.cc debug_list.cc locale.cc locale_init.cc \ + locale_facets.cc localename.cc stdexcept.cc strstream.cc \ + system_error.cc tree.cc allocator-inst.cc concept-inst.cc \ + fstream-inst.cc ext-inst.cc ios-inst.cc iostream-inst.cc \ + istream-inst.cc istream.cc locale-inst.cc misc-inst.cc \ + ostream-inst.cc sstream-inst.cc streambuf-inst.cc streambuf.cc \ + string-inst.cc valarray-inst.cc wlocale-inst.cc \ + wstring-inst.cc mutex.cc condition_variable.cc atomicity.cc \ + codecvt_members.cc collate_members.cc ctype_members.cc \ + messages_members.cc monetary_members.cc numeric_members.cc \ + time_members.cc basic_file.cc c++locale.cc \ compatibility-ldbl.cc parallel_list.cc parallel_settings.cc am__objects_1 = atomicity.lo codecvt_members.lo collate_members.lo \ ctype_members.lo messages_members.lo monetary_members.lo \ @@ -99,9 +99,9 @@ am__objects_4 = basic_file.lo c++locale.lo $(am__objects_2) \ $(am__objects_3) am__objects_5 = atomic.lo bitmap_allocator.lo pool_allocator.lo \ mt_allocator.lo codecvt.lo compatibility.lo complex_io.lo \ - ctype.lo date_time.lo debug.lo functexcept.lo hash.lo \ - hash_c++0x.lo globals_io.lo hashtable.lo hashtable_c++0x.lo \ - ios.lo ios_failure.lo ios_init.lo ios_locale.lo limits.lo \ + ctype.lo debug.lo functexcept.lo hash.lo hash_c++0x.lo \ + globals_io.lo hashtable.lo hashtable_c++0x.lo ios.lo \ + ios_failure.lo ios_init.lo ios_locale.lo limits.lo \ limits_c++0x.lo list.lo debug_list.lo locale.lo locale_init.lo \ locale_facets.lo localename.lo stdexcept.lo strstream.lo \ system_error.lo tree.lo allocator-inst.lo concept-inst.lo \ @@ -379,7 +379,6 @@ sources = \ compatibility.cc \ complex_io.cc \ ctype.cc \ - date_time.cc \ debug.cc \ functexcept.cc \ hash.cc \ @@ -862,11 +861,6 @@ limits_c++0x.lo: limits_c++0x.cc limits_c++0x.o: limits_c++0x.cc $(CXXCOMPILE) -std=gnu++0x -c $< -date_time.lo: date_time.cc - $(LTCXXCOMPILE) -std=gnu++0x -c $< -date_time.o: date_time.cc - $(CXXCOMPILE) -std=gnu++0x -c $< - atomic.lo: atomic.cc $(LTCXXCOMPILE) -x c++ -std=gnu++0x -c $< atomic.o: atomic.cc diff --git a/libstdc++-v3/src/date_time.cc b/libstdc++-v3/src/date_time.cc deleted file mode 100644 index 0286917b779..00000000000 --- a/libstdc++-v3/src/date_time.cc +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (C) 2008 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 2, 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. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING. If not, write to the Free -// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, -// USA. - -// As a special exception, you may use this file as part of a free software -// library without restriction. Specifically, if other files instantiate -// templates or use macros or inline functions from this file, or you compile -// this file and link it with other files to produce an executable, this -// file does not by itself cause the resulting executable to be covered by -// the GNU General Public License. This exception does not however -// invalidate any other reasons why the executable file might be covered by -// the GNU General Public License. - -#include - -namespace std -{ - system_time - get_system_time() - { - std::time_t sec = std::time(0); - return system_time(sec); - } - - const nanoseconds::tick_type nanoseconds::ticks_per_second; - const nanoseconds::tick_type nanoseconds::seconds_per_tick; - const bool nanoseconds::is_subsecond; - - const system_time::tick_type system_time::ticks_per_second; - const system_time::tick_type system_time::seconds_per_tick; - const bool system_time::is_subsecond; -} diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++200x/all.cc b/libstdc++-v3/testsuite/17_intro/headers/c++200x/all.cc index 049f42096d0..7988666739a 100644 --- a/libstdc++-v3/testsuite/17_intro/headers/c++200x/all.cc +++ b/libstdc++-v3/testsuite/17_intro/headers/c++200x/all.cc @@ -97,7 +97,6 @@ #include #include #include -#include #include #include #include diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++200x/all_multiple_inclusion.cc b/libstdc++-v3/testsuite/17_intro/headers/c++200x/all_multiple_inclusion.cc index 869fa02675c..814fbc3a144 100644 --- a/libstdc++-v3/testsuite/17_intro/headers/c++200x/all_multiple_inclusion.cc +++ b/libstdc++-v3/testsuite/17_intro/headers/c++200x/all_multiple_inclusion.cc @@ -94,7 +94,6 @@ #include #include #include -#include #include #include #include @@ -205,7 +204,6 @@ #include #include #include -#include #include #include #include diff --git a/libstdc++-v3/testsuite/31_date_time/headers/date_time/functions_std.cc b/libstdc++-v3/testsuite/31_date_time/headers/date_time/functions_std.cc deleted file mode 100644 index 49b4ecac83b..00000000000 --- a/libstdc++-v3/testsuite/31_date_time/headers/date_time/functions_std.cc +++ /dev/null @@ -1,27 +0,0 @@ -// { dg-do compile } -// { dg-options "-std=gnu++0x" } - -// Copyright (C) 2008 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 2, 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. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING. If not, write to the Free -// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, -// USA. - -#include - -namespace gnu -{ - using std::get_system_time; -} diff --git a/libstdc++-v3/testsuite/31_date_time/headers/date_time/std_c++0x_neg.cc b/libstdc++-v3/testsuite/31_date_time/headers/date_time/std_c++0x_neg.cc deleted file mode 100644 index 9b98b628c77..00000000000 --- a/libstdc++-v3/testsuite/31_date_time/headers/date_time/std_c++0x_neg.cc +++ /dev/null @@ -1,24 +0,0 @@ -// { dg-do compile } -// { dg-options "-std=gnu++98" } - -// Copyright (C) 2008 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 2, 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. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING. If not, write to the Free -// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, -// USA. - -#include // { dg-excess-errors "In file included from" } - -// { dg-error "upcoming ISO" "" { target *-*-* } 36 } diff --git a/libstdc++-v3/testsuite/31_date_time/headers/date_time/synopsis.cc b/libstdc++-v3/testsuite/31_date_time/headers/date_time/synopsis.cc deleted file mode 100644 index e86c9b784bf..00000000000 --- a/libstdc++-v3/testsuite/31_date_time/headers/date_time/synopsis.cc +++ /dev/null @@ -1,70 +0,0 @@ -// { dg-do compile } -// { dg-options "-std=gnu++0x" } - -// Copyright (C) 2008 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 2, 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. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING. If not, write to the Free -// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, -// USA. - -#include - -namespace std { - // duration types - class nanoseconds; - class microseconds; - class milliseconds; - class seconds; - class minutes; - class hours; - - // timepoint type - class system_time; - - // non-member functions - system_time get_system_time(); - - template - system_time operator+(const Duration& td, const system_time& rhs); - - template - bool operator==(const LhsDuration& lhs, const RhsDuration& rhs); - template - bool operator!=(const LhsDuration& lhs, const RhsDuration& rhs); - - template - bool operator< (const LhsDuration& lhs, const RhsDuration& rhs); - template - bool operator<=(const LhsDuration& lhs, const RhsDuration& rhs); - template - bool operator> (const LhsDuration& lhs, const RhsDuration& rhs); - template - bool operator>=(const LhsDuration& lhs, const RhsDuration& rhs); - -/* - template - FinestDuration operator+(const LhsDuration& lhs, const RhsDuration& rhs); - template - FinestDuration operator-(const LhsDuration& lhs, const RhsDuration& rhs); -*/ - - template - Duration operator*(Duration lhs, long rhs); - template - Duration operator*(long lhs, Duration rhs); - - template - Duration operator/(Duration lhs, long rhs); -} diff --git a/libstdc++-v3/testsuite/31_date_time/headers/date_time/types_std.cc b/libstdc++-v3/testsuite/31_date_time/headers/date_time/types_std.cc deleted file mode 100644 index f8fc5953c5b..00000000000 --- a/libstdc++-v3/testsuite/31_date_time/headers/date_time/types_std.cc +++ /dev/null @@ -1,33 +0,0 @@ -// { dg-do compile } -// { dg-options "-std=gnu++0x" } - -// Copyright (C) 2008 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 2, 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. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING. If not, write to the Free -// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, -// USA. - -#include - -namespace gnu -{ - typedef std::nanoseconds t1; - typedef std::microseconds t2; - typedef std::milliseconds t3; - typedef std::seconds t4; - typedef std::minutes t5; - typedef std::hours t6; - typedef std::system_time t7; -} diff --git a/libstdc++-v3/testsuite/31_date_time/nanoseconds/requirements/duration.cc b/libstdc++-v3/testsuite/31_date_time/nanoseconds/requirements/duration.cc deleted file mode 100644 index ca6e2cf374a..00000000000 --- a/libstdc++-v3/testsuite/31_date_time/nanoseconds/requirements/duration.cc +++ /dev/null @@ -1,50 +0,0 @@ -// { dg-do compile } -// { dg-options "-std=gnu++0x" } - -// Copyright (C) 2008 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 2, 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. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING. If not, write to the Free -// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, -// USA. - -#include - -namespace gnu -{ - bool - test_nanoseconds_is_duration() - { - typedef std::nanoseconds D; - D d; - D e(d); - d == e; - d < e; - d = e; - - typedef D::tick_type tick_type; - tick_type t1 = D::ticks_per_second; - tick_type t2 = D::seconds_per_tick; - bool b1 = D::is_subsecond; - tick_type t3 = d.count(); - -d; - - d += e; - d -= e; - d *= static_cast(1); - d /= static_cast(1); - - return b1 || t1 || t2 || t3; - } -} diff --git a/libstdc++-v3/testsuite/31_date_time/nanoseconds/requirements/traits.cc b/libstdc++-v3/testsuite/31_date_time/nanoseconds/requirements/traits.cc deleted file mode 100644 index 53f36180ea4..00000000000 --- a/libstdc++-v3/testsuite/31_date_time/nanoseconds/requirements/traits.cc +++ /dev/null @@ -1,33 +0,0 @@ -// { dg-do compile } -// { dg-options "-std=gnu++0x" } - -// Copyright (C) 2008 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 2, 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. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING. If not, write to the Free -// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, -// USA. - -#include - -namespace gnu -{ - void - test_nanoseconds_traits() - { - static_assert(std::nanoseconds::ticks_per_second == 1000L * 1000 * 1000, "FIXME"); - static_assert(std::nanoseconds::seconds_per_tick == 0, "FIXME"); - static_assert(std::nanoseconds::is_subsecond == true, "FIXME"); - } -} diff --git a/libstdc++-v3/testsuite/31_date_time/system_time/requirements/traits.cc b/libstdc++-v3/testsuite/31_date_time/system_time/requirements/traits.cc deleted file mode 100644 index 0310333a620..00000000000 --- a/libstdc++-v3/testsuite/31_date_time/system_time/requirements/traits.cc +++ /dev/null @@ -1,33 +0,0 @@ -// { dg-do compile } -// { dg-options "-std=gnu++0x" } - -// Copyright (C) 2008 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 2, 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. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING. If not, write to the Free -// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, -// USA. - -#include - -namespace gnu -{ - void - test_system_time_traits() - { - static_assert(std::nanoseconds::ticks_per_second == std::nanoseconds::ticks_per_second, "FIXME"); - static_assert(std::system_time::seconds_per_tick == 0, "FIXME"); - static_assert(std::system_time::is_subsecond == true, "FIXME"); - } -}