From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) by sourceware.org (Postfix) with ESMTPS id D92BF3858D1E for ; Thu, 14 Jul 2022 16:47:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D92BF3858D1E Received: by mail-ed1-x52a.google.com with SMTP id x91so3193714ede.1 for ; Thu, 14 Jul 2022 09:47:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=99KjXob+/TJm+WDn3o2NzX6Lc4lSlnGCWHMu6sp/kGA=; b=VhyRwytC+gg7t5FJ7T+NuORSmBvuEZnu22aOuyig3/qpSk3wO9TEzj35coAVTRjW4y dZzG/W6pikQpPaVQM/7ZZ55Fz6xWyaWgyCgzbF3RjUnYMZ+tRScmf1Af4m3nU+vTp6kH /4i237sCYDcm40H0BJ82LVPl/d4MCbtWmZKC9b+PaZ8shgGWMKRLyuR1PPtfxShhCiQR wX+k3gyDlflDJd05vMIgwVtJ0K2hO4ALG1hoNGSeqPATdJDF+jPVETbs5ev9OP7LmX1i /48EJhy+RIPB4DHY6kB16naAAzNDLX4rVfh6lhItsPXjvsyrSUU8/QRA//QvA9h0Ozs4 kWCA== X-Gm-Message-State: AJIora/1KXKC1ULHmdVtkBuil/FcQJtlmzFlOnIEuRSKQbdlaPHUEz8w ElSdar/Rywcrxk86J7io7M+TPwgh0iQXYGrR/CQzBonlVbQ5kdWu X-Google-Smtp-Source: AGRyM1ujVz8ABG2+Wh+Qn5wc5F33gT5IuCJ/BzPGzN2m+s6uQVpRlchfKrIZkDLR0C35DEirz5Lg3EqHCG1EE+ETZ3A= X-Received: by 2002:a05:6402:34d6:b0:43a:a021:929 with SMTP id w22-20020a05640234d600b0043aa0210929mr14079141edc.268.1657817219436; Thu, 14 Jul 2022 09:46:59 -0700 (PDT) MIME-Version: 1.0 From: Dan Klishch Date: Thu, 14 Jul 2022 18:46:47 +0200 Message-ID: Subject: Proposal: allow to extend C++ template argument deduction via plugins To: gcc@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jul 2022 16:47:03 -0000 Hi, 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? Thanks, Dan Klishch