[libcxx-commits] [PATCH] D74291: [libcxx] Adds [concept.same]
Michael Schellenberger Costa via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Feb 8 23:45:29 PST 2020
miscco added inline comments.
================
Comment at: libcxx/include/concepts:149
+template <class T, class U>
+concept __same_as_impl = __is_same(T, U);
+
----------------
miscco wrote:
> Thinking about it more, this will not work with other compilers such as MSVC. You should seither check the Compiler aka #ifdef __clang__ or the existence of the keyword
As the code was not displayed properly
```
template <class _Tp, class _Up>
concept __same_as_impl =
#ifdef __clang__
__is_same(_Tp, _Up);
#else
_VSTD::is_same_v<_Tp, _Up>;
#endif
```
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D74291/new/
https://reviews.llvm.org/D74291
More information about the libcxx-commits
mailing list