Custom size_t

Started by
10 comments, last by Bregma 5 years, 9 months ago
21 hours ago, Hodgman said:

What's the connection between C99 support and C++98/03/11/14/17 support?  C99 syntax isn't valid in any compliant C++ compiler, right? 

<stdint.h> was introduced in C99.  That's when size_t, uintptr_t, and all the sized integer types were introduced to the C language.  The concept of type size_t was adopted from C++.

With C++11 the C++ language became based on C99 instead of C89 (ie. the C++ standard includes the C99 standard "by inference" and itemizes the differences between languages from that document in appendixes C and D).  <cstdint> was introduced in the C++11 standard, and std::uintptr_t and all the sized integer types were introduced into the C++ language at that time.

std::size_t was a part of the original C++98 standard.

My guess is the UE code predates the standardization of fixed-width integer types in C++ in at least one target toolchain.

Stephen M. Webb
Professional Free Software Developer

This topic is closed to new replies.

Advertisement