| 115 | |
| 116 | template <typename T> |
| 117 | T* Owned<T>::get() const |
| 118 | { |
| 119 | if (data == nullptr) { |
| 120 | return nullptr; |
| 121 | } else { |
| 122 | // Static cast to avoid ambiguity in Visual Studio compiler. |
| 123 | CHECK(data->t != static_cast<T*>(nullptr)) |
| 124 | << "This owned pointer has already been shared"; |
| 125 | |
| 126 | return data->t; |
| 127 | } |
| 128 | } |
| 129 | |
| 130 | |
| 131 | template <typename T> |
no outgoing calls