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

            Bug ID: 104636
           Summary: implicit use of explicit constructor
           Product: gcc
           Version: 11.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gcc at ebasoft dot com.pl
  Target Milestone: ---

during build of kde-misc/kdeconnect with clang and then gcc I found that gcc
allows implicit use of explicit ctor mentioning even that it would use
explicit, it sounds like it is compiling this as c++98 or so ..

https://godbolt.org/z/WsWPbbKfe

<source>:14:13: warning: converting to 'foo' from initializer list would use
explicit constructor 'foo::foo(const char*, uint8_t)'
   14 |     return {};
      |             ^
<source>:14:13: note: in C++11 and above a default constructor can be explicit

similar bug was resolved and fixed
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=40685

Reply via email to