[multiple changes]
authorPaolo Carlini <paolo@gcc.gnu.org>
Sun, 16 Mar 2008 17:13:04 +0000 (17:13 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Sun, 16 Mar 2008 17:13:04 +0000 (17:13 +0000)
2008-03-16  Paolo Carlini  <pcarlini@suse.de>

* testsuite/17_intro/headers/c++200x/all_multiple_inclusion.cc:
Update.
* testsuite/17_intro/headers/c++200x/all.cc: Likewise.
* include/precompiled/stdc++.h: Likewise.

2008-03-16  Pedro Lamarão  <pedro.lamarao@gmail.com>

* include/std/date_time: New file.
* src/date_time.cc: New file.
  * config/abi/pre/gnu.ver: Added <date_time> symbols in version
  GLIBCXX_3.4.11 and changed two patterns in version GLIBCXX_3.4
that matched new symbols.
* include/Makefile.am: Add date_time in std headers.
* src/Makefile.am: Add date_time.cc to source files.
* include/Makefile.in: Regenerate.
* src/Makefile.in: Likewise.

2008-03-16  Pedro Lamarão  <pedro.lamarao@gmail.com>

      * testsuite/31_date_time/headers/date_time/types_std.cc: New.
      * 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.

2008-03-16  Paolo Carlini  <pcarlini@suse.de>

* config.h.in: Regenerate.

From-SVN: r133276

17 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/config.h.in
libstdc++-v3/config/abi/pre/gnu.ver
libstdc++-v3/include/Makefile.am
libstdc++-v3/include/Makefile.in
libstdc++-v3/include/precompiled/stdc++.h
libstdc++-v3/src/Makefile.am
libstdc++-v3/src/Makefile.in
libstdc++-v3/testsuite/17_intro/headers/c++200x/all.cc
libstdc++-v3/testsuite/17_intro/headers/c++200x/all_multiple_inclusion.cc
libstdc++-v3/testsuite/31_date_time/headers/date_time/functions_std.cc [new file with mode: 0644]
libstdc++-v3/testsuite/31_date_time/headers/date_time/std_c++0x_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/31_date_time/headers/date_time/synopsis.cc [new file with mode: 0644]
libstdc++-v3/testsuite/31_date_time/headers/date_time/types_std.cc [new file with mode: 0644]
libstdc++-v3/testsuite/31_date_time/nanoseconds/requirements/duration.cc [new file with mode: 0644]
libstdc++-v3/testsuite/31_date_time/nanoseconds/requirements/traits.cc [new file with mode: 0644]
libstdc++-v3/testsuite/31_date_time/system_time/requirements/traits.cc [new file with mode: 0644]

index 643fa0bfa6e5001808a9ffa661e28c3669d9453b..7ae26c60672f156ac2110891a91552d7e42512e3 100644 (file)
@@ -1,3 +1,37 @@
+2008-03-16  Paolo Carlini  <pcarlini@suse.de>
+
+       * testsuite/17_intro/headers/c++200x/all_multiple_inclusion.cc:
+       Update.
+       * testsuite/17_intro/headers/c++200x/all.cc: Likewise.
+       * include/precompiled/stdc++.h: Likewise.
+
+2008-03-16  Pedro Lamarão  <pedro.lamarao@gmail.com>
+
+       * include/std/date_time: New file.
+       * src/date_time.cc: New file.
+       * config/abi/pre/gnu.ver: Added <date_time> symbols in version
+       GLIBCXX_3.4.11 and changed two patterns in version GLIBCXX_3.4
+       that matched new symbols.
+       * include/Makefile.am: Add date_time in std headers.
+       * src/Makefile.am: Add date_time.cc to source files.
+       * include/Makefile.in: Regenerate.
+       * src/Makefile.in: Likewise.
+
+2008-03-16  Pedro Lamarão  <pedro.lamarao@gmail.com>
+
+      * testsuite/31_date_time/headers/date_time/types_std.cc: New.
+      * 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.   
+
+2008-03-16  Paolo Carlini  <pcarlini@suse.de>
+
+       * config.h.in: Regenerate.
+
 2008-03-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        * aclocal.m4: Regenerate.
index 4c187f18bad4f979fbd719fa12360eb0a109772f..39ce4a9305c121d04ee9bed7fe3d59eca8f4549a 100644 (file)
@@ -66,6 +66,9 @@
 /* Define if ECANCELED exists. */
 #undef HAVE_ECANCELED
 
+/* Define if EIDRM exists. */
+#undef HAVE_EIDRM
+
 /* Define to 1 if you have the <endian.h> header file. */
 #undef HAVE_ENDIAN_H
 
 /* Define if ETIME exists. */
 #undef HAVE_ETIME
 
+/* Define if ETXTBSY exists. */
+#undef HAVE_ETXTBSY
+
 /* Define to 1 if you have the `expf' function. */
 #undef HAVE_EXPF
 
index 0b093a6ce9c31c5b0df700eb635f1cb0095e7446..1d35bfbbd37dad9997315b7172efb8556b67d129 100644 (file)
@@ -60,7 +60,9 @@ GLIBCXX_3.4 {
 #     std::c[i-z]*;
       std::c[i-s]*;
       std::c[u-z]*;
-      std::[d-g]*;
+#     std::[d-g]*;
+      std::[d-e]*;
+      std::gslice*;
       std::h[^a]*;
       std::i[a-n]*;
       std::ios_base::[A-Ha-z]*;
@@ -95,7 +97,8 @@ GLIBCXX_3.4 {
       std::locale::_[T-Za-z]*;
 #     std::[A-Zm-r]*;
       std::[A-Zm]*;
-      std::n[^u]*;
+#     std::n[^u]*;
+      std::n[^au]*;
       std::nu[^m]*;
       std::num[^e]*;
       std::[p-r]*;
@@ -804,6 +807,17 @@ GLIBCXX_3.4.11 {
 
     _ZNKSt4hashISt10error_codeEclES0_;
 
+    # date_time
+    _ZSt15get_system_timev;
+    _ZNSt11nanoseconds16seconds_per_tickE;
+    _ZNSt11nanoseconds16ticks_per_secondE;
+    _ZNSt11nanoseconds12is_subsecondE;
+
+    _ZNSt11system_time16seconds_per_tickE;
+    _ZNSt11system_time16ticks_per_secondE;
+    _ZNSt11system_time12is_subsecondE;
+
 } GLIBCXX_3.4.10;
 
 # Symbols in the support library (libsupc++) have their own tag.
index bd57bc4f133bcd67c33ba48d55ca8cc8582c02bc..68e8e35b3ded7e05df0c93038772a69464519069 100644 (file)
@@ -33,6 +33,7 @@ std_headers = \
        ${std_srcdir}/bitset \
        ${std_srcdir}/c++0x_warning.h \
        ${std_srcdir}/complex \
+       ${std_srcdir}/date_time \
        ${std_srcdir}/deque \
        ${std_srcdir}/fstream \
        ${std_srcdir}/functional \
index 619a3f1187a616b46bd170b9e5b2653598970ef2..6d52f75866e02ca817f2f1e487cad21b594b53a5 100644 (file)
@@ -284,6 +284,7 @@ std_headers = \
        ${std_srcdir}/bitset \
        ${std_srcdir}/c++0x_warning.h \
        ${std_srcdir}/complex \
+       ${std_srcdir}/date_time \
        ${std_srcdir}/deque \
        ${std_srcdir}/fstream \
        ${std_srcdir}/functional \
index 7e7c2682ea1428e280947a9796bb06b3ab6b1e8f..e4b611067346376b6905de8a02c84029b4005897 100644 (file)
@@ -98,6 +98,7 @@
 
 #ifdef __GXX_EXPERIMENTAL_CXX0X__
 #include <array>
+#include <date_time>
 #include <random>
 #include <regex>
 #include <system_error>
index 654861902121f89bd2b8ff3dd6988c61921876a2..7bd12aa1f609cde08ba0f7230d2d3135fce44d65 100644 (file)
@@ -141,6 +141,7 @@ sources = \
        compatibility.cc \
        complex_io.cc \
        ctype.cc \
+       date_time.cc \
        debug.cc \
        functexcept.cc \
        hash.cc \
@@ -242,6 +243,11 @@ hashtable_c++0x.lo: hashtable_c++0x.cc
 hashtable_c++0x.o: hashtable_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 $<
+
 if GLIBCXX_LDBL_COMPAT
 # Use special rules for compatibility-ldbl.cc compilation, as we need to
 # pass -mlong-double-64.
index 9602acbeee58c4cd94d69db8eb4ac9fd0a80a67e..b115d7ccc2eb23beeb95f3b0bc34ebfa09b370a0 100644 (file)
@@ -72,20 +72,21 @@ toolexeclibLTLIBRARIES_INSTALL = $(INSTALL)
 LTLIBRARIES = $(toolexeclib_LTLIBRARIES)
 am__libstdc___la_SOURCES_DIST = bitmap_allocator.cc pool_allocator.cc \
        mt_allocator.cc codecvt.cc compatibility.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 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 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
+       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 \
+       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 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 \
        numeric_members.lo time_members.lo
@@ -95,18 +96,18 @@ am__objects_1 = atomicity.lo codecvt_members.lo collate_members.lo \
 am__objects_4 = basic_file.lo c++locale.lo $(am__objects_2) \
        $(am__objects_3)
 am__objects_5 = bitmap_allocator.lo pool_allocator.lo mt_allocator.lo \
-       codecvt.lo compatibility.lo complex_io.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 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 fstream-inst.lo ext-inst.lo \
-       ios-inst.lo iostream-inst.lo istream-inst.lo istream.lo \
-       locale-inst.lo misc-inst.lo ostream-inst.lo sstream-inst.lo \
-       streambuf-inst.lo streambuf.lo string-inst.lo valarray-inst.lo \
-       wlocale-inst.lo wstring-inst.lo $(am__objects_1) \
-       $(am__objects_4)
+       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 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 fstream-inst.lo \
+       ext-inst.lo ios-inst.lo iostream-inst.lo istream-inst.lo \
+       istream.lo locale-inst.lo misc-inst.lo ostream-inst.lo \
+       sstream-inst.lo streambuf-inst.lo streambuf.lo string-inst.lo \
+       valarray-inst.lo wlocale-inst.lo wstring-inst.lo \
+       $(am__objects_1) $(am__objects_4)
 am_libstdc___la_OBJECTS = $(am__objects_5)
 libstdc___la_OBJECTS = $(am_libstdc___la_OBJECTS)
 DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
@@ -374,6 +375,7 @@ sources = \
        compatibility.cc \
        complex_io.cc \
        ctype.cc \
+       date_time.cc \
        debug.cc \
        functexcept.cc \
        hash.cc \
@@ -833,6 +835,11 @@ hashtable_c++0x.lo: hashtable_c++0x.cc
 hashtable_c++0x.o: hashtable_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 $<
+
 # Use special rules for compatibility-ldbl.cc compilation, as we need to
 # pass -mlong-double-64.
 @GLIBCXX_LDBL_COMPAT_TRUE@compatibility-ldbl.lo: compatibility-ldbl.cc
index f1ed7cf38b589643beffa7fb6103169c6ca795e2..1bc1e6acd7afbfea1f62ad4a2e6c2eff7dc73e13 100644 (file)
@@ -1,7 +1,7 @@
 // { dg-options "-std=gnu++0x" }
 // { dg-do compile }
 
-// Copyright (C) 2007 Free Software Foundation, Inc.
+// Copyright (C) 2007, 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
@@ -94,6 +94,7 @@
 #include <array>
 #include <bitset>
 #include <complex>
+#include <date_time>
 #include <deque>
 #include <exception>
 #include <fstream>
index 9aa802c7041e4bb9291668d268a4b19fe2429c45..869fa02675c393963be50c1d44b1f88cd90e0141 100644 (file)
@@ -1,7 +1,7 @@
 // { dg-options "-std=gnu++0x" }
 // { dg-do compile }
 
-// Copyright (C) 2007 Free Software Foundation, Inc.
+// Copyright (C) 2007, 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
@@ -94,6 +94,7 @@
 #include <array>
 #include <bitset>
 #include <complex>
+#include <date_time>
 #include <deque>
 #include <exception>
 #include <fstream>
 #include <array>
 #include <bitset>
 #include <complex>
+#include <date_time>
 #include <deque>
 #include <exception>
 #include <fstream>
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
new file mode 100644 (file)
index 0000000..49b4eca
--- /dev/null
@@ -0,0 +1,27 @@
+// { 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 <date_time>
+
+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
new file mode 100644 (file)
index 0000000..9b98b62
--- /dev/null
@@ -0,0 +1,24 @@
+// { 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 <date_time>  // { 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
new file mode 100644 (file)
index 0000000..e86c9b7
--- /dev/null
@@ -0,0 +1,70 @@
+// { 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 <date_time>
+
+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<typename Duration>
+    system_time operator+(const Duration& td, const system_time& rhs);
+
+  template <class LhsDuration, class RhsDuration>
+    bool operator==(const LhsDuration& lhs, const RhsDuration& rhs);
+  template <class LhsDuration, class RhsDuration>
+    bool operator!=(const LhsDuration& lhs, const RhsDuration& rhs);
+
+  template <class LhsDuration, class RhsDuration>
+    bool operator< (const LhsDuration& lhs, const RhsDuration& rhs);
+  template <class LhsDuration, class RhsDuration>
+    bool operator<=(const LhsDuration& lhs, const RhsDuration& rhs);
+  template <class LhsDuration, class RhsDuration>
+    bool operator> (const LhsDuration& lhs, const RhsDuration& rhs);
+  template <class LhsDuration, class RhsDuration>
+    bool operator>=(const LhsDuration& lhs, const RhsDuration& rhs);
+
+/*
+  template <class LhsDuration, class RhsDuration>
+    FinestDuration operator+(const LhsDuration& lhs, const RhsDuration& rhs);
+  template <class LhsDuration, class RhsDuration>
+    FinestDuration operator-(const LhsDuration& lhs, const RhsDuration& rhs);
+*/
+  
+  template <class Duration>
+    Duration operator*(Duration lhs, long rhs);
+  template <class Duration>
+    Duration operator*(long lhs, Duration rhs);
+
+  template <class Duration>
+    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
new file mode 100644 (file)
index 0000000..f8fc595
--- /dev/null
@@ -0,0 +1,33 @@
+// { 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 <date_time>
+
+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
new file mode 100644 (file)
index 0000000..ca6e2cf
--- /dev/null
@@ -0,0 +1,50 @@
+// { 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 <date_time>
+
+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<long>(1);
+    d /= static_cast<long>(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
new file mode 100644 (file)
index 0000000..53f3618
--- /dev/null
@@ -0,0 +1,33 @@
+// { 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 <date_time>
+
+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
new file mode 100644 (file)
index 0000000..0310333
--- /dev/null
@@ -0,0 +1,33 @@
+// { 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 <date_time>
+
+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");
+  }
+}