prefer std::u?int[0-9]+_t and include <cstdint> else include <stdint.h>#2302
Merged
alecjacobson merged 1 commit intomainfrom Oct 14, 2023
Merged
prefer std::u?int[0-9]+_t and include <cstdint> else include <stdint.h>#2302alecjacobson merged 1 commit intomainfrom
alecjacobson merged 1 commit intomainfrom
Conversation
Collaborator
|
I don't understand why you need the |
Contributor
Author
|
It was news to me too. But apparently global namespace is only guaranteed with the c headers |
Collaborator
|
Yikes... Well I'm choosing to close my eyes until someone complains and I cannot do otherwise but to change my code... |
|
@alecjacobson https://github.com/libigl/libigl/blob/main/include/igl/path_to_executable.cpp#L25 gives error as https://github.com/libigl/libigl/blob/main/include/igl/path_to_executable.cpp#L17 doesn't provide the namespace for I think you should either add |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes this kind of problem https://www.reddit.com/r/Fedora/comments/16issng/fedora_38_cant_run_simple_libigl_code/
#include <cstdint>or#include <stdint.h>is often missing (and accidentally included by some other path) or a global namespace type is used (uint64_t) with the assumption that#include <cstdint>will define it (it doesn't have to). So, prefer to usestd::namespace types and#include <cstdint>. In some cases, where the code was ported from elsewhere I used#include <stdint.h>to match the global namespace types. (also remove some unnecessarysize_ttypes along the way)