I'm writing this small header-mostly library, which has to support C++11. Unfortunately, it turns out that I need an index_sequence
somewhere in there. I can "lift" an implementation from somewhere (e.g. this one, here on SO); but of course I would rather not burden the users' code with yet another impromptu definition of an index_sequence
when another one might already have been made.
Now, the first thing I'll do is a C++ version check, so for C++14 and onwards I'll do nothing. But if it's C++11 - how should I make a best effort to check that it hasn't been defined already? Is there some feature macro that people (= library authors) tend to use for this case?