mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[NFC] Introduce a little generators library
This commit is contained in:
@@ -167,6 +167,17 @@ template<typename Orig, typename Projected>
|
||||
using CastArrayRefView =
|
||||
ArrayRefView<Orig, Projected *, arrayRefViewCastHelper<Projected, Orig>>;
|
||||
|
||||
namespace generator_details {
|
||||
template <class T> struct is_array_ref_like;
|
||||
|
||||
template <class Orig, class Projected, Projected (&Project)(const Orig &),
|
||||
bool AllowOrigAccess>
|
||||
struct is_array_ref_like<ArrayRefView<Orig, Projected, Project,
|
||||
AllowOrigAccess>> {
|
||||
enum { value = true };
|
||||
};
|
||||
}
|
||||
|
||||
} // end namespace swift
|
||||
|
||||
#endif // SWIFT_BASIC_ARRAYREFVIEW_H
|
||||
|
||||
Reference in New Issue
Block a user