allendaicool / thrust

Automatically exported from code.google.com/p/thrust
Apache License 2.0
0 stars 0 forks source link

error: `&' cannot appear in a constant-expression #103

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
repros on schwanz

/usr/local/cuda/bin/../include/thrust/random/subtract_with_carry_engine.h:58:
error: `&' cannot appear in a constant-expression
In file included from random.cu:878:
/usr/local/cuda/bin/../include/thrust/random/linear_congruential_engine.h:
In static member function 'static void
thrust::random::detail::linear_congruential_engine_discard<unsigned int,
0ull>::discard(LinearCongruentialEngine&, long long unsigned int) [with
LinearCongruentialEngine =
thrust::random::linear_congruential_engine<unsigned int, 48271u, 0u,
2147483647u>]':
/usr/local/cuda/bin/../include/thrust/random/detail/linear_congruential_engine.i
nl:62:
  instantiated from 'void
thrust::random::linear_congruential_engine<UIntType, a, c, m>::discard(long
long unsigned int) [with UIntType = unsigned int, UIntType a = 48271u,
UIntType c = 0u, UIntType m = 2147483647u]'
random.cu:288:   instantiated from 'void TestEngineSaveRestore() [with
Engine = thrust::random::linear_congruential_engine<unsigned int, 48271u,
0u, 2147483647u>]'
random.cu:487:   instantiated from here
/usr/local/cuda/bin/../include/thrust/random/linear_congruential_engine.h:68:
error: 'unsigned int thrust::random::linear_congruential_engine<unsigned
int, 48271u, 0u, 2147483647u>::m_x' is private
/usr/local/cuda/bin/../include/thrust/random/detail/linear_congruential_engine_d
iscard.h:107:
error: within this context
/usr/local/cuda/bin/../include/thrust/random/linear_congruential_engine.h:68:
error: 'unsigned int thrust::random::linear_congruential_engine<unsigned
int, 48271u, 0u, 2147483647u>::m_x' is private
/usr/local/cuda/bin/../include/thrust/random/detail/linear_congruential_engine_d
iscard.h:107:
error: within this context
/usr/local/cuda/bin/../include/thrust/random/linear_congruential_engine.h:
In static member function 'static void
thrust::random::detail::linear_congruential_engine_discard<unsigned int,
0ull>::discard(LinearCongruentialEngine&, long long unsigned int) [with
LinearCongruentialEngine =
thrust::random::linear_congruential_engine<unsigned int, 16807u, 0u,
2147483647u>]':
/usr/local/cuda/bin/../include/thrust/random/detail/linear_congruential_engine.i
nl:62:
  instantiated from 'void
thrust::random::linear_congruential_engine<UIntType, a, c, m>::discard(long
long unsigned int) [with UIntType = unsigned int, UIntType a = 16807u,
UIntType c = 0u, UIntType m = 2147483647u]'
random.cu:288:   instantiated from 'void TestEngineSaveRestore() [with
Engine = thrust::random::linear_congruential_engine<unsigned int, 16807u,
0u, 2147483647u>]'

Original issue reported on code.google.com by wnbell on 22 Feb 2010 at 10:25

GoogleCodeExporter commented 9 years ago
bump

Original comment by wnbell on 2 Mar 2010 at 12:24

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r847.

Original comment by jaredhoberock on 3 Mar 2010 at 12:21