[Pcre-svn] [1697] code/trunk: C++ patch to guard 'using std:…

Inizio della pagina
Delete this message
Autore: Subversion repository
Data:  
To: pcre-svn
Oggetto: [Pcre-svn] [1697] code/trunk: C++ patch to guard 'using std::' directives with namespace pcrecpp.
Revision: 1697
          http://vcs.pcre.org/viewvc?view=rev&revision=1697
Author:   ph10
Date:     2017-04-21 18:05:21 +0100 (Fri, 21 Apr 2017)
Log Message:
-----------
C++ patch to guard 'using std::' directives with namespace pcrecpp.


Modified Paths:
--------------
    code/trunk/ChangeLog
    code/trunk/pcre_scanner_unittest.cc
    code/trunk/pcre_stringpiece.h.in
    code/trunk/pcre_stringpiece_unittest.cc
    code/trunk/pcrecpp_unittest.cc


Modified: code/trunk/ChangeLog
===================================================================
--- code/trunk/ChangeLog    2017-04-14 11:45:57 UTC (rev 1696)
+++ code/trunk/ChangeLog    2017-04-21 17:05:21 UTC (rev 1697)
@@ -42,7 +42,10 @@


10. Remove redundant line of code (accidentally left in ages ago).

+11. Applied C++ patch from Irfan Adilovic to guard 'using std::' directives
+with namespace pcrecpp (Bugzilla #2084).

+
Version 8.40 11-January-2017
----------------------------


Modified: code/trunk/pcre_scanner_unittest.cc
===================================================================
--- code/trunk/pcre_scanner_unittest.cc    2017-04-14 11:45:57 UTC (rev 1696)
+++ code/trunk/pcre_scanner_unittest.cc    2017-04-21 17:05:21 UTC (rev 1697)
@@ -57,6 +57,7 @@
 } while (0)


using std::vector;
+using std::string;
using pcrecpp::StringPiece;
using pcrecpp::Scanner;


Modified: code/trunk/pcre_stringpiece.h.in
===================================================================
--- code/trunk/pcre_stringpiece.h.in    2017-04-14 11:45:57 UTC (rev 1696)
+++ code/trunk/pcre_stringpiece.h.in    2017-04-21 17:05:21 UTC (rev 1697)
@@ -52,12 +52,12 @@


#include <pcre.h>

+namespace pcrecpp {
+
using std::memcmp;
using std::strlen;
using std::string;

-namespace pcrecpp {
-
class PCRECPP_EXP_DEFN StringPiece {
private:
const char* ptr_;

Modified: code/trunk/pcre_stringpiece_unittest.cc
===================================================================
--- code/trunk/pcre_stringpiece_unittest.cc    2017-04-14 11:45:57 UTC (rev 1696)
+++ code/trunk/pcre_stringpiece_unittest.cc    2017-04-21 17:05:21 UTC (rev 1697)
@@ -24,6 +24,7 @@
   }                                                     \
 } while (0)


+using std::string;
using pcrecpp::StringPiece;

static void CheckSTLComparator() {

Modified: code/trunk/pcrecpp_unittest.cc
===================================================================
--- code/trunk/pcrecpp_unittest.cc    2017-04-14 11:45:57 UTC (rev 1696)
+++ code/trunk/pcrecpp_unittest.cc    2017-04-21 17:05:21 UTC (rev 1697)
@@ -43,6 +43,7 @@
 #include <vector>
 #include "pcrecpp.h"


+using std::string;
using pcrecpp::StringPiece;
using pcrecpp::RE;
using pcrecpp::RE_Options;