Including the header brings in std and tinyply namespace
TristramShandy opened this issue · comments
TristramShandy commented
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
}
Dimitri Diakopoulos commented
Thanks @TristramShandy - I've fixed this on the master branch.