[Bug libstdc++/81468] [DR1177] is_constructible gives the wrong answer for time_point construction

2017-07-22 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81468

Jonathan Wakely  changed:

   What|Removed |Added

Summary|is_constructible gives the  |[DR1177] is_constructible
   |wrong answer for time_point |gives the wrong answer for
   |construction|time_point construction

--- Comment #3 from Jonathan Wakely  ---
Done. I think adding a DR number to the title is more useful when we suspend a
bug while the issue is still open, but there's certainly no harm adding it.

[Bug libstdc++/81468] [DR1177] is_constructible gives the wrong answer for time_point construction

2017-09-13 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81468

Jonathan Wakely  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |redi at gcc dot gnu.org

[Bug libstdc++/81468] [DR1177] is_constructible gives the wrong answer for time_point construction

2017-09-13 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81468

--- Comment #4 from Jonathan Wakely  ---
Author: redi
Date: Wed Sep 13 14:07:44 2017
New Revision: 252085

URL: https://gcc.gnu.org/viewcvs?rev=252085&root=gcc&view=rev
Log:
PR libstdc++/81468 constrain std::chrono::time_point constructor

PR libstdc++/81468
* include/std/chrono (__enable_if_is_duration)
(__disable_if_is_duration): New alias templates to simplify SFINAE.
(duration_cast, floor, ceil): Use __enable_if_is_duration.
(duration::__is_float, duration::__is_harmonic): New alias templates
to simplify SFINAE.
(duration::duration(const _Rep2&)): Use _Require, __is_float and
__is_harmonic.
(duration::duration(const duration<_Rep2, _Period2>&)): Likewise.
(__common_rep_type): Remove, replace with ...
(__common_rep_t): New alias template.
(operator*, operator/, operator%): Use __common_rep_t and
__disable_if_is_duration.
(time_point::time_point(const time_point&)): Add missing
constraint from LWG DR 1177.
* testsuite/20_util/duration/cons/dr1177.cc: New.
* testsuite/20_util/duration/literals/range.cc: Update dg-error line.
* testsuite/20_util/duration/requirements/typedefs_neg1.cc: Likewise.
* testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
* testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
* testsuite/20_util/time_point/cons/81468.cc: New.

Added:
trunk/libstdc++-v3/testsuite/20_util/duration/cons/dr1177.cc
trunk/libstdc++-v3/testsuite/20_util/time_point/cons/81468.cc
  - copied, changed from r252076,
trunk/libstdc++-v3/testsuite/20_util/duration/requirements/typedefs_neg2.cc
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/std/chrono
trunk/libstdc++-v3/testsuite/20_util/duration/literals/range.cc
trunk/libstdc++-v3/testsuite/20_util/duration/requirements/typedefs_neg1.cc
trunk/libstdc++-v3/testsuite/20_util/duration/requirements/typedefs_neg2.cc
trunk/libstdc++-v3/testsuite/20_util/duration/requirements/typedefs_neg3.cc

[Bug libstdc++/81468] [DR1177] is_constructible gives the wrong answer for time_point construction

2017-09-13 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81468

--- Comment #6 from Jonathan Wakely  ---
Author: redi
Date: Wed Sep 13 15:20:34 2017
New Revision: 252091

URL: https://gcc.gnu.org/viewcvs?rev=252091&root=gcc&view=rev
Log:
PR libstdc++/81468 constrain std::chrono::time_point constructor

PR libstdc++/81468
* include/std/chrono (time_point(const time_point<_Dur2>&)): Add
missing constraint from LWG DR 1177.
* testsuite/20_util/duration/cons/dr1177.cc: New.
* testsuite/20_util/time_point/cons/81468.cc: New.
* testsuite/20_util/duration/literals/range.cc: Update dg-error line.

Added:
   
branches/gcc-6-branch/libstdc++-v3/testsuite/20_util/duration/cons/dr1177.cc
   
branches/gcc-6-branch/libstdc++-v3/testsuite/20_util/time_point/cons/81468.cc
  - copied, changed from r252072,
