Skip to content

Commit ef4da2a

Browse files
authored
Add rvariant (#3)
* Initial addition * Replace license headers * Rename yk to iris * Rename yk to iris part2 * Merge config.hpp * Remove benchmark * Merge specialization_of * Merge type_traits.hpp * Rename cond_trivial.hpp * Rename cond_trivial class * Reorganize comparison utilities * Re-remove files * Rename include guard * Reorganize requirements * Reorganize hash: part 1 * Rename iris/hash.hpp * Move iris/core/hash.hpp * Move iris/core/hash_fwd.hpp * Fix includes * Move contents of hash.hpp * Rename hash_util.hpp back * Split FNV_hash.hpp * Don't include FNV_hash by default * Move ADL_streamable into requirements.hpp * Move seq util into rvariant detail * Fix missing include * Fix is_function_object * Move hash-related traits into hash.hpp * Remove "[core]" label from test * Move I/O-related code into separate header * Put boolean_testable under req namespace * Put cond_trivial_smf under top-level * Add LICENSE header * Match include guard names * Remove unused code * Rename nvoid_t to cvoid_t * Make cvoid_t take parameter pack * Rename npack_indexing * Remove dummy.cpp * Remove unnecessary typename * Apply clang-tidy's fix * Add .clang-tidy * Remove static_assert * Enable CI-specific test * Chore * Rename natvis * Enable cpp.hint and iris.natvis sources for MSVC builds * Move cpp.hint
1 parent a9359a6 commit ef4da2a

54 files changed

Lines changed: 15600 additions & 21 deletions

Some content is hidden

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

.clang-tidy

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# SPDX-License-Identifier: MIT
2+
---
3+
Checks: '
4+
*,
5+
-abseil-*,
6+
-altera-*,
7+
-android-*,
8+
-darwin-*,
9+
-fuchsia-*,
10+
-google-*,
11+
-objc-*,
12+
-zircon-*,
13+
-linuxkernel-*,
14+
-llvmlibc-*,
15+
-hicpp-uppercase-literal-suffix,
16+
-modernize-use-nodiscard,
17+
-modernize-use-trailing-return-type,
18+
-cppcoreguidelines-special-member-functions,
19+
-clang-diagnostic-inconsistent-missing-destructor-override,
20+
-clang-diagnostic-switch-enum,
21+
-llvm-header-guard,
22+
-llvm-namespace-comment,
23+
-llvm-prefer-static-over-anonymous-namespace,
24+
-readability-identifier-length,
25+
-readability-use-concise-preprocessor-directives
26+
'
27+
28+
CheckOptions:
29+
- key: performance-move-const-arg.CheckTriviallyCopyableMove
30+
value: false

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ jobs:
169169
-DCMAKE_CXX_FLAGS="${{ matrix.compiler.cxxflags }}" \
170170
-DCMAKE_CXX_STANDARD=${{ matrix.cpp_version.number }} \
171171
-DCMAKE_BUILD_TYPE=${{ matrix.build_type.name }} \
172+
-DIRIS_CI=ON \
172173
-S .
173174
174175
- name: Build Tests

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# SPDX-License-Identifier: MIT
2+
13
.DS_Store
24
/build*/
35

CMakeLists.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ if(MSVC)
4545
target_sources(
4646
iris
4747
PRIVATE
48-
# "${PROJECT_SOURCE_DIR}/cpp.hint" # TODO
49-
# "${PROJECT_SOURCE_DIR}/iris.natvis" # TODO
48+
"${PROJECT_SOURCE_DIR}/cpp.hint"
49+
"${PROJECT_SOURCE_DIR}/iris.natvis"
5050
)
5151

5252
target_link_libraries(iris PUBLIC _iris_cxx_common)
@@ -152,6 +152,10 @@ target_sources(iris PRIVATE FILE_SET HEADERS TYPE HEADERS FILES ${IRIS_HEADERS})
152152
source_group(TREE ${PROJECT_SOURCE_DIR}/include/iris PREFIX iris FILES ${IRIS_HEADERS})
153153
target_include_directories(iris INTERFACE ${PROJECT_SOURCE_DIR}/include)
154154

155+
option(IRIS_CI "Enables intensive testing for CI" OFF)
156+
if(IRIS_CI)
157+
target_compile_definitions(iris INTERFACE IRIS_CI=1)
158+
endif()
155159

156160
# -----------------------------------------------------------------
157161
# Test

cpp.hint

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// SPDX-License-Identifier: MIT
2+
3+
// Hint files help the Visual Studio IDE interpret Visual C++ identifiers
4+
// such as names of functions and macros.
5+
// For more information see https://go.microsoft.com/fwlink/?linkid=865984
6+
7+
#define IRIS_RVARIANT_VISIT_NOEXCEPT
8+
9+
#define IRIS_RVARIANT_ALWAYS_THROWING_UNREACHABLE_BEGIN
10+
#define IRIS_RVARIANT_ALWAYS_THROWING_UNREACHABLE_END
11+
12+
#define IRIS_RVARIANT_DISABLE_UNINITIALIZED_WARNING_BEGIN
13+
#define IRIS_RVARIANT_DISABLE_UNINITIALIZED_WARNING_END
14+
15+
#define assert
16+
#define NDEBUG
17+
18+
#define IRIS_FORCEINLINE
19+
#define IRIS_LIFETIMEBOUND

doc/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# SPDX-License-Identifier: MIT
2+
3+
_*.html
4+

doc/_std-indirect-proxy.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Equivalent to the `std::indirect` counterpart. ^{spec-url}[[spec\]]^

doc/_std-variant-proxy.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Equivalent to the `std::variant` counterpart. ^{spec-url}[[spec\]]^

0 commit comments

Comments
 (0)