← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-pkg/yade/git-trunk] Rev 4050: Remove most of "using namespace std; "

 

------------------------------------------------------------
revno: 4050
committer: Anton Gladky <gladky.anton@xxxxxxxxx>
timestamp: Wed 2014-07-02 18:18:24 +0200
message:
  Remove most of "using namespace std;"
modified:
  lib/factory/DynLibManager.cpp
  lib/import/STLReader.hpp
  lib/import/utils.hpp
  lib/multimethods/DynLibDispatcher.hpp
  lib/smoothing/WeightedAverage2d.hpp
  lib/triangulation/FlowBoundingSphere.hpp
  lib/triangulation/FlowBoundingSphere.ipp
  lib/triangulation/FlowBoundingSphereLinSolv.hpp
  lib/triangulation/FlowBoundingSphereLinSolv.ipp
  lib/triangulation/KinematicLocalisationAnalyser.hpp
  lib/triangulation/Network.ipp
  lib/triangulation/PeriodicFlowLinSolv.hpp
  lib/triangulation/PeriodicFlowLinSolv.ipp
  lib/triangulation/Tenseur3.cpp
  lib/triangulation/Tenseur3.h
  lib/triangulation/Tesselation.ipp
  lib/triangulation/Timer.cpp
  lib/triangulation/Timer.h
  lib/triangulation/TriaxialState.h
  lib/triangulation/basicVTKwritter.cpp
  lib/triangulation/basicVTKwritter.hpp
  pkg/common/InsertionSortCollider.cpp
  pkg/common/PersistentTriangulationCollider.cpp
  pkg/common/ResetRandomPosition.hpp
  pkg/common/SpatialQuickSortCollider.hpp
  pkg/common/ZECollider.cpp
  pkg/dem/CapillaryTriaxialTest.cpp
  pkg/dem/CohesiveTriaxialTest.cpp
  pkg/dem/GeneralIntegratorInsertionSortCollider.cpp
  pkg/dem/Law2_ScGeom_CapillaryPhys_Capillarity.cpp
  pkg/dem/PeriIsoCompressor.cpp
  pkg/dem/SampleCapillaryPressureEngine.cpp
  pkg/dem/Shop.hpp
  pkg/dem/SimpleShear.cpp
  pkg/dem/SimpleShear.hpp
  pkg/dem/SpherePack.cpp
  pkg/dem/SpherePack.hpp
  pkg/dem/TesselationWrapper.cpp
  pkg/dem/TriaxialTest.cpp
  pkg/lbm/HydrodynamicsLawLBM.cpp
  py/_polyhedra_utils.cpp
  py/_utils.cpp
  py/pack/_packPredicates.cpp
  py/wrapper/yadeWrapper.cpp


--
lp:yade
https://code.launchpad.net/~yade-pkg/yade/git-trunk

Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-pkg/yade/git-trunk/+edit-subscription
=== modified file 'lib/factory/DynLibManager.cpp'
--- lib/factory/DynLibManager.cpp	2014-07-02 16:11:24 +0000
+++ lib/factory/DynLibManager.cpp	2014-07-02 16:18:24 +0000
@@ -9,7 +9,6 @@
 
 #include "DynLibManager.hpp"
 
-
 #include<fstream>
 #include<stdexcept>
 #include<boost/filesystem/operations.hpp>
@@ -18,9 +17,6 @@
 
 #include "ClassFactory.hpp"
 
-
-//using namespace std;
-
 CREATE_LOGGER(DynLibManager);
 
 

=== modified file 'lib/import/STLReader.hpp'
--- lib/import/STLReader.hpp	2014-07-02 16:11:24 +0000
+++ lib/import/STLReader.hpp	2014-07-02 16:18:24 +0000
@@ -14,8 +14,6 @@
 #include <cmath>
 #include "utils.hpp"
 
