view: improve template deduction guides
This commit is contained in:
parent
2ec9a7ebe6
commit
29702704fb
@ -157,7 +157,7 @@ namespace util::format {
|
||||
auto
|
||||
specifiers (void) const&
|
||||
{
|
||||
return util::make_view (m_specifiers);
|
||||
return util::view {m_specifiers};
|
||||
}
|
||||
|
||||
template <size_t Index>
|
||||
|
7
view.hpp
7
view.hpp
@ -426,6 +426,9 @@ namespace util {
|
||||
typename ContainerT::const_iterator
|
||||
>;
|
||||
|
||||
// base + count constructor
|
||||
template <typename BeginT>
|
||||
view (BeginT const &, size_t count) -> view<BeginT,BeginT>;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
@ -441,7 +444,7 @@ namespace util {
|
||||
auto
|
||||
make_view (ContainerT &t)
|
||||
{
|
||||
return util::view<decltype(std::begin (t))> { std::begin (t), std::end (t) };
|
||||
return util::view { std::begin (t), std::end (t) };
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
@ -449,7 +452,7 @@ namespace util {
|
||||
auto
|
||||
make_view (const ContainerT &t)
|
||||
{
|
||||
return util::view<decltype(std::cbegin (t))> { std::cbegin (t), std::cend (t) };
|
||||
return util::view { std::cbegin (t), std::cend (t) };
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user