 
 
 
Does your compiler implement namespaces?
g++ ./namespac.cpp
Success: BZ_NAMESPACES
 
 
 
What about exceptions?
g++ ./except.cpp
Success: BZ_EXCEPTIONS
 
 
 
Run-Time Type Identification?
g++ ./rtti.cpp
Success: BZ_RTTI
 
 
 
Member constants?
g++ ./membcnst.cpp
Success: BZ_MEMBER_CONSTANTS
 
 
 
Does your compiler cling to the old 'for' scoping rules?
g++ ./oldfor.cpp
bzjunk.cpp: In function `int main()':
bzjunk.cpp:12: error: name lookup of `i' changed for new ISO `for' scoping
bzjunk.cpp:7: error:   using obsolete binding at `i'
Failed:  BZ_OLD_FOR_SCOPING
 
 
 
How about the 'explicit' keyword?
g++ ./explicit.cpp
Success: BZ_EXPLICIT
 
 
 
What about the 'mutable' keyword?
g++ ./mutable.cpp
Success: BZ_MUTABLE
 
 
 
Does your compiler recognize 'typename'?
g++ ./typename.cpp
Success: BZ_TYPENAME
 
 
 
Just on the off chance... the NCEG 'restrict' keyword?
g++ ./restrict.cpp
bzjunk.cpp:4: error: parse error before `,' token
bzjunk.cpp: In function `void add(...)':
bzjunk.cpp:7: error: `length' undeclared (first use this function)
bzjunk.cpp:7: error: (Each undeclared identifier is reported only once for each 
   function it appears in.)
bzjunk.cpp:8: error: `a' undeclared (first use this function)
bzjunk.cpp:8: error: `b' undeclared (first use this function)
bzjunk.cpp:8: error: `c' undeclared (first use this function)
Failed:  BZ_NCEG_RESTRICT
 
 
 
Maybe it recognizes __restrict__?
g++ ./restric2.cpp
Success: BZ_NCEG_RESTRICT_EGCS
 
 
 
Does it recognize bool as a built-in type?
g++ ./bool.cpp
Success: BZ_BOOL
 
 
 
What about const_cast<>?
g++ ./constcst.cpp
Success: BZ_CONST_CAST
 
 
 
static_cast<>?
g++ ./statcast.cpp
Success: BZ_STATIC_CAST
 
 
 
reinterpret_cast<>?
g++ ./reinterp.cpp
Success: BZ_REINTERPRET_CAST
 
 
 
dynamic_cast<>?
g++ ./dynamic.cpp
Success: BZ_DYNAMIC_CAST
 
 
 
Will it handle basic templates? (If not, just give up now.)
g++ ./template.cpp
Success: BZ_TEMPLATES
 
 
 
Partial specialization?
g++ ./partial.cpp
Success: BZ_PARTIAL_SPECIALIZATION
 
 
 
Partial ordering?
g++ ./porder.cpp
Success: BZ_PARTIAL_ORDERING
 
 
 
Default template parameters?
g++ ./default.cpp
Success: BZ_DEFAULT_TEMPLATE_PARAMETERS
 
 
 
Member templates?
g++ ./membtmpl.cpp
Success: BZ_MEMBER_TEMPLATES
 
 
 
Member templates outside the class declaration?
g++ ./membtmp2.cpp
Success: BZ_MEMBER_TEMPLATES_OUTSIDE_CLASS
 
 
 
Does it recognize the full specialization syntax?
g++ ./fullspec.cpp
Success: BZ_FULL_SPECIALIZATION_SYNTAX
 
 
 
Function templates with non-type parameters?
g++ ./nontype.cpp
Success: BZ_FUNCTION_NONTYPE_PARAMETERS
 
 
 
Template-qualified base class specifiers?
g++ ./elabbase.cpp
Success: BZ_TEMPLATE_QUALIFIED_BASE_CLASS
 
 
 
Template-qualified return types (necessary for vector type promotion)?
g++ ./elabret.cpp
Success: BZ_TEMPLATE_QUALIFIED_RETURN_TYPE
 
 
 
Explicit template function qualification?
g++ ./tempqual.cpp
Success: BZ_EXPLICIT_TEMPLATE_FUNCTION_QUALIFICATION
 
 
 
Templates as template arguments?
g++ ./temptemp.cpp
Success: BZ_TEMPLATES_AS_TEMPLATE_ARGUMENTS
 
 
 
Use of the template keyword as a qualifier?
g++ ./tempkey.cpp
Success: BZ_TEMPLATE_KEYWORD_QUALIFIER
 
 
 
Function matching with argument types which are template scope-qualified?
g++ ./tempqmt.cpp
Success: BZ_TEMPLATE_SCOPED_ARGUMENT_MATCHING
 
 
 
Will it support the vector type promotion mechanism?
g++ ./promote.cpp
Success: BZ_TYPE_PROMOTION
 
 
 
Numeric traits promotions (sum type, etc.)?
g++ ./numtrait.cpp
Success: BZ_USE_NUMTRAIT
 
 
 
Can your compiler handle computations inside an enum?
g++ ./enumcomp.cpp
bzjunk.cpp: In instantiation of `Z<foo, bar>':
bzjunk.cpp:21:   instantiated from here
bzjunk.cpp:13: warning: comparison between `enum foo::<anonymous>' and `enum 
   bar::<anonymous>'
