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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
What is the
      explicit
      _Stop_state_ref(const stop_source&)
      : _M_ptr(new _Stop_state_t())
      { }
there for, can't you use some completely unrelated type there instead (bool,
stop_source*, some enum, whatever), or drop the const at least?
The passing pointer to uninitialized const object or reference to uninitialized
const object to function we don't know anything about is I think one of the
design goals of Martin's change which probably not everybody will agree with,
but it is true that it can sometimes find bugs in code.

Reply via email to