Skip to content

Commit 80c5acb

Browse files
committed
🚚 static -> inline (follows C++ standard naming)
1 parent 5a6c159 commit 80c5acb

27 files changed

+328
-328
lines changed

‎CMakeLists.txt‎

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ============================================================================
22
#
3-
# ztd.static_containers
3+
# ztd.inline_containers
44
#
55
# © ThePhD <phdofthehouse@gmail.com>
66
#
@@ -28,12 +28,12 @@ set(CMAKE_PROJECT_INCLUDE ${ZTD_CMAKE_PROJECT_PRELUDE})
2828
# # Project declaration
2929
# informs about the project, gives a description, version and MOST IMPORTANTLY
3030
# the languages the project is going to use. Required.
31-
project(ztd.static_containers
31+
project(ztd.inline_containers
3232
VERSION 0.5.0
3333
DESCRIPTION "A library for a fixed-capacity vector."
3434
LANGUAGES C CXX)
3535

36-
if(ZTD_STATIC_CONTAINERS_READTHEDOCS)
36+
if(ZTD_INLINE_CONTAINERS_READTHEDOCS)
3737
# ReadTheDocs seems unable to handle the include at the project level: something must be going wrong?
3838
include(CheckCXXCompilerFlag)
3939
include(CheckCCompilerFlag)
@@ -56,13 +56,13 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
5656
# # # Top-Level Directories
5757
# Check if this is the top-level project or not
5858
if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
59-
set(ZTD_STATIC_CONTAINERS_IS_TOP_LEVEL_PROJECT YES)
59+
set(ZTD_INLINE_CONTAINERS_IS_TOP_LEVEL_PROJECT YES)
6060
else()
61-
set(ZTD_STATIC_CONTAINERS_IS_TOP_LEVEL_PROJECT NO)
61+
set(ZTD_INLINE_CONTAINERS_IS_TOP_LEVEL_PROJECT NO)
6262
endif()
6363

6464
# Modify bad flags / change defaults if we are the top level
65-
if(ZTD_STATIC_CONTAINERS_IS_TOP_LEVEL_PROJECT)
65+
if(ZTD_INLINE_CONTAINERS_IS_TOP_LEVEL_PROJECT)
6666
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
6767
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/x86/${CMAKE_BUILD_TYPE}/lib")
6868
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/x86/${CMAKE_BUILD_TYPE}/bin")
@@ -81,7 +81,7 @@ if(ZTD_STATIC_CONTAINERS_IS_TOP_LEVEL_PROJECT)
8181
set(CMAKE_C_STANDARD 11)
8282
endif()
8383

84-
if(ZTD_STATIC_CONTAINERS_BENCHMARKS OR ZTD_STATIC_CONTAINERS_EXAMPLES OR ZTD_STATIC_CONTAINERS_TESTS OR ZTD_STATIC_CONTAINERS_SCRATCH)
84+
if(ZTD_INLINE_CONTAINERS_BENCHMARKS OR ZTD_INLINE_CONTAINERS_EXAMPLES OR ZTD_INLINE_CONTAINERS_TESTS OR ZTD_INLINE_CONTAINERS_SCRATCH)
8585
# normal flags
8686
check_compiler_flag(disable-permissive MSVC /permissive- GCC -pedantic)
8787

@@ -105,10 +105,10 @@ include(CMakePackageConfigHelpers)
105105
include(GNUInstallDirs)
106106

107107
# # Options
108-
option(ZTD_STATIC_CONTAINERS_CI "Whether or not we are in contiguous integration mode" OFF)
109-
option(ZTD_STATIC_CONTAINERS_TESTS "Enable build of tests" OFF)
110-
option(ZTD_STATIC_CONTAINERS_EXAMPLES "Enable build of examples" OFF)
111-
option(ZTD_STATIC_CONTAINERS_BENCHMARKS "Enable build of benchmarks" OFF)
108+
option(ZTD_INLINE_CONTAINERS_CI "Whether or not we are in contiguous integration mode" OFF)
109+
option(ZTD_INLINE_CONTAINERS_TESTS "Enable build of tests" OFF)
110+
option(ZTD_INLINE_CONTAINERS_EXAMPLES "Enable build of examples" OFF)
111+
option(ZTD_INLINE_CONTAINERS_BENCHMARKS "Enable build of benchmarks" OFF)
112112

113113
# # Dependencies
114114
# ztd.idk
@@ -117,20 +117,20 @@ FetchContent_Declare(ztd.idk
117117
GIT_TAG main)
118118
FetchContent_MakeAvailable(ztd.idk)
119119

120-
file(GLOB_RECURSE ztd.static_containers.sources
120+
file(GLOB_RECURSE ztd.inline_containers.sources
121121
LIST_DIRECTORIES FALSE
122122
CONFIGURE_DEPENDS
123123
include/ztd/**.*
124124
)
125125

126-
add_library(ztd.static_containers INTERFACE)
127-
add_library(ztd::static_containers ALIAS ztd.static_containers)
128-
target_sources(ztd.static_containers INTERFACE ${ztd.static_containers.sources})
129-
target_link_libraries(ztd.static_containers
126+
add_library(ztd.inline_containers INTERFACE)
127+
add_library(ztd::inline_containers ALIAS ztd.inline_containers)
128+
target_sources(ztd.inline_containers INTERFACE ${ztd.inline_containers.sources})
129+
target_link_libraries(ztd.inline_containers
130130
INTERFACE
131131
ztd::idk
132132
)
133-
target_include_directories(ztd.static_containers INTERFACE
133+
target_include_directories(ztd.inline_containers INTERFACE
134134
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
135135
$<INSTALL_INTERFACE:include>
136136
)
@@ -141,33 +141,33 @@ install(DIRECTORY include/
141141
# # Config / Version packaging
142142
# Version configurations
143143
configure_package_config_file(
144-
cmake/ztd.static_containers-config.cmake.in
145-
"${CMAKE_CURRENT_BINARY_DIR}/cmake/ztd.static_containers/ztd.static_containers-config.cmake"
146-
INSTALL_DESTINATION lib/cmake/ztd.static_containers
144+
cmake/ztd.inline_containers-config.cmake.in
145+
"${CMAKE_CURRENT_BINARY_DIR}/cmake/ztd.inline_containers/ztd.inline_containers-config.cmake"
146+
INSTALL_DESTINATION lib/cmake/ztd.inline_containers
147147
NO_CHECK_REQUIRED_COMPONENTS_MACRO)
148148

149149
write_basic_package_version_file(
150-
"${CMAKE_CURRENT_BINARY_DIR}/cmake/ztd.static_containers/ztd.static_containers-config-version.cmake"
150+
"${CMAKE_CURRENT_BINARY_DIR}/cmake/ztd.inline_containers/ztd.inline_containers-config-version.cmake"
151151
COMPATIBILITY SameMajorVersion)
152152

153-
export(TARGETS ztd.static_containers
153+
export(TARGETS ztd.inline_containers
154154
FILE
155-
"${CMAKE_CURRENT_BINARY_DIR}/cmake/ztd.static_containers/ztd.static_containers-targets.cmake")
155+
"${CMAKE_CURRENT_BINARY_DIR}/cmake/ztd.inline_containers/ztd.inline_containers-targets.cmake")
156156

157157
# # Benchmarks, Tests, Examples
158-
if(ZTD_STATIC_CONTAINERS_TESTS)
158+
if(ZTD_INLINE_CONTAINERS_TESTS)
159159
enable_testing()
160160
endif()
161161

162-
if(ZTD_STATIC_CONTAINERS_TESTS)
162+
if(ZTD_INLINE_CONTAINERS_TESTS)
163163
enable_testing()
164164
add_subdirectory(tests)
165165
endif()
166166

167-
if(ZTD_STATIC_CONTAINERS_EXAMPLES)
167+
if(ZTD_INLINE_CONTAINERS_EXAMPLES)
168168
add_subdirectory(examples)
169169
endif()
170170

171-
if(ZTD_STATIC_CONTAINERS_BENCHMARKS)
171+
if(ZTD_INLINE_CONTAINERS_BENCHMARKS)
172172
add_subdirectory(benchmarks)
173173
endif()

‎CMakePresets.json‎

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
"cacheVariables": {
1919
"CMAKE_CXX_STANDARD": "$env{CMAKE_CXX_STANDARD}",
2020
"CMAKE_C_STANDARD": "$env{CMAKE_C_STANDARD}",
21-
"ZTD_STATIC_CONTAINERS_EXAMPLES": true,
22-
"ZTD_STATIC_CONTAINERS_TESTS": true,
23-
"ZTD_STATIC_CONTAINERS_BENCHMARKS": true
21+
"ZTD_INLINE_CONTAINERS_EXAMPLES": true,
22+
"ZTD_INLINE_CONTAINERS_TESTS": true,
23+
"ZTD_INLINE_CONTAINERS_BENCHMARKS": true
2424
}
2525
},
2626
{
@@ -62,12 +62,12 @@
6262
"description": "Generates the documentation for any system",
6363
"inherits": "base",
6464
"cacheVariables": {
65-
"ZTD_STATIC_CONTAINERS_GENERATE_SINGLE": false,
66-
"ZTD_STATIC_CONTAINERS_EXAMPLES": false,
67-
"ZTD_STATIC_CONTAINERS_TESTS": false,
68-
"ZTD_STATIC_CONTAINERS_BENCHMARKS": false,
69-
"ZTD_STATIC_CONTAINERS_EXCLUDE_FROM_ALL": true,
70-
"ZTD_STATIC_CONTAINERS_DOCUMENTATION": true
65+
"ZTD_INLINE_CONTAINERS_GENERATE_SINGLE": false,
66+
"ZTD_INLINE_CONTAINERS_EXAMPLES": false,
67+
"ZTD_INLINE_CONTAINERS_TESTS": false,
68+
"ZTD_INLINE_CONTAINERS_BENCHMARKS": false,
69+
"ZTD_INLINE_CONTAINERS_EXCLUDE_FROM_ALL": true,
70+
"ZTD_INLINE_CONTAINERS_DOCUMENTATION": true
7171
}
7272
},
7373
{
@@ -77,13 +77,13 @@
7777
"description": "Generates the documentation for a ReadTheDocs build",
7878
"inherits": "base",
7979
"cacheVariables": {
80-
"ZTD_STATIC_CONTAINERS_GENERATE_SINGLE": false,
81-
"ZTD_STATIC_CONTAINERS_EXAMPLES": false,
82-
"ZTD_STATIC_CONTAINERS_TESTS": false,
83-
"ZTD_STATIC_CONTAINERS_BENCHMARKS": false,
84-
"ZTD_STATIC_CONTAINERS_EXCLUDE_FROM_ALL": true,
85-
"ZTD_STATIC_CONTAINERS_DOCUMENTATION": true,
86-
"ZTD_STATIC_CONTAINERS_DOCUMENTATION_NO_SPHINX": true
80+
"ZTD_INLINE_CONTAINERS_GENERATE_SINGLE": false,
81+
"ZTD_INLINE_CONTAINERS_EXAMPLES": false,
82+
"ZTD_INLINE_CONTAINERS_TESTS": false,
83+
"ZTD_INLINE_CONTAINERS_BENCHMARKS": false,
84+
"ZTD_INLINE_CONTAINERS_EXCLUDE_FROM_ALL": true,
85+
"ZTD_INLINE_CONTAINERS_DOCUMENTATION": true,
86+
"ZTD_INLINE_CONTAINERS_DOCUMENTATION_NO_SPHINX": true
8787
}
8888
},
8989
{
@@ -98,10 +98,10 @@
9898
"dev": true
9999
},
100100
"cacheVariables": {
101-
"ZTD_STATIC_CONTAINERS_SCRATCH": true,
102-
"ZTD_STATIC_CONTAINERS_TESTS": true,
103-
"ZTD_STATIC_CONTAINERS_EXAMPLES": true,
104-
"ZTD_STATIC_CONTAINERS_DOCUMENTATION": true,
101+
"ZTD_INLINE_CONTAINERS_SCRATCH": true,
102+
"ZTD_INLINE_CONTAINERS_TESTS": true,
103+
"ZTD_INLINE_CONTAINERS_EXAMPLES": true,
104+
"ZTD_INLINE_CONTAINERS_DOCUMENTATION": true,
105105
"FETCHCONTENT_SOURCE_DIR_ZTD.CMAKE": "${sourceDir}/../cmake",
106106
"FETCHCONTENT_SOURCE_DIR_ZTD.IDK": "${sourceDir}/../idk",
107107
"CMAKE_CXX_STANDARD": "23",
@@ -685,4 +685,4 @@
685685
]
686686
}
687687
]
688-
}
688+
}

‎LICENSE.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ztd.static_containers
1+
ztd.inline_containers
22

33
© ThePhD <phdofthehouse@gmail.com>
44

‎benchmarks/CMakeLists.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ============================================================================
22
#
3-
# ztd.static_container
3+
# ztd.inline_container
44
#
55
# © ThePhD <phdofthehouse@gmail.com>
66
#
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
@PACKAGE_INIT@
2+
3+
if (TARGET ztd::inline_containers)
4+
get_target_property(ZTD_INLINE_CONTAINERS_INCLUDE_DIRS
5+
ztd.inline_containers INTERFACE_INCLUDE_DIRECTORIES)
6+
set_and_check(ZTD_INLINE_CONTAINERS_INCLUDE_DIRS "${ZTD_INLINE_CONTAINERS_INCLUDE_DIRS}")
7+
endif()
8+
9+
if(TARGET ztd::inline_containers::single)
10+
get_target_property(ZTD_INLINE_CONTAINERS_SINGLE_INCLUDE_DIRS
11+
ztd.inline_containers.single INTERFACE_INCLUDE_DIRECTORIES)
12+
set_and_check(ZTD_INLINE_CONTAINERS_SINGLE_INCLUDE_DIRS "${ZTD_INLINE_CONTAINERS_SINGLE_INCLUDE_DIRS}")
13+
endif()

‎cmake/ztd.static_containers-config.cmake.in‎

Lines changed: 0 additions & 13 deletions
This file was deleted.

‎examples/CMakeLists.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ============================================================================
22
#
3-
# ztd.static_container
3+
# ztd.inline_container
44
#
55
# © ThePhD <phdofthehouse@gmail.com>
66
#
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// =============================================================================
2-
// ztd.static_containers
2+
// ztd.inline_containers
33
//
44
// © ThePhD <phdofthehouse@gmail.com>
55
//
@@ -13,12 +13,12 @@
1313

1414
#pragma once
1515

16-
#ifndef ZTD_STATIC_CONTAINERS_HPP
17-
#define ZTD_STATIC_CONTAINERS_HPP
16+
#ifndef ZTD_INLINE_CONTAINERS_HPP
17+
#define ZTD_INLINE_CONTAINERS_HPP
1818

19-
#include <ztd/static_containers/version.hpp>
20-
#include <ztd/static_containers/static_vector.hpp>
21-
#include <ztd/static_containers/static_string.hpp>
22-
#include <ztd/static_containers/is.hpp>
19+
#include <ztd/inline_containers/version.hpp>
20+
#include <ztd/inline_containers/inline_vector.hpp>
21+
#include <ztd/inline_containers/inline_string.hpp>
22+
#include <ztd/inline_containers/is.hpp>
2323

2424
#endif

‎include/ztd/static_containers/detail/storage.hpp‎ renamed to ‎include/ztd/inline_containers/detail/storage.hpp‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// =============================================================================
2-
// ztd.static_containers
2+
// ztd.inline_containers
33
//
44
// © ThePhD <phdofthehouse@gmail.com>
55
//
@@ -13,12 +13,12 @@
1313

1414
#pragma once
1515

16-
#ifndef ZTD_STATIC_CONTAINERS_DETAIL_STORAGE_HPP
17-
#define ZTD_STATIC_CONTAINERS_DETAIL_STORAGE_HPP
16+
#ifndef ZTD_INLINE_CONTAINERS_DETAIL_STORAGE_HPP
17+
#define ZTD_INLINE_CONTAINERS_DETAIL_STORAGE_HPP
1818

19-
#include <ztd/static_containers/version.hpp>
19+
#include <ztd/inline_containers/version.hpp>
2020

21-
#include <ztd/static_containers/forward.hpp>
21+
#include <ztd/inline_containers/forward.hpp>
2222

2323
#include <ztd/idk/type_traits.hpp>
2424
#include <ztd/idk/uninit.hpp>
@@ -27,7 +27,7 @@
2727
#include <climits>
2828

2929
namespace ztd {
30-
ZTD_STATIC_CONTAINERS_INLINE_ABI_NAMESPACE_OPEN_I_
30+
ZTD_INLINE_CONTAINERS_INLINE_ABI_NAMESPACE_OPEN_I_
3131

3232
namespace __fv_detail {
3333

@@ -105,9 +105,9 @@ namespace ztd {
105105
class __storage {
106106
private:
107107
template <typename, ::std::size_t>
108-
friend class ::ztd::static_vector;
108+
friend class ::ztd::inline_vector;
109109
template <typename, ::std::size_t>
110-
friend class ::ztd::static_basic_string;
110+
friend class ::ztd::inline_basic_string;
111111

112112
using __value_type = _Ty;
113113
using __storage_type = ztd::uninit<__value_type>;
@@ -180,9 +180,9 @@ namespace ztd {
180180
class __storage<_Ty, _Capacity, true> {
181181
private:
182182
template <typename, ::std::size_t>
183-
friend class ::ztd::static_vector;
183+
friend class ::ztd::inline_vector;
184184
template <typename, ::std::size_t>
185-
friend class ::ztd::static_basic_string;
185+
friend class ::ztd::inline_basic_string;
186186

187187
using __value_type = _Ty;
188188
using __storage_type = __value_type;
@@ -247,7 +247,7 @@ namespace ztd {
247247
};
248248
} // namespace __fv_detail
249249

250-
ZTD_STATIC_CONTAINERS_INLINE_ABI_NAMESPACE_CLOSE_I_
250+
ZTD_INLINE_CONTAINERS_INLINE_ABI_NAMESPACE_CLOSE_I_
251251

252252
} // namespace ztd
253253

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// =============================================================================
2-
// ztd.static_containers
2+
// ztd.inline_containers
33
//
44
// © ThePhD <phdofthehouse@gmail.com>
55
//
@@ -13,23 +13,23 @@
1313

1414
#pragma once
1515

16-
#ifndef ZTD_STATIC_CONTAINERS_FORWARD_HPP
17-
#define ZTD_STATIC_CONTAINERS_FORWARD_HPP
16+
#ifndef ZTD_INLINE_CONTAINERS_FORWARD_HPP
17+
#define ZTD_INLINE_CONTAINERS_FORWARD_HPP
1818

19-
#include <ztd/static_containers/version.hpp>
19+
#include <ztd/inline_containers/version.hpp>
2020

2121
#include <cstddef>
2222

2323
namespace ztd {
24-
ZTD_STATIC_CONTAINERS_INLINE_ABI_NAMESPACE_OPEN_I_
24+
ZTD_INLINE_CONTAINERS_INLINE_ABI_NAMESPACE_OPEN_I_
2525

2626
template <typename, ::std::size_t>
27-
class static_vector;
27+
class inline_vector;
2828

2929
template <typename, ::std::size_t>
30-
class static_basic_string;
30+
class inline_basic_string;
3131

32-
ZTD_STATIC_CONTAINERS_INLINE_ABI_NAMESPACE_CLOSE_I_
32+
ZTD_INLINE_CONTAINERS_INLINE_ABI_NAMESPACE_CLOSE_I_
3333
} // namespace ztd
3434

3535
#endif

0 commit comments

Comments
 (0)