Commit Graph

2177 Commits

Author SHA1 Message Date
Thibault Cohen
d856358bc9 Fix modernizr path 2014-08-27 12:05:43 -04:00
Thibault Cohen
e374f68b47 "Localize" modernizr 2014-08-27 11:42:14 -04:00
Thibault Cohen
218e06f4ca Add local google font 2014-08-25 16:13:38 -04:00
Dave Snider
21e875d3a5 forgot to minify 2014-08-21 19:46:30 -07:00
Dave Snider
e3ded0a636 update bourbon/neat combo to newest versions, per wyrm dependency 2014-08-21 19:40:29 -07:00
Dave Snider
f8d83b0336 Merge branch 'master' of github.com:snide/sphinx_rtd_theme 2014-08-21 19:29:13 -07:00
Dave Snider
02f84c12ae lock this down while i do some tests 2014-08-21 19:28:58 -07:00
Rapptz
a2237eb068 Fix lack of inline in functions.
diff --git a/bootstrap.py b/bootstrap.py
index c24f6e5..1d6a0b3 100755
--- a/bootstrap.py
+++ b/bootstrap.py
@@ -37,6 +37,7 @@ parser = argparse.ArgumentParser()
 parser.add_argument('--debug', action='store_true', help='compile with debug flags')
 parser.add_argument('--cxx', metavar='<compiler>', help='compiler name to use (default: g++)', default='g++')
 parser.add_argument('--ci', action='store_true', help=argparse.SUPPRESS)
