Heey, no more submodules needed now.

This commit is contained in:
ThePhD 2016-11-01 05:39:44 -04:00
parent 0fcb62a725
commit d3cb9042c3
3 changed files with 1146 additions and 1078 deletions

View File

@ -5,14 +5,9 @@ Let's get you going with Sol! To start, you'll need to use a lua distribution of
If you need help getting or building Lua, check out the `Lua page on getting started`_. Note that for Visual Studio, one can simply download the sources, include all the Lua library files in that project, and then build for debug/release, x86/x64/ARM rather easily and with minimal interference. Just make sure to adjust the Project Property page to build as a static library (or a DLL with the proper define set in the ``Preprocessor`` step).
After that, make sure you grab either the `single header file release`_, or just perform a clone of the `github repository here`_ and set your include paths up so that you can get at ``sol.hpp`` somehow. Note that we also have the latest version of the single header file with all dependencies included kept in the `repository as well`_. We recommend the single-header-file release, since it's easier to move around, manage and update if you commit it with some form of version control. If you use the github clone method and do not point to the `single/sol/sol.hpp`_ on your include files, you *must* update submodules in order to make sure Optional is present in the repository. Clone with:
After that, make sure you grab either the `single header file release`_, or just perform a clone of the `github repository here`_ and set your include paths up so that you can get at ``sol.hpp`` somehow. Note that we also have the latest version of the single header file with all dependencies included kept in the `repository as well`_. We recommend the single-header-file release, since it's easier to move around, manage and update if you commit it with some form of version control. You can also clone/submodule the repository and then point at the `single/sol/sol.hpp`_ on your include files path. Clone with:
>>> git clone https://github.com/ThePhD/sol2.git
>>> git submodule update --init
or, just run
>>> git clone --recursive https://github.com/ThePhD/sol2.git
When you're ready, try compiling this short snippet:

File diff suppressed because it is too large Load Diff

View File

@ -27,8 +27,8 @@
// The idea and interface is based on Boost.Optional library
// authored by Fernando Luis Cacciola Carballal
# ifndef ___SOL_OPTIONAL_HPP___
# define ___SOL_OPTIONAL_HPP___
# ifndef SOL_OPTIONAL_IMPLEMENTATION_HPP
# define SOL_OPTIONAL_IMPLEMENTATION_HPP
# include <utility>
# include <type_traits>
@ -578,7 +578,7 @@ namespace sol {
T* noreach = (T*)nullptr;
return *noreach;
#else
throw bad_optional_access("bad optional access")
throw bad_optional_access("bad optional access");
#endif
}
@ -592,7 +592,7 @@ namespace sol {
T* noreach = (T*)nullptr;
return *noreach;
#else
throw bad_optional_access("bad optional access")
throw bad_optional_access("bad optional access");
#endif
}
@ -606,7 +606,7 @@ namespace sol {
T* noreach = (T*)nullptr;
return std::move(*noreach);
#else
throw bad_optional_access("bad optional access")
throw bad_optional_access("bad optional access");
#endif
}
@ -637,7 +637,7 @@ namespace sol {
T* noreach = (T*)nullptr;
return *noreach;
#else
throw bad_optional_access("bad optional access")
throw bad_optional_access("bad optional access");
#endif
}
@ -650,7 +650,7 @@ namespace sol {
T* noreach = (T*)nullptr;
return *noreach;
#else
throw bad_optional_access("bad optional access")
throw bad_optional_access("bad optional access");
#endif
}
@ -789,7 +789,7 @@ namespace sol {
T* noreach = (T*)nullptr;
return *noreach;
#else
throw bad_optional_access("bad optional access")
throw bad_optional_access("bad optional access");
#endif
}
@ -1138,4 +1138,4 @@ namespace std
# undef TR2_OPTIONAL_REQUIRES
# undef TR2_OPTIONAL_ASSERTED_EXPRESSION
# endif //___SOL_OPTIONAL_HPP___
# endif // SOL_OPTIONAL_IMPLEMENTATION_HPP