Hi, On Mon, 6 Mar 2023, Richard Biener via Gcc-patches wrote:
> --- a/gcc/realmpfr.h > +++ b/gcc/realmpfr.h > @@ -24,6 +24,26 @@ > #include <mpfr.h> > #include <mpc.h> > > +class auto_mpfr > +{ > +public: > + auto_mpfr () { mpfr_init (m_mpfr); } > + explicit auto_mpfr (mpfr_prec_t prec) { mpfr_init2 (m_mpfr, prec); } > + ~auto_mpfr () { mpfr_clear (m_mpfr); } > + > + operator mpfr_t& () { return m_mpfr; } > + > + auto_mpfr (const auto_mpfr &) = delete; > + auto_mpfr &operator=(const auto_mpfr &) = delete; Shouldn't this use the idiom suggested in ansidecl.h, i.e. private: DISABLE_COPY_AND_ASSIGN (auto_mpfr); Alexander