branches/gcc-6-branch/libstdc++-v3/testsuite/20_util/duration/literals/range.cc
Modified:
branches/gcc-6-branch/libstdc++-v3/ChangeLog
branches/gcc-6-branch/libstdc++-v3/include/std/chrono
   
branches/gcc-6-branch/libstdc++-v3/testsuite/20_util/duration/literals/range.cc

[Bug libstdc++/81468] [DR1177] is_constructible gives the wrong answer for time_point construction

2017-09-13 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81468

--- Comment #5 from Jonathan Wakely  ---
Author: redi
Date: Wed Sep 13 15:20:21 2017
New Revision: 252090

URL: https://gcc.gnu.org/viewcvs?rev=252090&root=gcc&view=rev
Log:
PR libstdc++/81468 constrain std::chrono::time_point constructor

PR libstdc++/81468
* include/std/chrono (time_point(const time_point<_Dur2>&)): Add
missing constraint from LWG DR 1177.
* testsuite/20_util/duration/cons/dr1177.cc: New.
* testsuite/20_util/time_point/cons/81468.cc: New.
* testsuite/20_util/duration/literals/range.cc: Update dg-error line.

Added:
   
branches/gcc-7-branch/libstdc++-v3/testsuite/20_util/duration/cons/dr1177.cc
   
branches/gcc-7-branch/libstdc++-v3/testsuite/20_util/time_point/cons/81468.cc
  - copied, changed from r252071,
branches/gcc-7-branch/libstdc++-v3/testsuite/20_util/duration/literals/range.cc
Modified:
branches/gcc-7-branch/libstdc++-v3/ChangeLog
branches/gcc-7-branch/libstdc++-v3/include/std/chrono
   
branches/gcc-7-branch/libstdc++-v3/testsuite/20_util/duration/literals/range.cc

[Bug libstdc++/81468] [DR1177] is_constructible gives the wrong answer for time_point construction

2017-09-13 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81468

--- Comment #7 from Jonathan Wakely  ---
Author: redi
Date: Wed Sep 13 15:28:12 2017
New Revision: 252092

URL: https://gcc.gnu.org/viewcvs?rev=252092&root=gcc&view=rev
Log:
PR libstdc++/81468 constrain std::chrono::time_point constructor

PR libstdc++/81468
* include/std/chrono (time_point(const time_point<_Dur2>&)): Add
missing constraint from LWG DR 1177.
* testsuite/20_util/duration/cons/dr1177.cc: New.
* testsuite/20_util/time_point/cons/81468.cc: New.
* testsuite/20_util/duration/literals/range.cc: Update dg-error line.

Added:
   
branches/gcc-5-branch/libstdc++-v3/testsuite/20_util/duration/cons/dr1177.cc
   
branches/gcc-5-branch/libstdc++-v3/testsuite/20_util/time_point/cons/81468.cc
  - copied, changed from r252073,
branches/gcc-5-branch/libstdc++-v3/testsuite/20_util/duration/literals/range.cc
Modified:
branches/gcc-5-branch/libstdc++-v3/ChangeLog
branches/gcc-5-branch/libstdc++-v3/include/std/chrono
   
branches/gcc-5-branch/libstdc++-v3/testsuite/20_util/duration/literals/range.cc

[Bug libstdc++/81468] [DR1177] is_constructible gives the wrong answer for time_point construction

2017-09-13 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81468

Jonathan Wakely  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |5.5
  Known to fail||5.4.0, 6.4.0, 7.2.0

--- Comment #8 from Jonathan Wakely  ---
Fixed for 5.5, 6.5 and 7.3 (all active branches).

[Bug libstdc++/81468] [DR1177] is_constructible gives the wrong answer for time_point construction

2017-09-18 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81468

--- Comment #9 from Jonathan Wakely  ---
Author: redi
Date: Mon Sep 18 20:00:32 2017
New Revision: 252950

URL: https://gcc.gnu.org/viewcvs?rev=252950&root=gcc&view=rev
Log:
PR libstdc++/81468 fix test for duration conversions

PR libstdc++/81468
* testsuite/20_util/duration/cons/dr1177.cc: Fix incorrect test and
improve static assertion messages.

Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/testsuite/20_util/duration/cons/dr1177.cc