equal
deleted
inserted
replaced
66 struct False { |
66 struct False { |
67 ///\e |
67 ///\e |
68 static const bool value = false; |
68 static const bool value = false; |
69 }; |
69 }; |
70 |
70 |
71 template <bool left, bool right> |
71 |
72 struct _CompileTimeAnd { |
72 class InvalidType { |
73 static const bool value = false; |
73 private: |
|
74 InvalidType(); |
74 }; |
75 }; |
75 |
76 |
76 template <> |
|
77 struct _CompileTimeAnd<true, true> { |
|
78 static const bool value = true; |
|
79 }; |
|
80 |
|
81 template <typename Left, typename Right> |
|
82 struct CompileTimeAnd { |
|
83 static const bool value = |
|
84 _CompileTimeAnd<Left::value, Right::value>::value; |
|
85 }; |
|
86 |
77 |
87 template <typename T> |
78 template <typename T> |
88 struct Wrap { |
79 struct Wrap { |
89 const T &value; |
80 const T &value; |
90 Wrap(const T &t) : value(t) {} |
81 Wrap(const T &t) : value(t) {} |