Files
swift-mirror/test/Interop/Cxx/stdlib/Inputs/std-vector.h
Egor Zhdan af014c02b3 [cxx-interop] Import iterator types that are not typedef-ed
This prevented `std::vector<std::string>` from being auto-conformed to `CxxRandomAccessCollection`.

If an iterator type is templated, and does not have an explicit instantiation via a typedef or a using-decl, its specialization will not have an owning Clang module. Make sure we treat it as a part of the Clang module that owns the template decl.

rdar://112762768 / resolves https://github.com/apple/swift/issues/67410
2023-07-24 11:25:15 +01:00

12 lines
321 B
C++

#ifndef TEST_INTEROP_CXX_STDLIB_INPUTS_STD_VECTOR_H
#define TEST_INTEROP_CXX_STDLIB_INPUTS_STD_VECTOR_H
#include <vector>
#include <string>
using Vector = std::vector<int>;
using VectorOfString = std::vector<std::string>;
inline Vector initVector() { return {}; }
#endif // TEST_INTEROP_CXX_STDLIB_INPUTS_STD_VECTOR_H