-using namespace std;
-
 class STLReader {
     public:
 

=== modified file 'lib/import/utils.hpp'
--- lib/import/utils.hpp	2014-07-02 16:11:24 +0000
+++ lib/import/utils.hpp	2014-07-02 16:18:24 +0000
@@ -1,12 +1,11 @@
 #pragma once
 
 #include<utility>
-using namespace std;
 
 template<class T>
-pair<T,T> minmax(const T &a, const T &b) 
+std::pair<T,T> minmax(const T &a, const T &b) 
 {
-    return (a<b) ? pair<T,T>(a,b) : pair<T,T>(b,a);
+    return (a<b) ? std::pair<T,T>(a,b) : std::pair<T,T>(b,a);
 }
 
 template<class T>

=== modified file 'lib/multimethods/DynLibDispatcher.hpp'
--- lib/multimethods/DynLibDispatcher.hpp	2014-07-02 16:11:24 +0000
+++ lib/multimethods/DynLibDispatcher.hpp	2014-07-02 16:18:24 +0000
@@ -35,9 +35,6 @@
 #include<string>
 #include<ostream>
 
-
-using namespace std;
-
 struct DynLibDispatcher_Item2D{ int ix1, ix2; std::string functorName; DynLibDispatcher_Item2D(int a, int b, std::string c):ix1(a),ix2(b),functorName(c){}; };
 struct DynLibDispatcher_Item1D{ int ix1     ; std::string functorName; DynLibDispatcher_Item1D(int a,        std::string c):ix1(a),       functorName(c){}; };
 ///

=== modified file 'lib/smoothing/WeightedAverage2d.hpp'
--- lib/smoothing/WeightedAverage2d.hpp	2014-07-02 16:11:24 +0000
+++ lib/smoothing/WeightedAverage2d.hpp	2014-07-02 16:18:24 +0000
@@ -15,6 +15,11 @@
 #include<boost/python/object.hpp>
 #include<boost/version.hpp>
 #include<boost/math/distributions/normal.hpp>
+#include<yade/lib/base/Math.hpp>
+
+#ifndef FOREACH
+	#define FOREACH BOOST_FOREACH
+#endif
 
 #ifndef  __GXX_EXPERIMENTAL_CXX0X__
 #	include<boost/shared_ptr.hpp>
@@ -24,13 +29,8 @@
 	using std::shared_ptr;
 #endif
 
-#ifndef FOREACH
-	#define FOREACH BOOST_FOREACH
-#endif
-using namespace std;
-
-#include<yade/lib/base/Math.hpp>
-
+using std::vector;
+using std::string;
 
 template<typename T>
 struct GridContainer{

=== modified file 'lib/triangulation/FlowBoundingSphere.hpp'
--- lib/triangulation/FlowBoundingSphere.hpp	2014-07-02 16:11:24 +0000
+++ lib/triangulation/FlowBoundingSphere.hpp	2014-07-02 16:18:24 +0000
@@ -17,7 +17,6 @@
 
 typedef pair<pair<int,int>, vector<double> > Constriction;
 
-using namespace std;
 namespace CGT {
 
 template<class _Tesselation>

=== modified file 'lib/triangulation/FlowBoundingSphere.ipp'
--- lib/triangulation/FlowBoundingSphere.ipp	2014-07-02 16:11:24 +0000
+++ lib/triangulation/FlowBoundingSphere.ipp	2014-07-02 16:18:24 +0000
@@ -31,8 +31,6 @@
 
 // #define USE_FAST_MATH 1
 
-
-using namespace std;
 namespace CGT
 {
 

=== modified file 'lib/triangulation/FlowBoundingSphereLinSolv.hpp'
--- lib/triangulation/FlowBoundingSphereLinSolv.hpp	2014-07-02 16:11:24 +0000
+++ lib/triangulation/FlowBoundingSphereLinSolv.hpp	2014-07-02 16:18:24 +0000
@@ -30,8 +30,6 @@
 
 ///_____ Declaration ____
 
-using namespace std;
-
 namespace CGT {
 
 template<class _Tesselation, class FlowType=FlowBoundingSphere<_Tesselation> >

=== modified file 'lib/triangulation/FlowBoundingSphereLinSolv.ipp'
--- lib/triangulation/FlowBoundingSphereLinSolv.ipp	2014-07-02 16:11:24 +0000
+++ lib/triangulation/FlowBoundingSphereLinSolv.ipp	2014-07-02 16:18:24 +0000
@@ -39,8 +39,6 @@
 namespace CGT
 {
 
-using namespace std;
-
 #ifdef PARDISO
 #ifdef AIX
 #define F77_FUNC(func)  func
@@ -989,4 +987,4 @@
 
 } //namespace CGT
 
-#endif //FLOW_ENGINE
\ No newline at end of file
+#endif //FLOW_ENGINE

=== modified file 'lib/triangulation/KinematicLocalisationAnalyser.hpp'
--- lib/triangulation/KinematicLocalisationAnalyser.hpp	2014-03-21 18:47:45 +0000
+++ lib/triangulation/KinematicLocalisationAnalyser.hpp	2014-07-02 16:18:24 +0000
@@ -16,6 +16,10 @@
 #include "Tenseur3.h"
 
 namespace CGT {
+  
+using std::pair;
+using std::ofstream;
+
 #define SPHERE_DISCRETISATION 20; //number of "teta" intervals on the unit sphere
 #define LINEAR_DISCRETISATION 200; //number of intervals on segments like [UNmin,UNmax]
 	

=== modified file 'lib/triangulation/Network.ipp'
--- lib/triangulation/Network.ipp	2014-07-02 16:11:24 +0000
+++ lib/triangulation/Network.ipp	2014-07-02 16:18:24 +0000
@@ -14,8 +14,6 @@
 
 #define FAST
 
-
-using namespace std;
 namespace CGT {
 
 // 	template<class Tesselation> const double Network<Tesselation>::FAR = 50000;

=== modified file 'lib/triangulation/PeriodicFlowLinSolv.hpp'
--- lib/triangulation/PeriodicFlowLinSolv.hpp	2014-07-02 16:11:24 +0000
+++ lib/triangulation/PeriodicFlowLinSolv.hpp	2014-07-02 16:18:24 +0000
@@ -11,8 +11,6 @@
 
 #ifdef FLOW_ENGINE
 
-using namespace std;
-
 namespace CGT {
 
 template<class _Tesselation>

=== modified file 'lib/triangulation/PeriodicFlowLinSolv.ipp'
--- lib/triangulation/PeriodicFlowLinSolv.ipp	2014-07-02 16:11:24 +0000
+++ lib/triangulation/PeriodicFlowLinSolv.ipp	2014-07-02 16:18:24 +0000
@@ -24,8 +24,6 @@
 namespace CGT
 {
 
-using namespace std;
-
 #ifdef PARDISO
 #ifdef AIX
 #define F77_FUNC(func)  func
@@ -251,4 +249,4 @@
 
 } //namespace CGT
 
-#endif //FLOW_ENGINE
\ No newline at end of file
+#endif //FLOW_ENGINE

=== modified file 'lib/triangulation/Tenseur3.cpp'
--- lib/triangulation/Tenseur3.cpp	2014-07-02 16:11:24 +0000
+++ lib/triangulation/Tenseur3.cpp	2014-07-02 16:18:24 +0000
@@ -1,8 +1,6 @@
-
 #include "Tenseur3.h"
 #include "RegularTriangulation.h" 
 
-using namespace std;
 namespace CGT {
 
 Real Tens::Norme2(void)

=== modified file 'lib/triangulation/Tenseur3.h'
--- lib/triangulation/Tenseur3.h	2014-03-21 18:45:24 +0000
+++ lib/triangulation/Tenseur3.h	2014-07-02 16:18:24 +0000
@@ -6,6 +6,11 @@
 
 namespace CGT {
 
+using std::endl;
+using std::cout;
+using std::cerr;
+using std::string;
+
 #define NORMALIZE(vecteur) ((vecteur) = (vecteur)*(1.0/sqrt(pow((vecteur)[0],2)+pow((vecteur)[1],2)+pow((vecteur)[2],2))))
 
 class Tens;

=== modified file 'lib/triangulation/Tesselation.ipp'
--- lib/triangulation/Tesselation.ipp	2014-07-02 16:11:24 +0000
+++ lib/triangulation/Tesselation.ipp	2014-07-02 16:18:24 +0000
@@ -6,13 +6,18 @@
 *  GNU General Public License v2 or later. See file LICENSE for details. *
 *************************************************************************/
 
-using namespace std;
-
 //FIXME: handle that a better way
 #define MAX_ID 200000
 
 namespace CGT {
 
+using std::cerr;
+using std::cout;
+using std::endl;
+using std::max;
+using std::vector;
+using std::ifstream;
+
 template<class TT>
 _Tesselation<TT>::_Tesselation ( void )
 {
@@ -322,4 +327,4 @@
 	return true;
 }
 
-} //namespace CGT
\ No newline at end of file
+} //namespace CGT

=== modified file 'lib/triangulation/Timer.cpp'
--- lib/triangulation/Timer.cpp	2014-07-02 16:11:24 +0000
+++ lib/triangulation/Timer.cpp	2014-07-02 16:18:24 +0000
@@ -1,8 +1,6 @@
 #include <string.h>
 #include "Timer.h"
 
-using namespace std;
-
 Real_timer::Real_timer() : T1(0), T2(0), elapsed(0.0), started(0.0), interv(0), running(true)
 {
 	T1 = clock();

=== modified file 'lib/triangulation/Timer.h'
--- lib/triangulation/Timer.h	2012-01-20 17:31:56 +0000
+++ lib/triangulation/Timer.h	2014-07-02 16:18:24 +0000
@@ -4,6 +4,8 @@
 #include <iostream>
 #include <time.h>
 
+using std::string;
+
 // SECTION: A Timer Measuring Real-Time
 // ========================================================================
 // 

=== modified file 'lib/triangulation/TriaxialState.h'
--- lib/triangulation/TriaxialState.h	2014-07-02 16:11:24 +0000
+++ lib/triangulation/TriaxialState.h	2014-07-02 16:18:24 +0000
@@ -21,7 +21,9 @@
  */
 
 namespace CGT {
-using namespace std;
+
+using std::string;
+using std::min;
 
 class TriaxialState
 {

=== modified file 'lib/triangulation/basicVTKwritter.cpp'
--- lib/triangulation/basicVTKwritter.cpp	2014-07-02 16:11:24 +0000
+++ lib/triangulation/basicVTKwritter.cpp	2014-07-02 16:18:24 +0000
@@ -1,7 +1,5 @@
 #include "basicVTKwritter.hpp"
 
-using namespace std;
-
 bool basicVTKwritter::open(const char * filename, const char * comment)
 {
   file.open(filename,ios_base::out);

=== modified file 'lib/triangulation/basicVTKwritter.hpp'
--- lib/triangulation/basicVTKwritter.hpp	2012-01-11 21:30:18 +0000
+++ lib/triangulation/basicVTKwritter.hpp	2014-07-02 16:18:24 +0000
@@ -6,6 +6,11 @@
 enum DataName     {SCALARS,VECTORS,TENSORS};
 enum DataType     {INT,FLOAT};
 
+using std::ios_base;
+using std::endl;
+using std::cout;
+using std::cerr;
+
 // Really simplistic struct for vtk file creation
 struct basicVTKwritter
 {

=== modified file 'pkg/common/InsertionSortCollider.cpp'
--- pkg/common/InsertionSortCollider.cpp	2014-07-02 16:11:24 +0000
+++ pkg/common/InsertionSortCollider.cpp	2014-07-02 16:18:24 +0000
@@ -16,8 +16,6 @@
   #include<omp.h>
 #endif
 
-using namespace std;
-
 YADE_PLUGIN((InsertionSortCollider))
 CREATE_LOGGER(InsertionSortCollider);
 

=== modified file 'pkg/common/PersistentTriangulationCollider.cpp'
--- pkg/common/PersistentTriangulationCollider.cpp	2014-07-02 16:11:24 +0000
+++ pkg/common/PersistentTriangulationCollider.cpp	2014-07-02 16:18:24 +0000
@@ -16,9 +16,6 @@
 #include<yade/pkg/common/Sphere.hpp>
 #include<yade/pkg/common/ElastMat.hpp>
 
-
-using namespace std;
-		
 // PersistentTriangulationCollider::PersistentTriangulationCollider() : Collider()
 // {
 // 	haveDistantTransient=false;

=== modified file 'pkg/common/ResetRandomPosition.hpp'
--- pkg/common/ResetRandomPosition.hpp	2014-07-02 16:11:24 +0000
+++ pkg/common/ResetRandomPosition.hpp	2014-07-02 16:18:24 +0000
@@ -14,8 +14,6 @@
 #include <vector>
 #include <string>
 
-using namespace std;
-
 /// @brief Produces spheres over the course of a simulation. 
 class ResetRandomPosition : public PeriodicEngine {
 public:

=== modified file 'pkg/common/SpatialQuickSortCollider.hpp'
--- pkg/common/SpatialQuickSortCollider.hpp	2014-07-02 16:11:24 +0000
+++ pkg/common/SpatialQuickSortCollider.hpp	2014-07-02 16:18:24 +0000
@@ -11,8 +11,6 @@
 #include <yade/core/InteractionContainer.hpp>
 #include <vector>
 
-using namespace std;
-
 class SpatialQuickSortCollider : public Collider {
     protected:
 

=== modified file 'pkg/common/ZECollider.cpp'
--- pkg/common/ZECollider.cpp	2014-07-02 16:11:24 +0000
+++ pkg/common/ZECollider.cpp	2014-07-02 16:18:24 +0000
@@ -14,8 +14,6 @@
 #include<vector>
 #include<boost/static_assert.hpp>
 
-using namespace std;
-
 YADE_PLUGIN((ZECollider))
 CREATE_LOGGER(ZECollider);
 

=== modified file 'pkg/dem/CapillaryTriaxialTest.cpp'
--- pkg/dem/CapillaryTriaxialTest.cpp	2014-07-02 16:11:24 +0000
+++ pkg/dem/CapillaryTriaxialTest.cpp	2014-07-02 16:18:24 +0000
@@ -53,8 +53,6 @@
 #include <boost/random/variate_generator.hpp>
 #include <boost/random/normal_distribution.hpp>
 
-using namespace std;
-
 typedef pair<Vector3r, Real> BasicSphere;
 //! generate a list of non-overlapping spheres
 string GenerateCloud_water(vector<BasicSphere>& sphere_list, Vector3r lowerCorner, Vector3r upperCorner, long number, Real rad_std_dev, Real porosity);

=== modified file 'pkg/dem/CohesiveTriaxialTest.cpp'
--- pkg/dem/CohesiveTriaxialTest.cpp	2014-07-02 16:11:24 +0000
+++ pkg/dem/CohesiveTriaxialTest.cpp	2014-07-02 16:18:24 +0000
@@ -49,9 +49,6 @@
 #include <boost/random/variate_generator.hpp>
 #include <boost/random/normal_distribution.hpp>
 
-using namespace std;
-
-
 typedef pair<Vector3r, Real> BasicSphere;
 //! make a list of spheres non-overlapping sphere
 string GenerateCloud_cohesive(vector<BasicSphere>& sphere_list, Vector3r lowerCorner, Vector3r upperCorner, long number, Real rad_std_dev, Real porosity);

=== modified file 'pkg/dem/GeneralIntegratorInsertionSortCollider.cpp'
--- pkg/dem/GeneralIntegratorInsertionSortCollider.cpp	2014-07-02 16:11:24 +0000
+++ pkg/dem/GeneralIntegratorInsertionSortCollider.cpp	2014-07-02 16:18:24 +0000
@@ -12,8 +12,6 @@
 #include<vector>
 #include<boost/static_assert.hpp>
 
-using namespace std;
-
 YADE_PLUGIN((GeneralIntegratorInsertionSortCollider))
 CREATE_LOGGER(GeneralIntegratorInsertionSortCollider);
 

=== modified file 'pkg/dem/Law2_ScGeom_CapillaryPhys_Capillarity.cpp'
--- pkg/dem/Law2_ScGeom_CapillaryPhys_Capillarity.cpp	2014-07-02 16:11:24 +0000
+++ pkg/dem/Law2_ScGeom_CapillaryPhys_Capillarity.cpp	2014-07-02 16:18:24 +0000
@@ -27,8 +27,6 @@
 
 YADE_PLUGIN((Law2_ScGeom_CapillaryPhys_Capillarity));
 
-using namespace std;
-
 void Law2_ScGeom_CapillaryPhys_Capillarity::postLoad(Law2_ScGeom_CapillaryPhys_Capillarity&){
 
   capillary = shared_ptr<capillarylaw>(new capillarylaw);

=== modified file 'pkg/dem/PeriIsoCompressor.cpp'
--- pkg/dem/PeriIsoCompressor.cpp	2014-07-02 16:11:24 +0000
+++ pkg/dem/PeriIsoCompressor.cpp	2014-07-02 16:18:24 +0000
@@ -8,8 +8,6 @@
 #include<yade/pkg/dem/DemXDofGeom.hpp>
 #include<yade/lib/pyutil/gil.hpp>
 
-using namespace std;
-
 YADE_PLUGIN((PeriIsoCompressor)(PeriTriaxController)(Peri3dController))
 
 CREATE_LOGGER(PeriIsoCompressor);

=== modified file 'pkg/dem/SampleCapillaryPressureEngine.cpp'
--- pkg/dem/SampleCapillaryPressureEngine.cpp	2014-07-02 16:11:24 +0000
+++ pkg/dem/SampleCapillaryPressureEngine.cpp	2014-07-02 16:18:24 +0000
@@ -16,8 +16,6 @@
 #include<yade/lib/base/Math.hpp>
 #include <boost/lexical_cast.hpp>
 
-using namespace std;
-
 YADE_PLUGIN((SampleCapillaryPressureEngine));
 CREATE_LOGGER(SampleCapillaryPressureEngine);
 

=== modified file 'pkg/dem/Shop.hpp'
--- pkg/dem/Shop.hpp	2014-07-02 16:11:24 +0000
+++ pkg/dem/Shop.hpp	2014-07-02 16:18:24 +0000
@@ -23,7 +23,6 @@
 class FrictMat;
 class Interaction;
 
-using namespace std;
 using boost::shared_ptr;
 namespace py = boost::python;
 

=== modified file 'pkg/dem/SimpleShear.cpp'
--- pkg/dem/SimpleShear.cpp	2014-07-02 16:11:24 +0000
+++ pkg/dem/SimpleShear.cpp	2014-07-02 16:18:24 +0000
@@ -41,8 +41,6 @@
 #include <boost/filesystem/convenience.hpp>
 #include <utility>
 
-using namespace std;
-
 YADE_PLUGIN((SimpleShear))
 CREATE_LOGGER(SimpleShear);
 

=== modified file 'pkg/dem/SimpleShear.hpp'
--- pkg/dem/SimpleShear.hpp	2014-07-02 16:11:24 +0000
+++ pkg/dem/SimpleShear.hpp	2014-07-02 16:18:24 +0000
@@ -14,9 +14,6 @@
 typedef pair<Vector3r, Real> BasicSphere;
 //! make a list of spheres non-overlapping sphere
 
-using namespace std;
-
-
 class SimpleShear : public FileGenerator
 {
 		void createBox(shared_ptr<Body>& body, Vector3r position, Vector3r extents);

=== modified file 'pkg/dem/SpherePack.cpp'
--- pkg/dem/SpherePack.cpp	2014-07-02 16:11:24 +0000
+++ pkg/dem/SpherePack.cpp	2014-07-02 16:18:24 +0000
@@ -17,8 +17,6 @@
 
 CREATE_LOGGER(SpherePack);
 
-using namespace std;
-
 namespace py=boost::python;
 
 

=== modified file 'pkg/dem/SpherePack.hpp'
--- pkg/dem/SpherePack.hpp	2014-07-02 16:11:24 +0000
+++ pkg/dem/SpherePack.hpp	2014-07-02 16:18:24 +0000
@@ -3,10 +3,9 @@
 #pragma once
 
 #include<vector>
-#include<string>	
+#include<string>
 #include<limits>
 #include<iostream>
-using namespace std; // sorry
 
 #include<boost/python.hpp>
 #include<boost/python/object.hpp>
@@ -28,6 +27,11 @@
 #include<yade/lib/base/Logging.hpp>
 #include<yade/lib/base/Math.hpp>
 
+using std::vector;
+using std::string;
+using std::min;
+using std::runtime_error;
+
 /*! Class representing geometry of spherical packing, with some utility functions. */
 class SpherePack{
 	// return coordinate wrapped to x0…x1, relative to x0; don't care about period

=== modified file 'pkg/dem/TesselationWrapper.cpp'
--- pkg/dem/TesselationWrapper.cpp	2014-07-02 16:11:24 +0000
+++ pkg/dem/TesselationWrapper.cpp	2014-07-02 16:18:24 +0000
@@ -163,7 +163,6 @@
 
 bool TesselationWrapper::insert(double x, double y, double z, double rad, unsigned int id)
 {
-	using namespace std;
 	checkMinMax(x,y,z,rad);
 	mean_radius += rad;
 	++n_spheres;
@@ -172,7 +171,8 @@
 
 void TesselationWrapper::checkMinMax(double x, double y, double z, double rad)
 {
-	using namespace std;
+	using std::min;
+	using std::max;
 	Pmin = CGT::Point(min(Pmin.x(), x-rad), min(Pmin.y(), y-rad),  min(Pmin.z(), z-rad));
 	Pmax = CGT::Point(max(Pmax.x(), x+rad),  max(Pmax.y(), y+rad),  max(Pmax.z(), z+rad));
 }
@@ -180,12 +180,11 @@
 
 bool TesselationWrapper::move(double x, double y, double z, double rad, unsigned int id)
 {
-	using namespace std;
 	checkMinMax(x,y,z,rad);
 	if (Tes->move(x,y,z,rad,id)!=NULL)
 		return true;
 	else {
-		cerr << "Tes->move(x,y,z,rad,id)==NULL" << endl; return false;
+		std::cerr << "Tes->move(x,y,z,rad,id)==NULL" << std::endl; return false;
 	}
 }
 

=== modified file 'pkg/dem/TriaxialTest.cpp'
--- pkg/dem/TriaxialTest.cpp	2014-07-02 16:11:24 +0000
+++ pkg/dem/TriaxialTest.cpp	2014-07-02 16:18:24 +0000
@@ -56,8 +56,6 @@
 CREATE_LOGGER(TriaxialTest);
 YADE_PLUGIN((TriaxialTest));
 
-using namespace std;
-
 TriaxialTest::~TriaxialTest () {}
 
 bool TriaxialTest::generate(string& message)

=== modified file 'pkg/lbm/HydrodynamicsLawLBM.cpp'
--- pkg/lbm/HydrodynamicsLawLBM.cpp	2014-07-02 16:11:24 +0000
+++ pkg/lbm/HydrodynamicsLawLBM.cpp	2014-07-02 16:18:24 +0000
@@ -33,7 +33,6 @@
 
 
 namespace bfs=boost::filesystem;
-using namespace std;
 
 template<class Scalar> VECTOR3_TEMPLATE(Scalar) operator*(Scalar s, const VECTOR3_TEMPLATE(Scalar)& v) {return v*s;}
 inline Vector3i vect3rToVect3i(Vector3r vect){Vector3i newvect((int)vect[0],(int)vect[1],(int)vect[2]);return(newvect);}

=== modified file 'py/_polyhedra_utils.cpp'
--- py/_polyhedra_utils.cpp	2014-07-02 16:11:24 +0000
+++ py/_polyhedra_utils.cpp	2014-07-02 16:18:24 +0000
@@ -16,7 +16,6 @@
 
 #include<numpy/ndarrayobject.h>
 
-using namespace std;
 namespace py = boost::python;
 
 

=== modified file 'py/_utils.cpp'
--- py/_utils.cpp	2014-07-02 16:11:24 +0000
+++ py/_utils.cpp	2014-07-02 16:18:24 +0000
@@ -17,7 +17,6 @@
 
 #include<numpy/ndarrayobject.h>
 
-using namespace std;
 namespace py = boost::python;
 
 bool isInBB(Vector3r p, Vector3r bbMin, Vector3r bbMax){return p[0]>bbMin[0] && p[0]<bbMax[0] && p[1]>bbMin[1] && p[1]<bbMax[1] && p[2]>bbMin[2] && p[2]<bbMax[2];}

=== modified file 'py/pack/_packPredicates.cpp'
--- py/pack/_packPredicates.cpp	2014-07-02 16:11:24 +0000
+++ py/pack/_packPredicates.cpp	2014-07-02 16:18:24 +0000
@@ -8,7 +8,6 @@
 #include<iostream>
 
 namespace py=boost::python;
-using namespace std;
 
 /*
 This file contains various predicates that say whether a given point is within the solid,
@@ -306,7 +305,7 @@
 
 }
 /* Helper function for inGtsSurface::aabb() */
-static void vertex_aabb(GtsVertex *vertex, pair<Vector3r,Vector3r> *bb)
+static void vertex_aabb(GtsVertex *vertex, std::pair<Vector3r,Vector3r> *bb)
 {
 	GtsPoint *_p=GTS_POINT(vertex);
 	Vector3r p(_p->x,_p->y,_p->z);
@@ -326,16 +325,16 @@
 	GNode* tree;
 public:
 	inGtsSurface(py::object _surf, bool _noPad=false): pySurf(_surf), noPad(_noPad), noPadWarned(false) {
-		if(!pygts_surface_check(_surf.ptr())) throw invalid_argument("Ctor must receive a gts.Surface() instance."); 
+		if(!pygts_surface_check(_surf.ptr())) throw std::invalid_argument("Ctor must receive a gts.Surface() instance."); 
 		surf=PYGTS_SURFACE_AS_GTS_SURFACE(PYGTS_SURFACE(_surf.ptr()));
-	 	if(!gts_surface_is_closed(surf)) throw invalid_argument("Surface is not closed.");
+	 	if(!gts_surface_is_closed(surf)) throw std::invalid_argument("Surface is not closed.");
 		is_open=gts_surface_volume(surf)<0.;
-		if((tree=gts_bb_tree_surface(surf))==NULL) throw runtime_error("Could not create GTree.");
+		if((tree=gts_bb_tree_surface(surf))==NULL) throw std::runtime_error("Could not create GTree.");
 	}
 	~inGtsSurface(){g_node_destroy(tree);}
 	py::tuple aabb() const {
 		Real inf=std::numeric_limits<Real>::infinity();
-		pair<Vector3r,Vector3r> bb; bb.first=Vector3r(inf,inf,inf); bb.second=Vector3r(-inf,-inf,-inf);
+		std::pair<Vector3r,Vector3r> bb; bb.first=Vector3r(inf,inf,inf); bb.second=Vector3r(-inf,-inf,-inf);
 		gts_surface_foreach_vertex(surf,(GtsFunc)vertex_aabb,&bb);
 		return vvec2tuple(bb.first,bb.second);
 	}

=== modified file 'py/wrapper/yadeWrapper.cpp'
--- py/wrapper/yadeWrapper.cpp	2014-07-02 16:11:24 +0000
+++ py/wrapper/yadeWrapper.cpp	2014-07-02 16:18:24 +0000
@@ -54,23 +54,19 @@
 	#include<boost/math/nonfinite_num_facets.hpp>
 #endif
 
+#include <locale>
 #include <boost/random/linear_congruential.hpp>
 #include <boost/random/uniform_real.hpp>
 #include <boost/random/variate_generator.hpp>
-
-#include<yade/core/Timing.hpp>
-
-#include<locale>
-#include<boost/archive/codecvt_null.hpp>
-
-using namespace std;
+#include <boost/archive/codecvt_null.hpp>
+#include <boost/python/object.hpp>
+#include <boost/version.hpp>
+
+#include <yade/core/Timing.hpp>
+#include <yade/lib/serialization/ObjectIO.hpp>
+
 namespace py = boost::python;
 
-#include<yade/lib/serialization/ObjectIO.hpp>
-
-#include<boost/python/object.hpp>
-#include<boost/version.hpp>
-
 /*
 Python normally iterates over object it is has __getitem__ and __len__, which BodyContainer does.
 However, it will not skip removed bodies automatically, hence this iterator which does just that.