111
|
1 // { dg-options -std=c++17 }
|
|
2
|
|
3 #include <vector>
|
|
4
|
|
5 template<class T> struct container {
|
|
6 container(T t) {}
|
|
7 template<class Iter> container(Iter beg, Iter end);
|
|
8 };
|
|
9 template<class Iter>
|
|
10 container(Iter b, Iter e) // { dg-message "iterator_traits.int" }
|
|
11 -> container<typename std::iterator_traits<Iter>::value_type>;
|
|
12 std::vector<double> v = { /* ... */ };
|
|
13 container c(7); // OK, deduces int for T
|
|
14 auto d = container(v.begin(), v.end()); // OK, deduces double for T
|
|
15 container e{5, 6}; // { dg-error "" } int is not an iterator
|