Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: ‘value’ is not a member of ‘nix::to_data_type<long long unsigned int>’ #12

Open
jgrewe opened this issue Feb 18, 2015 · 5 comments
Assignees

Comments

@jgrewe
Copy link
Member

jgrewe commented Feb 18, 2015

nix_mx does not compile under linux, I get the following compile error:

/home/jan/projects/programming/nix-mx/include/utils/mkarray.h: In instantiation of ‘typename std::enable_if<std::is_arithmetic<_Tp>::value, mxArray_tag>::type* make_mx_array(T) [with T = long long unsigned int; typename std::enable_if<std::is_arithmetic<_Tp>::value, mxArray_tag>::type = mxArray_tag]’:
/home/jan/projects/programming/nix-mx/include/utils/struct.h:43:66:   required from ‘void struct_builder::set(mwIndex, int, T&&) [with T = long long unsigned int; mwIndex = long unsigned int]’
/home/jan/projects/programming/nix-mx/include/utils/struct.h:38:3:   required from ‘void struct_builder::set(int, T&&) [with T = long long unsigned int]’
/home/jan/projects/programming/nix-mx/include/utils/struct.h:28:3:   required from ‘void struct_builder::set(T&&) [with T = long long unsigned int]’
/home/jan/projects/programming/nix-mx/src/nixgen.cc:64:36:   required from here
/home/jan/projects/programming/nix-mx/include/utils/mkarray.h:59:58: error: ‘value’ is not a member of ‘nix::to_data_type<long long unsigned int>’
  DType2 dtype = dtype_nix2mex(nix::to_data_type<T>::value);
@jgrewe jgrewe self-assigned this Feb 18, 2015
@gicmo
Copy link
Member

gicmo commented Feb 18, 2015

It is SourceCount, which is ndsize_t(long long unsigned int) which should be 64bit unsigned, i.e. uint64_t (DataType.hpp line 161). What compiler + platform is that exactly?

@gicmo
Copy link
Member

gicmo commented Feb 18, 2015

Oh, and it is a nix bug, because to_data_type<T> is in nix. I guess we never do a to_data_type<ndsize_t> in nix?

@jgrewe
Copy link
Member Author

jgrewe commented Feb 18, 2015

Just did a static cast to mwSize, like it is done at other places in the wrapper

@jgrewe
Copy link
Member Author

jgrewe commented Feb 18, 2015

so it is ubuntu 64bit, g++ 4.82

@gicmo
Copy link
Member

gicmo commented Sep 19, 2015

This is indeed a NIX issue: G-Node/nix#486

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants