Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6198839
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T04:05:01+00:00 2026-05-24T04:05:01+00:00

Are the non-member function templates begin(container) and end(container) part of C++0x? If so, in

  • 0

Are the non-member function templates begin(container) and end(container) part of C++0x? If so, in which header file do they live?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T04:05:02+00:00Added an answer on May 24, 2026 at 4:05 am

    Yes, but just as swap is defined in different places and depends on ADL, so are begin and end. The ‘generic’ versions are defined in <iterator>:

    // 24.6.5, range access:
    template <class C> auto begin(C& c) -> decltype(c.begin());
    template <class C> auto begin(const C& c) -> decltype(c.begin());
    template <class C> auto end(C& c) -> decltype(c.end());
    template <class C> auto end(const C& c) -> decltype(c.end());
    template <class T, size_t N> T* begin(T (&array)[N]);
    template <class T, size_t N> T* end(T (&array)[N]);
    

    Note also that 24.6.5 says:

    In addition to being available via inclusion of the <iterator> header, the function templates in 24.6.5 are available when any of the following headers are included: <array>, <deque>, <forward_list>, <list>, <map>, <regex>, <set>, <string>, <unordered_map>, <unordered_set>, and <vector>.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If I define a non-member function in a header, will it always be inlined
I'm trying to write non-member operator function templates like: #include <utility> template < typename
What's the best way to connect a GTK+ signal to a non-static member function?
Possible Duplicate: CakePHP: Call to a member function find() on a non-object I have
I met a problem when Call to a member function combinestring() on a non-object.
I'm getting a Call to a member function fetchColumn() on a non-object error when
C++0x thread library or Boost.thread define non-member variadic template function that lock all lock
C++0x thread library or Boost.thread define a non-member variadic template function that locks all
I'm trying to use partial template specialization on a (non-member) function, and I'm tripping
I want to call a member function which is virtual (inheritance is used in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.