Description
Hi
I have been struggling with some compiler errors involving 'variant'. I have my own 'variant' class in my library and it seemed to be clashing when I pulled in the tabulate header. I had a look and found this in tabulate.hpp:
#if __cplusplus >= 201703L
#include <string_view>
#include
using std::get_if;
using std::holds_alternative;
using std::string_view;
using std::variant;
using std::visit;
This is not a good practice to pull names from the standard library into the global namespace! Every library that uses tabulate will now have these names in the global namespace too.
I also found std::optional used this way.
I have manually gone and commented out all such using statements and added std:: prefix everywhere where they were used. It is not a lot of places - so it seems an easy fix!
Best Regards, P.