Update contrib.
1 /***********************************************************************************
4 Interface for the ThrowCompare class
7 * Mark of the Unicorn, Inc.
9 * Permission to use, copy, modify, distribute and sell this software
10 * and its documentation for any purpose is hereby granted without fee,
11 * provided that the above copyright notice appear in all copies and
12 * that both that copyright notice and this permission notice appear
13 * in supporting documentation. Mark of the Unicorn makes no
14 * representations about the suitability of this software for any
15 * purpose. It is provided "as is" without express or implied warranty.
17 ***********************************************************************************/
18 #ifndef ThrowCompare_H_
19 #define ThrowCompare_H_
22 #include "TestClass.h"
25 bool operator()( const TestClass& a, const TestClass& b ) const {
26 simulate_possible_failure();
33 inline bool operator()( const TestClass& a, const TestClass& b ) const {
34 simulate_possible_failure();
39 struct ThrowHash { // : private ThrowCompare
40 inline EH_CSTD::size_t operator()( const TestClass& a ) const {
41 simulate_possible_failure();
42 return EH_CSTD::size_t(a.value());
46 #endif // ThrowCompare_H_