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
}
When including the library with
#define TINYPLY_IMPLEMENTATION
, thestd
andtinyply
namespaces are automatically included viausing
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