Skip to content

Commit

Permalink
3.05.04 release
Browse files Browse the repository at this point in the history
  • Loading branch information
rparolin committed Apr 3, 2017
1 parent 1502123 commit 8f640f8
Show file tree
Hide file tree
Showing 5 changed files with 87 additions and 33 deletions.
4 changes: 2 additions & 2 deletions include/EASTL/internal/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@
///////////////////////////////////////////////////////////////////////////////

#ifndef EASTL_VERSION
#define EASTL_VERSION "3.05.03"
#define EASTL_VERSION_N 30503
#define EASTL_VERSION "3.05.04"
#define EASTL_VERSION_N 30504
#endif


Expand Down
20 changes: 10 additions & 10 deletions include/EASTL/internal/hashtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ namespace eastl
// contains the cached hashed value or not.
#define ENABLE_IF_HAS_HASHCODE(T, RT) typename eastl::enable_if<Internal::has_hashcode_member<T>::value, RT>::type*
#define ENABLE_IF_HASHCODE_U32(T, RT) typename eastl::enable_if<eastl::is_same<T, uint32_t>::value, RT>::type
#define ENABLE_IF_TRUETYPE(T) typename eastl::enable_if<BoolConstantT::value>::type*
#define DISABLE_IF_TRUETYPE(T) typename eastl::enable_if<!BoolConstantT::value>::type*
#define ENABLE_IF_TRUETYPE(T) typename eastl::enable_if<T::value>::type*
#define DISABLE_IF_TRUETYPE(T) typename eastl::enable_if<!T::value>::type*


/// node_iterator_base
Expand Down Expand Up @@ -1230,11 +1230,11 @@ namespace eastl
void DoFreeBuckets(node_type** pBucketArray, size_type n);

#if EASTL_MOVE_SEMANTICS_ENABLED && EASTL_VARIADIC_TEMPLATES_ENABLED
template <typename BoolConstantT, class... Args>
eastl::pair<iterator, bool> DoInsertValue(BoolConstantT, Args&&... args, ENABLE_IF_TRUETYPE(BoolConstantT) = 0);
template <typename BoolConstantT, class... Args, ENABLE_IF_TRUETYPE(BoolConstantT) = 0>
eastl::pair<iterator, bool> DoInsertValue(BoolConstantT, Args&&... args);

template <typename BoolConstantT, class... Args>
iterator DoInsertValue(BoolConstantT, Args&&... args, DISABLE_IF_TRUETYPE(BoolConstantT) = 0);
template <typename BoolConstantT, class... Args, DISABLE_IF_TRUETYPE(BoolConstantT) = 0>
iterator DoInsertValue(BoolConstantT, Args&&... args);

