Clone of the EASTL library taken from
C++ C
Pull request Compare This branch is 83 commits behind paulhodge:community.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


                        -- About this library --

This library consists of the portion of EASTL which has been made open source
through the EAWebKit distribution. EA has made these files available in zip
format at . The purpose of this github project is to serve up
these files in a more convenient way. This project isn't affiliated or endorsed
by EA.

EASTL is an STL replacement that is optimized for games. To learn more about
EASTL, go here:

If you're just browsing, then most of the good stuff is under include/EASTL/

These files are only *part* of the actual EASTL library. According to Paul
Pedriana, only 50-60% of EASTL is officially published; the remainder may be
published sometime in the future. There's also a large suite of unit tests and
benchmarks which are not yet published.

                              -- Usage --

Add the 'include' directory to your include path, and the contents of 'src' to
your project's source files. Alternatively, you can compile the 'src' files into
a shared library and link against that.

At minimum, you'll need to implement a default allocator function, since this is
deliberately left unimplemented in EASTL. Here's the simplest code that will

    void* operator new[](size_t size, const char* pName, int flags,
        unsigned debugFlags, const char* file, int line)
        return malloc(size);
    void* operator new[](size_t size, size_t alignment, size_t alignmentOffset,
        const char* pName, int flags, unsigned debugFlags, const char* file, int line)
        // doesn't support alignment
        return malloc(size);

Another function left unimplemented is Vsnprintf8, which can be as simple as:

    int Vsnprintf8(char8_t* pDestination, size_t n, const char8_t* pFormat,
            va_list arguments)
        #ifdef _MSC_VER
            return _vsnprintf(pDestination, n, pFormat, arguments);
            return vsnprintf(pDestination, n, pFormat, arguments);

There is also a wealth of compiler flags to choose from, refer to the file
include/EASTL/internal/config.h to see what settings are available.

For your debug builds, make sure to use the _DEBUG preprocessor flag, as this
will enable many appropriate settings in EASTL. Alternatively, you could enable
EA_DEBUG or EASTL_DEBUG for similar effect.

For more documentation, you'll have to read the source code. :)