Massive simplification of boxed_cast. More planned

This commit is contained in:
Jason Turner
2016-04-13 14:09:08 -06:00
parent 8d808f75c0
commit 6f0d02f158
6 changed files with 46 additions and 79 deletions

View File

@@ -424,7 +424,7 @@ namespace chaiscript
/// \brief casts an object while applying any Dynamic_Conversion available
template<typename Type>
typename detail::Cast_Helper<Type>::Result_Type boxed_cast(const Boxed_Value &bv) const
auto boxed_cast(const Boxed_Value &bv) const -> decltype(chaiscript::boxed_cast<Type>(bv, nullptr))
{
Type_Conversions_State state(m_conversions, m_conversions.conversion_saves());
return chaiscript::boxed_cast<Type>(bv, &state);