vendredi 29 décembre 2017

Wrap pattern std::begin; return begin(c); into a function

Is there a way to wrap the pattern into a general, template function?

template <typename C>
auto Begin(C&& c) -> ??? {
  using std::begin;
  return begin(std::forward<C>(c));
}

The question here is how to write the return type of the function here?

Aucun commentaire:

Enregistrer un commentaire