mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-29 00:06:44 -04:00
parser-inc: Add some missing C++11/14/17/20 stdlib stubs
This commit is contained in:
parent
807be99f10
commit
180a902978
9
dtool/src/parser-inc/bit
Normal file
9
dtool/src/parser-inc/bit
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
namespace std {
|
||||||
|
enum class endian {
|
||||||
|
little,
|
||||||
|
big,
|
||||||
|
native,
|
||||||
|
};
|
||||||
|
};
|
11
dtool/src/parser-inc/condition_variable
Normal file
11
dtool/src/parser-inc/condition_variable
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
namespace std {
|
||||||
|
class condition_variable;
|
||||||
|
class condition_variable_any;
|
||||||
|
|
||||||
|
enum class cv_status {
|
||||||
|
no_timeout,
|
||||||
|
timeout,
|
||||||
|
};
|
||||||
|
}
|
31
dtool/src/parser-inc/coroutine
Normal file
31
dtool/src/parser-inc/coroutine
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
namespace std {
|
||||||
|
template<class R, class... ArgTypes>
|
||||||
|
struct coroutine_traits;
|
||||||
|
|
||||||
|
template<class Promise = void>
|
||||||
|
struct coroutine_handle;
|
||||||
|
|
||||||
|
template<class T> struct hash;
|
||||||
|
template<class P> struct hash<coroutine_handle<P>>;
|
||||||
|
|
||||||
|
struct noop_coroutine_promise;
|
||||||
|
|
||||||
|
template<> struct coroutine_handle<noop_coroutine_promise>;
|
||||||
|
using noop_coroutine_handle = coroutine_handle<noop_coroutine_promise>;
|
||||||
|
|
||||||
|
noop_coroutine_handle noop_coroutine() noexcept;
|
||||||
|
|
||||||
|
struct suspend_never {
|
||||||
|
constexpr bool await_ready() const noexcept { return true; }
|
||||||
|
constexpr void await_suspend(coroutine_handle<>) const noexcept {}
|
||||||
|
constexpr void await_resume() const noexcept {}
|
||||||
|
};
|
||||||
|
|
||||||
|
struct suspend_always {
|
||||||
|
constexpr bool await_ready() const noexcept { return false; }
|
||||||
|
constexpr void await_suspend(coroutine_handle<>) const noexcept {}
|
||||||
|
constexpr void await_resume() const noexcept {}
|
||||||
|
};
|
||||||
|
}
|
9
dtool/src/parser-inc/forward_list
Normal file
9
dtool/src/parser-inc/forward_list
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <compare>
|
||||||
|
#include <initializer_list>
|
||||||
|
|
||||||
|
namespace std {
|
||||||
|
template<class T> struct allocator;
|
||||||
|
template<class T, class Allocator = allocator<T>> class forward_list;
|
||||||
|
}
|
27
dtool/src/parser-inc/future
Normal file
27
dtool/src/parser-inc/future
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
namespace std {
|
||||||
|
enum class future_status {
|
||||||
|
ready,
|
||||||
|
timeout,
|
||||||
|
deferred
|
||||||
|
};
|
||||||
|
|
||||||
|
class future_error;
|
||||||
|
|
||||||
|
template<class R> class promise;
|
||||||
|
template<class R> class promise<R&>;
|
||||||
|
template<> class promise<void>;
|
||||||
|
|
||||||
|
template<class R> class future;
|
||||||
|
template<class R> class future<R&>;
|
||||||
|
template<> class future<void>;
|
||||||
|
|
||||||
|
template<class R> class shared_future;
|
||||||
|
template<class R> class shared_future<R&>;
|
||||||
|
template<> class shared_future<void>;
|
||||||
|
|
||||||
|
template<class> class packaged_task;
|
||||||
|
template<class R, class... ArgTypes>
|
||||||
|
class packaged_task<R(ArgTypes...)>;
|
||||||
|
}
|
@ -22,6 +22,7 @@ namespace std {
|
|||||||
inline constexpr adopt_lock_t adopt_lock {};
|
inline constexpr adopt_lock_t adopt_lock {};
|
||||||
|
|
||||||
template<class Mutex> class lock_guard;
|
template<class Mutex> class lock_guard;
|
||||||
|
template<class... MutexTypes> class scoped_lock;
|
||||||
template<class Mutex> class unique_lock;
|
template<class Mutex> class unique_lock;
|
||||||
|
|
||||||
struct once_flag;
|
struct once_flag;
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <stdtypedefs.h>
|
||||||
|
|
||||||
namespace std {
|
namespace std {
|
||||||
class bad_alloc;
|
class bad_alloc;
|
||||||
class bad_array_new_length;
|
class bad_array_new_length;
|
||||||
@ -10,4 +12,12 @@ namespace std {
|
|||||||
extern const nothrow_t nothrow;
|
extern const nothrow_t nothrow;
|
||||||
|
|
||||||
using new_handler = void (*)();
|
using new_handler = void (*)();
|
||||||
|
|
||||||
|
inline constexpr size_t hardware_destructive_interference_size;
|
||||||
|
inline constexpr size_t hardware_constructive_interference_size;
|
||||||
|
|
||||||
|
struct destroying_delete_t {
|
||||||
|
explicit destroying_delete_t() = default;
|
||||||
|
};
|
||||||
|
inline constexpr destroying_delete_t destroying_delete {};
|
||||||
}
|
}
|
||||||
|
7
dtool/src/parser-inc/shared_mutex
Normal file
7
dtool/src/parser-inc/shared_mutex
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
namespace std {
|
||||||
|
class shared_mutex;
|
||||||
|
class shared_timed_mutex;
|
||||||
|
template<class Mutex> class shared_lock;
|
||||||
|
}
|
21
dtool/src/parser-inc/thread
Normal file
21
dtool/src/parser-inc/thread
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <compare>
|
||||||
|
|
||||||
|
namespace std {
|
||||||
|
class thread {
|
||||||
|
public:
|
||||||
|
class id;
|
||||||
|
};
|
||||||
|
|
||||||
|
class jthread {
|
||||||
|
public:
|
||||||
|
using id = thread::id;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<class T> struct hash;
|
||||||
|
template<> struct hash<thread::id>;
|
||||||
|
|
||||||
|
namespace this_thread {
|
||||||
|
}
|
||||||
|
}
|
@ -14,6 +14,9 @@ namespace std {
|
|||||||
typedef integral_constant<bool, true> true_type;
|
typedef integral_constant<bool, true> true_type;
|
||||||
typedef integral_constant<bool, false> false_type;
|
typedef integral_constant<bool, false> false_type;
|
||||||
|
|
||||||
|
template<bool B>
|
||||||
|
using bool_constant = integral_constant<bool, B>;
|
||||||
|
|
||||||
template<class T, class U>
|
template<class T, class U>
|
||||||
struct is_same : std::false_type {};
|
struct is_same : std::false_type {};
|
||||||
|
|
||||||
@ -86,6 +89,9 @@ namespace std {
|
|||||||
template<class T, class U>
|
template<class T, class U>
|
||||||
struct is_convertible : integral_constant<bool, __is_convertible_to(T, U)> {};
|
struct is_convertible : integral_constant<bool, __is_convertible_to(T, U)> {};
|
||||||
|
|
||||||
|
template<class T>
|
||||||
|
struct is_aggregate;
|
||||||
|
|
||||||
template<class T> struct add_cv { typedef const volatile T type; };
|
template<class T> struct add_cv { typedef const volatile T type; };
|
||||||
template<class T> struct add_const { typedef const T type; };
|
template<class T> struct add_const { typedef const T type; };
|
||||||
template<class T> struct add_volatile { typedef volatile T type; };
|
template<class T> struct add_volatile { typedef volatile T type; };
|
||||||
@ -93,4 +99,17 @@ namespace std {
|
|||||||
template<class T> struct add_lvalue_reference { typedef T &type; };
|
template<class T> struct add_lvalue_reference { typedef T &type; };
|
||||||
template<class T> struct add_rvalue_reference { typedef T &&type; };
|
template<class T> struct add_rvalue_reference { typedef T &&type; };
|
||||||
template<class T> struct add_pointer { typedef T *type; };
|
template<class T> struct add_pointer { typedef T *type; };
|
||||||
|
|
||||||
|
constexpr bool is_constant_evaluated() noexcept;
|
||||||
|
|
||||||
|
template<class T>
|
||||||
|
struct type_identity {
|
||||||
|
using type = T;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<class T>
|
||||||
|
using type_identity_t = typename type_identity<T>::type;
|
||||||
|
|
||||||
|
template<class...>
|
||||||
|
using void_t = void;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user