Function force_size

Synopsis

#include <include/EASTL/string.h>

void force_size(size_type n)

Description

No description yet.

Source

Lines 1443-1455 in include/EASTL/string.h. Line 601 in include/EASTL/string.h.

template <typename T, typename Allocator>
inline void basic_string<T, Allocator>::force_size(size_type n)
{
    #if EASTL_STRING_OPT_RANGE_ERRORS
        if(EASTL_UNLIKELY(n > capacity()))
            ThrowRangeException();
    #elif EASTL_ASSERT_ENABLED
        if(EASTL_UNLIKELY(n > capacity()))
            EASTL_FAIL_MSG("basic_string::force_size -- out of range");
    #endif
    internalLayout().SetSize(n);
}





Add Discussion as Guest

Log in