Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
  • This project
    • Loading...
  • Sign in / Register
R
riscv-gcc-1
  • Overview
    • Overview
    • Details
    • Activity
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 0
    • Issues 0
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • lvzhengyang
  • riscv-gcc-1
  • Repository

Switch branch/tag
  • riscv-gcc-1
  • libstdc++-v3
  • testsuite
  • 25_algorithms
  • shift_right
  • 1.cc
Find file
BlameHistoryPermalink
  • Patrick Palka's avatar
    libstdc++: P0769R2 Add shift to <algorithm> · c5eab4ed
    This patch adds std::shift_left and std::shift_right as per P0769R2.  Alhough
    these are STL-style algos, this patch places them in <bits/ranges_algo.h>
    because they make use of some functions in the ranges namespace that are more
    easily reachable from <bits/ranges_algo.h> than from <bits/stl_algo.h>, namely
    ranges::next.  In order to place these algos in <bits/stl_algo.h>, we would need
    to include <bits/range_access.h> from <bits/stl_algo.h> which would undesirably
    increase the size of <bits/stl_algo.h>.
    
    libstdc++-v3/ChangeLog:
    
    	P0769R2 Add shift to <algorithm>
    	* include/bits/ranges_algo.h (shift_left, shift_right): New.
    	* testsuite/25_algorithms/shift_left/1.cc: New test.
    	* testsuite/25_algorithms/shift_right/1.cc: New test.
    Patrick Palka committed Feb 24, 2020
    c5eab4ed
1.cc 2.41 KB
Edit