Merge branch 'ChaiScript_5_0_CPP_11' of https://github.com/ChaiScript/ChaiScript into ChaiScript_5_0_CPP_11

This commit is contained in:
Jason Turner 2014-02-26 10:51:36 -07:00
commit cb42bffbf9
7 changed files with 53 additions and 11 deletions

View File

@ -23,7 +23,7 @@ set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/readme.md")
set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/description.txt") set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/description.txt")
set(CPACK_PACKAGE_VERSION_MAJOR 5) set(CPACK_PACKAGE_VERSION_MAJOR 5)
set(CPACK_PACKAGE_VERSION_MINOR 2) set(CPACK_PACKAGE_VERSION_MINOR 3)
set(CPACK_PACKAGE_VERSION_PATCH 0) set(CPACK_PACKAGE_VERSION_PATCH 0)
set(CPACK_PACKAGE_EXECUTABLES "chai;ChaiScript Eval") set(CPACK_PACKAGE_EXECUTABLES "chai;ChaiScript Eval")

View File

@ -275,7 +275,11 @@ namespace chaiscript
auto pf = std::dynamic_pointer_cast<const dispatch::Dynamic_Proxy_Function>(t_pf); auto pf = std::dynamic_pointer_cast<const dispatch::Dynamic_Proxy_Function>(t_pf);
if (pf) if (pf)
{ {
return bool(pf->get_guard()); if (pf->get_guard()) {
return true;
} else {
return false;
}
} else { } else {
return false; return false;
} }

View File

@ -107,6 +107,10 @@ namespace chaiscript
#ifdef BOOST_MSVC
#pragma warning(pop)
#endif
/** /**
* Used by Proxy_Function_Impl to determine if it is equivalent to another * Used by Proxy_Function_Impl to determine if it is equivalent to another
* Proxy_Function_Impl object. This function is primarly used to prevent * Proxy_Function_Impl object. This function is primarly used to prevent

View File

@ -1,17 +1,41 @@
Changes since 5.1.0 Notes:
* There was overlap during the 5.x and 4.x development cycle, so some of the notes appear twice as the new features were developed for 4.x (which required boost) then ported to 5.x (which requires C++11).
* This is the last release of 5.x, all future development will be on the final merged 6.x line.
### Changes since 5.2.0
* Official support for MSVC with C++11. All major platforms and compilers are now support for C++11 release
* Enhanced unit tests
* Add `continue` statement, fix various use cases for `for` loops
* Fix use of suffixed numbers in vector initialization
* Code cleanups
* Eliminate global data, which makes code more portable and thread safe
* Fix issue #79
* Merge pretty_print fixes from @mgee #82
* Compiler warning fixes for latest compiler releases
* Fix threading problems
* Fix linking error on MacOS Mavericks #88
* Allow non-const globals
* Make sure user cannot name a variable with `::` in it #91
* Fix various string / map / vector `size` and `count` calls for compilers which have weird overloads for them. #90 #93 #95
* Make module search path relative to the currently running executable
* Build and work with wstring windows builds
### Changes since 5.1.0
* Add support for automatic conversion of arithmetic types when possible * Add support for automatic conversion of arithmetic types when possible
and when no ambiguous method dispatch exists. and when no ambiguous method dispatch exists.
Changes since 5.0.0 ### Changes since 5.0.0
* Fix sizing of numeric constants to match that of the C++ standard * Fix sizing of numeric constants to match that of the C++ standard
* Add support for u,ll,l,f suffixes for numeric constants * Add support for u,ll,l,f suffixes for numeric constants
* Siginificant improvement in error reporting * Siginificant improvement in error reporting
Changes since 4.0.0 ### Changes since 4.0.0
* Dropped boost in favor of C++11 * Dropped boost in favor of C++11
* Separated out stdlib to make more options for compile time improvements * Separated out stdlib to make more options for compile time improvements
Changes since 3.1.0 ### Changes since 3.1.0
* svenstaro: Unused variables and CMake consistency fixes * svenstaro: Unused variables and CMake consistency fixes
* Added support for returning pointers from functions (#13) * Added support for returning pointers from functions (#13)
* Compile with -pedantic (#9) * Compile with -pedantic (#9)
@ -30,7 +54,7 @@ Changes since 3.1.0
* Increased unit tests to 161 * Increased unit tests to 161
* Performance enhancements * Performance enhancements
Changes since 3.0.0 ### Changes since 3.0.0
* Numeric operations performance increased approximately 10x * Numeric operations performance increased approximately 10x
* Looping operations performance increased up to 2x * Looping operations performance increased up to 2x
* Engine start up time decreased * Engine start up time decreased
@ -39,8 +63,7 @@ Changes since 3.0.0
uint8_t, uint16_t, uint32_t, uint64_t, int8_t, int16_t, int32_t, int64_t uint8_t, uint16_t, uint32_t, uint64_t, int8_t, int16_t, int32_t, int64_t
* Enhanced support for capturing of exceptions thrown from ChaiScript in C++ * Enhanced support for capturing of exceptions thrown from ChaiScript in C++
Changes since 2.3.3 ### Changes since 2.3.3
* Code simplifications * Code simplifications
* Fully integrate documentation with source code in doxygen style comments * Fully integrate documentation with source code in doxygen style comments
* Unit tests increased from 114 to 137 * Unit tests increased from 114 to 137

View File

@ -67,8 +67,8 @@ std::string default_search_path()
return ""; return "";
} }
#else #else
std::string exepath; std::string exepath;
std::vector<char> buf(2048); std::vector<char> buf(2048);

View File

@ -26,7 +26,12 @@ bool has_parse_tree(const chaiscript::Const_Proxy_Function &t_pf)
= std::dynamic_pointer_cast<const chaiscript::dispatch::Dynamic_Proxy_Function>(t_pf); = std::dynamic_pointer_cast<const chaiscript::dispatch::Dynamic_Proxy_Function>(t_pf);
if (pf) if (pf)
{ {
return bool(pf->get_parse_tree()); if (pf->get_parse_tree())
{
return true;
} else {
return false;
}
} else { } else {
return false; return false;
} }

View File

@ -15,6 +15,9 @@ class TestBaseType
int val; int val;
const int const_val; const int const_val;
private:
TestBaseType &operator=(const TestBaseType &);
}; };
enum TestEnum enum TestEnum
@ -32,6 +35,9 @@ class TestDerivedType : public TestBaseType
public: public:
virtual ~TestDerivedType() {} virtual ~TestDerivedType() {}
virtual int func() { return 1; } virtual int func() { return 1; }
private:
TestDerivedType &operator=(const TestDerivedType &);
}; };
std::string hello_world() std::string hello_world()