+parser.add_argument('--testing', action='store_true', help=argparse.SUPPRESS)
 parser.add_argument('--lua-dir', metavar='<dir>', help='directory lua is in with include and lib subdirectories')
 parser.add_argument('--install-dir', metavar='<dir>', help='directory to install the headers to', default=install_dir);
 parser.epilog = """In order to install sol, administrative privileges might be required.
@@ -80,6 +81,9 @@ if args.ci:
 else:
     ldflags.extend(libraries(['lua']))

+if args.testing:
+    cxxflags.append('-Wmissing-declarations')
+
 if 'linux' in sys.platform:
     ldflags.extend(libraries(['dl']))

diff --git a/sol/demangle.hpp b/sol/demangle.hpp
index 694a2be..78f4dd4 100644
--- a/sol/demangle.hpp
+++ b/sol/demangle.hpp
@@ -33,12 +33,12 @@
 namespace sol {
 namespace detail {
 #ifdef _MSC_VER
-std::string get_type_name(const std::type_info& id) {
+inline std::string get_type_name(const std::type_info& id) {
     return id.name();
 }

 #elif defined(__GNUC__) || defined(__clang__)
-std::string get_type_name(const std::type_info& id) {
+inline std::string get_type_name(const std::type_info& id) {
     int status;
     char* unmangled = abi::__cxa_demangle(id.name(), 0, 0, &status);
     std::string realname = unmangled;
@@ -50,7 +50,7 @@ std::string get_type_name(const std::type_info& id) {
 #error Compiler not supported for demangling
 #endif // compilers

-std::string demangle(const std::type_info& id) {
+inline std::string demangle(const std::type_info& id) {
     std::string realname = get_type_name(id);
     const static std::array<std::string, 2> removals = {{ "struct ", "class " }};
     const static std::array<std::string, 2> replacements = {{ "::", "_" }};
diff --git a/sol/resolve.hpp b/sol/resolve.hpp
index 0d849d0..1f6f606 100644
--- a/sol/resolve.hpp
+++ b/sol/resolve.hpp
@@ -28,66 +28,67 @@
 namespace sol {
 namespace detail {
 template<typename R, typename... Args, typename F, typename = typename std::result_of<Unqualified<F>(Args...)>::type>
-auto resolve_i(types<R(Args...)>, F&&)->R(Unqualified<F>::*)(Args...) {
+inline auto resolve_i(types<R(Args...)>, F&&) -> R(Unqualified<F>::*)(Args...) {
     using Sig = R(Args...);
     typedef Unqualified<F> Fu;
     return static_cast<Sig Fu::*>(&Fu::operator());
 }

 template<typename F, typename U = Unqualified<F>>
-auto resolve_f(std::true_type, F&& f) -> decltype(resolve_i(types<function_signature_t<decltype(&U::operator())>>(), std::forward<F>(f))) {
+inline auto resolve_f(std::true_type, F&& f)
+-> decltype(resolve_i(types<function_signature_t<decltype(&U::operator())>>(), std::forward<F>(f))) {
     return resolve_i(types<function_signature_t<decltype(&U::operator())>>(), std::forward<F>(f));
 }

 template<typename F>
-void resolve_f(std::false_type, F&&) {
+inline void resolve_f(std::false_type, F&&) {
     static_assert(has_deducible_signature<F>::value,
                   "Cannot use no-template-parameter call with an overloaded functor: specify the signature");
 }

 template<typename F, typename U = Unqualified<F>>
-auto resolve_i(types<>, F&& f) -> decltype(resolve_f(has_deducible_signature<U> {}, std::forward<F>(f))) {
+inline auto resolve_i(types<>, F&& f) -> decltype(resolve_f(has_deducible_signature<U> {}, std::forward<F>(f))) {
     return resolve_f(has_deducible_signature<U> {}, std::forward<F>(f));
 }

 template<typename... Args, typename F, typename R = typename std::result_of<F&(Args...)>::type>
-auto resolve_i(types<Args...>, F&& f) -> decltype( resolve_i(types<R(Args...)>(), std::forward<F>(f))) {
+inline auto resolve_i(types<Args...>, F&& f) -> decltype( resolve_i(types<R(Args...)>(), std::forward<F>(f))) {
     return resolve_i(types<R(Args...)>(), std::forward<F>(f));
 }

 template<typename Sig, typename C>
-Sig C::* resolve_v(std::false_type, Sig C::* mem_func_ptr) {
+inline Sig C::* resolve_v(std::false_type, Sig C::* mem_func_ptr) {
     return mem_func_ptr;
 }

 template<typename Sig, typename C>
-Sig C::* resolve_v(std::true_type, Sig C::* mem_variable_ptr) {
+inline Sig C::* resolve_v(std::true_type, Sig C::* mem_variable_ptr) {
     return mem_variable_ptr;
 }
 } // detail

 template<typename... Args, typename R>
-auto resolve(R fun_ptr(Args...)) -> R(*)(Args...) {
+inline auto resolve(R fun_ptr(Args...)) -> R(*)(Args...) {
     return fun_ptr;
 }

 template<typename Sig>
-Sig* resolve(Sig* fun_ptr) {
+inline Sig* resolve(Sig* fun_ptr) {
     return fun_ptr;
 }

 template<typename... Args, typename R, typename C>
-auto resolve(R(C::*mem_ptr)(Args...)) -> R(C::*)(Args...) {
+inline auto resolve(R(C::*mem_ptr)(Args...)) -> R(C::*)(Args...) {
     return mem_ptr;
 }

 template<typename Sig, typename C>
-Sig C::* resolve(Sig C::* mem_ptr) {
+inline Sig C::* resolve(Sig C::* mem_ptr) {
     return detail::resolve_v(std::is_member_object_pointer<Sig C::*>(), mem_ptr);
 }

 template<typename... Sig, typename F>
-auto resolve(F&& f) -> decltype(detail::resolve_i(types<Sig...>(), std::forward<F>(f))) {
+inline auto resolve(F&& f) -> decltype(detail::resolve_i(types<Sig...>(), std::forward<F>(f))) {
     return detail::resolve_i(types<Sig...>(), std::forward<F>(f));
 }
 } // sol
2014-08-10 21:07:19 -04:00
Rapptz
da76793c30 Formatting changes. 2014-08-10 20:49:34 -04:00
Rapptz
2a5b800286 Change shebang of bootstrap 2014-08-10 19:59:03 -04:00
Nadav Spiegelman
0ea156f883 Fix typo: compatability -> compatibility 2014-08-10 17:08:36 -04:00
ThePhD
715efa6e20 I do believe C++'s inconsistencies will destroy me utterly one day.
But it is not this day. C++14 allows for not specifying the `&` in front of the member function
2014-08-09 05:49:10 -07:00
ThePhD
f18bcedd46 has_deducible versus is_class 2014-08-09 05:26:30 -07:00
ThePhD
db05dc8436 Additions to gitignore. 2014-08-09 04:55:35 -07:00
ThePhD
37c3883eb6 Free functions and lambdas whos first arguments match the userdata type (unqualified)
now are usable as functions for userdata.
allows free functions and lambdas to provide useful operations, like operator+*-/
and other things which may not be implemented as class members.
2014-08-09 04:54:58 -07:00
Eric Holscher
e77fdfb7f1 Add div.document to the theme.
This refs: https://github.com/rtfd/readthedocs.org/issues/794
All of the standard Sphinx themes include this,
and RTD uses it internally.
2014-08-06 17:04:11 -07:00
Rapptz
2e44a6cf42 Updated README again, removing TODO 2014-08-05 19:21:03 -04:00
Rapptz
172096e016 Update README 2014-08-05 19:10:07 -04:00
ThePhD
c123fd9204 Fix unused parameter warnings on clang. 2014-08-05 09:22:43 -07:00
ThePhD
63e66a40c2 Fix clang builds due to being unable to use shortcut-syntax for overloaded. You must specify the whole signature (how droll). 2014-08-05 09:07:29 -07:00
ThePhD
7d7e46d06a Slay some extra spaces. 2014-08-05 00:31:59 -07:00
ThePhD
2a73410a4b Merge remote-tracking branch 'root/master'
Conflicts:
	sol/userdata.hpp
2014-08-05 00:15:34 -07:00
ThePhD
e25d4b4c02 Properly handle const value returns (and constness in general).
Keeps errors when trying to bind a const variables directly,
but const returns should be forced to value-types,
since lua has no concept of `const`.
2014-08-05 00:08:41 -07:00
Rapptz
6774249bb5 Ignore some warnings on clang. 2014-08-04 21:19:16 -04:00
Rapptz
2ac3e27229 Update travis script, fix warnings. 2014-08-04 21:05:47 -04:00
Rapptz
721c6f1dae Update .travis.yml 2014-08-04 20:53:43 -04:00
Rapptz
d245860334 Add --ci flag to travis-ci script 2014-08-04 20:08:53 -04:00
Rapptz
43e0217a63 Add travis-ci integration 2014-08-04 20:07:06 -04:00
Rapptz
68c89c53b9 Add uninstall and install targets to ninja. 2014-08-04 19:29:38 -04:00
Rapptz
6f52eb532e Update bootstrap.py to handle external lua directories and linking on
linux.
2014-08-04 18:30:13 -04:00
Ryan Alexander
9819699105 Add include for std::free from <cstdlib> 2014-08-04 18:12:11 -04:00
ThePhD
14b1a3fe0c Some missing support for reference-style (l-value reference and pointer) calls from lua. Fixed. 2014-07-30 00:19:58 -07:00
ThePhD
ef8fa7395f Updated examples and readme changes to reflect new API (userdata example kept erroneous info that userdata<T> must be kept alive) 2014-07-27 12:57:19 -07:00
ThePhD
368d78d463 userdata member variables are now supported
userdata now performs lookup based on tables
userdata now has reduced number of vector tables
userdata garbage collection improved
debug.hpp - new header for debugging problems with stack, mostly for internal use
2014-07-27 12:56:24 -07:00
Dave Snider
58098e0169 Merge pull request #129 from gl3n/patch-1
Custom sidebar title
2014-07-15 09:21:15 -07:00
Dave Snider
454933b2a7 how to submit issues 2014-07-08 09:28:42 -07:00
ThePhD
30c1f8c1b8 Tabs to spaces 2014-07-01 19:18:03 -07:00
ThePhD
84ae20a57a Extraneous Cx. 2014-07-01 05:23:27 -07:00
ThePhD
eb25bb05bb Overloaded functions now work properly when types are specified in signature
this triggered overhaul of set_function/pusher<function_t>::push(...)
both state and table reflect changes to userdata structure to make it easier to use
tests updated to account for overload resolution
some function-related traits added to make use easier -- cleaned up archaic typenames in function_types.hpp
Account for std::reference_wrapper for objects -- sol now uses copy-by-default (value-semantics) for all functors
updated tests to reflect this
2014-06-28 23:16:48 -07:00
ThePhD
b41f92adc9 updated tests
fixed small error in state with new system
all tests passing GCC 4.9 std=c++11
2014-06-27 21:34:18 -07:00
ThePhD
36e45d88b2 userdata no longer needs to be kept around for its lifetime
can be discarded and lua VM will keep all necessary information
2014-06-27 21:27:48 -07:00
ThePhD
5930818891 Fixed tests spacing 2014-06-27 01:40:51 -07:00
ThePhD
d548fdaee8 Fix spacing issues 2014-06-27 01:36:09 -07:00
ThePhD
b5a938b285 Fix spacing issues 2014-06-27 01:34:16 -07:00
ThePhD
d35de4a8fa Fix for Issue #35
Userdata now properly forwards arguments to constructor
get_call now properly has extra parameters to allow for forwarding items from the first call that are not popped
Added tests to cover new cases
2014-06-27 01:25:57 -07:00
Rapptz
05dcba2fac Fix compiler error with clang 2014-06-25 17:07:21 -04:00
gl3n
bcf5e22910 Custom sidebar title
I added a **sidebartitle** block to customize easily the sidebar title (with the project image for example).
2014-06-23 12:35:55 +02:00
Dave Snider
b83f5adf97 update with wyrm's better breakpoint naming 2014-06-11 22:18:11 -07:00
Rapptz
7976b280e9 Add tests for issue #25 2014-06-09 09:18:29 -04:00
PrincessNyanara
6fbae52e9f container changes reverted
perhaps one day...
2014-06-09 06:29:06 -04:00