mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-13 15:07:27 +08:00
[multiple changes]
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
This commit is contained in:
parent
fcb9237b9c
commit
5ae8cf8c41
@ -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.
|
||||
|
@ -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
|
||||
|
||||
@ -99,6 +102,9 @@
|
||||
/* 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
|
||||
|
||||
|
@ -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.
|
||||
|
@ -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 \
|
||||
|
@ -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 \
|
||||
|
@ -98,6 +98,7 @@
|
||||
|
||||
#ifdef __GXX_EXPERIMENTAL_CXX0X__
|
||||
#include <array>
|
||||
#include <date_time>
|
||||
#include <random>
|
||||
#include <regex>
|
||||
#include <system_error>
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
@ -204,6 +205,7 @@
|
||||
#include <array>
|
||||
#include <bitset>
|
||||
#include <complex>
|
||||
#include <date_time>
|
||||
#include <deque>
|
||||
#include <exception>
|
||||
#include <fstream>
|
||||
|
@ -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;
|
||||
}
|
@ -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 }
|
@ -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);
|
||||
}
|
@ -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;
|
||||
}
|
@ -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;
|
||||
}
|
||||
}
|
@ -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");
|
||||
}
|
||||
}
|
@ -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");
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user