Browse Source

Move C++ version detection to core.h

master
Nemanja Trifunovic 5 years ago
parent
commit
f26d39e8ad
  1. 12
      source/utf8.h
  2. 4
      source/utf8/checked.h
  3. 9
      source/utf8/core.h

12
source/utf8.h

@ -31,16 +31,4 @@ DEALINGS IN THE SOFTWARE.
#include "utf8/checked.h"
#include "utf8/unchecked.h"
// Determine whether to include C++ 11 specific header
// If the user defines UTF_CPP_CPLUSPLUS, use that.
// Otherwise, trust the unreliable predefined macro __cplusplus
#if !defined UTF_CPP_CPLUSPLUS
#define UTF_CPP_CPLUSPLUS __cplusplus
#endif
#if UTF_CPP_CPLUSPLUS >= 201103L // C++ 11 or later
#include "utf8/cpp11.h"
#endif // C++ 11 or later
#endif // header guard

4
source/utf8/checked.h

@ -320,5 +320,9 @@ namespace utf8
} // namespace utf8
#if UTF_CPP_CPLUSPLUS >= 201103L // C++ 11 or later
#include "utf8/cpp11.h"
#endif // C++ 11 or later
#endif //header guard

9
source/utf8/core.h

@ -30,6 +30,15 @@ DEALINGS IN THE SOFTWARE.
#include <iterator>
// Determine the C++ standard version.
// If the user defines UTF_CPP_CPLUSPLUS, use that.
// Otherwise, trust the unreliable predefined macro __cplusplus
#if !defined UTF_CPP_CPLUSPLUS
#define UTF_CPP_CPLUSPLUS __cplusplus
#endif
namespace utf8
{
// The typedefs for 8-bit, 16-bit and 32-bit unsigned integers

Loading…
Cancel
Save