<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - ICE with concepts"
href="https://bugs.llvm.org/show_bug.cgi?id=47174">47174</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>ICE with concepts
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>C++2a
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>llvm@marehr.dialup.fu-berlin.de
</td>
</tr>
<tr>
<th>CC</th>
<td>blitzrakete@gmail.com, erik.pilkington@gmail.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
</td>
</tr></table>
<p>
<div>
<pre>Hi clang-team,
(maybe you find a better summary)
the following code ICEs
```c++
#include <vector>
namespace ranges {
template <bool> struct if_then { template <typename T> using apply = T; };
template <typename I> char is_std_iterator_traits_specialized_impl_(void *);
template <typename I>
inline constexpr bool is_std_iterator_traits_specialized_v = 1 ==
sizeof(is_std_iterator_traits_specialized_impl_<I>(static_cast<std::iterator_traits<I>
*>(nullptr)));
} // namespace ranges
namespace concepts {
template <typename T, typename U>
using common_reference_t = decltype(true ? std::declval<T &>() : std::declval<T
&>());
template <typename T, typename U>
concept common_reference_with = requires()
{
typename common_reference_t<T, U>;
};
} // namespace concepts
namespace ranges {
template <typename R>
using iter_value_t = typename
if_then<is_std_iterator_traits_specialized_v<R>>::template
apply<std::iterator_traits<R>>::value_type;
template <typename T>
concept input_range = ::concepts::common_reference_with<char &,
iter_value_t<typename T::iterator> &>;
} // namespace ranges
namespace seqan3 {
template <typename rng_t>
concept sequence = ranges::input_range<rng_t> && std::is_same_v<rng_t,
std::vector<char>>;
template <typename type>
struct debug_stream_printer;
} // namespace seqan3
template <typename rng_t> concept any_type = true;
namespace seqan3 {
template <ranges::input_range rng_t>
requires any_type<rng_t>
struct debug_stream_printer<rng_t> {};
template <sequence sequence_t>
requires any_type<sequence_t>
struct debug_stream_printer<sequence_t> {};
} // namespace seqan3
int main()
{
seqan3::debug_stream_printer<std::vector<char>>{};
}
```
<a href="https://godbolt.org/z/fj9E73">https://godbolt.org/z/fj9E73</a>
with
<span class="quote">> clang++-git -std=c++2a ./ice.cpp</span >
This code is a reduction from code that uses the ranges-v3 library.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>