title: C++ on Solaris: How to cope with "Formal argument" wrongly passed error?
body: <p>I am trying to compile the SMT solver Z3 (Version 4.5.0) from Microsoft Research on a Solaris 10 (Sparc) with Solaris Studio 12.3 (and this is due to constraints that I cannot change, so please do not hint to gcc/g++).</p>
  
  <p>I already had to make some (more or less trivial) code changes in order to come to the error I am opposed with now:</p>
  
  <pre><code>"../src/util/map.h", line 54: Error: Formal argument p of type const std::pair&lt;expr*, int&gt;&amp; in call to pair_hash&lt;obj_ptr_hash&lt;expr&gt;, int_hash&gt;::operator()(const std::pair&lt;expr*, int&gt;&amp;) const is being passed const std::pair&lt;expr*, bool&gt;.
  "../src/util/hashtable.h", line 155:     Where: While instantiating "table2map&lt;default_map_entry&lt;std::pair&lt;expr*, bool&gt;, bool&gt;, pair_hash&lt;obj_ptr_hash&lt;expr&gt;, int_hash&gt;, default_eq&lt;std::pair&lt;expr*, bool&gt;&gt;&gt;::entry_hash_proc::operator()(const _key_data&lt;std::pair&lt;expr*, bool&gt;, bool&gt;&amp;) const".
  "../src/util/hashtable.h", line 155:     Where: Instantiated from core_hashtable&lt;default_map_entry&lt;std::pair&lt;expr*, bool&gt;, bool&gt;, table2map&lt;default_map_entry&lt;std::pair&lt;expr*, bool&gt;, bool&gt;, pair_hash&lt;obj_ptr_hash&lt;expr&gt;, int_hash&gt;, default_eq&lt;std::pair&lt;expr*, bool&gt;&gt;&gt;::entry_hash_proc, table2map&lt;default_map_entry&lt;std::pair&lt;expr*, bool&gt;, bool&gt;, pair_hash&lt;obj_ptr_hash&lt;expr&gt;, int_hash&gt;, default_eq&lt;std::pair&lt;expr*, bool&gt;&gt;&gt;::entry_eq_proc&gt;::get_hash(const _key_data&lt;std::pair&lt;expr*, bool&gt;, bool&gt;&amp;) const.
  "../src/util/hashtable.h", line 350:     Where: Instantiated from non-template code.
  1 Error(s) and 33 Warning(s) detected.
  *** Error code 2
  The following command caused the error:
  CC -D_MP_INTERNAL -DNDEBUG -D_EXTERNAL_RELEASE  -xldscope=hidden -c -xarch=sse2 -xvector=simd -D_NO_OMP_ -D _EXTERNAL_RELEASE -xO3 -xregs=frameptr -D_SUNOS_ -KPIC -xalias_level=any -features=zla -I../src/ast/rewriter/bit_blaster -I../src/ast/rewriter -I../src/ast -I../src/util -I../src/math/polynomial -I../src/math/automata -I../src/ast/simplifier -I../src/ast/macros -I../src/ast/normal_forms -I../src/cmd_context -I../src/solver -I../src/model -I../src/tactic -I../src/interp -I../src/smt/proto_model -I../src/smt/params -I../src/ast/pattern -I../src/parsers/smt2 -I../src/parsers/util -I../src/ast/substitution -I../src/math/grobner -I../src/math/euclid -I../src/math/simplex -I../src/ast/proof_checker -I../src/ast/fpa -osmt/smt_quick_checker.o ../src/smt/smt_quick_checker.cpp
  make: Fatal error: Command failed for target `smt/smt_quick_checker.o'
  bash-3.2$
  </code></pre>
  
  <p>The code causing the error can be found <a href="https://github.com/Z3Prover/z3/blob/z3-4.5.0/src/util/map.h" rel="nofollow noreferrer">here</a> at line 54.</p>
  
  <p>I already poked around with a cast to <code>std::pair&lt;expr*, int&gt;</code>, but as this is code used with different types, this lead to a similar error with <code>unsigned</code>.</p>
  
  <p>Can anybody help me with this error?</p>