/
usr
/
include
/
luabind
/
detail
/
/usr/include/luabind/detail
mkdir
upload
Name
Size
Mode
Actions
call.hpp
9158
0644
edit
dl
rm
call_function.hpp
18726
0644
edit
dl
rm
call_member.hpp
13721
0644
edit
dl
rm
call_operator_iterate.hpp
2194
0644
edit
dl
rm
class_registry.hpp
2940
0644
edit
dl
rm
class_rep.hpp
6235
0644
edit
dl
rm
constructor.hpp
3691
0644
edit
dl
rm
convert_to_lua.hpp
2924
0644
edit
dl
rm
debug.hpp
2273
0644
edit
dl
rm
decorate_type.hpp
6592
0644
edit
dl
rm
deduce_signature.hpp
2016
0644
edit
dl
rm
enum_maker.hpp
3542
0644
edit
dl
rm
format_signature.hpp
3609
0644
edit
dl
rm
garbage_collector.hpp
1862
0644
edit
dl
rm
has_get_pointer.hpp
2960
0644
edit
dl
rm
inheritance.hpp
4197
0644
edit
dl
rm
instance_holder.hpp
3108
0644
edit
dl
rm
link_compatibility.hpp
1994
0644
edit
dl
rm
make_instance.hpp
2811
0644
edit
dl
rm
most_derived.hpp
1602
0644
edit
dl
rm
object.hpp
33394
0644
edit
dl
rm
object_call.hpp
1899
0644
edit
dl
rm
object_rep.hpp
4471
0644
edit
dl
rm
operator_id.hpp
2465
0644
edit
dl
rm
other.hpp
3290
0644
edit
dl
rm
pcall.hpp
1458
0644
edit
dl
rm
pointee_sizeof.hpp
1840
0644
edit
dl
rm
policy.hpp
28340
0644
edit
dl
rm
primitives.hpp
1856
0644
edit
dl
rm
property.hpp
782
0644
edit
dl
rm
signature_match.hpp
2171
0644
edit
dl
rm
stack_utils.hpp
1640
0644
edit
dl
rm
typetraits.hpp
5439
0644
edit
dl
rm
yes_no.hpp
1324
0644
edit
dl
rm
Edit:
/usr/include/luabind/detail/typetraits.hpp
(5439B)
// Copyright (c) 2003 Daniel Wallin and Arvid Norberg // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the "Software"), // to deal in the Software without restriction, including without limitation // the rights to use, copy, modify, merge, publish, distribute, sublicense, // and/or sell copies of the Software, and to permit persons to whom the // Software is furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF // ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A // PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT // SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE // OR OTHER DEALINGS IN THE SOFTWARE. #ifndef LUABIND_TYPETRAITS_HPP_INCLUDED #define LUABIND_TYPETRAITS_HPP_INCLUDED #include <luabind/config.hpp> #include <luabind/detail/primitives.hpp> #include <luabind/detail/yes_no.hpp> #include <boost/mpl/if.hpp> #include <boost/type_traits/is_const.hpp> #include <boost/type_traits/is_reference.hpp> namespace luabind { namespace detail { #ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION template<class T> struct is_const_type { typedef typename boost::mpl::if_<boost::is_const<T> , yes_t , no_t >::type type; }; template<bool is_Reference = false> struct is_const_reference_helper { template<class> struct apply { enum { value = false }; }; }; template<class T> typename is_const_type<T>::type is_const_reference_tester(T&); no_t is_const_reference_tester(...); template<> struct is_const_reference_helper<true> { template<class T> struct apply { static T getT(); enum { value = sizeof(is_const_reference_tester(getT())) == sizeof(yes_t) }; }; }; template<class T> struct is_const_reference : is_const_reference_helper<boost::is_reference<T>::value>::template apply<T> { typedef boost::mpl::bool_<value> type; }; template<class T> struct is_nonconst_reference { enum { value = boost::is_reference<T>::value && !is_const_reference<T>::value }; typedef boost::mpl::bool_<value> type; }; #else template<class T> struct is_const_reference { enum { value = false }; typedef boost::mpl::bool_<value> type; }; template<class T> struct is_const_reference<const T&> { enum { value = true }; typedef boost::mpl::bool_<value> type; }; template<class T> struct is_nonconst_reference { enum { value = false }; typedef boost::mpl::bool_<value> type; }; template<class T> struct is_nonconst_reference<T&> { enum { value = !is_const_reference<T&>::value }; typedef boost::mpl::bool_<value> type; }; #endif template<class A> yes_t is_const_pointer_helper(void(*)(const A*)); no_t is_const_pointer_helper(...); template<class T> struct is_const_pointer { enum { value = sizeof(is_const_pointer_helper(static_cast<void(*)(T)>(0))) == sizeof(yes_t) }; typedef boost::mpl::bool_<value> type; }; template<class A> yes_t is_nonconst_pointer_helper(void(*)(A*)); no_t is_nonconst_pointer_helper(...); template<class T> struct is_nonconst_pointer { enum { value = sizeof(is_nonconst_pointer_helper(static_cast<void(*)(T)>(0))) == sizeof(yes_t) && !is_const_pointer<T>::value }; typedef boost::mpl::bool_<value> type; }; /* template<class T> struct is_constructable_from_helper { static yes_t check(const T&); static no_t check(...); }; template<class T, class From> struct is_constructable_from { static From getFrom(); enum { value = sizeof(is_constructable_from_helper<T>::check(getFrom())) == sizeof(yes_t) }; }; template<class T> struct is_const_member_function_helper { static no_t test(...); template<class R> static yes_t test(R(T::*)() const); template<class R, class A1> static yes_t test(R(T::*)(A1) const); template<class R, class A1, class A2> static yes_t test(R(T::*)(A1,A2) const); template<class R, class A1, class A2, class A3> static yes_t test(R(T::*)(A1,A2,A3) const); }; template<class T, class U> struct is_const_member_function { static U getU(); enum { value = sizeof(is_const_member_function_helper<T>::test(getU())) == sizeof(yes_t) }; }; */ template<int v1, int v2> struct max_c { enum { value = (v1>v2)?v1:v2 }; }; }} #endif // LUABIND_TYPETRAITS_HPP_INCLUDED
Save
cmd:
run