// -*- C++ -*-
//===--------------------------- cstddef ----------------------------------===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_CSTDDEF
#define _LIBCPP_CSTDDEF

/*
    cstddef synopsis

Macros:

    offsetof(type,member-designator)
    NULL

namespace std
{

Types:

    ptrdiff_t
    size_t
    max_align_t
    nullptr_t

}  // std

*/

#include <__config>

#ifdef __GLIBC__
#define __need_NULL
#define __need_ptrdiff_t
#define __need_size_t
#endif  // __GLIBC__

#include <stddef.h>

#pragma GCC system_header

_LIBCPP_BEGIN_NAMESPACE_STD

using ::ptrdiff_t;
using ::size_t;

typedef long double max_align_t;

#ifdef _LIBCPP_HAS_NO_NULLPTR

struct _LIBCPP_VISIBLE nullptr_t
{
    void* _;

    struct __nat {int __for_bool_;};

    _LIBCPP_ALWAYS_INLINE nullptr_t(int __nat::*) {}

    _LIBCPP_ALWAYS_INLINE operator int __nat::*() const {return 0;}

    template <class _Tp>
        _LIBCPP_ALWAYS_INLINE
        operator _Tp* () const {return 0;}

    template <class _Tp, class _Up>
        _LIBCPP_ALWAYS_INLINE
        operator _Tp _Up::* () const {return 0;}

    friend _LIBCPP_ALWAYS_INLINE bool operator==(nullptr_t, nullptr_t) {return true;}
    friend _LIBCPP_ALWAYS_INLINE bool operator!=(nullptr_t, nullptr_t) {return false;}
    friend _LIBCPP_ALWAYS_INLINE bool operator<(nullptr_t, nullptr_t) {return false;}
    friend _LIBCPP_ALWAYS_INLINE bool operator<=(nullptr_t, nullptr_t) {return true;}
    friend _LIBCPP_ALWAYS_INLINE bool operator>(nullptr_t, nullptr_t) {return false;}
    friend _LIBCPP_ALWAYS_INLINE bool operator>=(nullptr_t, nullptr_t) {return true;}
};

inline _LIBCPP_ALWAYS_INLINE nullptr_t __get_nullptr_t() {return nullptr_t(0);}

#define nullptr _STD::__get_nullptr_t()

#else  // _LIBCPP_HAS_NO_NULLPTR

typedef decltype(nullptr) nullptr_t;

#endif  // _LIBCPP_HAS_NO_NULLPTR

_LIBCPP_END_NAMESPACE_STD

#endif  // _LIBCPP_CSTDDEF
