//                    (C) 2016 SiLeader.
// Distributed under the Boost Software License, Version 1.0.
//    (See accompanying file LICENSE_1_0.txt or copy at
//          http://www.boost.org/LICENSE_1_0.txt)

#include <developer_settings.hpp>

namespace STD
{
    using int8_t=__INT8_TYPE__;
    using int16_t=__INT16_TYPE__;
    using int32_t=__INT32_TYPE__;
    using int64_t=__INT64_TYPE__;

    using uint8_t=__UINT8_TYPE__;
    using uint16_t=__UINT16_TYPE__;
    using uint32_t=__UINT32_TYPE__;
    using uint64_t=__UINT64_TYPE__;

    //int and uint fast
    using int_fast8_t=__INT_FAST8_TYPE__;
    using int_fast16_t=__INT_FAST16_TYPE__;
    using int_fast32_t=__INT_FAST32_TYPE__;
    using int_fast64_t=__INT_FAST64_TYPE__;

    using uint_fast8_t=__UINT_FAST8_TYPE__;
    using uint_fast16_t=__UINT_FAST16_TYPE__;
    using uint_fast32_t=__UINT_FAST32_TYPE__;
    using uint_fast64_t=__UINT_FAST64_TYPE__;

    //int and uint least
    using int_least8_t=__INT_LEAST8_TYPE__;
    using int_least16_t=__INT_LEAST16_TYPE__;
    using int_least32_t=__INT_LEAST32_TYPE__;
    using int_least64_t=__INT_LEAST64_TYPE__;

    using uint_least8_t=__UINT_LEAST8_TYPE__;
    using uint_least16_t=__UINT_LEAST16_TYPE__;
    using uint_least32_t=__UINT_LEAST32_TYPE__;
    using uint_least64_t=__UINT_LEAST64_TYPE__;

    //int and uint max
    using intmax_t=__INT_MAX_TYPE__;
    using uintmax_t=__UINT_MAX_TYPE__;

    //int and uint ptr
    using intptr_t=__INTPTR_TYPE__;
    using uintptr_t=__UINTPTR_TYPE__;
}

//int and uint max & min
#define INT8_MIN (-(__INT8_MAX__-1))
#define INT16_MIN (-(__INT16_MAX__-1))
#define INT32_MIN (-(__INT32_MAX__-1))
#define INT64_MIN (-(__INT64_MAX__-1))

#define INT8_MAN __INT8_MAX__
#define INT16_MAN __INT16_MAX__
#define INT32_MAN __INT32_MAX__
#define INT64_MAN __INT64_MAX__

#define UINT8_MIN 0
#define UINT16_MIN 0
#define UINT32_MIN 0
#define UINT64_MIN 0

#define UINT8_MAN __UINT8_MAX__
#define UINT16_MAN __UINT16_MAX__
#define UINT32_MAN __UINT32_MAX__
#define UINT64_MAN __UINT64_MAX__

//int and uint fast max & min
#define INT_FAST8_MIN (-(__INT_FAST8_MAX__-1))
#define INT_FAST16_MIN (-(__INT_FAST16_MAX__-1))
#define INT_FAST32_MIN (-(__INT_FAST32_MAX__-1))
#define INT_FAST64_MIN (-(__INT_FAST64_MAX__-1))

#define INT_FAST8_MAN __INT_FAST8_MAX__
#define INT_FAST16_MAN __INT_FAST16_MAX__
#define INT_FAST32_MAN __INT_FAST32_MAX__
#define INT_FAST64_MAN __INT_FAST64_MAX__

#define UINT_FAST8_MIN 0
#define UINT_FAST16_MIN 0
#define UINT_FAST32_MIN 0
#define UINT_FAST64_MIN 0

#define UINT_FAST8_MAN __UINT_FAST8_MAX__
#define UINT_FAST16_MAN __UINT_FAST16_MAX__
#define UINT_FAST32_MAN __UINT_FAST32_MAX__
#define UINT_FAST64_MAN __UINT_FAST64_MAX__

//int and uint least max & min
#define INT_LEAST8_MIN (-(__INT_LEAST8_MAX__-1))
#define INT_LEAST16_MIN (-(__INT_LEAST16_MAX__-1))
#define INT_LEAST32_MIN (-(__INT_LEAST32_MAX__-1))
#define INT_LEAST64_MIN (-(__INT_LEAST64_MAX__-1))

#define INT_LEAST8_MAN __INT_LEAST8_MAX__
#define INT_LEAST16_MAN __INT_LEAST16_MAX__
#define INT_LEAST32_MAN __INT_LEAST32_MAX__
#define INT_LEAST64_MAN __INT_LEAST64_MAX__

#define UINT_LEAST8_MIN 0
#define UINT_LEAST16_MIN 0
#define UINT_LEAST32_MIN 0
#define UINT_LEAST64_MIN 0

#define UINT_LEAST8_MAN __UINT_LEAST8_MAX__
#define UINT_LEAST16_MAN __UINT_LEAST16_MAX__
#define UINT_LEAST32_MAN __UINT_LEAST32_MAX__
#define UINT_LEAST64_MAN __UINT_LEAST64_MAX__

//int and uint max max & min
#define INT_MAX_MIX (-(__INTMAX_MAX__-1))

#define INT_MAX_MAN __INTMAX_MAX__

#define UINT_MAX_MIN 0

#define UINT_MAX_MAX __UINTMAX_MAX__

//int and uint ptr max & min
#define INT_PTR_MIX (-(__INTPTR_MAX__-1))

#define INT_PTR_MAN __INTPTR_MAX__

#define UINT_PTR_MIN 0

#define UINT_PTR_MAX __UINTPTR_MAX__
