hachem.wtf
aboutsummaryrefslogtreecommitdiff
path: root/examples/xs.sfinae
blob: e1402522e82895223d17eb43e2e2ea5b42a3f87f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
::declare<
    ::name<'x', 's'>,
    ::conditional_t<
        ::true_type::value,
        ::decltype(
            ::extent<
                ::array<
                    ::array<
                        ::remove_cv_t<
                            ::int32_t
                        >,
                        ::integral_constant<
                            ::size_t,
                            ::tuple_size<
                                ::array<
                                    ::byte,
                                    ::difference<'Z', 'F'>
                                >
                            >::value
                        >::value
                    >,
                    ::integral_constant<
                        ::size_t,
                        ::difference<'Z', 'F'>
                    >::value
                >
            >::value
        ),
        ::void
    >
>::commit;

::emit<::decltype(::value_of<::name<'x', 's'>>)>::commit;

// an array type says its extent, a bare type says its name
::emit<::array<::byte, ::value_of<::name<'x', 's'>>>>::commit;