[libcxx-commits] [PATCH] D102992: [libcxx][type_traits] remove `std::is_literal_type` and `std::result_of` for C++20
Christopher Di Bella via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Jun 11 08:40:16 PDT 2021
cjdb added inline comments.
================
Comment at: libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/result_of.deprecated.fail.cpp:25-26
+int main(int, char**) {
+ typedef std::result_of< // expected-warning {{'result_of<CallableStruct (int)>' is deprecated}}
+ CallableStruct(int)>::type f;
}
----------------
ldionne wrote:
> Why not write this as:
>
> ```
> typedef std::result_of<CallableStruct(int)>::type f; // expected-warning {{'result_of<CallableStruct (int)>' is deprecated}}
> ```
>
> Unless there is a reason for the funky indentation?
clang-format doesn't like that (I suspect the line is longer than 120 chars). I do this instead:
```
typedef std::result_of<CallableStruct(int)>::type f;
// expected-warning at -1{{'result_of<CallableStruct (int)>' is deprecated}}
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102992/new/
https://reviews.llvm.org/D102992
More information about the libcxx-commits
mailing list