https://bugs.exim.org/show_bug.cgi?id=2084

            Bug ID: 2084
           Summary: C++: Guard 'using std::' directives with namespace
                    pcrecpp
           Product: PCRE
           Version: 8.40
          Hardware: All
                OS: All
            Status: NEW
          Severity: bug
          Priority: medium
         Component: Code
          Assignee: p...@hermes.cam.ac.uk
          Reporter: irfanadilo...@gmail.com
                CC: pcre-dev@exim.org

Created attachment 1008
  --> https://bugs.exim.org/attachment.cgi?id=1008&action=edit
Patch to guard 'using std::' directives with namespace pcrecpp

These three 'using' directives in pcre_stringpiece.h.in:

 using std::memcmp;
 using std::strlen;
 using std::string;

are in the global namespace and thus propagate to all files including
pcre_stringpiece.h directly or indirectly, which may cause name clashes with
locally visible identifiers.

Attached is a trivial fix to guard these directives with the namespace pcrecpp.
The 'using std::string' directive is added to 3 unit test source files that
relied on the global using directive from the header file.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-- 
## List details at https://lists.exim.org/mailman/listinfo/pcre-dev 

Reply via email to