ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

ThrowCompare.h
Go to the documentation of this file.
00001 /***********************************************************************************
00002   ThrowCompare.h
00003 
00004     Interface for the ThrowCompare class
00005 
00006  * Copyright (c) 1997
00007  * Mark of the Unicorn, Inc.
00008  *
00009  * Permission to use, copy, modify, distribute and sell this software
00010  * and its documentation for any purpose is hereby granted without fee,
00011  * provided that the above copyright notice appear in all copies and
00012  * that both that copyright notice and this permission notice appear
00013  * in supporting documentation.  Mark of the Unicorn makes no
00014  * representations about the suitability of this software for any
00015  * purpose.  It is provided "as is" without express or implied warranty.
00016 
00017 ***********************************************************************************/
00018 #ifndef ThrowCompare_H_
00019 #define ThrowCompare_H_
00020 
00021 #include "Prefix.h"
00022 #include "TestClass.h"
00023 
00024 struct ThrowCompare {
00025   bool operator()( const TestClass& a, const TestClass& b ) const {
00026     simulate_possible_failure();
00027     return a < b;
00028   }
00029 };
00030 
00031 
00032 struct ThrowEqual {
00033   inline bool operator()( const TestClass& a, const TestClass& b ) const {
00034     simulate_possible_failure();
00035     return a == b;
00036   }
00037 };
00038 
00039 struct ThrowHash { // : private ThrowCompare
00040   inline EH_CSTD::size_t operator()( const TestClass& a ) const {
00041     simulate_possible_failure();
00042     return EH_CSTD::size_t(a.value());
00043   }
00044 };
00045 
00046 #endif // ThrowCompare_H_

Generated on Thu May 24 2012 04:35:41 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.