On 7/15/20 6:59 PM, Marek Polacek wrote:
The convert_like* macros were introduced in

2000-03-05  Nathan Sidwell  <nat...@codesourcery.com>

         * call.c (convert_like): Macrofy.
         (convert_like_with_context): New macro.

but now we can use overloading so we can do away with the macros.
I've also taken this chance to rename _real to _internal to make it
clear that it should not be called directly.

ok, a nit ...

+/* Wrapper for convert_like_internal that handles creating
+   IMPLICIT_CONV_EXPR.  */
+
+static tree
+convert_like (conversion *convs, tree expr, tree fn, int argnum,
+             bool issue_conversion_warnings,bool c_cast_p,

missing space after comma

+             tsubst_flags_t complain)
+{

+
+/* Convenience wrapper for convert_like.  */
+
+static inline tree
+convert_like (conversion *convs, tree expr, tsubst_flags_t complain)

It's unfortunate the argument ordering is not friendly to using default args. Reordering would be too much churn I suspect. Let's not go there.

+static inline tree
+convert_like_with_context (conversion *convs, tree expr, tree fn, int argnum,
+                          tsubst_flags_t complain)
+{
+  return convert_like (convs, expr, fn, argnum,
+                      /*issue_conversion_warnings=*/true,
+                      /*c_cast_p=*/false, complain);
+}

nathan


--
Nathan Sidwell

Reply via email to