主要是这几个错误
/usr/include/c++/11/bits/uniform_int_dist.h:284:71: error: call to non-‘constexpr’ function ‘static uint64_t omp::XoroShiro128Plus::min()’ 284 | constexpr __uctype __urngmin = _UniformRandomBitGenerator::min();
/usr/include/c++/11/bits/uniform_int_dist.h:285:71: error: call to non-‘constexpr’ function ‘static uint64_t omp::XoroShiro128Plus::max()’ 285 | constexpr __uctype __urngmax = _UniformRandomBitGenerator::max();
/usr/include/c++/11/bits/uniform_int_dist.h:286:34: error: non-constant condition for static assertion
286 | static_assert( __urngmin < __urngmax,
下面是完整信息
g++ -O3 -std=c++11 -Wall -Wpedantic -pthread -c -o omp/CombinedRange.o omp/CombinedRange.cpp
In file included from /usr/include/c++/11/bits/stl_algo.h:66,
from /usr/include/c++/11/algorithm:62,
from omp/CombinedRange.cpp:4:
/usr/include/c++/11/bits/uniform_int_dist.h: In instantiation of ‘std::uniform_int_distribution<_IntType>::result_type std::uniform_int_distribution<_IntType>::operator()(_UniformRandomBitGenerator&, const std::uniform_int_distribution<_IntType>::param_type&) [with _UniformRandomBitGenerator = omp::XoroShiro128Plus; _IntType = long unsigned int; std::uniform_int_distribution<_IntType>::result_type = long unsigned int]’:
/usr/include/c++/11/bits/stl_algo.h:3791:35: required from ‘void std::shuffle(_RAIter, _RAIter, _UGenerator&&) [with _RAIter = __gnu_cxx::__normal_iterator<omp::CombinedRange::Combo*, std::vector<omp::CombinedRange::Combo, omp::AlignedAllocatoromp::CombinedRange::Combo > >; _UGenerator = omp::XoroShiro128Plus&]’
omp/CombinedRange.cpp:101:17: required from here
/usr/include/c++/11/bits/uniform_int_dist.h:284:71: error: call to non-‘constexpr’ function ‘static uint64_t omp::XoroShiro128Plus::min()’
284 | constexpr __uctype __urngmin = _UniformRandomBitGenerator::min();
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
In file included from omp/CombinedRange.cpp:3:
omp/Random.h:32:21: note: ‘static uint64_t omp::XoroShiro128Plus::min()’ declared here
32 | static uint64_t min()
| ^
In file included from /usr/include/c++/11/bits/stl_algo.h:66,
from /usr/include/c++/11/algorithm:62,
from omp/CombinedRange.cpp:4:
/usr/include/c++/11/bits/uniform_int_dist.h:285:71: error: call to non-‘constexpr’ function ‘static uint64_t omp::XoroShiro128Plus::max()’
285 | constexpr __uctype __urngmax = _UniformRandomBitGenerator::max();
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
In file included from omp/CombinedRange.cpp:3:
omp/Random.h:37:21: note: ‘static uint64_t omp::XoroShiro128Plus::max()’ declared here
37 | static uint64_t max()
| ^
In file included from /usr/include/c++/11/bits/stl_algo.h:66,
from /usr/include/c++/11/algorithm:62,
from omp/CombinedRange.cpp:4:
/usr/include/c++/11/bits/uniform_int_dist.h:286:34: error: non-constant condition for static assertion
286 | static_assert( __urngmin < __urngmax,
| ~~~~~~^~~~~~~~~
make: *** [<builtin>: omp/CombinedRange.o] Error 1
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.