cmake CXX_HAS_CONCEPTS examples

ned14/quickcpplib cmakelib/QuickCppLibUtils.cmake :500

check_cxx_source_compiles("
  #if !defined(_MSC_VER) && !defined(__clang__) && (__GNUC__ < 9 || __cplusplus < 202000L)
  #define OUTCOME_GCC6_CONCEPT_BOOL bool
  #else
  #define OUTCOME_GCC6_CONCEPT_BOOL
  #endif
  namespace detail
  {
    template <class T, class U> concept OUTCOME_GCC6_CONCEPT_BOOL SameHelper = true;
    template <class T, class U> concept OUTCOME_GCC6_CONCEPT_BOOL same_as = detail::SameHelper<T, U> &&detail::SameHelper<U, T>;
  }  // namespace detail
  template <class U> concept OUTCOME_GCC6_CONCEPT_BOOL ValueOrNone = requires(U a)
  {
    {
      a.has_value()
    }
    ->detail::same_as<bool>;
    {a.value()};
  };
  int main() { return 0; }
  " CXX_HAS_CONCEPTS${iter})