← Back to team overview

linuxdcpp-team team mailing list archive

[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 2291: namespace woes in dwt

 

------------------------------------------------------------
revno: 2291
committer: poy <poy@xxxxxxxxxx>
branch nick: trunk
timestamp: Sat 2010-11-13 17:22:09 +0100
message:
  namespace woes in dwt
modified:
  dwt/include/dwt/GCCHeaders.h
  dwt/include/dwt/WindowsHeaders.h


--
lp:dcplusplus
https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk

Your team Dcplusplus-team is subscribed to branch lp:dcplusplus.
To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk/+edit-subscription
=== modified file 'dwt/include/dwt/GCCHeaders.h'
--- dwt/include/dwt/GCCHeaders.h	2010-11-12 17:22:02 +0000
+++ dwt/include/dwt/GCCHeaders.h	2010-11-13 16:22:09 +0000
@@ -40,17 +40,13 @@
 #error This file is only for GCC
 #endif
 
-#ifdef __MINGW32__
 /* the shared_ptr implementation provided by MinGW / GCC 4.5's libstdc++ consumes too many
 semaphores, so we prefer boost's one. see <https://bugs.launchpad.net/dcplusplus/+bug/654040>. */
 #define _SHARED_PTR_H 1 // skip libstdc++'s bits/shared_ptr.h
 #include <boost/shared_ptr.hpp>
 #include <boost/enable_shared_from_this.hpp>
 #include <boost/make_shared.hpp>
-using boost::shared_ptr;
-using boost::enable_shared_from_this;
-using boost::make_shared;
-#endif
+#define SHARED_PTR_NS boost
 
 // Need to forward declare these since GCC does syntax checking of
 // non-instantiated templates!

=== modified file 'dwt/include/dwt/WindowsHeaders.h'
--- dwt/include/dwt/WindowsHeaders.h	2010-10-28 22:43:23 +0000
+++ dwt/include/dwt/WindowsHeaders.h	2010-11-13 16:22:09 +0000
@@ -75,12 +75,6 @@
 #include <commdlg.h>
 #include <assert.h>
 
-// Standard headers that most classes need
-#include <memory>
-#include <vector>
-#include <list>
-#include <boost/noncopyable.hpp>
-
 // GCC specific
 #ifdef __GNUC__
 #include "GCCHeaders.h"
@@ -91,4 +85,18 @@
 #include "VCDesktopHeaders.h"
 #endif
 
+// Standard headers that most classes need
+#include <memory>
+#include <vector>
+#include <list>
+#include <boost/noncopyable.hpp>
+
+// pick the shared_ptr to use
+#ifndef SHARED_PTR_NS
+#define SHARED_PTR_NS std
+#endif
+using SHARED_PTR_NS::shared_ptr;
+using SHARED_PTR_NS::enable_shared_from_this;
+using SHARED_PTR_NS::make_shared;
+
 #endif // !WindowsHeaders_h