A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
type-traits.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2007 INRIA
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 */
7
8#ifndef TYPE_TRAITS_H
9#define TYPE_TRAITS_H
10
11#include "deprecated.h"
12#include "ptr.h"
13
14/**
15 * \file
16 * \ingroup object
17 * ns3::TypeTraits introspection declaration and template implementation.
18 */
19
20namespace ns3
21{
22
23/**
24 * \ingroup object
25 * Inspect a type to deduce its features.
26 * \tparam T \deduced The type to inspect.
27 */
28template <typename T>
29struct NS_DEPRECATED_3_43("Use functions provided by #include <type_traits>") TypeTraits
30{
31 private:
32 /** Null value type traits. */
33 struct NullType
34 {
35 };
36
37 /**
38 * Not a const type.
39 * \tparam U \deduced The type being inspected.
40 */
41 template <typename U>
42 struct UnConst
43 {
44 typedef U Result; /**< Non-const type. */
45 };
46
47 /**
48 * Const type.
49 * \tparam U \deduced The type being inspected.
50 */
51 template <typename U>
52 struct UnConst<const U>
53 {
54 typedef U Result; /**< Non-const type. */
55 };
56
57 /**
58 * Not a reference type.
59 * \tparam U \deduced The type being inspected.
60 */
61 template <typename U>
63 {
64 /** Value. */
65 enum
66 {
67 IsReference = 0 /**< Not a reference type. */
68 };
69
70 typedef U ReferencedType; /**< Base type. */
71 };
72
73 /**
74 * Reference type.
75 * \tparam U \deduced The type being inspected.
76 */
77 template <typename U>
78 struct ReferenceTraits<U&>
79 {
80 /** Value. */
81 enum
82 {
83 IsReference = 1 /**< Reference type. */
84 };
85
86 typedef U ReferencedType; /**< Base type. */
87 };
88
89 /**
90 * Not a pointer type.
91 * \tparam U \deduced The type being inspected.
92 */
93 template <typename U>
95 {
96 /** Value. */
97 enum
98 {
99 IsPointer = 0, /**< Not a pointer type. */
100 IsPtr = 0 /**< Not a Ptr type. */
101 };
102
103 typedef U PointeeType; /**< Base type. */
104 };
105
106 /**
107 * Pointer type.
108 * \tparam U \deduced The type being inspected.
109 */
110 template <typename U>
111 struct PointerTraits<U*>
112 {
113 /** Value. */
114 enum
115 {
116 IsPointer = 1, /**< Pointer type. */
117 IsPtr = 0 /**< Not a Ptr type. */
118 };
119
120 typedef U PointeeType; /**< Pointee type. */
121 };
122
123 /**
124 * Ptr type.
125 * \tparam U \deduced The type being inspected.
126 */
127 template <typename U>
129 {
130 /** Value. */
131 enum
132 {
133 IsPointer = 0, /**< Not a pointer type. */
134 IsPtr = 1 /**< Ptr type. */
135 };
136
137 typedef U PointeeType; /**< Pointee type. */
138 };
139
140 /**
141 * Base type, after removing \c &, \c * and \c const.
142 * \tparam U \deduced The type being inspected.
143 */
144 template <typename U>
145 struct Base
146 {
147 typedef U Type; /**< Base type. */
148 };
149
150 /**
151 * Base type, after removing \c &.
152 * \tparam U \deduced The type being inspected.
153 */
154 template <typename U>
155 struct Base<U&>
156 {
157 typedef typename Base<U>::Type Type; /**< Base type. */
158 };
159
160 /**
161 * Base type, after removing \c *.
162 * \tparam U \deduced The type being inspected.
163 */
164 template <typename U>
165 struct Base<U*>
166 {
167 typedef typename Base<U>::Type Type; /**< Base type. */
168 };
169
170 /**
171 * Base type, after removing \c const.
172 * \tparam U \deduced The type being inspected.
173 */
174 template <typename U>
175 struct Base<const U>
176 {
177 typedef typename Base<U>::Type Type; /**< Base type. */
178 };
179
180 /**
181 * Base type of a Ptr.
182 * \tparam U \deduced The type being inspected.
183 */
184 template <typename U>
185 struct PtrBase
186 {
187 typedef U Type; /**< Base type. */
188 };
189
190 /**
191 * Base type of a Ptr.
192 * \tparam U \deduced The type being inspected.
193 */
194 template <typename U>
195 struct PtrBase<ns3::Ptr<U>>
196 {
197 typedef U Type; /**< Base type. */
198 };
199
200 /**
201 * Not a function pointer type.
202 * \tparam U \deduced The type being inspected.
203 */
204 template <typename U>
206 {
207 /** Value. */
208 enum
209 {
210 IsFunctionPointer = 0 /**< Not a function pointer. */
211 };
212
213 typedef NullType ReturnType; /**< Return type. */
214 };
215
216 /**
217 * Function pointer type.
218 * \tparam U \deduced Return type.
219 */
220 template <typename U>
221 struct FunctionPtrTraits<U (*)()>
222 {
223 /** Value. */
224 enum
225 {
226 IsFunctionPointer = 1 /**< Function pointer. */
227 };
228
229 /** Value. */ enum
230 {
231 nArgs = 0 /**< Number of arguments. */
232 };
233
234 typedef U ReturnType; /**< Return type. */
235 };
236
237 /**
238 * Function pointer type.
239 * \tparam U \deduced Return type.
240 * \tparam V1 \deduced Argument type.
241 */
242 template <typename U, typename V1>
243 struct FunctionPtrTraits<U (*)(V1)>
244 {
245 /** Value. */
246 enum
247 {
248 IsFunctionPointer = 1 /**< Function pointer. */
249 };
250
251 /** Value. */ enum
252 {
253 nArgs = 1 /**< Number of arguments. */
254 };
255
256 typedef U ReturnType; /**< Return type. */
257 typedef V1 Arg1Type; /**< First argument type. */
258 };
259
260 /**
261 * Function pointer type.
262 * \tparam U \deduced Return type.
263 * \tparam V1 \deduced Argument type.
264 * \tparam V2 \deduced Argument type.
265 */
266 template <typename U, typename V1, typename V2>
267 struct FunctionPtrTraits<U (*)(V1, V2)>
268 {
269 /** Value. */
270 enum
271 {
272 IsFunctionPointer = 1 /**< Function pointer. */
273 };
274
275 /** Value. */ enum
276 {
277 nArgs = 2 /**< Number of arguments. */
278 };
279
280 typedef U ReturnType; /**< Return type. */
281 typedef V1 Arg1Type; /**< First argument type. */
282 typedef V2 Arg2Type; /**< Second argument type. */
283 };
284
285 /**
286 * Function pointer type.
287 * \tparam U \deduced Return type.
288 * \tparam V1 \deduced Argument type.
289 * \tparam V2 \deduced Argument type.
290 * \tparam V3 \deduced Argument type.
291 */
292 template <typename U, typename V1, typename V2, typename V3>
293 struct FunctionPtrTraits<U (*)(V1, V2, V3)>
294 {
295 /** Value. */
296 enum
297 {
298 IsFunctionPointer = 1 /**< Function pointer. */
299 };
300
301 /** Value. */ enum
302 {
303 nArgs = 3 /**< Number of arguments. */
304 };
305
306 typedef U ReturnType; /**< Return type. */
307 typedef V1 Arg1Type; /**< First argument type. */
308 typedef V2 Arg2Type; /**< Second argument type. */
309 typedef V3 Arg3Type; /**< Third argument type. */
310 };
311
312 /**
313 * Function pointer type.
314 * \tparam U \deduced Return type.
315 * \tparam V1 \deduced Argument type.
316 * \tparam V2 \deduced Argument type.
317 * \tparam V3 \deduced Argument type.
318 * \tparam V4 \deduced Argument type.
319 */
320 template <typename U, typename V1, typename V2, typename V3, typename V4>
321 struct FunctionPtrTraits<U (*)(V1, V2, V3, V4)>
322 {
323 /** Value. */
324 enum
325 {
326 IsFunctionPointer = 1 /**< Function pointer. */
327 };
328
329 /** Value. */ enum
330 {
331 nArgs = 4 /**< Number of arguments. */
332 };
333
334 typedef U ReturnType; /**< Return type. */
335 typedef V1 Arg1Type; /**< First argument type. */
336 typedef V2 Arg2Type; /**< Second argument type. */
337 typedef V3 Arg3Type; /**< Third argument type. */
338 typedef V4 Arg4Type; /**< Fourth argument type. */
339 };
340
341 /**
342 * Function pointer type.
343 * \tparam U \deduced Return type.
344 * \tparam V1 \deduced Argument type.
345 * \tparam V2 \deduced Argument type.
346 * \tparam V3 \deduced Argument type.
347 * \tparam V4 \deduced Argument type.
348 * \tparam V5 \deduced Argument type.
349 */
350 template <typename U, typename V1, typename V2, typename V3, typename V4, typename V5>
351 struct FunctionPtrTraits<U (*)(V1, V2, V3, V4, V5)>
352 {
353 /** Value. */
354 enum
355 {
356 IsFunctionPointer = 1 /**< Function pointer. */
357 };
358
359 /** Value. */ enum
360 {
361 nArgs = 5 /**< Number of arguments. */
362 };
363
364 typedef U ReturnType; /**< Return type. */
365 typedef V1 Arg1Type; /**< First argument type. */
366 typedef V2 Arg2Type; /**< Second argument type. */
367 typedef V3 Arg3Type; /**< Third argument type. */
368 typedef V4 Arg4Type; /**< Fourth argument type. */
369 typedef V5 Arg5Type; /**< Fifth argument type. */
370 };
371
372 /**
373 * Function pointer type.
374 * \tparam U \deduced Return type.
375 * \tparam V1 \deduced Argument type.
376 * \tparam V2 \deduced Argument type.
377 * \tparam V3 \deduced Argument type.
378 * \tparam V4 \deduced Argument type.
379 * \tparam V5 \deduced Argument type.
380 * \tparam V6 \deduced Argument type.
381 */
382 template <typename U,
383 typename V1,
384 typename V2,
385 typename V3,
386 typename V4,
387 typename V5,
388 typename V6>
389 struct FunctionPtrTraits<U (*)(V1, V2, V3, V4, V5, V6)>
390 {
391 /** Value. */
392 enum
393 {
394 IsFunctionPointer = 1 /**< Function pointer. */
395 };
396
397 /** Value. */ enum
398 {
399 nArgs = 6 /**< Number of arguments. */
400 };
401
402 typedef U ReturnType; /**< Return type. */
403 typedef V1 Arg1Type; /**< First argument type. */
404 typedef V2 Arg2Type; /**< Second argument type. */
405 typedef V3 Arg3Type; /**< Third argument type. */
406 typedef V4 Arg4Type; /**< Fourth argument type. */
407 typedef V5 Arg5Type; /**< Fifth argument type. */
408 typedef V6 Arg6Type; /**< Sixth argument type. */
409 };
410
411 /**
412 * Not a pointer to member type.
413 * \tparam U \deduced Return type.
414 */
415 template <typename U>
417 {
418 /** Value. */
419 enum
420 {
421 IsPointerToMember = 0 /**< Not a pointer to member. */
422 };
423 };
424
425 /**
426 * Pointer to member function.
427 * \tparam U \deduced Return type.
428 * \tparam V \deduced Class type.
429 */
430 template <typename U, typename V>
431 struct PtrToMemberTraits<U (V::*)()>
432 {
433 /** Value. */
434 enum
435 {
436 IsPointerToMember = 1 /**< Pointer to member function. */
437 };
438
439 /** Value. */ enum
440 {
441 nArgs = 0 /**< Number of arguments. */
442 };
443
444 typedef U ReturnType; /**< Return type. */
445 };
446
447 /**
448 * Pointer to const member function.
449 * \tparam U \deduced Return type.
450 * \tparam V \deduced Class type.
451 */
452 template <typename U, typename V>
453 struct PtrToMemberTraits<U (V::*)() const>
454 {
455 /** Value. */
456 enum
457 {
458 IsPointerToMember = 1 /**< Pointer to member function. */
459 };
460
461 /** Value. */ enum
462 {
463 nArgs = 0 /**< Number of arguments. */
464 };
465
466 typedef U ReturnType; /**< Return type. */
467 };
468
469 /**
470 * Pointer to member function.
471 * \tparam U \deduced Return type.
472 * \tparam V \deduced Class type.
473 * \tparam W1 \deduced Argument type.
474 */
475 template <typename U, typename V, typename W1>
476 struct PtrToMemberTraits<U (V::*)(W1)>
477 {
478 /** Value. */
479 enum
480 {
481 IsPointerToMember = 1 /**< Pointer to member function. */
482 };
483
484 /** Value. */ enum
485 {
486 nArgs = 1 /**< Number of arguments. */
487 };
488
489 typedef U ReturnType; /**< Return type. */
490 typedef W1 Arg1Type; /**< First argument type. */
491 };
492
493 /**
494 * Pointer to const member function.
495 * \tparam U \deduced Return type.
496 * \tparam V \deduced Class type.
497 * \tparam W1 \deduced Argument type.
498 */
499 template <typename U, typename V, typename W1>
500 struct PtrToMemberTraits<U (V::*)(W1) const>
501 {
502 /** Value. */
503 enum
504 {
505 IsPointerToMember = 1 /**< Pointer to member function. */
506 };
507
508 /** Value. */ enum
509 {
510 nArgs = 1 /**< Number of arguments. */
511 };
512
513 typedef U ReturnType; /**< Return type. */
514 typedef W1 Arg1Type; /**< First argument type. */
515 };
516
517 /**
518 * Pointer to member function.
519 * \tparam U \deduced Return type.
520 * \tparam V \deduced Class type.
521 * \tparam W1 \deduced Argument type.
522 * \tparam W2 \deduced Argument type.
523 */
524 template <typename U, typename V, typename W1, typename W2>
525 struct PtrToMemberTraits<U (V::*)(W1, W2)>
526 {
527 /** Value. */
528 enum
529 {
530 IsPointerToMember = 1 /**< Pointer to member function. */
531 };
532
533 /** Value. */ enum
534 {
535 nArgs = 2 /**< Number of arguments. */
536 };
537
538 typedef U ReturnType; /**< Return type. */
539 typedef W1 Arg1Type; /**< First argument type. */
540 typedef W2 Arg2Type; /**< Second argument type. */
541 };
542
543 /**
544 * Pointer to const member function.
545 * \tparam U \deduced Return type.
546 * \tparam V \deduced Class type.
547 * \tparam W1 \deduced Argument type.
548 * \tparam W2 \deduced Argument type.
549 */
550 template <typename U, typename V, typename W1, typename W2>
551 struct PtrToMemberTraits<U (V::*)(W1, W2) const>
552 {
553 /** Value. */
554 enum
555 {
556 IsPointerToMember = 1 /**< Pointer to member function. */
557 };
558
559 /** Value. */ enum
560 {
561 nArgs = 2 /**< Number of arguments. */
562 };
563
564 typedef U ReturnType; /**< Return type. */
565 typedef W1 Arg1Type; /**< First argument type. */
566 typedef W2 Arg2Type; /**< Second argument type. */
567 };
568
569 /**
570 * Pointer to member function.
571 * \tparam U \deduced Return type.
572 * \tparam V \deduced Class type.
573 * \tparam W1 \deduced Argument type.
574 * \tparam W2 \deduced Argument type.
575 * \tparam W3 \deduced Argument type.
576 */
577 template <typename U, typename V, typename W1, typename W2, typename W3>
578 struct PtrToMemberTraits<U (V::*)(W1, W2, W3)>
579 {
580 /** Value. */
581 enum
582 {
583 IsPointerToMember = 1 /**< Pointer to member function. */
584 };
585
586 /** Value. */ enum
587 {
588 nArgs = 3 /**< Number of arguments. */
589 };
590
591 typedef U ReturnType; /**< Return type. */
592 typedef W1 Arg1Type; /**< First argument type. */
593 typedef W2 Arg2Type; /**< Second argument type. */
594 typedef W3 Arg3Type; /**< Third argument type. */
595 };
596
597 /**
598 * Pointer to const member function.
599 * \tparam U \deduced Return type.
600 * \tparam V \deduced Class type.
601 * \tparam W1 \deduced Argument type.
602 * \tparam W2 \deduced Argument type.
603 * \tparam W3 \deduced Argument type.
604 */
605 template <typename U, typename V, typename W1, typename W2, typename W3>
606 struct PtrToMemberTraits<U (V::*)(W1, W2, W3) const>
607 {
608 /** Value. */
609 enum
610 {
611 IsPointerToMember = 1 /**< Pointer to member function. */
612 };
613
614 /** Value. */ enum
615 {
616 nArgs = 3 /**< Number of arguments. */
617 };
618
619 typedef U ReturnType; /**< Return type. */
620 typedef W1 Arg1Type; /**< First argument type. */
621 typedef W2 Arg2Type; /**< Second argument type. */
622 typedef W3 Arg3Type; /**< Third argument type. */
623 };
624
625 /**
626 * Pointer to member function.
627 * \tparam U \deduced Return type.
628 * \tparam V \deduced Class type.
629 * \tparam W1 \deduced Argument type.
630 * \tparam W2 \deduced Argument type.
631 * \tparam W3 \deduced Argument type.
632 * \tparam W4 \deduced Argument type.
633 */
634 template <typename U, typename V, typename W1, typename W2, typename W3, typename W4>
635 struct PtrToMemberTraits<U (V::*)(W1, W2, W3, W4)>
636 {
637 /** Value. */
638 enum
639 {
640 IsPointerToMember = 1 /**< Pointer to member function. */
641 };
642
643 /** Value. */ enum
644 {
645 nArgs = 4 /**< Number of arguments. */
646 };
647
648 typedef U ReturnType; /**< Return type. */
649 typedef W1 Arg1Type; /**< First argument type. */
650 typedef W2 Arg2Type; /**< Second argument type. */
651 typedef W3 Arg3Type; /**< Third argument type. */
652 typedef W4 Arg4Type; /**< Fourth argument type. */
653 };
654
655 /**
656 * Pointer to const member function.
657 * \tparam U \deduced Return type.
658 * \tparam V \deduced Class type.
659 * \tparam W1 \deduced Argument type.
660 * \tparam W2 \deduced Argument type.
661 * \tparam W3 \deduced Argument type.
662 * \tparam W4 \deduced Argument type.
663 */
664 template <typename U, typename V, typename W1, typename W2, typename W3, typename W4>
665 struct PtrToMemberTraits<U (V::*)(W1, W2, W3, W4) const>
666 {
667 /** Value. */
668 enum
669 {
670 IsPointerToMember = 1 /**< Pointer to member function. */
671 };
672
673 /** Value. */ enum
674 {
675 nArgs = 4 /**< Number of arguments. */
676 };
677
678 typedef U ReturnType; /**< Return type. */
679 typedef W1 Arg1Type; /**< First argument type. */
680 typedef W2 Arg2Type; /**< Second argument type. */
681 typedef W3 Arg3Type; /**< Third argument type. */
682 typedef W4 Arg4Type; /**< Fourth argument type. */
683 };
684
685 /**
686 * Pointer to member function.
687 * \tparam U \deduced Return type.
688 * \tparam V \deduced Class type.
689 * \tparam W1 \deduced Argument type.
690 * \tparam W2 \deduced Argument type.
691 * \tparam W3 \deduced Argument type.
692 * \tparam W4 \deduced Argument type.
693 * \tparam W5 \deduced Argument type.
694 */
695 template <typename U,
696 typename V,
697 typename W1,
698 typename W2,
699 typename W3,
700 typename W4,
701 typename W5>
702 struct PtrToMemberTraits<U (V::*)(W1, W2, W3, W4, W5)>
703 {
704 /** Value. */
705 enum
706 {
707 IsPointerToMember = 1 /**< Pointer to member function. */
708 };
709
710 /** Value. */ enum
711 {
712 nArgs = 5 /**< Number of arguments. */
713 };
714
715 typedef U ReturnType; /**< Return type. */
716 typedef W1 Arg1Type; /**< First argument type. */
717 typedef W2 Arg2Type; /**< Second argument type. */
718 typedef W3 Arg3Type; /**< Third argument type. */
719 typedef W4 Arg4Type; /**< Fourth argument type. */
720 typedef W5 Arg5Type; /**< Fifth argument type. */
721 };
722
723 /**
724 * Pointer to const member function.
725 * \tparam U \deduced Return type.
726 * \tparam V \deduced Class type.
727 * \tparam W1 \deduced Argument type.
728 * \tparam W2 \deduced Argument type.
729 * \tparam W3 \deduced Argument type.
730 * \tparam W4 \deduced Argument type.
731 * \tparam W5 \deduced Argument type.
732 */
733 template <typename U,
734 typename V,
735 typename W1,
736 typename W2,
737 typename W3,
738 typename W4,
739 typename W5>
740 struct PtrToMemberTraits<U (V::*)(W1, W2, W3, W4, W5) const>
741 {
742 /** Value. */
743 enum
744 {
745 IsPointerToMember = 1 /**< Pointer to member function. */
746 };
747
748 /** Value. */ enum
749 {
750 nArgs = 5 /**< Number of arguments. */
751 };
752
753 typedef U ReturnType; /**< Return type. */
754 typedef W1 Arg1Type; /**< First argument type. */
755 typedef W2 Arg2Type; /**< Second argument type. */
756 typedef W3 Arg3Type; /**< Third argument type. */
757 typedef W4 Arg4Type; /**< Fourth argument type. */
758 typedef W5 Arg5Type; /**< Fifth argument type. */
759 };
760
761 /**
762 * Pointer to member function.
763 * \tparam U \deduced Return type.
764 * \tparam V \deduced Class type.
765 * \tparam W1 \deduced Argument type.
766 * \tparam W2 \deduced Argument type.
767 * \tparam W3 \deduced Argument type.
768 * \tparam W4 \deduced Argument type.
769 * \tparam W5 \deduced Argument type.
770 * \tparam W6 \deduced Argument type.
771 */
772 template <typename U,
773 typename V,
774 typename W1,
775 typename W2,
776 typename W3,
777 typename W4,
778 typename W5,
779 typename W6>
780 struct PtrToMemberTraits<U (V::*)(W1, W2, W3, W4, W5, W6)>
781 {
782 /** Value. */
783 enum
784 {
785 IsPointerToMember = 1 /**< Pointer to member function. */
786 };
787
788 /** Value. */ enum
789 {
790 nArgs = 6 /**< Number of arguments. */
791 };
792
793 typedef U ReturnType; /**< Return type. */
794 typedef W1 Arg1Type; /**< First argument type. */
795 typedef W2 Arg2Type; /**< Second argument type. */
796 typedef W3 Arg3Type; /**< Third argument type. */
797 typedef W4 Arg4Type; /**< Fourth argument type. */
798 typedef W5 Arg5Type; /**< Fifth argument type. */
799 typedef W6 Arg6Type; /**< Sixth argument type. */
800 };
801
802 /**
803 * Pointer to const member function.
804 * \tparam U \deduced Return type.
805 * \tparam V \deduced Class type.
806 * \tparam W1 \deduced Argument type.
807 * \tparam W2 \deduced Argument type.
808 * \tparam W3 \deduced Argument type.
809 * \tparam W4 \deduced Argument type.
810 * \tparam W5 \deduced Argument type.
811 * \tparam W6 \deduced Argument type.
812 */
813 template <typename U,
814 typename V,
815 typename W1,
816 typename W2,
817 typename W3,
818 typename W4,
819 typename W5,
820 typename W6>
821 struct PtrToMemberTraits<U (V::*)(W1, W2, W3, W4, W5, W6) const>
822 {
823 /** Value. */
824 enum
825 {
826 IsPointerToMember = 1 /**< Pointer to member function. */
827 };
828
829 /** Value. */ enum
830 {
831 nArgs = 6 /**< Number of arguments. */
832 };
833
834 typedef U ReturnType; /**< Return type. */
835 typedef W1 Arg1Type; /**< First argument type. */
836 typedef W2 Arg2Type; /**< Second argument type. */
837 typedef W3 Arg3Type; /**< Third argument type. */
838 typedef W4 Arg4Type; /**< Fourth argument type. */
839 typedef W5 Arg5Type; /**< Fifth argument type. */
840 typedef W6 Arg6Type; /**< Sixth argument type. */
841 };
842
843 public:
844 /** Not a const type. */
846 /** Referenced type. */
848 /** Pointee type. */
850 /** Base type, after removing \c &, \c * and \c const. */
851 typedef typename Base<T>::Type BaseType;
852 /** Ptr base type. */
854
855 /** Predicates. */
856 enum
857 {
858 /** Pointer to member predicate. */
860 /** Pointer predicate. */
862 /** Ptr predicate. */
864 /** Reference predicate. */
866 /** Function pointer predicate. */
868 };
869
870 /** Pointer to member traits type. */
872 /** Function pointer traits. */
874};
875
876} // namespace ns3
877
878#endif /* TYPE_TRAITS_H */
Smart pointer class similar to boost::intrusive_ptr.
NS_DEPRECATED macro definition.
#define NS_DEPRECATED_3_43(msg)
Tag for things deprecated in version ns-3.43.
Definition deprecated.h:91
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::Ptr smart pointer declaration and implementation.
Base< U >::Type Type
Base type.
Base< U >::Type Type
Base type.
Base< U >::Type Type
Base type.
Base type, after removing &, * and const.
Not a function pointer type.
NullType ReturnType
Return type.
Null value type traits.
Definition type-traits.h:34
Base type of a Ptr.
Not a pointer to member type.
Not a reference type.
Definition type-traits.h:63
Not a const type.
Definition type-traits.h:43
U Result
Non-const type.
Definition type-traits.h:44
Inspect a type to deduce its features.
Definition type-traits.h:30
ReferenceTraits< T >::ReferencedType ReferencedType
Referenced type.
PtrToMemberTraits< T > PointerToMemberTraits
Pointer to member traits type.
PtrBase< T >::Type PtrBaseType
Ptr base type.
FunctionPtrTraits< T > FunctionPointerTraits
Function pointer traits.
Base< T >::Type BaseType
Base type, after removing &, * and const.
PointerTraits< T >::PointeeType PointeeType
Pointee type.
UnConst< T >::Result NonConstType
Not a const type.