| 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 |
nothing calls this directly
no outgoing calls
no test coverage detected