Run this code

    
    
    #include <forward_list>
    #include <list>
    #include <ranges>
    #include <set>
    #include <unordered_set>
     
    int main()
    {
        static_assert(
                std::ranges::bidirectional_range<[std::set](http://en.cppreference.com/w/cpp/container/set)<int>> and
            not std::ranges::bidirectional_range<[std::unordered_set](http://en.cppreference.com/w/cpp/container/unordered_set)<int>> and
                std::ranges::bidirectional_range<[std::list](http://en.cppreference.com/w/cpp/container/list)<int>> and
            not std::ranges::bidirectional_range<[std::forward_list](http://en.cppreference.com/w/cpp/container/forward_list)<int>>
        );
    }

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

[ ranges::forward_range  ](/w/cpp/ranges/forward_range "cpp/ranges/forward range") (C++20)  |  specifies a range whose iterator type satisfies [ ` forward_iterator ` ](/w/cpp/iterator/forward_iterator "cpp/iterator/forward iterator")   
(concept)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/ranges/dsc_forward_range&action=edit)  
---|---  
[ ranges::random_access_range  ](/w/cpp/ranges/random_access_range "cpp/ranges/random access range") (C++20)  |  specifies a range whose iterator type satisfies [ ` random_access_iterator ` ](/w/cpp/iterator/random_access_iterator "cpp/iterator/random access iterator")   
(concept)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/ranges/dsc_random_access_range&action=edit)  
  
Retrieved from " [
https://en.cppreference.com/mwiki/index.php?title=cpp/ranges/bidirectional_range&oldid=151098
](https://en.cppreference.com/mwiki/index.php?title=cpp/ranges/bidirectional_range&oldid=151098)
"

#####  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/bidirectional_range "A list of all wiki pages that link here \[j\]")
  * [ Related changes ](/w/Special:RecentChangesLinked/cpp/ranges/bidirectional_range "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/bidirectional_range&printable=yes "Printable version of this page \[p\]")
  * [ Permanent link ](/mwiki/index.php?title=cpp/ranges/bidirectional_range&oldid=151098 "Permanent link to this revision of the page")
  * [ Page information ](/mwiki/index.php?title=cpp/ranges/bidirectional_range&action=info)

  * In other languages 

  * [ Español ](http://es.cppreference.com/w/cpp/ranges/bidirectional_range "cpp/ranges/bidirectional range")
  * [ 日本語 ](http://ja.cppreference.com/w/cpp/ranges/bidirectional_range "cpp/ranges/bidirectional range")
  * [ 中文 ](http://zh.cppreference.com/w/cpp/ranges/bidirectional_range "cpp/ranges/bidirectional range")

  * This page was last modified on 27 April 2023, at 14:52. 
  * This page has been accessed 17,852 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/