blob: 457e49a8fdd79052bc3353018c8cf401d2c531a4 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
--- contrib/tools/cython/Cython/Utility/CppSupport.cpp (index)
+++ contrib/tools/cython/Cython/Utility/CppSupport.cpp (working tree)
@@ -83,20 +83,11 @@ auto __Pyx_pythran_to_python(T &&value) -> decltype(to_python(
////////////// OptionalLocals.proto ////////////////
//@proto_block: utility_code_proto_before_types
-
-#include <utility>
-#if defined(CYTHON_USE_BOOST_OPTIONAL)
- // fallback mode - std::optional is preferred but this gives
- // people with a less up-to-date compiler a chance
- #include <boost/optional.hpp>
- #define __Pyx_Optional_BaseType boost::optional
-#else
- #include <optional>
- // since std::optional is a C++17 features, a templated using declaration should be safe
- // (although it could be replaced with a define)
- template <typename T>
- using __Pyx_Optional_BaseType = std::optional<T>;
-#endif
+#include <optional>
+// since std::optional is a C++17 features, a templated using declaration should be safe
+// (although it could be replaced with a define)
+template <typename T>
+using __Pyx_Optional_BaseType = std::optional<T>;
// This class reuses as much of the implementation of std::optional as possible.
// The only place it differs significantly is the assignment operators, which use
|