[MacPorts] #41871: lparse @1.1.2_0: "hash" and "runtime_error" collide with std::hash and std::runtime_error (was: Lparse @1.1.2 - error when staging lparse into destroot)

MacPorts noreply at macports.org
Wed Mar 18 13:03:44 PDT 2015


#41871: lparse @1.1.2_0: "hash" and "runtime_error" collide with std::hash and
std::runtime_error
---------------------------+-------------------
  Reporter:  f.zoboli25@…  |      Owner:  snc@…
      Type:  defect        |     Status:  new
  Priority:  Normal        |  Milestone:
 Component:  ports         |    Version:
Resolution:                |   Keywords:
      Port:  lparse        |
---------------------------+-------------------
Changes (by larryv@…):

 * cc: f.zoboli25@… (removed)
 * version:  2.2.1 =>


Comment:

 The problem is:
 1. The code defines “`hash`” and “`runtime_error`” functions.
 1. The modern C++ Standard Library defines `std::hash` and
 `std::runtime_error`.
 1. The code uses “`using namespace std`”.

 A textbook case of why one should not import entire namespaces.

-- 
Ticket URL: <https://trac.macports.org/ticket/41871#comment:3>
MacPorts <https://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list