llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
29.15k stars 12.03k forks source link

[clang-format] Space after `std::enable_if_t` #105939

Open louwers opened 2 months ago

louwers commented 2 months ago

This doesn't look right. clang-format v18.1.8

    template <std::size_t I = 0, typename... Tp>
        inline typename std::enable_if_t <
        I<sizeof...(Tp), void> set(std::size_t i, std::tuple<Tp...> tuple, std::size_t tupleIndex) {
        if (tupleIndex == 0) {
            set(i, std::get<I>(tuple).a1);
        } else {
            set<I + 1, Tp...>(i, tuple, tupleIndex - 1);
        }
    }

There should not be a space between std::enable_if_t and the < after it.

llvmbot commented 1 month ago

@llvm/issue-subscribers-bug

Author: Bart Louwers (louwers)

This doesn't look right. clang-format v18.1.8 ```cpp template <std::size_t I = 0, typename... Tp> inline typename std::enable_if_t < I<sizeof...(Tp), void> set(std::size_t i, std::tuple<Tp...> tuple, std::size_t tupleIndex) { if (tupleIndex == 0) { set(i, std::get<I>(tuple).a1); } else { set<I + 1, Tp...>(i, tuple, tupleIndex - 1); } } ``` There should not be a space between `std::enable_if_t` and the `<` after it.