Update boxed_cast_tests to account for new features

This commit is contained in:
Jason Turner
2016-03-27 20:50:15 -06:00
parent 91a3ae1f14
commit 46c45e8fc7
2 changed files with 29 additions and 25 deletions

View File

@@ -176,6 +176,8 @@ namespace chaiscript
template<typename Result>
struct Cast_Helper_Inner<std::shared_ptr<Result> &>
{
static_assert(!std::is_const<Result>::value, "Non-const reference to std::shared_ptr<const T> is not supported");
typedef Boxed_Value::Sentinel<Result> Result_Type;
static Result_Type cast(const Boxed_Value &ob, const Type_Conversions_State *)
@@ -185,6 +187,7 @@ namespace chaiscript
}
};
/// Cast_Helper_Inner for casting to a const std::shared_ptr<const> & type
template<typename Result>
struct Cast_Helper_Inner<const std::shared_ptr<const Result> > : Cast_Helper_Inner<std::shared_ptr<const Result> >