Skip to content

Commit cbd4b78

Browse files
committed
refactor(functional-programming): delete
1 parent a8c042b commit cbd4b78

File tree

4 files changed

+26
-40
lines changed

4 files changed

+26
-40
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ cmake_minimum_required(VERSION 3.24)
55
#
66
project(
77
stdsharp
8-
VERSION 0.8.7
8+
VERSION 0.8.8
99
LANGUAGES CXX)
1010

1111
include(cmake/Utils.cmake)

include/stdsharp/compilation_config_in.h

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
1-
#include <cassert>
1+
#if defined( __GNUG__) || defined(_MSC_VER)
2+
#pragma push_macro("STDSHARP_ALWAYS_INLINE")
3+
#pragma push_macro("STDSHARP_NO_UNIQUE_ADDRESS")
4+
#pragma push_macro("STDSHARP_INTRINSIC")
5+
#pragma push_macro("STDSHARP_EBO")
6+
#pragma push_macro("STDSHARP_MEM_PACK_IMPL")
7+
#pragma push_macro("STDSHARP_MEM_PACK")
8+
#endif
29

310
#ifdef __GNUG__
411
#define STDSHARP_ALWAYS_INLINE [[gnu::always_inline]]
12+
#elif defined(_MSC_VER)
13+
#define STDSHARP_ALWAYS_INLINE [[msvc::forceinline]]
514
#else
615
#define STDSHARP_ALWAYS_INLINE inline
716
#endif
@@ -20,14 +29,6 @@
2029
#define STDSHARP_EBO
2130
#endif
2231

23-
#if __has_cpp_attribute(assume)
24-
#define STDSHARP_ASSUME(...) [[assume(__VA_ARGS__)]]
25-
#elif defined(_MSC_VER)
26-
#define STDSHARP_ASSUME(...) __assume(__VA_ARGS__)
27-
#else
28-
#define STDSHARP_ASSUME(...) assert(__VA_ARGS__);
29-
#endif
30-
3132
#define STDSHARP_MEM_PACK_IMPL(fn_name, impl_name, type, cv, ref) \
3233
constexpr decltype(auto) fn_name(auto&&... args) cv ref noexcept( \
3334
noexcept(type::impl_name(static_cast<cv type ref>(*this), cpp_forward(args)...)) \
Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
1-
#undef STDSHARP_NO_UNIQUE_ADDRESS
2-
#undef STDSHARP_INTRINSIC
3-
#undef STDSHARP_ALWAYS_INLINE
4-
#undef STDSHARP_EBO
5-
#undef STDSHARP_ASSUME
6-
#undef STDSHARP_MEM_PACK_IMPL
7-
#undef STDSHARP_MEM_PACK
1+
#if defined(__GNUG__) || defined(_MSC_VER)
2+
#pragma pop_macro("STDSHARP_ALWAYS_INLINE")
3+
#pragma pop_macro("STDSHARP_NO_UNIQUE_ADDRESS")
4+
#pragma pop_macro("STDSHARP_INTRINSIC")
5+
#pragma pop_macro("STDSHARP_EBO")
6+
#pragma pop_macro("STDSHARP_MEM_PACK_IMPL")
7+
#pragma pop_macro("STDSHARP_MEM_PACK")
8+
#else
9+
#undef STDSHARP_NO_UNIQUE_ADDRESS
10+
#undef STDSHARP_INTRINSIC
11+
#undef STDSHARP_ALWAYS_INLINE
12+
#undef STDSHARP_EBO
13+
#undef STDSHARP_MEM_PACK_IMPL
14+
#undef STDSHARP_MEM_PACK
15+
#endif

include/stdsharp/functional/fp.h

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

0 commit comments

Comments
 (0)