lundi 12 décembre 2016

g++ random generator fails due to internal error

I am trying to compile a code utilising C++ RNG and PRNG. However, it fails to compile because of this:

/usr/include/c++/6/bits/uniform_int_dist.h: In instantiation of ‘std::uniform_int_distribution<_IntType>::result_type std::uniform_int_distribution<_IntType>::operator()(_UniformRandomNumberGenerator&, const std::uniform_int_distribution<_IntType>::param_type&) [with _UniformRandomNumberGenerator = long int() throw (); _IntType = int; std::uniform_int_distribution<_IntType>::result_type = int]’:
/usr/include/c++/6/bits/uniform_int_dist.h:165:51:   required from ‘std::uniform_int_distribution<_IntType>::result_type std::uniform_int_distribution<_IntType>::operator()(_UniformRandomNumberGenerator&) [with _UniformRandomNumberGenerator = long int() throw (); _IntType = int; std::uniform_int_distribution<_IntType>::result_type = int]’
8vezir.c++:43:37:   required from here
/usr/include/c++/6/bits/uniform_int_dist.h:222:4: error: ‘long int() throw ()’ is not a class, struct, or union type
    _Gresult_type;
    ^~~~~~~~~~~~~
/usr/include/c++/6/bits/uniform_int_dist.h:225:4: error: ‘long int() throw ()’ is not a class, struct, or union type
    __uctype;
    ^~~~~~~~

Tried in GCC 6.2. Is it a GCC bug?




Aucun commentaire:

Enregistrer un commentaire