View Issue Details

IDProjectCategoryView StatusLast Update
0032909Open CASCADEOCCT:Codingpublic2023-03-19 23:19
ReporterddzamaAssigned Toddzama 
PrioritynormalSeverityminor 
Status closedResolutionfixed 
PlatformWindowsOSVC++ 2019 
Product Version7.6.0 
Target Version7.7.0Fixed in Version7.6.3 
Summary0032909: Coding Rules - replace (removed from C++17) `std::random_shuffle` with `std::shuffle` for random permutation algorithm
DescriptionSince C++17 the accessible version of permutation function left the function:
    
    template< class RandomIt, class URBG >
    void shuffle( RandomIt first, RandomIt last, URBG&& g );
    
    See details and example of use: https://en.cppreference.com/w/cpp/algorithm/random_shuffle
TagsNo tags attached.
Test case numberNot required

Relationships

child of 0032887 assignedddzama Open CASCADE Coding - Problem of compilation on VS2019/C++20 

Activities

git

2022-04-05 10:58

administrator   ~0107631

Branch CR32909 has been created by ddzama.

SHA-1: 215da479d1d950cf29568506bf79ab46e7d98a1d


Detailed log of new commits:

Author: Dmitry DZAMA
Date: Wed Mar 30 12:30:01 2022 +0300

    0032909: Replace (removed from C++17) `std::random_shuffle` with `std::shuffle` for random permutation algorithm
    
    Since C++17 the accessible version of permutation function left the function:
    
    template< class RandomIt, class URBG >
    void shuffle( RandomIt first, RandomIt last, URBG&& g );
    
    See details and example of use: https://en.cppreference.com/w/cpp/algorithm/random_shuffle

git

2022-04-07 14:29

administrator   ~0107689

Branch CR32909 has been updated forcibly by ddzama.

SHA-1: 2cb46b39f32f4070f0f5137e1a19abfb4393e00a

git

2022-04-07 14:38

administrator   ~0107699

Branch CR32909 has been updated forcibly by ddzama.

SHA-1: 385cbf564871fb150d287cad5819cd304fd37d59

git

2022-04-07 15:16

administrator   ~0107715

Branch CR32909 has been updated forcibly by ddzama.

SHA-1: d2c9b387ff79c944fd4f5ca361f377e2b82c1245

kgv

2022-04-08 18:26

developer   ~0107770

Please raise the patch if it compiles on older supported compilers.

smoskvin

2022-04-09 09:51

administrator   ~0107797

Combination -
OCCT branch : IR-2022-04-08
master SHA - 7021de2fe7a69d4c788ccf43b8b096dbcc8597c8
49e51745631c52b6c452c65adae4d6dfa21a1b1e
Products branch : IR-2022-04-08 SHA - e16d959d441765c483049307ba7293173532103a
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.

Number of compiler warnings:
No new/fixed warnings

Regressions/Differences/Improvements:
No regressions/differences

CPU differences:
Debian80-64:
OCCT
Total CPU difference: 18452.87000000039 / 18490.94000000032 [-0.21%]
Products
Total CPU difference: 11761.310000000152 / 11719.920000000124 [+0.35%]
Windows-64-VC14:
OCCT
Total CPU difference: 20539.828125 / 20552.71875 [-0.06%]
Products
Total CPU difference: 13248.21875 / 13242.609375 [+0.04%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention

git

2023-01-21 21:09

administrator   ~0112951

Branch CR32909 has been deleted by vglukhik.

SHA-1: d2c9b387ff79c944fd4f5ca361f377e2b82c1245

Related Changesets

occt: master 7021de2f

2022-03-30 12:30:01

ddzama


Committer: smoskvin Details Diff
0032909: Coding Rules - replace (removed from C++17) `std::random_shuffle` with `std::shuffle` for random permutation algorithm

Since C++17 the accessible version of permutation function left the function:

template< class RandomIt, class URBG >
void shuffle( RandomIt first, RandomIt last, URBG&& g );

See details and example of use: https://en.cppreference.com/w/cpp/algorithm/random_shuffle
Affected Issues
0032909
mod - src/QANCollection/QANCollection_Stl.cxx Diff File

Issue History

Date Modified Username Field Change
2022-04-05 10:51 ddzama New Issue
2022-04-05 10:51 ddzama Assigned To => ddzama
2022-04-05 10:51 ddzama Relationship added parent of 0032908
2022-04-05 10:52 ddzama Relationship added child of 0032887
2022-04-05 10:58 git Note Added: 0107631
2022-04-05 11:03 ddzama Relationship added child of 0032910
2022-04-05 11:04 ddzama Relationship deleted child of 0032887
2022-04-07 12:27 kgv Relationship added child of 0032887
2022-04-07 12:27 kgv Product Version 7.7.0 => 7.6.0
2022-04-07 12:27 kgv Summary Replace (removed from C++17) `std::random_shuffle` with `std::shuffle` for random permutation algorithm => Coding Rules - replace (removed from C++17) `std::random_shuffle` with `std::shuffle` for random permutation algorithm
2022-04-07 12:28 kgv Relationship deleted child of 0032910
2022-04-07 12:28 kgv Relationship deleted parent of 0032908
2022-04-07 14:29 git Note Added: 0107689
2022-04-07 14:38 git Note Added: 0107699
2022-04-07 14:51 ddzama Relationship deleted child of 0032887
2022-04-07 14:53 ddzama Relationship added child of 0032887
2022-04-07 15:16 git Note Added: 0107715
2022-04-08 18:26 kgv Assigned To ddzama => bugmaster
2022-04-08 18:26 kgv Status new => resolved
2022-04-08 18:26 kgv Note Added: 0107770
2022-04-08 18:26 kgv Status resolved => reviewed
2022-04-09 09:51 smoskvin Status reviewed => tested
2022-04-09 09:51 smoskvin Note Added: 0107797
2022-04-09 09:54 smoskvin Test case number => Not required
2022-04-10 10:42 smoskvin Changeset attached => occt master 7021de2f
2022-04-10 10:42 ddzama Assigned To bugmaster => ddzama
2022-04-10 10:42 ddzama Status tested => verified
2022-04-10 10:42 ddzama Resolution open => fixed
2023-01-21 21:09 git Note Added: 0112951
2023-03-19 23:19 vglukhik Status verified => closed
2023-03-19 23:19 vglukhik Fixed in Version => 7.6.3