[Bug c++/55813] Poorly named/documented option Wctor-dtor-privacy
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55813 Kyle J Strand changed: What|Removed |Added CC||kyle.strand at beckman dot com --- Comment #4 from Kyle J Strand --- The behavior (even as of 5.1) still seems at odds with the documentation. In particular, classes with *public* constructors *can* trigger this warning. See http://stackoverflow.com/q/33157248/1858225 for discussion and sample code.
[Bug c++/71484] New: Class with implicit public constructor triggers `-Wctor-dtor-privacy`
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71484 Bug ID: 71484 Summary: Class with implicit public constructor triggers `-Wctor-dtor-privacy` Product: gcc Version: 5.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: kyle.strand at beckman dot com Target Milestone: --- A class whose only user-declared methods are `private`, but which *does* have an implicit public constructor, can trigger `-Wctor-dtor-privacy`. See http://stackoverflow.com/q/33157248/1858225 for discussion and sample code. The offending code is copied here for convenience: struct foo { private: static int test(void) { return 3; }; };
[Bug c++/71484] Class with implicit public constructor triggers `-Wctor-dtor-privacy`
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71484 Kyle J Strand changed: What|Removed |Added Severity|normal |minor
[Bug c++/55813] Poorly named/documented option Wctor-dtor-privacy
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55813 --- Comment #6 from Kyle J Strand --- (In reply to Manuel López-Ibáñez from comment #5) > Please open a new PR and copy the testcase on it. Submitted as Bug 71484 .
[Bug c++/69392] New: G++ can't capture 'this' pointer to templated type using init-capture
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69392 Bug ID: 69392 Summary: G++ can't capture 'this' pointer to templated type using init-capture Product: gcc Version: 5.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: kyle.strand at beckman dot com Target Milestone: --- Created attachment 37409 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37409&action=edit Tarball with source (with comments), preprocessed source, and compiler output G++ erroneously fails to deduce the type of the `this` pointer inside a template-class member function when using init-capture to copy `this` into a lambda. My GCC version is 5.1.0 on an x86_64 architecture. My OS is Debian 8. More information, including a comparison to Clang++ and a list of variations that do or do not work, is available on this StackOverflow question: http://stackoverflow.com/q/34889310/1858225
[Bug c++/69390] dynamic_cast on rvalue fails
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69390 Kyle J Strand changed: What|Removed |Added CC||kyle.strand at beckman dot com --- Comment #1 from Kyle J Strand --- See http://stackoverflow.com/q/34901154/1858225. According to comments Clang accepts this code.
[Bug c++/69392] G++ can't capture 'this' pointer to templated type using init-capture
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69392 --- Comment #2 from Kyle J Strand --- (In reply to Jason Merrill from comment #1) > Log: > PR c++/69392 > * lambda.c (lambda_capture_field_type): Handle 'this' specially > for init-capture, too. > What special handling is done for 'this'?
[Bug c++/72780] New: public `using` directive exposes protected base-class constructor
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72780 Bug ID: 72780 Summary: public `using` directive exposes protected base-class constructor Product: gcc Version: 5.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: kyle.strand at beckman dot com Target Milestone: --- In the code below, the protected constructors of `Base` and `MyCrtp` should both be inaccessible and therefore trigger access errors in `main`. However, the CRTP base-class constructor call does NOT trigger an error in GCC. class Base { protected: Base(int) {} }; class Derived : public Base { public: using Base::Base; }; template class MyCrtp { protected: template MyCrtp(T&&) { } }; class Implementer : public MyCrtp { using BASE = MyCrtp; public: using BASE::MyCrtp; }; int main() { Derived d(3); // Compile error with GCC and Clang Implementer i(3); // GCC gives NO error }