Skip to content

Commit abd2716

Browse files
committed
Merge type_traits.hpp
1 parent e0102ac commit abd2716

19 files changed

Lines changed: 1073 additions & 435 deletions

‎include/iris/core/config.hpp‎

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#ifndef IRIS_CORE_CONFIG_HPP
2+
#define IRIS_CORE_CONFIG_HPP
3+
4+
// SPDX-License-Identifier: MIT
5+
6+
#include <version>
7+
8+
#if _MSC_VER
9+
# include <CodeAnalysis/CppCoreCheck/Warnings.h>
10+
# pragma warning(default: CPPCORECHECK_LIFETIME_WARNINGS)
11+
#endif
12+
13+
// <https://devblogs.microsoft.com/cppblog/msvc-cpp20-and-the-std-cpp20-switch/#c++20-[[no_unique_address]]>
14+
15+
#if _MSC_VER && _MSC_VER < 1929 // VS 2019 v16.9 or before
16+
# error "Too old MSVC version; we don't support this because it leads to ODR violation regarding the existence of [[(msvc::)no_unique_address]]"
17+
#endif
18+
19+
#if _MSC_VER && __INTELLISENSE__ // Memory Layout view shows wrong layout without this workaround
20+
# define IRIS_NO_UNIQUE_ADDRESS [[msvc::no_unique_address, no_unique_address]]
21+
22+
#elif _MSC_VER // normal MSVC
23+
# define IRIS_NO_UNIQUE_ADDRESS [[msvc::no_unique_address]]
24+
25+
#else // other compilers
26+
# define IRIS_NO_UNIQUE_ADDRESS [[no_unique_address]]
27+
#endif
28+
29+
30+
#ifndef IRIS_LIFETIMEBOUND
31+
# if defined(__clang__)
32+
# define IRIS_LIFETIMEBOUND [[clang::lifetimebound]]
33+
# elif defined(_MSC_VER)
34+
# define IRIS_LIFETIMEBOUND [[msvc::lifetimebound]]
35+
# else
36+
# define IRIS_LIFETIMEBOUND
37+
# endif
38+
#endif
39+
40+
41+
42+
43+
#endif

‎include/iris/core/seq.hpp‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@
66
#include <type_traits>
77
#include <utility>
88

9-
namespace iris::core {
9+
namespace iris {
1010

1111
template<class... Ts>
1212
struct type_list;
1313

14+
namespace core {
1415

1516
namespace detail {
1617

@@ -137,6 +138,8 @@ struct seq_cartesian_product_entry<F, std::integer_sequence<T, As...>, Rest...>
137138
template<template<auto...> class F, class... Ss>
138139
using seq_cartesian_product = typename detail::seq_cartesian_product_entry<F, Ss...>::type;
139140

140-
} // iris::core
141+
} // core
142+
143+
} // iris
141144

142145
#endif

‎include/iris/core/type_traits.hpp‎

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

‎include/iris/indirect.hpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// SPDX-License-Identifier: MIT
55

66
#include <iris/core/library.hpp>
7-
#include <iris/core/type_traits.hpp>
7+
#include <iris/type_traits.hpp>
88
#include <iris/core/hash.hpp>
99

1010
#include <compare>

0 commit comments

Comments
 (0)