From c12a38f875eb4e3dd458249fe02eda98de55257f Mon Sep 17 00:00:00 2001 From: Robert Ramey Date: Thu, 3 Feb 2005 20:28:41 +0000 Subject: [PATCH] removed extraneous static [SVN r27081] --- include/boost/smart_cast.hpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/include/boost/smart_cast.hpp b/include/boost/smart_cast.hpp index 126859b4..b6609271 100644 --- a/include/boost/smart_cast.hpp +++ b/include/boost/smart_cast.hpp @@ -47,7 +47,6 @@ #include #include #include -#include #include #include @@ -79,7 +78,7 @@ namespace smart_cast_impl { }; template - static T cast(U & u){ + static T cast(U & u){ // if we're in debug mode #if ! defined(NDEBUG) \ || defined(__BORLANDC__) && (__BORLANDC__ <= 0x564) \ @@ -143,7 +142,8 @@ namespace smart_cast_impl { struct polymorphic { // unfortunately, this below fails to work for virtual base - // classes. Subject for further study + // classes. need has_virtual_base to do this. + // Subject for further study #if 0 struct linear { template @@ -194,7 +194,7 @@ namespace smart_cast_impl { return typex::cast(u); #endif } - #endif + #else template static T cast(U * u){ T tmp = dynamic_cast(u); @@ -203,7 +203,7 @@ namespace smart_cast_impl { #endif return tmp; } - + #endif }; struct non_polymorphic { @@ -261,7 +261,7 @@ namespace smart_cast_impl { // note that it will fail with // smart_cast(s) template -static T smart_cast(U u) { +T smart_cast(U u) { typedef BOOST_DEDUCED_TYPENAME mpl::eval_if< BOOST_DEDUCED_TYPENAME mpl::or_< @@ -289,7 +289,7 @@ static T smart_cast(U u) { // this implements: // smart_cast_reference(Source & s) template -static T smart_cast_reference(U & u) { +T smart_cast_reference(U & u) { return smart_cast_impl::reference::cast(u); }