[std::vector](http://en.cppreference.com/w/cpp/container/vector) vec{3, 1, 4};
        int arr[]{5, 10, 15};
     
        [assert](http://en.cppreference.com/w/cpp/error/assert)(std::[ranges::find](http://en.cppreference.com/w/cpp/algorithm/ranges/find)(vec, 5) == std::[ranges::cend](http://en.cppreference.com/w/cpp/ranges-ranges-placeholder/cend)(vec));
        [assert](http://en.cppreference.com/w/cpp/error/assert)(std::[ranges::find](http://en.cppreference.com/w/cpp/algorithm/ranges/find)(arr, 5) != std::[ranges::cend](http://en.cppreference.com/w/cpp/ranges-ranges-placeholder/cend)(arr));
    }

###  [ [ edit ](/mwiki/index.php?title=cpp/ranges/cend&action=edit&section=2
"Edit section: See also") ]  See also

[ ranges::end  ](/w/cpp/ranges/end "cpp/ranges/end") (C++20)  |  returns a sentinel indicating the end of a range   
(customization point object)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/ranges/dsc_end&action=edit)  
---|---  
[ end  cend  ](/w/cpp/iterator/end "cpp/iterator/end") (C++11)  (C++14)  |  returns an iterator to the end of a container or array   
(function template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/iterator/dsc_end&action=edit)  
  
Retrieved from " [
https://en.cppreference.com/mwiki/index.php?title=cpp/ranges/cend&oldid=158241
](https://en.cppreference.com/mwiki/index.php?title=cpp/ranges/cend&oldid=158241)
"

#####  Navigation

  * [ Support us ](http://www.cppreference.com/support)
  * [ Recent changes ](/w/Special:RecentChanges "A list of recent changes in the wiki \[r\]")
  * [ FAQ ](/w/Cppreference:FAQ)
  * [ Offline version ](/w/Cppreference:Archives)

#####  Toolbox

  * [ What links here ](/w/Special:WhatLinksHere/cpp/ranges/cend "A list of all wiki pages that link here \[j\]")
  * [ Related changes ](/w/Special:RecentChangesLinked/cpp/ranges/cend "Recent changes in pages linked from this page \[k\]")
  * [ Upload file ](http://upload.cppreference.com/w/Special:Upload "Upload files \[u\]")
  * [ Special pages ](/w/Special:SpecialPages "A list of all special pages \[q\]")
  * [ Printable version ](/mwiki/index.php?title=cpp/ranges/cend&printable=yes "Printable version of this page \[p\]")
  * [ Permanent link ](/mwiki/index.php?title=cpp/ranges/cend&oldid=158241 "Permanent link to this revision of the page")
  * [ Page information ](/mwiki/index.php?title=cpp/ranges/cend&action=info)

  * In other languages 

  * [ Deutsch ](http://de.cppreference.com/w/cpp/ranges/cend "cpp/ranges/cend")
  * [ Español ](http://es.cppreference.com/w/cpp/ranges/cend "cpp/ranges/cend")
  * [ 日本語 ](http://ja.cppreference.com/w/cpp/ranges/cend "cpp/ranges/cend")
  * [ Русский ](http://ru.cppreference.com/w/cpp/ranges/cend "cpp/ranges/cend")
  * [ 中文 ](http://zh.cppreference.com/w/cpp/ranges/cend "cpp/ranges/cend")

  * This page was last modified on 8 September 2023, at 10:29. 
  * This page has been accessed 11,864 times. 

  * [ Privacy policy ](/w/Cppreference:Privacy_policy "Cppreference:Privacy policy")
  * [ About cppreference.com ](/w/Cppreference:About "Cppreference:About")
  * [ Disclaimers ](/w/Cppreference:General_disclaimer "Cppreference:General disclaimer")

  * [ ![Powered by MediaWiki](/mwiki/skins/common/images/poweredby_mediawiki_88x31.png) ](//www.mediawiki.org/) [ ![Powered by GeSHi](//upload.cppreference.com/mwiki/images/2/2b/powered_by_geshi_88x31.png) ](http://qbnz.com/highlighter/) [ ![Hosted by Tiger Technologies](//upload.cppreference.com/mwiki/images/9/94/powered_by_tigertech_88x31.png) ](http://www.tigertech.net/referral/cppreference.com)