config.hpp 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. //
  2. // Copyright (c) 2019-2023 Ruben Perez Hidalgo (rubenperez038 at gmail dot com)
  3. //
  4. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  5. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  6. //
  7. #ifndef BHO_MYSQL_DETAIL_CONFIG_HPP
  8. #define BHO_MYSQL_DETAIL_CONFIG_HPP
  9. #include <asio2/bho/config.hpp>
  10. // clang-format off
  11. // Concepts
  12. #if defined(__has_include)
  13. #if __has_include(<version>)
  14. #include <version>
  15. #if defined(__cpp_concepts) && defined(__cpp_lib_concepts)
  16. #define BHO_MYSQL_HAS_CONCEPTS
  17. #endif
  18. #endif
  19. #endif
  20. // C++14 conformance
  21. #if BHO_CXX_VERSION >= 201402L
  22. #define BHO_MYSQL_CXX14
  23. #endif
  24. // Separate build
  25. #if defined(BHO_MYSQL_SEPARATE_COMPILATION)
  26. #define BHO_MYSQL_DECL
  27. #define BHO_MYSQL_STATIC_IF_COMPILED static
  28. #define BHO_MYSQL_STATIC_OR_INLINE static
  29. #else
  30. #define BHO_MYSQL_HEADER_ONLY
  31. #define BHO_MYSQL_DECL inline
  32. #define BHO_MYSQL_STATIC_IF_COMPILED
  33. #define BHO_MYSQL_STATIC_OR_INLINE inline
  34. #endif
  35. // clang-format on
  36. #endif