alibaba / graph-learn

An Industrial Graph Neural Network Framework
Apache License 2.0
1.28k stars 267 forks source link

use std::shuffle to replace std::random_shuffle #245

Closed siyuan0322 closed 1 year ago

siyuan0322 commented 1 year ago

Cannot built on mac with c++17 enabled, under latest LLVM release.

/Users/siyuan/CLionProjects/graphscope/learning_engine/graph-learn/graphlearn/src/common/threading/lockfree/lockfree_stack.h:70:8: error: no member named 'random_shuffle' in namespace 'std'
  std::random_shuffle(index.begin(), index.end());
  ~~~~~^

std::random_shuffle was deprecated in c++14 and deleted in c++17, use std::shuffle to replace it.

ref: https://en.cppreference.com/w/cpp/algorithm/random_shuffle