Patchwork [v3] missed merges

login
register
mail settings
Submitter Benjamin Kosnik
Date Jan. 19, 2011, 2:23 a.m.
Message ID <20110118182308.59593005@shotwell>
Download mbox | patch
Permalink /patch/79392/
State New
Headers show

Comments

Benjamin Kosnik - Jan. 19, 2011, 2:23 a.m.
culling my unfinished 2010 branches, I found these small bits that were
left out of the constexpr merge and the last doc patch.

tested x86/linux

-benjamin

Patch

2011-01-18  Benjamin Kosnik  <bkoz@redhat.com>

	* doc/xml/images/confdeps.png: Regenerate.

	* include/std/chrono (duration): Mark copy constructor constexpr.
	* testsuite/20_util/duration/cons/constexpr.cc: Add test.

Index: doc/xml/images/confdeps.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: include/std/chrono
===================================================================
--- include/std/chrono	(revision 168978)
+++ include/std/chrono	(working copy)
@@ -1,6 +1,6 @@ 
 // <chrono> -*- C++ -*-
 
-// Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
+// Copyright (C) 2008, 2009, 2010, 2011 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
@@ -223,6 +223,8 @@ 
 	// 20.8.3.1 construction / copy / destroy
 	constexpr duration() : __r() { }
 
+	constexpr duration(const duration&) = default;
+
 	template<typename _Rep2, typename = typename
 	       enable_if<is_convertible<_Rep2, rep>::value
 			 && (treat_as_floating_point<rep>::value
@@ -238,7 +240,6 @@ 
 	  : __r(duration_cast<duration>(__d).count()) { }
 
 	~duration() = default;
-	duration(const duration&) = default;
 	duration& operator=(const duration&) = default;
 
 	// 20.8.3.2 observer
Index: testsuite/20_util/duration/cons/constexpr.cc
===================================================================
--- testsuite/20_util/duration/cons/constexpr.cc	(revision 168978)
+++ testsuite/20_util/duration/cons/constexpr.cc	(working copy)
@@ -27,6 +27,7 @@ 
   test1.operator()<std::chrono::seconds>();
 
   __gnu_test::constexpr_single_value_constructible test2;
+  test2.operator()<std::chrono::seconds, std::chrono::seconds>();
   test2.operator()<std::chrono::seconds, std::chrono::seconds::rep>();
   test2.operator()<std::chrono::minutes, std::chrono::hours>();
   return 0;