| 175 | /// Similar to shared_ptr_clone. Used for Proxy_Function. |
| 176 | template<typename Type> |
| 177 | Boxed_Value ptr_assign(Boxed_Value lhs, const std::shared_ptr<Type> &rhs) |
| 178 | { |
| 179 | if (lhs.is_undef() |
| 180 | || (!lhs.get_type_info().is_const() && lhs.get_type_info().bare_equal(chaiscript::detail::Get_Type_Info<Type>::get()))) |
| 181 | { |
| 182 | lhs.assign(Boxed_Value(rhs)); |
| 183 | return lhs; |
| 184 | } else { |
| 185 | throw exception::bad_boxed_cast("type mismatch in pointer assignment"); |
| 186 | } |
| 187 | } |
| 188 | |
| 189 | /// Class consisting of only static functions. All default bootstrapping occurs |
| 190 | /// from this class. |
nothing calls this directly
no test coverage detected