Difference between container.begin() and begin(container)?

My question is pretty straightforward, yet I wasn't able to find an answer in google.
Is there any difference between using container.begin() and begin(container)?

Thanks.
begin(container) is more generic: it works with C-style arrays, with std::valarray, and is expected to work with third-party types that provide it as the customization point. Range-for loop calls the non-member begin/end (if it can't find a member)
Last edited on
Topic archived. No new replies allowed.