From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yb1-xb31.google.com (mail-yb1-xb31.google.com [IPv6:2607:f8b0:4864:20::b31]) by sourceware.org (Postfix) with ESMTPS id 8B5D23858D28 for ; Sun, 30 Jan 2022 15:35:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8B5D23858D28 Received: by mail-yb1-xb31.google.com with SMTP id c19so4333653ybf.2 for ; Sun, 30 Jan 2022 07:35:21 -0800 (PST) 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=bH3SioyYfQUJd1I4Kcixql6gy8qqSp9dM4XlSoh0x9A=; b=3LOHdDZ8fpzzvjYc4OVa9SdalDSTjogpk3mOI/sQOUwFIwu1ZCYOsFqTvl35Vm6qva YCTHhRwpvpxdAiR6bYls0j8u1uzZyJUZ54ABj5f1txL+KCNlQmBPftmSOtb+HpTUShIX jEm8zPEptphxaBs83ayOO45x1msr/qx5mN+zOmOpev01XpmBISn+hAXkAfMO1OoVNBx1 ZKe9aRsHN58wq6g8KN5Wd2kvzPMHIrxjHsgK1lDqrJ3vxsGA9maEbxn7rDrcx8q3ZH4G NB0dsBpjxdlLrKZ/8KnS1tCDguHQBydlKMsG7i1jkBwhy5fflwL2Gxd+aKz0rtXkM4Hz yPdA== X-Gm-Message-State: AOAM533pAYreglbmtrYCccmBUGz9X7Z36by0coTUyYNm5r8WoT2o1z/i Jvx7qCuHnNOWD8FeLM9AmNSBYjsrBSZJvff4PIL08SMf X-Google-Smtp-Source: ABdhPJxJQLnBM2/7+acjgo3cUZzKDM6SdvpFyMIGFJLI45ylwvAHBPtCDWmavmfjsFUVxReKRL5uLIszY8iwqjgHLqg= X-Received: by 2002:a25:4156:: with SMTP id o83mr24023423yba.460.1643556920678; Sun, 30 Jan 2022 07:35:20 -0800 (PST) MIME-Version: 1.0 From: =?UTF-8?Q?Marc_Nieper=2DWi=C3=9Fkirchen?= Date: Sun, 30 Jan 2022 16:35:09 +0100 Message-ID: Subject: C++ API: Vector arguments / error detection To: =?UTF-8?Q?Marc_Nieper=2DWi=C3=9Fkirchen_via_Jit?= X-Spam-Status: No, score=0.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: jit@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Jit mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Jan 2022 15:35:22 -0000 This is about two unrelated issues regarding the C++ API: (1) At the moment, a lot of API functions like new_function take non-const referenced to vectors, e.g. std::vector ¶ms; Can we change this into const references? This way, one can write auto param1 = ctxt.new_param (...); auto param2 = ctxt.new_param (...); auto func = new_function (..., {param1, param2}, ...); instead of the more complicated and less convenient auto param1 = ...; auto param2 = ...; auto params = std::vector {param1, param2}; auto func = new_function (..., params, ...); (2) When using gccjit::context::compile_to_file, how can I check whether the compilation succeeded without errors or not? In libgccjit++.h no error is checked and no exception thrown. Thanks, Marc