Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

45 righe
1.1 KiB

  1. //
  2. // Lol Engine
  3. //
  4. // Copyright © 2010–2024 Sam Hocevar <sam@hocevar.net>
  5. //
  6. // Lol Engine is free software. It comes without any warranty, to
  7. // the extent permitted by applicable law. You can redistribute it
  8. // and/or modify it under the terms of the Do What the Fuck You Want
  9. // to Public License, Version 2, as published by the WTFPL Task Force.
  10. // See http://www.wtfpl.net/ for more details.
  11. //
  12. #pragma once
  13. //
  14. // The build-time features
  15. // ———————————————————————
  16. //
  17. // C++ compiler features detected through __has_cpp_attribute
  18. #if defined(__has_cpp_attribute)
  19. # if !__has_cpp_attribute(nodiscard)
  20. # error C++ compiler support for [[nodiscard]] is required (use -std=c++17?)
  21. # endif
  22. # if !__has_cpp_attribute(fallthrough)
  23. # error C++ compiler support for [[fallthrough]] is required (use -std=c++17?)
  24. # endif
  25. #endif
  26. // C++ compiler features detected through __has_feature
  27. #if defined(__has_feature)
  28. # if !__has_feature(cxx_constexpr)
  29. # error C++ compiler for constexpr is required (use -std=c++11?)
  30. # endif
  31. #endif