Skip to content

Commit 452fe51

Browse files
feat(config): add small_vec feature flag with experiment guard
Add conditional compilation logic for WHEEL_SMALL_VEC feature that requires WHEEL_EXPERIMENT to be defined. Provides compile-time error when small_vec is used without the experimental flag enabled.
1 parent 5b84f04 commit 452fe51

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

wheel_memory/include/wheel_memory/config.hxx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@
55
#define WHEEL_MEMORY_END_NAMESPACE }
66
#define WHEEL_MEMORY_NAMESPACE_NAME wheel_memory
77

8+
#if defined (WHEEL_EXPERIMENT) && defined(WHEEL_SMALL_VEC)
9+
#define HAS_USE_SMALL_VEC 1
10+
11+
#elif !defined(WHEEL_EXPERIMENT) && defined(WHEEL_SMALL_VEC)
12+
#error "Cannot use WHEEL_SMALL_VEC without WHEEL_EXPERIMENT"
13+
#else
14+
#define HAS_USEHAS_USE_SMALL_VEC 0
15+
#endif
16+
817
#if defined(_MSC_VER)
918
#define WHEEL_NO_INLINE __declspec(noinline)
1019

0 commit comments

Comments
 (0)