Files
swift-mirror/test/Interop/Cxx/stdlib/Inputs/std-optional.h
Egor Zhdan e0d7f52467 [cxx-interop] Adjust a test
This prevents a name conflict between a Swift `protocol CxxOptional` and a C++ `using CxxOptional`.
2023-08-08 17:45:18 +01:00

13 lines
358 B
C++

#ifndef TEST_INTEROP_CXX_STDLIB_INPUTS_STD_OPTIONAL_H
#define TEST_INTEROP_CXX_STDLIB_INPUTS_STD_OPTIONAL_H
#include <optional>
using StdOptionalInt = std::optional<int>;
inline StdOptionalInt getNonNilOptional() { return {123}; }
inline StdOptionalInt getNilOptional() { return {std::nullopt}; }
#endif // TEST_INTEROP_CXX_STDLIB_INPUTS_STD_OPTIONAL_H