[flang-commits] [flang] [flang][runtime] Added Fortran::common::optional for use on device. (PR #85177)

via flang-commits flang-commits at lists.llvm.org
Thu Mar 14 08:12:03 PDT 2024


================
@@ -0,0 +1,243 @@
+//===-- include/flang/Common/optional.h -------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// Implementation of std::optional borrowed from LLVM's
+// libc/src/__support/CPP/optional.h with modifications (e.g. value_or, emplace
+// methods were added).
+//
+// The implementation defines optional in Fortran::common namespace.
+// This standalone implementation may beused if the target
----------------
jeanPerier wrote:

```suggestion
// This standalone implementation may be used if the target
```

https://github.com/llvm/llvm-project/pull/85177


More information about the flang-commits mailing list