From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: LLVM breakage on seawasp |
Date: | 2019-08-24 21:46:54 |
Message-ID: | 20190824214654.453pjkmzekkgdqnm@alap3.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
On 2019-08-25 09:15:35 +1200, Thomas Munro wrote:
> On Sun, Aug 25, 2019 at 8:24 AM Andres Freund <andres(at)anarazel(dot)de> wrote:
> > On August 24, 2019 1:08:11 PM PDT, Thomas Munro <thomas(dot)munro(at)gmail(dot)com> wrote:
> > >Perhaps we'll need some macrology to select between llvm and std
> > >versions? I am guessing we can't decree that PostgreSQL's minimum C++
> > >level is C++14 and simply change it to std::make_unique.
> >
> > Perhaps just a
> > #if new_enough
> > using std::make_unique
> > #else
> > using llvm::mak_eunique
> >
> > At the start of the file, and then use it unqualified?
>
> Yeah, it's a pain though, you'd have to say:
>
> #if llvm >= 9
> # if cpp >= 14
> # using std::make_unique;
> # else
> # error "postgres needs at least c++ 14 to use llvm 9"
> # endif
> #else
> # using llvm::make_unique;
> #endif
I don't think we'd really need the inner part, because you can't use
llvm 9 without a new enough compiler. There's plenty make_unique use in
inline functions etc.
> Maybe we should just use std::unique_ptr's constructor, ie give it new
> ImportMayTy() instead of using make_unique(), even though that's not
> cool C++ these days?
Yea, wfm. do you want to make it so?
Greetings,
Andres Freund
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2019-08-24 21:54:50 | Re: LLVM breakage on seawasp |
Previous Message | Andres Freund | 2019-08-24 21:39:32 | Re: LLVM breakage on seawasp |