From: g0dil Date: Tue, 19 Jan 2010 09:05:47 +0000 (+0000) Subject: Fix karmic build X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=084d18afd1abb3c6b19de612dbdf4dbc40ffd795;p=senf.git Fix karmic build git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1547 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/senf/Utils/Console/ScopedDirectory.cti b/senf/Utils/Console/ScopedDirectory.cti index b93344c..69b70fa 100644 --- a/senf/Utils/Console/ScopedDirectory.cti +++ b/senf/Utils/Console/ScopedDirectory.cti @@ -56,7 +56,7 @@ prefix_ senf::console::ScopedDirectory::ScopedDirectory(Owner * owner) template template -prefix_ typename senf::console::OwnerNodeCreateTraits::result_type +prefix_ typename senf::console::OwnerNodeCreateTraits::result_type senf::console::ScopedDirectory::add(std::string const & name, Object const & ob) { return OwnerNodeCreateTraits::Creator::create(node(), *owner_, name, ob); diff --git a/senf/Utils/Console/ScopedDirectory.hh b/senf/Utils/Console/ScopedDirectory.hh index 1712f9f..0613d10 100644 --- a/senf/Utils/Console/ScopedDirectory.hh +++ b/senf/Utils/Console/ScopedDirectory.hh @@ -151,8 +151,8 @@ namespace console { /////////////////////////////////////////////////////////////////////////// template - typename OwnerNodeCreateTraits::result_type add(std::string const & name, - Object const & ob); + typename OwnerNodeCreateTraits::result_type add( + std::string const & name, Object const & ob); ///< Create new child node /**< Adds a new child node to the (proxied) DirectoryNode. How the node is added is configured @@ -161,8 +161,8 @@ namespace console { directory node. */ template - typename OwnerNodeCreateTraits::result_type add(std::string const & name, - Object & ob); + typename OwnerNodeCreateTraits::result_type add( + std::string const & name, Object & ob); ///< Create new child node /**< \see add() */ diff --git a/senf/Utils/Console/Variables.cti b/senf/Utils/Console/Variables.cti index e5a311c..1d19fbd 100644 --- a/senf/Utils/Console/Variables.cti +++ b/senf/Utils/Console/Variables.cti @@ -200,7 +200,7 @@ template prefix_ senf::console::ConstVariableAttributor senf::console::detail::VariableNodeCreator::add(DirectoryNode & node, std::string const & name, - Variable & var) + Variable const & var) { typename VariableAttributor::QueryOverload & queryOverload ( node.add(name, typename detail::QueryVariable::Function( @@ -212,7 +212,8 @@ senf::console::detail::VariableNodeCreator::add(DirectoryNode & #ifndef DOXYGEN template -prefix_ senf::console::VariableAttributor senf::console:: +prefix_ typename senf::console::detail::VariableNodeCreator::result_type +senf::console:: senf_console_add_node(DirectoryNode & node, std::string const & name, Variable & var, int, typename boost::disable_if< boost::is_convertible >::type *, typename boost::disable_if< boost::is_convertible >::type *, @@ -222,15 +223,28 @@ senf_console_add_node(DirectoryNode & node, std::string const & name, Variable & } template +prefix_ typename senf::console::detail::VariableNodeCreator::result_type +senf::console:: +senf_console_add_node(DirectoryNode & node, std::string const & name, Variable const & var, int, + typename boost::disable_if< boost::is_convertible >::type *, + typename boost::disable_if< boost::is_convertible >::type *, + typename boost::disable_if_c::is_callable>::type *) +{ + return detail::VariableNodeCreator::add(node, name, var); +} + +template prefix_ typename senf::console::detail::VariableNodeCreator::result_type -senf::console::senf_console_add_node(DirectoryNode & node, std::string const & name, - boost::reference_wrapper var, int) +senf::console:: +senf_console_add_node(DirectoryNode & node, std::string const & name, + boost::reference_wrapper var, int) { return detail::VariableNodeCreator::add(node, name, var.get()); } template -prefix_ senf::console::VariableAttributor senf::console:: +prefix_ typename senf::console::detail::VariableNodeCreator::result_type +senf::console:: senf_console_add_node(DirectoryNode & node, Owner & owner, std::string const & name, Variable & var, int, typename boost::disable_if< boost::is_convertible >::type *, @@ -241,6 +255,18 @@ senf_console_add_node(DirectoryNode & node, Owner & owner, std::string const & n } template +prefix_ typename senf::console::detail::VariableNodeCreator::result_type +senf::console:: +senf_console_add_node(DirectoryNode & node, Owner & owner, std::string const & name, + Variable const & var, int, + typename boost::disable_if< boost::is_convertible >::type *, + typename boost::disable_if< boost::is_convertible >::type *, + typename boost::disable_if_c::is_callable>::type *) +{ + return detail::VariableNodeCreator::add(node, name, var); +} + +template prefix_ typename senf::console::detail::VariableNodeCreator::result_type senf::console::senf_console_add_node(DirectoryNode & node, Owner &, std::string const & name, diff --git a/senf/Utils/Console/Variables.hh b/senf/Utils/Console/Variables.hh index 4f93a93..658630b 100644 --- a/senf/Utils/Console/Variables.hh +++ b/senf/Utils/Console/Variables.hh @@ -47,25 +47,43 @@ namespace console { #ifndef DOXYGEN template - VariableAttributor senf_console_add_node( + typename detail::VariableNodeCreator::result_type + senf_console_add_node( DirectoryNode & node, std::string const & name, Variable & var, int, typename boost::disable_if< boost::is_convertible >::type * = 0, typename boost::disable_if< boost::is_convertible >::type * = 0, typename boost::disable_if_c::is_callable>::type * = 0); template + typename detail::VariableNodeCreator::result_type + senf_console_add_node( + DirectoryNode & node, std::string const & name, Variable const & var, int, + typename boost::disable_if< boost::is_convertible >::type * = 0, + typename boost::disable_if< boost::is_convertible >::type * = 0, + typename boost::disable_if_c::is_callable>::type * = 0); + + template typename detail::VariableNodeCreator::result_type senf_console_add_node(DirectoryNode & node, std::string const & name, boost::reference_wrapper var, int); template - VariableAttributor senf_console_add_node( + typename detail::VariableNodeCreator::result_type + senf_console_add_node( DirectoryNode & node, Owner & owner, std::string const & name, Variable & var, int, typename boost::disable_if< boost::is_convertible >::type * = 0, typename boost::disable_if< boost::is_convertible >::type * = 0, typename boost::disable_if_c::is_callable>::type * = 0); template + typename detail::VariableNodeCreator::result_type + senf_console_add_node( + DirectoryNode & node, Owner & owner, std::string const & name, Variable const & var, int, + typename boost::disable_if< boost::is_convertible >::type * = 0, + typename boost::disable_if< boost::is_convertible >::type * = 0, + typename boost::disable_if_c::is_callable>::type * = 0); + + template typename detail::VariableNodeCreator::result_type senf_console_add_node(DirectoryNode & node, Owner & owner, std::string const & name, boost::reference_wrapper var, int); diff --git a/senf/Utils/Console/Variables.ih b/senf/Utils/Console/Variables.ih index 0f703aa..23a5074 100644 --- a/senf/Utils/Console/Variables.ih +++ b/senf/Utils/Console/Variables.ih @@ -87,7 +87,7 @@ namespace detail { { typedef ConstVariableAttributor result_type; static ConstVariableAttributor add(DirectoryNode & node, std::string const & name, - Variable & var); + Variable const & var); }; #endif diff --git a/senf/Utils/Termlib/Telnet.hh b/senf/Utils/Termlib/Telnet.hh index e127a95..7fb7eab 100644 --- a/senf/Utils/Termlib/Telnet.hh +++ b/senf/Utils/Termlib/Telnet.hh @@ -259,23 +259,23 @@ namespace term { void timeout(); enum Command { - CMD_NONE = 0, - CMD_SE = 240, - CMD_NOP = 241, - CMD_DM = 242, - CMD_BRK = 243, - CMD_IP = 244, - CMD_AO = 245, - CMD_AYT = 246, - CMD_EC = 247, - CMD_EL = 248, - CMD_GA = 249, - CMD_SB = 250, - CMD_WILL = 251, - CMD_WONT = 252, - CMD_DO = 253, - CMD_DONT = 254, - CMD_IAC = 255, + CMD_NONE = static_cast(0), + CMD_SE = static_cast(240), + CMD_NOP = static_cast(241), + CMD_DM = static_cast(242), + CMD_BRK = static_cast(243), + CMD_IP = static_cast(244), + CMD_AO = static_cast(245), + CMD_AYT = static_cast(246), + CMD_EC = static_cast(247), + CMD_EL = static_cast(248), + CMD_GA = static_cast(249), + CMD_SB = static_cast(250), + CMD_WILL = static_cast(251), + CMD_WONT = static_cast(252), + CMD_DO = static_cast(253), + CMD_DONT = static_cast(254), + CMD_IAC = static_cast(255), }; struct OptInfo diff --git a/senf/Utils/type_traits.mpp b/senf/Utils/type_traits.mpp index eaf46c7..2b0eb3c 100644 --- a/senf/Utils/type_traits.mpp +++ b/senf/Utils/type_traits.mpp @@ -82,6 +82,18 @@ struct function_traits_arg_type typedef typename Traits::mpp_CurArg() type; }; +template +struct remove_member_pointer +{ + typedef T type (mpp_Args()); +}; + +template +struct remove_member_pointer +{ + typedef T type (mpp_Args()); +}; + // //////////////////////////////////////////////////////////////////////// #endif // ///////////////////////////////////////////////////////////////// // //////////////////////////////////////////////////////////////////////// diff --git a/senf/Utils/type_traits.test.cc b/senf/Utils/type_traits.test.cc index 9b1c3ab..16b9b3f 100644 --- a/senf/Utils/type_traits.test.cc +++ b/senf/Utils/type_traits.test.cc @@ -38,7 +38,7 @@ ///////////////////////////////cc.p//////////////////////////////////////// namespace { - struct Class {}; + struct Class; } BOOST_AUTO_UNIT_TEST(typeTraits) @@ -60,11 +60,35 @@ BOOST_AUTO_UNIT_TEST(typeTraits) >::value )); BOOST_STATIC_ASSERT(( boost::is_same< - senf::remove_member_pointer< int (Class::*) >::type, - int + senf::remove_member_pointer< Class (Class::*) >::type, + Class >::value )); BOOST_STATIC_ASSERT(( boost::is_same< - senf::remove_member_pointer< void (Class::*)(int) >::type, + senf::remove_member_pointer< Class const (Class::*) >::type, + Class const + >::value )); + BOOST_STATIC_ASSERT(( boost::is_same< + senf::remove_member_pointer< Class (Class::*)(int) >::type, + Class (int) + >::value )); + BOOST_STATIC_ASSERT(( boost::is_same< + senf::remove_member_pointer< Class const (Class::*)(int) >::type, + Class const (int) + >::value )); + BOOST_STATIC_ASSERT(( boost::is_same< + senf::remove_member_pointer< void (Class::*)(int) const>::type, + void (int) + >::value )); + BOOST_STATIC_ASSERT(( boost::is_same< + senf::remove_member_pointer< Class const (Class::*)(int) const>::type, + Class const (int) + >::value )); + BOOST_STATIC_ASSERT(( boost::is_same< + senf::remove_member_pointer< void (Class::* const)(int)>::type, + void (int) + >::value )); + BOOST_STATIC_ASSERT(( boost::is_same< + senf::remove_member_pointer< void (Class::* const)(int) const>::type, void (int) >::value )); @@ -97,6 +121,7 @@ BOOST_AUTO_UNIT_TEST(typeTraits) BOOST_STATIC_ASSERT(( senf::is_any_function< void () >::value )); BOOST_STATIC_ASSERT(( senf::is_any_function< void (*)(int) >::value )); BOOST_STATIC_ASSERT(( senf::is_any_function< void (Class::*)() >::value )); + BOOST_STATIC_ASSERT(( senf::is_any_function< void (Class::*)() const >::value )); BOOST_STATIC_ASSERT(( ! senf::is_any_function< int * >::value )); BOOST_STATIC_ASSERT(( boost::is_same<