Debian Codegraph @

gcc/testsuite/g++.dg/modules/tpl-spec-7.C

raw
1 // { dg-additional-options "-fmodules-ts" }
2
3 export module foo;
4 // { dg-module-cmi foo }
5
6 typedef unsigned long size_t;
7
8 template<typename _Tp, bool _IsInt, bool _IsEnum>
9 class __make_unsigned_selector;
10
11 class __make_unsigned_selector_base
12 {
13 protected:
14 template<typename...> struct _List { };
15
16 template<typename _Tp, typename... _Up>
17 struct _List<_Tp, _Up...> : _List<_Up...>
18 { static constexpr size_t __size = sizeof(_Tp); };
19
20 template<size_t _Sz, typename _Tp, bool = (_Sz <= _Tp::__size)>
21 struct __select;
22 };
23
24 template<typename _Tp>
25 class __make_unsigned_selector<_Tp, false, true>
26 : __make_unsigned_selector_base
27 {
28 using _UInts = _List<unsigned char, unsigned short, unsigned int,
29 unsigned long, unsigned long long>;
30
31 using __unsigned_type = typename __select<sizeof(_Tp), _UInts>::__type;
32 };
33
34
35
36
37
38