Publisher review:Minmax.H - Macros & typesafe C templates for min() and max() Macros & typesafe C templates for min() and max()
The following 2 macros are used only for C compilers which lack templates. If you use a C compiler which supports templates, ignore the rest of this section. If you're compiling standard C, rather than C , you may ignore the rest of this section.
Set SIGNED_DISTINCT to 1 for conforming C compilers that treat signed, unsigned, and "normal" types as 3 distinct entities. Set SIGNED_DISTINCT to 0 for older or non-conforming C compilers. To determine the proper setting for your compiler, compile MINMAX.H as a C source file using the "compile only" (usually -c) switch. If the compiler reports "already defined" errors, you probably need to change the value of SIGNED_DISTINCT to 0.
If you still get "already defined" errors after setting SIGNED_DISTINCT to 0, you may either have a truly broken compiler or have some obscure (e.g. Zortech/Symantec's -Ju or -Jm) switch set which causes this behavior. As a last resort, you can set UNSIGNED_DISTINCT to 0 as well.
Minmax.H is a C/C++ script for Snippets scripts design by Bob Stout.
It runs on following operating system: Windows / Linux.
Operating system:Windows / Linux