#####  [ cppreference.com ](/)

[ Log in
](/mwiki/index.php?title=Special:UserLogin&returnto=cpp%2Falgorithm%2Franges%2Fsort
"You are encouraged to log in; however, it is not mandatory \[o\]")

#####  Namespaces

  * [ Page ](/w/cpp/algorithm/ranges/sort "View the content page \[c\]")
  * [ Discussion ](/mwiki/index.php?title=Talk:cpp/algorithm/ranges/sort&action=edit&redlink=1 "Discussion about the content page \[t\]")

#####  Variants

#####  Views

  * [ View ](/w/cpp/algorithm/ranges/sort)
  * [ Edit ](/mwiki/index.php?title=cpp/algorithm/ranges/sort&action=edit "You can edit this page. Please use the preview button before saving \[e\]")
  * [ History ](/mwiki/index.php?title=cpp/algorithm/ranges/sort&action=history "Past revisions of this page \[h\]")

#####  Actions

#  std::ranges::  sort

From cppreference.com

< [ cpp ](/w/cpp "cpp") ‎ | [ algorithm ](/w/cpp/algorithm "cpp/algorithm") ‎ | [ ranges ](/w/cpp/algorithm/ranges "cpp/algorithm/ranges")

[ C++ ](/w/cpp "cpp")

[ Compiler support ](/w/cpp/compiler_support "cpp/compiler support")  
---  
[ Freestanding and hosted ](/w/cpp/freestanding "cpp/freestanding")  
[ Language ](/w/cpp/language "cpp/language")  
[ Standard library ](/w/cpp/standard_library "cpp/standard library")  
[ Standard library headers ](/w/cpp/header "cpp/header")  
[ Named requirements ](/w/cpp/named_req "cpp/named req")  
[ Feature test macros ](/w/cpp/feature_test "cpp/feature test") (C++20)  
[ Language support library ](/w/cpp/utility#Language_support "cpp/utility")  
[ Concepts library ](/w/cpp/concepts "cpp/concepts") (C++20)  
[ Metaprogramming library ](/w/cpp/meta "cpp/meta") (C++11)  
[ Diagnostics library ](/w/cpp/error "cpp/error")  
[ General utilities library ](/w/cpp/utility "cpp/utility")  
[ Strings library ](/w/cpp/string "cpp/string")  
[ Containers library ](/w/cpp/container "cpp/container")  
[ Iterators library ](/w/cpp/iterator "cpp/iterator")  
[ Ranges library ](/w/cpp/ranges "cpp/ranges") (C++20)  
[ Algorithms library ](/w/cpp/algorithm "cpp/algorithm")  
[ Numerics library ](/w/cpp/numeric "cpp/numeric")  
[ Localizations library ](/w/cpp/locale "cpp/locale")  
[ Input/output library ](/w/cpp/io "cpp/io")  
[ Filesystem library ](/w/cpp/filesystem "cpp/filesystem") (C++17)  
[ Regular expressions library ](/w/cpp/regex "cpp/regex") (C++11)  
[ Concurrency support library ](/w/cpp/thread "cpp/thread") (C++11)  
[ Technical specifications ](/w/cpp/experimental "cpp/experimental")  
[ Symbols index ](/w/cpp/symbol_index "cpp/symbol index")  
[ External libraries ](/w/cpp/links/libs "cpp/links/libs")  
  
[ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/navbar_content&action=edit)

[ Algorithm library ](/w/cpp/algorithm "cpp/algorithm")

[ Constrained algorithms and algorithms on ranges ](/w/cpp/algorithm/ranges
"cpp/algorithm/ranges") (C++20)  
---  
Constrained algorithms, e.g. [ ` ranges::copy ` ](/w/cpp/algorithm/ranges/copy
"cpp/algorithm/ranges/copy") , **` ranges::sort ` ** , ...  
[ Execution policies  (C++17)  ](/w/cpp/algorithm#Execution_policies
"cpp/algorithm")  
|  |  [ is_execution_policy  ](/w/cpp/algorithm/is_execution_policy "cpp/algorithm/is execution policy") (C++17)   
---  
  
|  [ execution::seq  execution::par  execution::par_unseq  execution::unseq
](/w/cpp/algorithm/execution_policy_tag "cpp/algorithm/execution policy tag")
(C++17)  (C++17)  (C++17)  (C++20)  
---  
  
|  |  [ execution::sequenced_policy  execution::parallel_policy  execution::parallel_unsequenced_policy  execution::parallel_unsequenced  ](/w/cpp/algorithm/execution_policy_tag_t "cpp/algorithm/execution policy tag t") (C++17)  (C++17)  (C++17)  (C++20)   
---  
  
|  [ Non-modifying sequence operations ](/w/cpp/algorithm#Non-
modifying_sequence_operations "cpp/algorithm")  
---  
[ Batch operations ](/w/cpp/algorithm#Batch_operations "cpp/algorithm")  
|  [ for_each  ](/w/cpp/algorithm/for_each "cpp/algorithm/for each")  
---  
  
|  [ for_each_n  ](/w/cpp