mirror of
https://github.com/holub/mame
synced 2025-06-07 21:33:45 +03:00
This works (nw)
This commit is contained in:
parent
63fb72684a
commit
4a876eab0e
65
3rdparty/compat_cpp14.h
vendored
65
3rdparty/compat_cpp14.h
vendored
@ -1,65 +0,0 @@
|
|||||||
// Ville Voutilainen code from include/bits/range_access.h from libstdc++
|
|
||||||
|
|
||||||
#if defined(__GNUC__) && ((__GNUC__ == 5 && __GNUC_MINOR__ < 2) || (__GNUC__ == 4 && __GNUC_MINOR__ > 8))
|
|
||||||
|
|
||||||
template<class _Container>
|
|
||||||
inline constexpr auto
|
|
||||||
cbegin(const _Container& __cont) noexcept(noexcept(std::begin(__cont)))-> decltype(std::begin(__cont))
|
|
||||||
{ return std::begin(__cont); }
|
|
||||||
|
|
||||||
template<class _Container>
|
|
||||||
inline constexpr auto
|
|
||||||
cend(const _Container& __cont) noexcept(noexcept(std::end(__cont)))-> decltype(std::end(__cont))
|
|
||||||
{ return std::end(__cont); }
|
|
||||||
|
|
||||||
template<class _Container>
|
|
||||||
inline auto
|
|
||||||
rbegin(_Container& __cont) -> decltype(__cont.rbegin())
|
|
||||||
{ return __cont.rbegin(); }
|
|
||||||
|
|
||||||
template<class _Container>
|
|
||||||
inline auto
|
|
||||||
rbegin(const _Container& __cont) -> decltype(__cont.rbegin())
|
|
||||||
{ return __cont.rbegin(); }
|
|
||||||
|
|
||||||
template<class _Container>
|
|
||||||
inline auto
|
|
||||||
rend(_Container& __cont) -> decltype(__cont.rend())
|
|
||||||
{ return __cont.rend(); }
|
|
||||||
|
|
||||||
template<class _Container>
|
|
||||||
inline auto
|
|
||||||
rend(const _Container& __cont) -> decltype(__cont.rend())
|
|
||||||
{ return __cont.rend(); }
|
|
||||||
|
|
||||||
template<class _Tp, size_t _Nm>
|
|
||||||
inline reverse_iterator<_Tp*>
|
|
||||||
rbegin(_Tp (&__arr)[_Nm])
|
|
||||||
{ return reverse_iterator<_Tp*>(__arr + _Nm); }
|
|
||||||
|
|
||||||
template<class _Tp, size_t _Nm>
|
|
||||||
inline reverse_iterator<_Tp*>
|
|
||||||
rend(_Tp (&__arr)[_Nm])
|
|
||||||
{ return reverse_iterator<_Tp*>(__arr); }
|
|
||||||
|
|
||||||
template<class _Tp>
|
|
||||||
inline reverse_iterator<const _Tp*>
|
|
||||||
rbegin(initializer_list<_Tp> __il)
|
|
||||||
{ return reverse_iterator<const _Tp*>(__il.end()); }
|
|
||||||
|
|
||||||
template<class _Tp>
|
|
||||||
inline reverse_iterator<const _Tp*>
|
|
||||||
rend(initializer_list<_Tp> __il)
|
|
||||||
{ return reverse_iterator<const _Tp*>(__il.begin()); }
|
|
||||||
|
|
||||||
template<class _Container>
|
|
||||||
inline auto
|
|
||||||
crbegin(const _Container& __cont) -> decltype(std::rbegin(__cont))
|
|
||||||
{ return std::rbegin(__cont); }
|
|
||||||
|
|
||||||
template<class _Container>
|
|
||||||
inline auto
|
|
||||||
crend(const _Container& __cont) -> decltype(std::rend(__cont))
|
|
||||||
{ return std::rend(__cont); }
|
|
||||||
|
|
||||||
#endif
|
|
@ -25,8 +25,6 @@
|
|||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include <unordered_set>
|
#include <unordered_set>
|
||||||
|
|
||||||
#include "compat_cpp14.h"
|
|
||||||
|
|
||||||
// core emulator headers -- must be first
|
// core emulator headers -- must be first
|
||||||
#include "emucore.h"
|
#include "emucore.h"
|
||||||
#include "eminline.h"
|
#include "eminline.h"
|
||||||
|
@ -185,6 +185,21 @@
|
|||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
|
#if defined(__GNUC__) && ((__GNUC__ == 5 && __GNUC_MINOR__ < 2) || (__GNUC__ == 4 && __GNUC_MINOR__ > 8))
|
||||||
|
namespace std
|
||||||
|
{
|
||||||
|
template<class _Container>
|
||||||
|
inline constexpr auto
|
||||||
|
cbegin(const _Container& __cont) noexcept(noexcept(std::begin(__cont)))-> decltype(std::begin(__cont))
|
||||||
|
{ return std::begin(__cont); }
|
||||||
|
|
||||||
|
template<class _Container>
|
||||||
|
inline constexpr auto
|
||||||
|
cend(const _Container& __cont) noexcept(noexcept(std::end(__cont)))-> decltype(std::end(__cont))
|
||||||
|
{ return std::end(__cont); }
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace util {
|
namespace util {
|
||||||
namespace detail {
|
namespace detail {
|
||||||
//**************************************************************************
|
//**************************************************************************
|
||||||
|
Loading…
Reference in New Issue
Block a user