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

Added DMLC_DECLARE_TRAITS(is_pod, int8_t, true); #26

Merged
merged 1 commit into from
Jul 17, 2015

Conversation

rodrigob
Copy link
Contributor

Fixes compilation on g++-4.8 and clang++-3.5.

Fixes compilation on g++-4.8 and clang++-3.5.
@tqchen
Copy link
Member

tqchen commented Jul 17, 2015

Please also remove the line for int8_t since I guess char will be more often used, and seems MSVC indeed use char for int8_t

@rodrigob
Copy link
Contributor Author

This is exactly what I was worried about. Simply adding "char" is a not a cross-platform solution, as would be simply removing int8_t. We should make this compiler dependent, or have a good way to detect (at compilation time) of char == int8_t.

@tqchen
Copy link
Member

tqchen commented Jul 17, 2015

Alright, I think it is fine anyway, since traits is only needed for non c++11 compile mode, and MSVC is by default c++11 and this section will not be enabled. I will merge it in for now.

Thanks!

@tqchen
Copy link
Member

tqchen commented Jul 17, 2015

We can remove int8_t for now since it is not usually used in most cases. In common case(c++11 enabled) the library will always compile correctly

tqchen added a commit that referenced this pull request Jul 17, 2015
Added DMLC_DECLARE_TRAITS(is_pod, int8_t, true);
@tqchen tqchen merged commit 35f7179 into dmlc:master Jul 17, 2015
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

Successfully merging this pull request may close these issues.

2 participants