@class RLMObject;

#ifndef __has_feature
#define __has_feature(x) 0
#endif

#pragma mark - Generics

#if __has_extension(objc_generics)
#define RLM_GENERIC_COLLECTION <RLMObjectType: RLMObject *>
#define RLM_GENERIC_RETURN <RLMObjectType>
#define RLMObjectArgument RLMObjectType
#else
#define RLM_GENERIC_COLLECTION
#define RLM_GENERIC_RETURN
typedef id RLMObjectType;
typedef RLMObject * RLMObjectArgument;
#endif

#pragma mark - Nullability

#if !__has_feature(nullability)
#ifndef __nullable
#define __nullable
#endif
#ifndef __nonnull
#define __nonnull
#endif
#ifndef __null_unspecified
#define __null_unspecified
#endif
#ifndef nullable
#define nullable
#endif
#ifndef nonnull
#define nonnull
#endif
#ifndef null_unspecified
#define null_unspecified
#endif
#endif

#if defined(NS_ASSUME_NONNULL_BEGIN) && defined(NS_ASSUME_NONNULL_END)
#define RLM_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
#define RLM_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END
#else
#define RLM_ASSUME_NONNULL_BEGIN
#define RLM_ASSUME_NONNULL_END
#endif
