Address msvc issues with #167 #165

The best we can get it down to is 2 moves in MSVC, it does not
elide the moves/copies as well as GCC and Clang do

It's not possible for us to support registering of array types in
MSVC12, but we can in MSVC14 with the latest release of the
compiler.
This commit is contained in:
Jason Turner
2015-04-18 20:51:45 -06:00
parent 71245aa703
commit db34899225
3 changed files with 23 additions and 1 deletions

View File

@@ -71,10 +71,19 @@ int main()
chai.eval(" { auto i = create(); } ");
#ifdef CHAISCRIPT_MSVC
if (Test::destructcount() == 3 && Test::copycount() == 0 && Test::movecount() == 2 && Test::constructcount() == 1)
{
return EXIT_SUCCESS;
} else {
return EXIT_FAILURE;
}
#else
if (Test::destructcount() == 2 && Test::copycount() == 0 && Test::movecount() == 1 && Test::constructcount() == 1)
{
return EXIT_SUCCESS;
} else {
return EXIT_FAILURE;
}
#endif
}