This is similar to What differences, if any, between C++03 and C++11 can be detected at run-time?. But in this case, I want detection to occur via the preprocessor.
How should we guard the move constructor (and move assignment) when the sources are used in both C++03 and C++11?
Is the following sufficient (is move semantics something all C++ compilers adopted due to it being essential/core feature)?
#if (__cpluplus >= 201103L)
Foo(Foo&& other);
#endif
Or do I need to get into compiler specifics? If we need compiler specific macros, then how do we handle situations like Visual Studio 2012 __cplusplus and C++ 11?
Sorry to ask. I don't have some of these compilers to test on, like Visual Studio 2012, Intel ICC and Comeau.
EDIT: the library uses a GNUmakefile and Standard C++ 03. It does not use Autotools, it does not use Cmake, and it does not use Boost.