Skip to content

Commit 660e138

Browse files
committed
Move details of to separate header
1 parent 14ae4b1 commit 660e138

2 files changed

Lines changed: 12 additions & 5 deletions

File tree

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#pragma once
2+
#include <meta>
3+
4+
#include "compiler.hpp"
5+
6+
#if RSL_COMPILER == RSL_COMPILER_GCC
7+
# define RSL_DEFINE_STATIC_ARRAY(...) [:::std::meta::reflect_constant_array(__VA_ARGS__):]
8+
#else
9+
# define RSL_DEFINE_STATIC_ARRAY(...) (::std::define_static_array(__VA_ARGS__))
10+
#endif

include/rsl/macro

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#include <rsl/_impl/macro/compiler.hpp>
44
#include <rsl/_impl/macro/opt.hpp>
55
#include <rsl/_impl/macro/os.hpp>
6+
#include <rsl/_impl/macro/define_static_array.hpp>
67
#include <rsl/_impl/macro/loop.hpp>
78
#include <rsl/_impl/macro/diagnostic.hpp>
89

@@ -37,11 +38,7 @@
3738
#define $enable_if(...) RSL_ENABLE_IF(__VA_ARGS__)
3839

3940
//! Workaround for expansion statements in GCC
40-
#if $compiler_is(GCC)
41-
# define $define_static_array(...) [:::std::meta::reflect_constant_array(__VA_ARGS__):]
42-
#else
43-
# define $define_static_array(...) (::std::define_static_array(__VA_ARGS__))
44-
#endif
41+
#define $define_static_array(...) RSL_DEFINE_STATIC_ARRAY(__VA_ARGS__)
4542

4643
/** Applies `macro` to every element and inserts delimiters produced by `delim` between elements
4744
* @param macro function-like macro applied to every element

0 commit comments

Comments
 (0)