This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/77288] Std::experimental::optional::operator= implementation is broken in gcc 6.1


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77288

--- Comment #12 from ville at gcc dot gnu.org ---
Author: ville
Date: Mon Oct 24 12:52:31 2016
New Revision: 241477

URL: https://gcc.gnu.org/viewcvs?rev=241477&root=gcc&view=rev
Log:
Backport from mainline:

        2016-10-24  Ville Voutilainen  <ville.voutilainen@gmail.com>

        Cross-port the latest resolution of LWG2756 and some
        bug-fixes to experimental::optional.
        PR libstdc++/77288
        PR libstdc++/77727
        * include/experimental/optional (_Optional_base):
        Remove constructors that take a _Tp.
        (__is_optional_impl, __is_optional): Remove.
        (__converts_from_optional): New.
        (optional(_Up&&)): Fix constraints, call base with in_place.
        (optional(const optional<_Up>&)): Fix constraints, use emplace.
        (optional(optional<_Up>&&)): Likewise.
        (operator=(_Up&&)): Fix constraints.
        (operator=(const optional<_Up>&)): Likewise.
        (operator=(optional<_Up>&&)): Likewise.
        (emplace(_Args&&...)): Constrain.
        (emplace(initializer_list<_Up>, _Args&&...)): Likewise.
        * testsuite/experimental/optional/77288.cc: New.
        * testsuite/experimental/optional/assignment/5.cc: Adjust.
        * testsuite/experimental/optional/cons/77727.cc: New.
        * testsuite/experimental/optional/cons/value.cc: Adjust.

Added:
    branches/gcc-6-branch/libstdc++-v3/testsuite/experimental/optional/77288.cc
   
branches/gcc-6-branch/libstdc++-v3/testsuite/experimental/optional/cons/77727.cc
      - copied, changed from r241461,
branches/gcc-6-branch/libstdc++-v3/testsuite/experimental/optional/assignment/5.cc
Modified:
    branches/gcc-6-branch/libstdc++-v3/ChangeLog
    branches/gcc-6-branch/libstdc++-v3/include/experimental/optional
   
branches/gcc-6-branch/libstdc++-v3/testsuite/experimental/optional/assignment/5.cc
   
branches/gcc-6-branch/libstdc++-v3/testsuite/experimental/optional/cons/value.cc

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]