nclude <ranges>
    #include <span>
    #include <stack>
    #include <tuple>
     
    const char* str{"not a forward range"};
    const char str2[] = "a forward range";
    static_assert(
        std::ranges::forward_range<decltype("a forward range")> &&
        !std::ranges::forward_range<decltype(str)> &&
        std::ranges::forward_range<decltype(str2)> &&
        !std::ranges::forward_range<[std::stack](http://en.cppreference.com/w/cpp/container/stack)<char>> &&
        std::ranges::forward_range<[std::forward_list](http://en.cppreference.com/w/cpp/container/forward_list)<char>> &&
        !std::ranges::forward_range<[std::tuple](http://en.cppreference.com/w/cpp/utility/tuple)<[std::forward_list](http://en.cppreference.com/w/cpp/container/forward_list)<char>>> &&
        std::ranges::forward_range<[std::span](http://en.cppreference.com/w/cpp/container/span)<char>> &&
        !std::ranges::forward_range<[std::queue](http://en.cppreference.com/w/cpp/container/queue)<char>> &&
    "");
     
    int main() {}

Retrieved from " [
https://en.cppreference.com/mwiki/index.php?title=cpp/ranges/forward_range&oldid=169774
](https://en.cppreference.com/mwiki/index.php?title=cpp/ranges/forward_range&oldid=169774)
"

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

  * In other languages 

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

  * This page was last modified on 12 February 2024, at 16:22. 
  * This page has been accessed 25,107 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)