public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/64232] New: Derived class with implicitly declared assignment operator is std::assignable though base class is not std::assignable
@ 2014-12-09  1:53 mmehlich at semanticdesigns dot com
  2014-12-09 12:09 ` [Bug c++/64232] Derived class with implicitly declared assignment operator is std::is_assignable though base class is not std::is_assignable redi at gcc dot gnu.org
  2014-12-09 21:49 ` mmehlich at semanticdesigns dot com
  0 siblings, 2 replies; 3+ messages in thread
From: mmehlich at semanticdesigns dot com @ 2014-12-09  1:53 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 64232
           Summary: Derived class with implicitly declared assignment
                    operator is std::assignable though base class is not
                    std::assignable
           Product: gcc
           Version: 4.8.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mmehlich at semanticdesigns dot com

Derived class with implicitly declared assignment operator is std::assignable
though the base class is not std::assignable

Code:

#include <iostream>
#include <type_traits>

struct X {
    X(const X&) = delete;
    void operator=(X x);
};

struct Y: X {
};

int main()
{
    std::cout << std::is_assignable<X&,X>::value << std::endl;
    std::cout << std::is_assignable<Y&,Y>::value << std::endl;
}

Output:
0
1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-12-09 21:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-09  1:53 [Bug c++/64232] New: Derived class with implicitly declared assignment operator is std::assignable though base class is not std::assignable mmehlich at semanticdesigns dot com
2014-12-09 12:09 ` [Bug c++/64232] Derived class with implicitly declared assignment operator is std::is_assignable though base class is not std::is_assignable redi at gcc dot gnu.org
2014-12-09 21:49 ` mmehlich at semanticdesigns dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).