MCPcopy Create free account
hub / github.com/OpenFodder/openfodder / ArgStorage

Class ArgStorage

Source/Utils/dukglue/detail_types.h:143–156  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

141 // Native objects are already allocated on the heap, so there's no problem storing, say, const Dog& in the tuple.
142 template<typename T>
143 struct ArgStorage {
144 private:
145 typedef typename Bare<T>::type BareType;
146 //typedef DukType<BareType> ThisDukType;
147 typedef typename DukType<BareType>::IsValueType IsValueType;
148
149 static_assert(!IsValueType::value || !std::is_pointer<T>::value, "Cannot return pointer to value type.");
150 static_assert(!IsValueType::value ||
151 (!std::is_reference<T>::value || std::is_const<typename std::remove_reference<T>::type>::value),
152 "Value types can only be returned as const references.");
153
154 public:
155 typedef typename std::conditional<IsValueType::value, BareType, T>::type type;
156 };
157 }
158}
159

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected