[std::quoted](http://en.cppreference.com/w/cpp/io/manip/quoted)(str) << '\n';
     
        std::ranges::single_view<[std::tuple](http://en.cppreference.com/w/cpp/utility/tuple)<int, double, [std::string](http://en.cppreference.com/w/cpp/string/basic_string)>>
            sv3{[std::in_place](http://en.cppreference.com/w/cpp/utility/in_place), 42, 3.14, "😄"}; // uses (std::in_place_t, Args&&... args)
     
        [std::cout](http://en.cppreference.com/w/cpp/io/cout) << "8)  sv3 holds a tuple: { "
                  << [std::get](http://en.cppreference.com/w/cpp/utility/variant/get)<0>(sv3[0]) << ", "
                  << [std::get](http://en.cppreference.com/w/cpp/utility/variant/get)<1>(sv3[0]) << ", "
                  << [std::get](http://en.cppreference.com/w/cpp/utility/variant/get)<2>(sv3[0]) << " }\n";
    }

Output:

    
    
    1) *sv1.data(): 3.1415
    2) *sv1.begin(): 3.1415
    3)  sv1.size(): 1
    4)  distance: 1
    5)  str = "C++20"
    6) *sv2.data(): "C++20"
    7)  str = ""
    8)  sv3 holds a tuple: { 42, 3.14, 😄 }

###  [ [ edit
](/mwiki/index.php?title=cpp/ranges/single_view&action=edit&section=6 "Edit
section: Defect reports") ]  Defect reports

The following behavior-changing defect reports were applied retroactively to
previously published C++ standards.

DR  |  Applied to  |  Behavior as published  |  Correct behavior   
---|---|---|---  
[ LWG 3428 ](https://cplusplus.github.io/LWG/issue3428) |  C++20  |  ` single_view ` was convertible from  [ std::in_place_t ](/w/cpp/utility/in_place "cpp/utility/in place") |  the constructor is made explicit   
[ P2367R0 ](https://wg21.link/P2367R0) |  C++20  |  deduction guides for ` single_view ` failed to decay the argument;   
` views::single ` copied but not wrapped a ` single_view ` |  a decaying guide provided;   
made always wrapping  
  
###  [ [ edit
](/mwiki/index.php?title=cpp/ranges/single_view&action=edit&section=7 "Edit
section: See also") ]  See also

[ ranges::empty_view  views::empty  ](/w/cpp/ranges/empty_view "cpp/ranges/empty view") (C++20)  |  an empty [ ` view ` ](/w/cpp/ranges/view "cpp/ranges/view") with no elements   
(class template)  (variable template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/ranges/dsc_empty_view&action=edit)  
---|---  
[ ranges::split_view  views::split  ](/w/cpp/ranges/split_view "cpp/ranges/split view") (C++20)  |  a [ ` view ` ](/w/cpp/ranges/view "cpp/ranges/view") over the subranges obtained from splitting another [ ` view ` ](/w/cpp/ranges/view "cpp/ranges/view") using a delimiter   
(class template)  (range adaptor object)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/ranges/dsc_split_view&action=edit)  
  
Retrieved from " [
https://en.cppreference.com/mwiki/index.php?title=cpp/ranges/single_view&oldid=168759
](https://en.cppreference.com/mwiki/index.php?title=cpp/ranges/single_view&oldid=168759)
"

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

  * In other languages 

  *