public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Ben Boeckel <ben.boeckel@kitware.com>
To: Dan Klishch <daklishch@gmail.com>
Cc: gcc@gcc.gnu.org
Subject: Re: Proposal: allow to extend C++ template argument deduction via plugins
Date: Fri, 15 Jul 2022 10:18:12 -0400	[thread overview]
Message-ID: <YtF3JAkBIOebB/e5@megas.dev.benboeckel.internal> (raw)
In-Reply-To: <CAAvxmfmYgbAgxssWDsmraBA_=rTS_nkG1KJsnQEp=wgVkuydyw@mail.gmail.com>

On Thu, Jul 14, 2022 at 18:46:47 +0200, Dan Klishch via Gcc wrote:
> As far as I understand the currently available plugin extension points, it is
> not possible to modify template argument deduction algorithm (except the
> theoretical possibility to completely override parsing step). However, such
> opportunity might be beneficial for projects like libpqxx, for example, when
> database schema and query text are available at compile-time, return types of
> the query might be inferred by the plugin.
> 
> I propose to add something like PLUGIN_FUNCTION_CALL plugin_event which will
> allow to modify function calls conditionally. Will a patch adding such
> functionality be welcomed?

Note that I'm not a GCC developer, so my opinion isn't worth much on the
acceptability-to-GCC front.

Wouldn't this make it a C++ dialect? How would non-GCC compilers be able
to be compatible with such an API? That is, if the schema and query
being available changes the API (nevermind the schema itself changing),
I don't see how this works in general.

--Ben

  reply	other threads:[~2022-07-15 14:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-14 16:46 Dan Klishch
2022-07-15 14:18 ` Ben Boeckel [this message]
2022-07-15 16:25   ` Dan Klishch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YtF3JAkBIOebB/e5@megas.dev.benboeckel.internal \
    --to=ben.boeckel@kitware.com \
    --cc=daklishch@gmail.com \
    --cc=gcc@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).