https://bugs.llvm.org/show_bug.cgi?id=35063
Bug ID: 35063
Summary: libc++ says my user-defined type has an operator<<
during sfinae - libstdc++ works as expected
Product: libc++
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: All Bugs
Assignee: unassignedclangb...@nondot.org
Reporter: xax...@gmail.com
CC: llvm-bugs@lists.llvm.org, mclow.li...@gmail.com
https://godbolt.org/g/PRfyjH
#include <type_traits>
#include <iostream>
template<typename T, typename = void>
struct has_insertion_operator : std::false_type {};
template<typename T>
struct has_insertion_operator<T,
std::void_t<decltype(
operator<<(std::declval<std::ostream>(),
std::declval<T>()))>
> : std::true_type {};
template<class T>
constexpr bool has_insertion_operator_v = has_insertion_operator<T>::value;
class A{};
static_assert(!has_insertion_operator_v<A>); // <== I expect this to pass, but
it fires on libc++.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs