Add thread specific cache of type info

Reduces the number of locks necessary to check of a user defined type
conversion should be scanned for / applied.
This commit is contained in:
Jason Turner
2014-10-28 22:12:03 -06:00
parent e85be6eb3d
commit 7c766f87a4
3 changed files with 51 additions and 3 deletions

View File

@@ -86,7 +86,7 @@ namespace chaiscript
#pragma warning(disable : 4127)
#endif
if ( /*std::is_polymorphic<typename detail::Bare_Type<Type>::type>::value && */ t_conversions)
if (t_conversions && t_conversions->convertable_type<Type>())
{
try {
// std::cout << "trying an up conversion " << typeid(Type).name() << std::endl;