[libcxx-commits] [PATCH] D118926: [libc++] Adds TEST_IF_INT128.

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Feb 8 10:01:16 PST 2022


Mordante added a comment.

For format I use it in a few places. The difference there is it's at the end of the list which makes it more awkward to use `#ifdef` due to the "hanging" `>`. For example

    std::tuple<
        unsigned long long, long long, unsigned long, long, unsigned int, int,
        unsigned short, short, unsigned char, signed char
  #ifndef TEST_HAS_NO_INT128
        , __int128_t, __uint128_t
  #endif
        > types;

The reason to put them at the end is that the test does something like `auto foo = std::get<1>(types)`.

Regarding the name, I based the name on `_LIBCPP_IF_WIDE_CHARACTERS` which also lacks `_HAS`. I prefer to keep things consistent. @ldionne @Quuxplusone do you prefer 1 or 2?

1. `_LIBCPP_IF_WIDE_CHARACTERS` and `TEST_IF_INT128`
2. `_LIBCPP_IF_HAS_WIDE_CHARACTERS` and `TEST_IF_HAS_INT128`

Based on Arthur's suggestion I'm now more tending to option 2.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D118926/new/

https://reviews.llvm.org/D118926



More information about the libcxx-commits mailing list