bzjunk.cpp:13: warning: enumeral mismatch in conditional expression: `
   foo::<anonymous enum>' vs `bar::<anonymous enum>'
Success: BZ_ENUM_COMPUTATIONS
 
 
 
Does it handle (int) casts in enum computations?
g++ ./enumcmp2.cpp
Success: BZ_ENUM_COMPUTATIONS_WITH_CAST
 
 
 
Does it have complex<T>?
g++ ./complex.cpp
Success: BZ_HAVE_COMPLEX
 
 
 
Does it have numeric_limits<T>?
g++ ./numlimit.cpp
Success: BZ_HAVE_NUMERIC_LIMITS
 
 
 
Does it have <climits>?
g++ ./climits.cpp
Success: BZ_HAVE_CLIMITS
 
 
 
Does it have valarray<T>?
g++ ./valarray.cpp
Success: BZ_HAVE_VALARRAY
 
 
 
Complex math functions?
g++ ./compmath.cpp
Success: BZ_HAVE_COMPLEX_MATH
 
 
 
IEEE Math library?
g++ ./ieeemath.cpp
Success: BZ_HAVE_IEEE_MATH
 
 
 
System V Math library?
g++ ./sysvmath.cpp
bzjunk.cpp: In function `int main()':
bzjunk.cpp:22: error: `_class' undeclared (first use this function)
bzjunk.cpp:22: error: (Each undeclared identifier is reported only once for 
   each function it appears in.)
bzjunk.cpp:23: error: `itrunc' undeclared (first use this function)
bzjunk.cpp:24: error: `nearest' undeclared (first use this function)
bzjunk.cpp:25: error: `rsqrt' undeclared (first use this function)
bzjunk.cpp:26: error: `uitrunc' undeclared (first use this function)
bzjunk.cpp:34: error: `unordered' undeclared (first use this function)
Failed:  BZ_HAVE_SYSTEM_V_MATH
 
 
 
Are C math functions in <cmath> and std::?
g++ ./mathscop.cpp
Success: BZ_MATH_FN_IN_NAMESPACE_STD
 
 
 
Are complex math functions in std::?
g++ ./cmthscop.cpp
Success: BZ_COMPLEX_MATH_IN_NAMESPACE_STD
 
 
 
ISO C++ Standard library?
g++ ./std.cpp
Success: BZ_HAVE_STD
 
 
 
Standard template library?
g++ ./stl.cpp
Success: BZ_HAVE_STL
 
 
 
What about getrusage()?
g++ ./getruse.cpp
Success: BZ_HAVE_RUSAGE
