Skip to content

Commit d3fed74

Browse files
committed
integrated EASTL into the libcxx headers
1 parent 72854f4 commit d3fed74

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+671
-111
lines changed

.gitmodules

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@
2020
url = https://github.com/CE-Programming/graphx-template
2121
[submodule "src/EASTL"]
2222
path = src/ea/EASTL
23-
url = https://github.com/electronicarts/EASTL.git
23+
url = https://github.com/CE-Programming/EASTL.git
24+
branch = eastl-tice
2425
[submodule "src/EABase"]
2526
path = src/ea/EABase
26-
url = https://github.com/electronicarts/EABase.git
27+
url = https://github.com/CE-Programming/EABase.git
28+
branch = eastl-tice

src/ea/EASTL

src/ea/include/__EASTL_user_config.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44

55
#define EASTL_THREAD_SUPPORT_AVAILABLE 0
6+
#define EASTL_EASTDC_VSNPRINTF 0
67

78

89
#if !defined(_SSIZE_T_) && !defined(_SSIZE_T_DEFINED) && !defined(SSIZE_T_DEFINED)

src/libcxx/header_test.cpp

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
11
#include <__config>
22
#include <algorithm>
3+
#include <any>
4+
#include <array>
35
#include <bit>
6+
#include <bitset>
47
#include <cassert>
58
#include <cctype>
69
#include <cerrno>
710
#include <cfenv>
811
#include <cfloat>
12+
#include <chrono>
913
#include <cinttypes>
1014
#include <ciso646>
1115
#include <climits>
1216
#include <cmath>
17+
#include <compare>
1318
#if __cplusplus >= 201907L
1419
#include <concepts>
1520
#endif // __cplusplus >= 201907L
@@ -22,23 +27,44 @@
2227
#include <cstdio>
2328
#include <cstdlib>
2429
#include <cstring>
25-
#include <ctime>
2630
#include <ctgmath>
31+
#include <ctime>
2732
#include <cwchar>
2833
#include <cwctype>
2934
#include <cxxabi.h>
35+
#include <deque>
3036
#include <exception>
37+
#include <expected>
38+
#include <functional>
3139
#include <initializer_list>
40+
#include <iterator>
3241
#include <limits>
42+
#include <list>
43+
#include <map>
3344
#include <memory>
3445
#include <new>
3546
#include <numbers>
47+
#include <numeric>
48+
#include <optional>
49+
#include <queue>
50+
#include <random>
51+
#include <ratio>
52+
#include <set>
3653
#if __cplusplus >= 201907L
3754
#include <source_location>
3855
#endif // __cplusplus >= 201907L
56+
#include <span>
57+
#include <stack>
58+
#include <string>
59+
#include <string_view>
60+
#include <tuple>
3961
#include <type_traits>
4062
#include <typeinfo>
63+
#include <unordered_map>
64+
#include <unordered_set>
4165
#include <utility>
66+
#include <variant>
67+
#include <vector>
4268
#include <version>
4369

4470
#include <alloca.h>

src/libcxx/include/__eastl_config

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#ifndef _EZCXX_EASTL_CONFIG
2+
#define _EZCXX_EASTL_CONFIG
3+
4+
#include <__config>
5+
6+
#pragma clang system_header
7+
8+
namespace eastl {
9+
10+
}
11+
12+
namespace std {
13+
using namespace eastl;
14+
}
15+
16+
#endif /* _EZCXX_EASTL_CONFIG */

src/libcxx/include/algorithm

Lines changed: 4 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,13 @@
11
// -*- C++ -*-
2-
//===----------------------------------------------------------------------===//
3-
//
4-
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5-
// See https://llvm.org/LICENSE.txt for license information.
6-
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7-
//
8-
//===----------------------------------------------------------------------===//
9-
102
#ifndef _EZCXX_ALGORITHM
113
#define _EZCXX_ALGORITHM
124

13-
#include <__config>
14-
15-
// currently unused, but included in the standard
5+
#include <__eastl_config>
166
#include <initializer_list>
7+
#include <EASTL/algorithm.h>
8+
#include <EASTL/heap.h>
9+
#include <EASTL/sort.h>
1710

1811
#pragma clang system_header
1912

20-
// very limited implementation of <algorithm>
21-
// only supports std:max, std::min, and std::clamp
22-
// these functions can be replaced when <algorithm> is properly implemented
23-
24-
namespace std {
25-
26-
template <class _Tp, class _Compare> _EZCXX_NODISCARD_EXT inline constexpr
27-
const _Tp& max(const _Tp& __a, const _Tp& __b, _Compare __comp)
28-
{
29-
return __comp(__a, __b) ? __b : __a;
30-
}
31-
32-
template <class _Tp> _EZCXX_NODISCARD_EXT inline constexpr
33-
const _Tp& max(const _Tp& __a, const _Tp& __b)
34-
{
35-
return (__a < __b) ? __b : __a;
36-
}
37-
38-
template <class _Tp, class _Compare> _EZCXX_NODISCARD_EXT inline constexpr
39-
const _Tp& min(const _Tp& __a, const _Tp& __b, _Compare __comp)
40-
{
41-
return __comp(__a, __b) ? __a : __b;
42-
}
43-
44-
template <class _Tp> _EZCXX_NODISCARD_EXT inline constexpr
45-
const _Tp& min(const _Tp& __a, const _Tp& __b)
46-
{
47-
return (__a < __b) ? __a : __b;
48-
}
49-
50-
template <class _Tp, class _Compare> _EZCXX_NODISCARD_EXT inline constexpr
51-
const _Tp& clamp(const _Tp& __v, const _Tp& __lo, const _Tp& __hi, _Compare __comp)
52-
{
53-
return __comp(__v, __lo) ? __lo : __comp(__hi, __v) ? __hi : __v;
54-
}
55-
56-
template <class _Tp> _EZCXX_NODISCARD_EXT inline constexpr
57-
const _Tp& clamp(const _Tp& __v, const _Tp& __lo, const _Tp& __hi)
58-
{
59-
return (__v < __lo) ? __lo : (__hi < __v) ? __hi : __v;
60-
}
61-
62-
} // namespace std
63-
6413
#endif // _EZCXX_ALGORITHM

src/libcxx/include/any

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// -*- C++ -*-
2+
#ifndef _EZCXX_ANY
3+
#define _EZCXX_ANY
4+
5+
#include <__eastl_config>
6+
#include <algorithm>
7+
#include <EASTL/any.h>
8+
9+
#pragma clang system_header
10+
11+
#endif // _EZCXX_ANY

src/libcxx/include/array

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// -*- C++ -*-
2+
#ifndef _EZCXX_ARRAY
3+
#define _EZCXX_ARRAY
4+
5+
#include <__eastl_config>
6+
#include <initializer_list>
7+
#include <EASTL/array.h>
8+
9+
#pragma clang system_header
10+
11+
#endif // _EZCXX_ARRAY

src/libcxx/include/bitset

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// -*- C++ -*-
2+
#ifndef _EZCXX_BITSET
3+
#define _EZCXX_BITSET
4+
5+
#include <__eastl_config>
6+
#include <string>
7+
#include <EASTL/bitset.h>
8+
9+
#pragma clang system_header
10+
11+
#endif // _EZCXX_BITSET

src/libcxx/include/chrono

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// -*- C++ -*-
2+
#ifndef _EZCXX_CHRONO
3+
#define _EZCXX_CHRONO
4+
5+
#include <__eastl_config>
6+
#include <EASTL/chrono.h>
7+
8+
#pragma clang system_header
9+
10+
#endif // _EZCXX_CHRONO

0 commit comments

Comments
 (0)