template <class... Args>
node_type* DoAllocateNode(Args&&... args);
Expand Down Expand Up @@ -1989,9 +1989,9 @@ namespace eastl
#if EASTL_MOVE_SEMANTICS_ENABLED && EASTL_VARIADIC_TEMPLATES_ENABLED
template <typename K, typename V, typename A, typename EK, typename Eq,
typename H1, typename H2, typename H, typename RP, bool bC, bool bM, bool bU>
template <typename BoolConstantT, class... Args>
template <typename BoolConstantT, class... Args, ENABLE_IF_TRUETYPE(BoolConstantT)>
eastl::pair<typename hashtable<K, V, A, EK, Eq, H1, H2, H, RP, bC, bM, bU>::iterator, bool>
hashtable<K, V, A, EK, Eq, H1, H2, H, RP, bC, bM, bU>::DoInsertValue(BoolConstantT, Args&&... args, ENABLE_IF_TRUETYPE(BoolConstantT)) // true_type means bUniqueKeys is true.
hashtable<K, V, A, EK, Eq, H1, H2, H, RP, bC, bM, bU>::DoInsertValue(BoolConstantT, Args&&... args) // true_type means bUniqueKeys is true.
{
// Adds the value to the hash table if not already present.
// If already present then the existing value is returned via an iterator/bool pair.
Expand Down Expand Up @@ -2059,9 +2059,9 @@ namespace eastl

template <typename K, typename V, typename A, typename EK, typename Eq,
typename H1, typename H2, typename H, typename RP, bool bC, bool bM, bool bU>
template <typename BoolConstantT, class... Args>
template <typename BoolConstantT, class... Args, DISABLE_IF_TRUETYPE(BoolConstantT)>
typename hashtable<K, V, A, EK, Eq, H1, H2, H, RP, bC, bM, bU>::iterator
hashtable<K, V, A, EK, Eq, H1, H2, H, RP, bC, bM, bU>::DoInsertValue(BoolConstantT, Args&&... args, DISABLE_IF_TRUETYPE(BoolConstantT)) // false_type means bUniqueKeys is false.
hashtable<K, V, A, EK, Eq, H1, H2, H, RP, bC, bM, bU>::DoInsertValue(BoolConstantT, Args&&... args) // false_type means bUniqueKeys is false.
{
const eastl::pair<bool, uint32_t> bRehash = mRehashPolicy.GetRehashRequired((uint32_t)mnBucketCount, (uint32_t)mnElementCount, (uint32_t)1);

Expand Down
1 change: 1 addition & 0 deletions include/EASTL/list.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
#pragma warning(disable: 4530) // C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
#pragma warning(disable: 4345) // Behavior change: an object of POD type constructed with an initializer of the form () will be default-initialized
#pragma warning(disable: 4571) // catch(...) semantics changed since Visual C++ 7.1; structured exceptions (SEH) are no longer caught.
#pragma warning(disable: 4623) // default constructor was implicitly defined as deleted
#endif

EA_DISABLE_SN_WARNING(828); // The EDG SN compiler has a bug in its handling of variadic template arguments and mistakenly reports "parameter "args" was never referenced"
Expand Down
84 changes: 63 additions & 21 deletions test/packages/EATest/include/EATest/EATest.h
Original file line number Diff line number Diff line change
Expand Up @@ -343,27 +343,69 @@ namespace EA
#define EATEST_VERIFY_F(bExpression, pFormat, ...) EA::UnitTest::TestInternal::EATEST_VERIFY_F_IMP((bExpression), nErrorCount, __FILE__, __LINE__, pFormat, __VA_ARGS__)
#endif

/// EATEST_VERIFY_THROW
/// EATEST_VERIFY_NOTHROW
///
/// This macro confirms whether or not an expression throws or doesn't throw. If it's not the case that EASTL_EXCEPTIONS_ENABLED
/// the provided expression will not be evaluated.
///
/// See EATEST_VERIFY for details about error reporting and the _MSG variants
#if EASTL_EXCEPTIONS_ENABLED
#define EATEST_VERIFY_THROW(expression) {bool isNoThrow; try{ {expression;} isNoThrow=true; }catch(...){isNoThrow=false;} EATEST_VERIFY(!isNoThrow); }
#define EATEST_VERIFY_NOTHROW(expression) {bool isNoThrow; try{ {expression;} isNoThrow=true; }catch(...){isNoThrow=false;} EATEST_VERIFY(isNoThrow); }
#define EATEST_VERIFY_THROW_MSG(expression, msg) {bool isNoThrow; try{ {expression;} isNoThrow=true; }catch(...){isNoThrow=false;} EATEST_VERIFY_MSG(!isNoThrow, msg); }
#define EATEST_VERIFY_NOTHROW_MSG(expression, msg) {bool isNoThrow; try{ {expression;} isNoThrow=true; }catch(...){isNoThrow=false;} EATEST_VERIFY_MSG(isNoThrow, msg); }
#else
#define EATEST_VERIFY_THROW(expression)
#define EATEST_VERIFY_NOTHROW(expression)
#define EATEST_VERIFY_THROW_MSG(expression, msg)
#define EATEST_VERIFY_NOTHROW_MSG(expression, msg)
#endif


///////////////////////////////////////////////////////////////////////
/// EATEST_VERIFY_THROW
/// EATEST_VERIFY_NOTHROW
///
/// This macro confirms whether or not an expression throws or doesn't throw.
///
/// See EATEST_VERIFY for details about error reporting and the _MSG variants
#if !defined(EA_COMPILER_NO_EXCEPTIONS)

#define EATEST_VERIFY_IMPL(expression) \
bool EA_PREPROCESSOR_JOIN(isThrow, __LINE__) = false; \
try \
{ \
(expression); \
} \
catch (...) \
{ \
EA_PREPROCESSOR_JOIN(isThrow, __LINE__) = true; \
}

#define EATEST_VERIFY_THROW(expression) \
do \
{ \
{ \
EATEST_VERIFY_IMPL(expression) \
EATEST_VERIFY(EA_PREPROCESSOR_JOIN(isThrow, __LINE__)); \
} \
} while (false)

#define EATEST_VERIFY_NOTHROW(expression) \
do \
{ \
{ \
EATEST_VERIFY_IMPL(expression) \
EATEST_VERIFY(!EA_PREPROCESSOR_JOIN(isThrow, __LINE__)); \
} \
} while (false)

#define EATEST_VERIFY_THROW_MSG(expression, msg) \
do \
{ \
{ \
EATEST_VERIFY_IMPL(expression) \
EATEST_VERIFY_MSG(EA_PREPROCESSOR_JOIN(isThrow, __LINE__), msg); \
} \
} while (false)

#define EATEST_VERIFY_NOTHROW_MSG(expression, msg) \
do \
{ \
{ \
EATEST_VERIFY_IMPL(expression) \
EATEST_VERIFY_MSG(!EA_PREPROCESSOR_JOIN(isThrow, __LINE__), msg); \
} \
} while (false)
#else
#define EATEST_VERIFY_THROW(expression)
#define EATEST_VERIFY_NOTHROW(expression)
#define EATEST_VERIFY_THROW_MSG(expression, msg)
#define EATEST_VERIFY_NOTHROW_MSG(expression, msg)
#endif


///////////////////////////////////////////////////////////////////////
/// GetSystemTimeMicroseconds
///
/// While this function could be used for basic benchmarking, the
Expand Down
11 changes: 11 additions & 0 deletions test/source/TestList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ namespace
bool operator==(const C& rhs) { return mC == rhs.mC; }
int mC;
};

struct D
{
D() = delete;
};
}


Expand All @@ -90,6 +95,12 @@ int TestList()

int nErrorCount = 0;

{
// test T with a deleted default-ctor
eastl::list<D> dlist;

}

EATEST_VERIFY(TestObject::IsClear());
TestObject::Reset();

Expand Down

0 comments on commit 8f640f8

Please sign in to comment.