Reduce exceptions on startup to minimum

This still has some exceptions thrown during the loading of modules
since I have no way of knowing where the operating system
`dlopen` and `LoadLibrary` functions will search for me to pre-check
it.

Closes #158
This commit is contained in:
Jason Turner
2015-04-06 13:17:41 -06:00
parent f953f9b297
commit 962bdf4b3c
6 changed files with 39 additions and 36 deletions

View File

@@ -267,7 +267,7 @@ namespace chaiscript
template<typename ContainerType>
ModulePtr assignable_type(const std::string &type, ModulePtr m = ModulePtr(new Module()))
{
basic_constructors<ContainerType>(type, m);
copy_constructor<ContainerType>(type, m);
operators::assign<ContainerType>(m);
return m;
}
@@ -443,6 +443,7 @@ namespace chaiscript
m->add(fun(static_cast<elemaccess>(&MapType::operator[])), "[]");
container_type<MapType>(type, m);
default_constructible_type<MapType>(type, m);
assignable_type<MapType>(type, m);
unique_associative_container_type<MapType>(type, m);
pair_associative_container_type<MapType>(type, m);