Date: Wed, 24 Jun 2026 18:11:27 -0400
On Wed, Jun 24, 2026 at 5:44 PM Jens Maurer via Std-Proposals
<std-proposals_at_[hidden]> wrote:
>
>
> Did you run this past WG14? What's their interest?
This looks very similar to N3531. It looks like that was dropped though.
>
> Jens
>
>
> On 6/24/26 23:33, Frederick Virchanza Gotham via Std-Proposals wrote:
> > Instead of doing this:
> >
> > #define ASSERT_EQ(a, b) \
> > do \
> > { \
> > if ( (a) == (b) ) break; \
> > \
> > std::fprintf(stderr, #a " != " #b " at %s:%d\n", \
> > __FILE__, __LINE__); \
> > std::abort(); \
> > } while (0)
> >
> > Wouldn't it be nice to be able to do this:
> >
> > #define ASSERT_EQ(a, b) \\\
> > do
> > {
> > if ( (a) == (b) ) break;
> >
> > std::fprintf(stderr, #a " != " #b " at %s:%d\n",
> > __FILE__, __LINE__);
> > std::abort();
> > } while (0)
> > \\\
> >
> > I'm told back in the 1990's, a guy called Andrew Myers made a patch
> > for GNU gcc so that you could do:
> >
> > #begin define swap(x,y,T)
> > do {
> > T temp = x;
> > x = y;
> > y = temp;
> > } while (0)
> > #end
> >
> > Whether we use three backslashes or "'#begin define", this should be
> > standardised in C++29.
>
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
<std-proposals_at_[hidden]> wrote:
>
>
> Did you run this past WG14? What's their interest?
This looks very similar to N3531. It looks like that was dropped though.
>
> Jens
>
>
> On 6/24/26 23:33, Frederick Virchanza Gotham via Std-Proposals wrote:
> > Instead of doing this:
> >
> > #define ASSERT_EQ(a, b) \
> > do \
> > { \
> > if ( (a) == (b) ) break; \
> > \
> > std::fprintf(stderr, #a " != " #b " at %s:%d\n", \
> > __FILE__, __LINE__); \
> > std::abort(); \
> > } while (0)
> >
> > Wouldn't it be nice to be able to do this:
> >
> > #define ASSERT_EQ(a, b) \\\
> > do
> > {
> > if ( (a) == (b) ) break;
> >
> > std::fprintf(stderr, #a " != " #b " at %s:%d\n",
> > __FILE__, __LINE__);
> > std::abort();
> > } while (0)
> > \\\
> >
> > I'm told back in the 1990's, a guy called Andrew Myers made a patch
> > for GNU gcc so that you could do:
> >
> > #begin define swap(x,y,T)
> > do {
> > T temp = x;
> > x = y;
> > y = temp;
> > } while (0)
> > #end
> >
> > Whether we use three backslashes or "'#begin define", this should be
> > standardised in C++29.
>
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
Received on 2026-06-24 22:11:06
