ddiakopoulos / tinyply

:earth_africa: C++11 ply 3d mesh format importer & exporter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Including the header brings in std and tinyply namespace

TristramShandy opened this issue · comments

When including the library with #define TINYPLY_IMPLEMENTATION, the std and tinyply namespaces are automatically included via using declarations. This introduces in a lot of very common names (like Type and Buffer from tinyply:: or vector from std::) into the declarative region that is using tinyply and can lead to unexpected and hard to debug errors.

As a fix, I suggest to write the implementation like this

namespace tinyply
{
  using namespace std;
  // implementation here
}

Thanks @TristramShandy - I've fixed this on the master branch.