teju85/ARFF — pull request #1 by kris7topher (2013-08-11 16:18:39+00:00)
Title: Some compiler-related workarounds

First of all, thanks for the nice library for ARFF file I/O!

I wanted to use you library in a machine learning project but at first failed to build everything. On my system, gtest needed `-lpthread` at the end of the linking command line to link successfully, and additionally, it seems `gtest-all.cc` is enough for the gtest static archive (and compiling any other gtest files results in errors because of multiply-defined non inline symbols).

I also did some modifications for make the headers a *bit more* standards-compilant. The variadic throw macro, I think, cannot be done portably pre-C++11 without some hefty dependencies (e.g. boost::exception). However, `## __VA_ARGS__` is a GNU-extension while `__VA_ARGS__` is standard in C++11 so I removed the `##` bit. Anyways, the code compiles with GNU extensions (as shown by `-pedanctic`) for C++98 or C++03, and without any extensions for C++11 (as shown by, e.g. `-std=c++11 -Weverything -Wno-c++98-compat -Wno-c++98-compat-pedantic` under clang, although I only did that for the headers. But `-std=c++11 -pedantic` has no warnings in GCC when compiling the static library, either.)

On a slightly unrelated note, I don't think it is too good practice to have a big honkin' macro named `THROW` right in the global scope... What I try to imply that the code is nearly 2 years old, and it might be nice to update it according to "modern" (i.e. C++11) coding style. I understand you probably have no free time available to do that since you have abandoned the project a long time ago. I am hoping to find some time myself to do that (although there is only a very slim chance, unfortunately), maybe with the addition of implementing newer ARFF features like collection-valued attributes... A native library for reading and writing data files used by a popular tool seems like a nice thing to have