Merge branch 'master' into 2011-09-09-CxScript
Conflicts: include/chaiscript/dispatchkit/boxed_number.hpp include/chaiscript/dispatchkit/dispatchkit.hpp
This commit is contained in:
commit
2969f61fe4
@ -13,13 +13,21 @@
|
|||||||
namespace chaiscript
|
namespace chaiscript
|
||||||
{
|
{
|
||||||
|
|
||||||
|
#ifdef BOOST_MSVC
|
||||||
|
#pragma warning(push)
|
||||||
|
#pragma warning(disable : 4244 4018 4389 4146)
|
||||||
|
#endif
|
||||||
|
|
||||||
/// \brief Represents any numeric type, generically. Used internally for generic operations between POD values
|
/// \brief Represents any numeric type, generically. Used internally for generic operations between POD values
|
||||||
class Boxed_Number
|
class Boxed_Number
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
struct boolean
|
struct boolean
|
||||||
{
|
{
|
||||||
|
|
||||||
|
#ifdef __GNUC__
|
||||||
#pragma GCC diagnostic ignored "-Wsign-compare"
|
#pragma GCC diagnostic ignored "-Wsign-compare"
|
||||||
|
#endif
|
||||||
template<typename T, typename U>
|
template<typename T, typename U>
|
||||||
static Boxed_Value go(Operators::Opers t_oper, const T &t, const U &u, const Boxed_Value &)
|
static Boxed_Value go(Operators::Opers t_oper, const T &t, const U &u, const Boxed_Value &)
|
||||||
{
|
{
|
||||||
@ -696,7 +704,11 @@ namespace chaiscript
|
|||||||
{
|
{
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef BOOST_MSVC
|
||||||
|
#pragma warning(pop)
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -834,7 +834,7 @@ namespace chaiscript
|
|||||||
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss) {
|
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss) {
|
||||||
Boxed_Value match_value;
|
Boxed_Value match_value;
|
||||||
bool breaking = false;
|
bool breaking = false;
|
||||||
int currentCase = 1;
|
size_t currentCase = 1;
|
||||||
bool hasMatched = false;
|
bool hasMatched = false;
|
||||||
|
|
||||||
chaiscript::eval::detail::Scope_Push_Pop spp(t_ss);
|
chaiscript::eval::detail::Scope_Push_Pop spp(t_ss);
|
||||||
|
@ -61,7 +61,7 @@ int test_5()
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
chai.eval("throw(runtime_error(\"error\"))", chaiscript::exception_specification<int, double, float, const std::string &, const std::exception &>());
|
chai.eval("throw(runtime_error(\"error\"))", chaiscript::exception_specification<int, double, float, const std::string &, const std::exception &>());
|
||||||
} catch (const double e) {
|
} catch (const double) {
|
||||||
std::cout << "test_5 failed with double" << std::endl;
|
std::cout << "test_5 failed with double" << std::endl;
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
} catch (int) {
|
} catch (int) {
|
||||||
@ -73,7 +73,7 @@ int test_5()
|
|||||||
} catch (const std::string &) {
|
} catch (const std::string &) {
|
||||||
std::cout << "test_5 failed with string" << std::endl;
|
std::cout << "test_5 failed with string" << std::endl;
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
} catch (const std::exception &e) {
|
} catch (const std::exception &) {
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -96,10 +96,10 @@ int test_unhandled()
|
|||||||
} catch (float) {
|
} catch (float) {
|
||||||
std::cout << "test_unhandled failed with float" << std::endl;
|
std::cout << "test_unhandled failed with float" << std::endl;
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
} catch (const std::exception &e) {
|
} catch (const std::exception &) {
|
||||||
std::cout << "test_unhandled failed with std::exception" << std::endl;
|
std::cout << "test_unhandled failed with std::exception" << std::endl;
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
} catch (const chaiscript::Boxed_Value &bv) {
|
} catch (const chaiscript::Boxed_Value &) {
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user