Thrive
luabind.h
1 #pragma once
2 
3 #include <boost/version.hpp>
4 #include <iostream>
5 #include <memory>
6 
7 namespace luabind { namespace detail { namespace has_get_pointer_ {
8 
9  template<typename T>
10  inline T*
11  get_pointer(
12  const std::unique_ptr<T>& ptr
13  ) {
14  return ptr.get();
15  }
16 
17 
18  template<typename T>
19  inline T*
20  get_pointer(
21  std::unique_ptr<T>& ptr
22  ) {
23  return ptr.get();
24  }
25 
26 
27  template<typename T>
28  inline T*
29  get_pointer(
30  const std::shared_ptr<T>& ptr
31  ) {
32  return ptr.get();
33  }
34 
35 
36  template<typename T>
37  inline T*
38  get_pointer(
39  std::shared_ptr<T>& ptr
40  ) {
41  return ptr.get();
42  }
43 
44 }}}
45 
46 #if (BOOST_VERSION / 100 % 1000) < 53
47 
48 namespace boost {
49 
50  template<typename T>
51  inline T*
52  get_pointer(
53  const std::unique_ptr<T>& ptr
54  ) {
55  return ptr.get();
56  }
57 
58 
59  template<typename T>
60  inline T*
61  get_pointer(
62  const std::shared_ptr<T>& ptr
63  ) {
64  return ptr.get();
65  }
66 
67 }
68 
69 #endif // Boost version
70 
71 #include <luabind/luabind.hpp>
72 
73 inline void
74 printLuaError(const luabind::error& e) {
75  luabind::object error_msg(luabind::from_stack(
76  e.state(),
77  -1
78  ));
79  std::cerr<< error_msg << std::endl;
80 }
81 
Definition: luabind.h:48
Definition: bullet_to_ogre_system.h:5