refresh-bio / KMC

Fast and frugal disk based k-mer counter
256 stars 73 forks source link

Using namespace std in an header file #117

Closed voichek closed 5 years ago

voichek commented 5 years ago

Hi,

I am using the KMC API in my code. I have noticed that "kmer_defs.h" file add the std namespace. To my knowledge adding namespace in header files is not a common practice as it effects all the cpp/h files including it.

I was wondering if you could please remove it from the code, so programs using it won't be affected.

Best wishes, Yoav Voichek

marekkokot commented 5 years ago

Hi,

You are absolutelly right, using namespace is a bad practice. Thanks for reporting that, it was fiexed with last commit (at least in KMC API, in KMC code we still have some using namespace in header files, maybe at some point we will fix that, but for now as we need to keep implementation in header files because of templates we will keep it the way it is, furthermore for the end user it is probably not so important, but I hope we will find a time to fix it also in KMC at some point).

Thanks again for reporting that and for using KMC. Best, Marek

voichek commented 5 years ago

Thank you for the quick response!