RainerKuemmerle / g2o

g2o: A General Framework for Graph Optimization
3.08k stars 1.11k forks source link

Compilation fails: static assertion failed due to requirement 'is_unsigned<int>::value' #838

Open yurivict opened 1 week ago

yurivict commented 1 week ago
In file included from /wrkdirs/usr/ports/math/g2o/work/g2o-20230806_git/g2o/examples/sphere/create_sphere.cpp:35:
In file included from /wrkdirs/usr/ports/math/g2o/work/g2o-20230806_git/g2o/stuff/sampler.h:36:
In file included from /usr/include/c++/v1/random:1707:
/usr/include/c++/v1/__random/seed_seq.h:84:17: error: static assertion failed due to requirement 'is_unsigned<int>::value': [rand.util.seedseq]/7 requires the value_type of the iterator to be an unsigned integer capable of accommodating 32-bit quantities.
   84 |   static_assert(is_unsigned<_ValueType>::value && sizeof(_ValueType) >= sizeof(uint32_t),
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/wrkdirs/usr/ports/math/g2o/work/g2o-20230806_git/g2o/examples/sphere/create_sphere.cpp:165:13: note: in instantiation of function template specialization 'std::seed_seq::generate<std::__wrap_iter<int *>>' requested here
  165 |     seedSeq.generate(seeds.begin(), seeds.end());
      |             ^
1 error generated.

log

clang-18 Version: 20230806 FreeBSD 14.1

wangzheqie commented 1 week ago

这是来自QQ邮箱的自动回复邮件。你好,我已经收到你的邮件,尽快处理。

RainerKuemmerle commented 5 days ago

@yurivict This might already be fixed on master. As I do not have a FreeBSD machine running currently, would be great if you could build the master branch. Thank you.

https://github.com/RainerKuemmerle/g2o/blob/master/g2o/examples/sphere/create_sphere.cpp#L164