C++17: Class template argument deduction (#131)

* C++17: Class template argument deduction

Fixed the user-defined deduction guide.

* Update README
This commit is contained in:
Kevin Strobel
2023-10-25 22:24:53 +02:00
committed by GitHub
parent 7afc4981c1
commit 1284ccd3cf
2 changed files with 2 additions and 2 deletions

View File

@@ -383,7 +383,7 @@ struct container {
};
// deduction guide
template <template Iter>
template <typename Iter>
container(Iter b, Iter e) -> container<typename std::iterator_traits<Iter>::value_type>;
container a{ 7 }; // OK: deduces container<int>