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

fix compilation issues on VS2019 16.8.5 #122

Merged
merged 1 commit into from
Feb 22, 2021
Merged

fix compilation issues on VS2019 16.8.5 #122

merged 1 commit into from
Feb 22, 2021

Conversation

marzer
Copy link
Contributor

@marzer marzer commented Feb 21, 2021

Fixes two separate small issues:

  1. An implicit conversion in std::iota caused a warning on high warning levels (therefore an error when building with /WX)
  2. C-style typedefs of anonymous structs in mesh_attributes results in a hard error with /permissive-.

On an unrelated note, the definition for uint should be a typedef, not a macro, otherwise it can wreak havoc throughout the user's code if they happen to use that name (which was true in mine). I didn't attempt this fix because the scope of the impact is undoubtedly rather large, but since I assume your uint is coming from <types.h> on linux there's no reason why you can't do this somewhere:

namespace cinolib
{
#ifdef __linux__
	using ::uint;
#else 
	using uint = unsigned int;
#endif
}

- an implicit conversion in std::iota caused a warning (error on /WX)
- C-style typedefs of anonymous structs in mesh_attributes
@mlivesu
Copy link
Owner

mlivesu commented Feb 22, 2021

Thanks for the fixes.
You are right, my unsigned integers come from <types.h>, so things could be implemented in the way you suggest. I don't have much time to do this right now, but I'll add it to my todo list :)

@mlivesu mlivesu merged commit 3b7a965 into mlivesu:master Feb 22, 2021
francescozoccheddu pushed a commit to francescozoccheddu/cinolib that referenced this pull request Feb 10, 2024
fix compilation issues on VS2019 16.8.5
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