4 ms·
Yes, though which do you propose should be used? It's nice that the type is wrapped in the std namespace, but for something like a basic standardized type, seem
by leetNightshade 12y ago
Yes, though which do you propose should be used? It's nice that the type is wrapped in the std namespace, but for something like a basic standardized type, seems like a waste. I think I'd rather include stdint.h.
- verroq 12y agoYou're writing C++ code, no need to regress back to C.
- shmerl 12y agoYes, but I agree with the commenter above. Wrapping it in std seems weird. By your logic, one shouldn't use int and long too, or may be they should be wrapped in std?
- jevinskie 12y agoIf it bothers you so much, just use 'using namespace std;' or 'using std::uint64_t;'. http://en.cppreference.com/w/cpp/language/namespace http://en.cppreference.com/w/cpp/language/namespace Or just '#include <stdint.h>'. C++ is TIMTOWTDI too!
- leetNightshade 12y agoYes, thank you (TIMTOWTDI)! I was just curious to see what other's used, and was sad to see this comment: "You're writing C++ code, no need to regress back to C." Really? Sure it's from C, but it's a part of C++. Going the route `using std::uint64_t`, you'd have to do that for every basic type. Which is fine. I'd just use that in a general header that's included everywhere in a project (stdafx, or what have you). Though at that point it doesn't really matter which you pick.
- shmerl 12y agoI'd prefer them to be included in C++ as regular base types really, to be on equal terms with int, char and etc.