mFrame
載入中...
搜尋中...
無符合項目
AutoConvert.h
1
7#ifndef MFRAME_0DEB9649_0521_4C73_8E93_BEF012AC9F2D
8#define MFRAME_0DEB9649_0521_4C73_8E93_BEF012AC9F2D
9
10/* ***************************************************************************************
11 * Include
12 */
13
14//----------------------------------------------------------------------------------------
15
16//----------------------------------------------------------------------------------------
17#include "./../lang/Interface.h"
18
19/* ***************************************************************************************
20 * Namespace
21 */
22namespace ufm::lang {
23 template <template <typename...> class C>
24 struct AutoConvert;
25} // namespace ufm::lang
26
27/* ***************************************************************************************
28 * Class/Interface/Struct/Enum
29 */
30
46template <template <typename...> class C>
54 template <typename... Args>
55 inline operator const C<Args...>&(void) const {
56 return *reinterpret_cast<const C<Args...>*>(this);
57 }
58
64 template <typename... Args>
65 inline operator C<Args...>&(void) {
66 return *reinterpret_cast<C<Args...>*>(this);
67 }
68};
69
70/* ***************************************************************************************
71 * End of file
72 */
73
74#endif /* MFRAME_0DEB9649_0521_4C73_8E93_BEF012AC9F2D */
Definition Appendable.h:23
自動轉型模板,方便不同型別介面之間的轉換
Definition AutoConvert.h:47