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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|1                           |0
             Status|WAITING                     |UNCONFIRMED

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
The code does:
        /* When converting from an init list we consider explicit
           constructors, but actually trying to call one is an error.  */
        if (DECL_NONCONVERTING_P (convfn) && DECL_CONSTRUCTOR_P (convfn)
            && BRACE_ENCLOSED_INITIALIZER_P (expr)
            /* Unless this is for direct-list-initialization.  */
            && (!CONSTRUCTOR_IS_DIRECT_INIT (expr) || convs->need_temporary_p)
            /* And in C++98 a default constructor can't be explicit.  */
            && cxx_dialect >= cxx11)
          {
            if (!(complain & tf_error))
              return error_mark_node;
            location_t loc = location_of (expr);
            if (CONSTRUCTOR_NELTS (expr) == 0
                && FUNCTION_FIRST_USER_PARMTYPE (convfn) != void_list_node)
              {
                auto_diagnostic_group d;
                if (pedwarn (loc, 0, "converting to %qT from initializer list "
                             "would use explicit constructor %qD",
                             totype, convfn))
                  inform (loc, "in C++11 and above a default constructor "
                          "can be explicit");
              }
            else
              error ("converting to %qT from initializer list would use "
                     "explicit constructor %qD", totype, convfn);
          }

Again I don't think this is a bug.

Reply via email to