On the latest master commit running poc03_arrayrefs.nim using
nim r --cc:vcc --backend:cpp --gc:arc --experimental:views poc03_arrayrefs.nim
fails in the c++ compiler with the following error message:
C:\Users\hugog\nimcache\poc03_arrayrefs_d\@mpoc03_arrayrefs.nim.cpp(263): error C2440: '=': cannot convert from 'const T *' to 'NI64 *'
with
[
T=int64_t
]
C:\Users\hugog\nimcache\poc03_arrayrefs_d\@mpoc03_arrayrefs.nim.cpp(263): note: Conversion loses qualifiers
C:\Users\hugog\nimcache\poc03_arrayrefs_d\@mpoc03_arrayrefs.nim.cpp(282): error C2440: '=': cannot convert from 'const T *' to 'NI64 *'
with
[
T=int64_t
]
C:\Users\hugog\nimcache\poc03_arrayrefs_d\@mpoc03_arrayrefs.nim.cpp(282): note: Conversion loses qualifiers
To me, it looks like perhaps the compiler can't convert between NI64* and int64_t*.
Edit: Or it probably has something to do with const. Is it because T4_ is initialized that it complains? Tried adding noInit everywhere I could but it still initialized it to 0 on the line above :/ Otherwise we could go around this by using const_cast from C++ somehow.
On the latest master commit running
poc03_arrayrefs.nim
usingnim r --cc:vcc --backend:cpp --gc:arc --experimental:views poc03_arrayrefs.nim
fails in the c++ compiler with the following error message:Lines 262 and 263 are:
And they are generated from line 7 in the nim file:
The definitions of
sizes
anddata
is:To me, it looks like perhaps the compiler can't convert between
NI64*
andint64_t*
. Edit: Or it probably has something to do withconst
. Is it becauseT4_
is initialized that it complains? Tried addingnoInit
everywhere I could but it still initialized it to 0 on the line above :/ Otherwise we could go around this by usingconst_cast
from C++ somehow.