JUCE Typedefs

Hello

Perhaps a stupid question, but why JUCE uses specific typedefs like juce::uint8, juce::uint32 ???

With C++ 11, there are already types like uint8_t or uint32_t.

JUCE predates C++11, and thus, these datatypes were created back then. I think the JUCE team should do a search-replace and get rid of those custom types.

4 Likes

Discussed previously here:

tl;dr this would be a breaking change with few benefits to justify the cost.

3 Likes

If you look at the code, for instance for int8:
namespace juce
{
/** A platform-independent 8-bit signed integer type. */
using int8 = signed char;
}

The keyword “using” exists since C+11 … I guess that before C+11 it was a #define ?

Git can easily answer this question. It was a typedef before :wink:

2 Likes