Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r82485 - in trunk: boost/tti/detail libs/tti/test
From: eldiener_at_[hidden]
Date: 2013-01-13 18:56:07


Author: eldiener
Date: 2013-01-13 18:56:05 EST (Sun, 13 Jan 2013)
New Revision: 82485
URL: http://svn.boost.org/trac/boost/changeset/82485

Log:
A const enclosing type looks for const member functions.
Added:
   trunk/libs/tti/test/test_has_mem_fun_fail3.cpp (contents, props changed)
   trunk/libs/tti/test/test_has_mem_fun_fail4.cpp (contents, props changed)
   trunk/libs/tti/test/test_has_member_fail3.cpp (contents, props changed)
   trunk/libs/tti/test/test_has_member_fail4.cpp (contents, props changed)
Removed:
   trunk/libs/tti/test/test_has_member.hpp
Text files modified:
   trunk/boost/tti/detail/dmem_fun.hpp | 30 +++++++++++++++---------------
   trunk/libs/tti/test/Jamfile.v2 | 4 ++++
   trunk/libs/tti/test/test_has_fun.cpp | 1 -
   trunk/libs/tti/test/test_has_fun.hpp | 1 -
   trunk/libs/tti/test/test_has_mem_fun.cpp | 11 ++++++++++-
   trunk/libs/tti/test/test_has_mem_fun.hpp | 5 ++++-
   trunk/libs/tti/test/test_has_mem_fun_compile.cpp | 10 ++++++++++
   trunk/libs/tti/test/test_has_member.cpp | 7 ++++++-
   trunk/libs/tti/test/test_has_member_compile.cpp | 9 +++++++--
   trunk/libs/tti/test/test_has_member_fail.cpp | 2 +-
   trunk/libs/tti/test/test_has_member_fail2.cpp | 2 +-
   trunk/libs/tti/test/test_structs.hpp | 13 +++++++++++--
   12 files changed, 69 insertions(+), 26 deletions(-)

Modified: trunk/boost/tti/detail/dmem_fun.hpp
==============================================================================
--- trunk/boost/tti/detail/dmem_fun.hpp (original)
+++ trunk/boost/tti/detail/dmem_fun.hpp 2013-01-13 18:56:05 EST (Sun, 13 Jan 2013)
@@ -27,19 +27,19 @@
 #include <boost/tti/gen/namespace_gen.hpp>
 
 #define BOOST_TTI_DETAIL_TRAIT_HAS_TYPES_MEMBER_FUNCTION(trait,name) \
- template<class T,class C> \
+ template<class BOOST_TTI_DETAIL_TP_PMEMF,class BOOST_TTI_DETAIL_TP_C> \
   struct BOOST_PP_CAT(trait,_detail_types) \
     { \
- template<T> \
+ template<BOOST_TTI_DETAIL_TP_PMEMF> \
     struct helper; \
     \
- template<class U> \
- static ::boost::type_traits::yes_type check(helper<&U::name> *); \
+ template<class BOOST_TTI_DETAIL_TP_EC> \
+ static ::boost::type_traits::yes_type check(helper<&BOOST_TTI_DETAIL_TP_EC::name> *); \
     \
- template<class U> \
+ template<class BOOST_TTI_DETAIL_TP_EC> \
     static ::boost::type_traits::no_type check(...); \
     \
- BOOST_STATIC_CONSTANT(bool,value=sizeof(check<C>(BOOST_TTI_DETAIL_NULLPTR))==sizeof(::boost::type_traits::yes_type)); \
+ BOOST_STATIC_CONSTANT(bool,value=sizeof(check<BOOST_TTI_DETAIL_TP_C>(BOOST_TTI_DETAIL_NULLPTR))==sizeof(::boost::type_traits::yes_type)); \
     \
     typedef boost::mpl::bool_<value> type; \
     }; \
@@ -47,12 +47,12 @@
 
 #define BOOST_TTI_DETAIL_TRAIT_HAS_CALL_TYPES_MEMBER_FUNCTION(trait,name) \
   BOOST_TTI_DETAIL_TRAIT_HAS_TYPES_MEMBER_FUNCTION(trait,name) \
- template<class TTI_T,class TTI_R,class TTI_FS,class TTI_TAG> \
+ template<class BOOST_TTI_DETAIL_TP_T,class BOOST_TTI_DETAIL_TP_R,class BOOST_TTI_DETAIL_TP_FS,class BOOST_TTI_DETAIL_TP_TAG> \
   struct BOOST_PP_CAT(trait,_detail_call_types) : \
     BOOST_PP_CAT(trait,_detail_types) \
       < \
- typename BOOST_TTI_NAMESPACE::detail::ptmf_seq<TTI_T,TTI_R,TTI_FS,TTI_TAG>::type, \
- typename boost::remove_const<TTI_T>::type \
+ typename BOOST_TTI_NAMESPACE::detail::ptmf_seq<BOOST_TTI_DETAIL_TP_T,BOOST_TTI_DETAIL_TP_R,BOOST_TTI_DETAIL_TP_FS,BOOST_TTI_DETAIL_TP_TAG>::type, \
+ BOOST_TTI_DETAIL_TP_T \
> \
     { \
     }; \
@@ -71,7 +71,7 @@
 #define BOOST_TTI_DETAIL_TRAIT_HAS_MEMBER_FUNCTION(trait,name) \
   BOOST_TTI_DETAIL_TRAIT_HAS_CALL_TYPES_MEMBER_FUNCTION(trait,name) \
   BOOST_TTI_DETAIL_TRAIT_CHECK_HAS_COMP_MEMBER_FUNCTION(trait,name) \
- template<class TTI_T,class TTI_R,class TTI_FS,class TTI_TAG> \
+ template<class BOOST_TTI_DETAIL_TP_T,class BOOST_TTI_DETAIL_TP_R,class BOOST_TTI_DETAIL_TP_FS,class BOOST_TTI_DETAIL_TP_TAG> \
   struct BOOST_PP_CAT(trait,_detail_hmf) \
     { \
     typedef typename \
@@ -79,12 +79,12 @@
       < \
       boost::mpl::and_ \
         < \
- boost::is_same<TTI_R,BOOST_TTI_NAMESPACE::detail::deftype>, \
- boost::is_same<TTI_FS,boost::mpl::vector<> >, \
- boost::is_same<TTI_TAG,boost::function_types::null_tag> \
+ boost::is_same<BOOST_TTI_DETAIL_TP_R,BOOST_TTI_NAMESPACE::detail::deftype>, \
+ boost::is_same<BOOST_TTI_DETAIL_TP_FS,boost::mpl::vector<> >, \
+ boost::is_same<BOOST_TTI_DETAIL_TP_TAG,boost::function_types::null_tag> \
>, \
- BOOST_PP_CAT(trait,_detail_check_comp)<TTI_T>, \
- BOOST_PP_CAT(trait,_detail_call_types)<TTI_T,TTI_R,TTI_FS,TTI_TAG> \
+ BOOST_PP_CAT(trait,_detail_check_comp)<BOOST_TTI_DETAIL_TP_T>, \
+ BOOST_PP_CAT(trait,_detail_call_types)<BOOST_TTI_DETAIL_TP_T,BOOST_TTI_DETAIL_TP_R,BOOST_TTI_DETAIL_TP_FS,BOOST_TTI_DETAIL_TP_TAG> \
>::type type; \
     \
     BOOST_STATIC_CONSTANT(bool,value=type::value); \

Modified: trunk/libs/tti/test/Jamfile.v2
==============================================================================
--- trunk/libs/tti/test/Jamfile.v2 (original)
+++ trunk/libs/tti/test/Jamfile.v2 2013-01-13 18:56:05 EST (Sun, 13 Jan 2013)
@@ -29,6 +29,8 @@
         [ compile test_has_member_compile.cpp ]
         [ compile-fail test_has_member_fail.cpp ]
         [ compile-fail test_has_member_fail2.cpp ]
+ [ compile-fail test_has_member_fail3.cpp ]
+ [ compile-fail test_has_member_fail4.cpp ]
     ;
 
 #
@@ -53,6 +55,8 @@
         [ compile test_has_mem_fun_compile.cpp ]
         [ compile-fail test_has_mem_fun_fail.cpp ]
         [ compile-fail test_has_mem_fun_fail2.cpp ]
+ [ compile-fail test_has_mem_fun_fail3.cpp ]
+ [ compile-fail test_has_mem_fun_fail4.cpp ]
     ;
 
 #

Modified: trunk/libs/tti/test/test_has_fun.cpp
==============================================================================
--- trunk/libs/tti/test/test_has_fun.cpp (original)
+++ trunk/libs/tti/test/test_has_fun.cpp 2013-01-13 18:56:05 EST (Sun, 13 Jan 2013)
@@ -22,7 +22,6 @@
   BOOST_TEST((BOOST_TTI_HAS_FUNCTION_GEN(sFunction)<AnotherType,AType::AnIntType,boost::mpl::vector<int,long,double> >::value));
   BOOST_TEST((!BOOST_TTI_HAS_FUNCTION_GEN(someFunctionMember)<AnotherType,AType,boost::mpl::vector<long,int> >::value));
   BOOST_TEST((TheTIntFunction<AnotherType,AType,boost::mpl::vector<long,double> >::value));
- BOOST_TEST((BOOST_TTI_HAS_FUNCTION_GEN(PublicIntFunction)<AnotherType,double,boost::mpl::vector<int> >::value));
   
   return boost::report_errors();
 

Modified: trunk/libs/tti/test/test_has_fun.hpp
==============================================================================
--- trunk/libs/tti/test/test_has_fun.hpp (original)
+++ trunk/libs/tti/test/test_has_fun.hpp 2013-01-13 18:56:05 EST (Sun, 13 Jan 2013)
@@ -19,7 +19,6 @@
 BOOST_TTI_HAS_FUNCTION(sFunction)
 BOOST_TTI_HAS_FUNCTION(someFunctionMember)
 BOOST_TTI_TRAIT_HAS_FUNCTION(HaveTheSIntFunction,SIntFunction)
-BOOST_TTI_HAS_FUNCTION(PublicIntFunction)
 BOOST_TTI_HAS_FUNCTION(TSFunction)
 
 #endif // BOOST_TEST_HAS_FUNCTION_HPP

Modified: trunk/libs/tti/test/test_has_mem_fun.cpp
==============================================================================
--- trunk/libs/tti/test/test_has_mem_fun.cpp (original)
+++ trunk/libs/tti/test/test_has_mem_fun.cpp 2013-01-13 18:56:05 EST (Sun, 13 Jan 2013)
@@ -17,7 +17,16 @@
   BOOST_TEST((AnotherIntFunction<AnotherType,int,boost::mpl::vector<AType> >::value));
   BOOST_TEST((BOOST_TTI_HAS_MEMBER_FUNCTION_GEN(sFunction)<AnotherType,AType::AnIntType,boost::mpl::vector<int,long,double> >::value));
   BOOST_TEST((!BOOST_TTI_HAS_MEMBER_FUNCTION_GEN(someFunctionMember)<AnotherType,AType,boost::mpl::vector<long,int> >::value));
- BOOST_TEST((BOOST_TTI_HAS_MEMBER_FUNCTION_GEN(PublicIntFunction)<AnotherType,double,boost::mpl::vector<int> >::value));
+
+ // Use const enclosing type
+
+ BOOST_TEST((BOOST_TTI_HAS_MEMBER_FUNCTION_GEN(AConstFunction)<const AType,double,boost::mpl::vector<long,char> >::value));
+ BOOST_TEST((StillTest<const AnotherType,const AType *,boost::mpl::vector<int> >::value));
+
+ // Use const_qualified
+
+ BOOST_TEST((BOOST_TTI_HAS_MEMBER_FUNCTION_GEN(AnotherConstFunction)<AnotherType,int,boost::mpl::vector<const AType *, short>,boost::function_types::const_qualified>::value));
+ BOOST_TEST((AskIfConst<AType,void,boost::mpl::vector<float,double>,boost::function_types::const_qualified>::value));
   
   return boost::report_errors();
 

Modified: trunk/libs/tti/test/test_has_mem_fun.hpp
==============================================================================
--- trunk/libs/tti/test/test_has_mem_fun.hpp (original)
+++ trunk/libs/tti/test/test_has_mem_fun.hpp 2013-01-13 18:56:05 EST (Sun, 13 Jan 2013)
@@ -10,12 +10,15 @@
 #include "test_structs.hpp"
 #include <boost/tti/has_member_function.hpp>
 
+BOOST_TTI_TRAIT_HAS_MEMBER_FUNCTION(AskIfConst,WFunction) // const
 BOOST_TTI_HAS_MEMBER_FUNCTION(VoidFunction)
+BOOST_TTI_HAS_MEMBER_FUNCTION(AnotherConstFunction) // const
 BOOST_TTI_TRAIT_HAS_MEMBER_FUNCTION(FunctionReturningInt,IntFunction)
+BOOST_TTI_HAS_MEMBER_FUNCTION(AConstFunction) // const
 BOOST_TTI_HAS_MEMBER_FUNCTION(aFunction)
 BOOST_TTI_TRAIT_HAS_MEMBER_FUNCTION(AnotherIntFunction,anotherFunction)
 BOOST_TTI_HAS_MEMBER_FUNCTION(sFunction)
+BOOST_TTI_TRAIT_HAS_MEMBER_FUNCTION(StillTest,StillSame) // const
 BOOST_TTI_HAS_MEMBER_FUNCTION(someFunctionMember)
-BOOST_TTI_HAS_MEMBER_FUNCTION(PublicIntFunction)
 
 #endif // TEST_HAS_MEMBER_FUNCTION_HPP

Modified: trunk/libs/tti/test/test_has_mem_fun_compile.cpp
==============================================================================
--- trunk/libs/tti/test/test_has_mem_fun_compile.cpp (original)
+++ trunk/libs/tti/test/test_has_mem_fun_compile.cpp 2013-01-13 18:56:05 EST (Sun, 13 Jan 2013)
@@ -23,6 +23,16 @@
   BOOST_MPL_ASSERT((AnotherIntFunction<AnotherType,int,boost::mpl::vector<AType> >));
   BOOST_MPL_ASSERT((BOOST_TTI_HAS_MEMBER_FUNCTION_GEN(sFunction)<AnotherType,AType::AnIntType,boost::mpl::vector<int,long,double> >));
   
+ // Use const enclosing type
+
+ BOOST_MPL_ASSERT((BOOST_TTI_HAS_MEMBER_FUNCTION_GEN(AnotherConstFunction)<const AnotherType,int,boost::mpl::vector<const AType *, short> >));
+ BOOST_MPL_ASSERT((AskIfConst<const AType,void,boost::mpl::vector<float,double> >));
+
+ // Use const_qualified
+
+ BOOST_MPL_ASSERT((BOOST_TTI_HAS_MEMBER_FUNCTION_GEN(AConstFunction)<AType,double,boost::mpl::vector<long,char>,boost::function_types::const_qualified>));
+ BOOST_MPL_ASSERT((StillTest<AnotherType,const AType *,boost::mpl::vector<int>,boost::function_types::const_qualified>));
+
   return 0;
 
   }

Added: trunk/libs/tti/test/test_has_mem_fun_fail3.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/tti/test/test_has_mem_fun_fail3.cpp 2013-01-13 18:56:05 EST (Sun, 13 Jan 2013)
@@ -0,0 +1,19 @@
+
+// (C) Copyright Edward Diener 2012
+// Use, modification and distribution are subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt).
+
+#include "test_has_mem_fun.hpp"
+#include <boost/mpl/assert.hpp>
+
+int main()
+ {
+
+ // Member function is const
+
+ BOOST_MPL_ASSERT((BOOST_TTI_HAS_MEMBER_FUNCTION_GEN(AnotherConstFunction)<AnotherType,int,boost::mpl::vector<const AType *, short> >));
+
+ return 0;
+
+ }

Added: trunk/libs/tti/test/test_has_mem_fun_fail4.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/tti/test/test_has_mem_fun_fail4.cpp 2013-01-13 18:56:05 EST (Sun, 13 Jan 2013)
@@ -0,0 +1,19 @@
+
+// (C) Copyright Edward Diener 2012
+// Use, modification and distribution are subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt).
+
+#include "test_has_mem_fun.hpp"
+#include <boost/mpl/assert.hpp>
+
+int main()
+ {
+
+ // Member function is not const
+
+ BOOST_MPL_ASSERT((BOOST_TTI_HAS_MEMBER_FUNCTION_GEN(aFunction)<const AnotherType,AType,boost::mpl::vector<int> >));
+
+ return 0;
+
+ }

Modified: trunk/libs/tti/test/test_has_member.cpp
==============================================================================
--- trunk/libs/tti/test/test_has_member.cpp (original)
+++ trunk/libs/tti/test/test_has_member.cpp 2013-01-13 18:56:05 EST (Sun, 13 Jan 2013)
@@ -4,7 +4,7 @@
 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt).
 
-#include "test_has_member.hpp"
+#include "test_has_mem_fun.hpp"
 #include <boost/detail/lightweight_test.hpp>
 
 int main()
@@ -18,6 +18,11 @@
   BOOST_TEST(BOOST_TTI_HAS_MEMBER_FUNCTION_GEN(sFunction)<AType::AnIntType (AnotherType::*)(int,long,double)>::value);
   BOOST_TEST(!BOOST_TTI_HAS_MEMBER_FUNCTION_GEN(someFunctionMember)<AType (AnotherType::*)(long,int)>::value);
   
+ BOOST_TEST((BOOST_TTI_HAS_MEMBER_FUNCTION_GEN(AConstFunction)<double (AType::*)(long,char) const>::value));
+ BOOST_TEST((StillTest<const AType * (AnotherType::*)(int) const>::value));
+ BOOST_TEST((BOOST_TTI_HAS_MEMBER_FUNCTION_GEN(AnotherConstFunction)<int (AnotherType::*)(const AType *, short) const>::value));
+ BOOST_TEST((AskIfConst<void (AType::*)(float,double) const>::value));
+
   return boost::report_errors();
 
   }

Deleted: trunk/libs/tti/test/test_has_member.hpp
==============================================================================
--- trunk/libs/tti/test/test_has_member.hpp 2013-01-13 18:56:05 EST (Sun, 13 Jan 2013)
+++ (empty file)
@@ -1,20 +0,0 @@
-
-// (C) Copyright Edward Diener 2011
-// Use, modification and distribution are subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt).
-
-#if !defined(TEST_HAS_MEMBER_HPP)
-#define TEST_HAS_MEMBER_HPP
-
-#include "test_structs.hpp"
-#include <boost/tti/has_member_function.hpp>
-
-BOOST_TTI_HAS_MEMBER_FUNCTION(VoidFunction)
-BOOST_TTI_TRAIT_HAS_MEMBER_FUNCTION(FunctionReturningInt,IntFunction)
-BOOST_TTI_HAS_MEMBER_FUNCTION(aFunction)
-BOOST_TTI_TRAIT_HAS_MEMBER_FUNCTION(AnotherIntFunction,anotherFunction)
-BOOST_TTI_HAS_MEMBER_FUNCTION(sFunction)
-BOOST_TTI_HAS_MEMBER_FUNCTION(someFunctionMember)
-
-#endif // TEST_HAS_MEMBER_HPP

Modified: trunk/libs/tti/test/test_has_member_compile.cpp
==============================================================================
--- trunk/libs/tti/test/test_has_member_compile.cpp (original)
+++ trunk/libs/tti/test/test_has_member_compile.cpp 2013-01-13 18:56:05 EST (Sun, 13 Jan 2013)
@@ -1,10 +1,10 @@
 
-// (C) Copyright Edward Diener 2011
+// (C) Copyright Edward Diener 2011,2012
 // Use, modification and distribution are subject to the Boost Software License,
 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt).
 
-#include "test_has_member.hpp"
+#include "test_has_mem_fun.hpp"
 #include <boost/mpl/assert.hpp>
 
 int main()
@@ -23,6 +23,11 @@
   BOOST_MPL_ASSERT((AnotherIntFunction<int (AnotherType::*)(AType)>));
   BOOST_MPL_ASSERT((BOOST_TTI_HAS_MEMBER_FUNCTION_GEN(sFunction)<AType::AnIntType (AnotherType::*)(int,long,double)>));
   
+ BOOST_MPL_ASSERT((BOOST_TTI_HAS_MEMBER_FUNCTION_GEN(AConstFunction)<double (AType::*)(long,char) const>));
+ BOOST_MPL_ASSERT((StillTest<const AType * (AnotherType::*)(int) const>));
+ BOOST_MPL_ASSERT((BOOST_TTI_HAS_MEMBER_FUNCTION_GEN(AnotherConstFunction)<int (AnotherType::*)(const AType *, short) const>));
+ BOOST_MPL_ASSERT((AskIfConst<void (AType::*)(float,double) const>));
+
   return 0;
 
   }

Modified: trunk/libs/tti/test/test_has_member_fail.cpp
==============================================================================
--- trunk/libs/tti/test/test_has_member_fail.cpp (original)
+++ trunk/libs/tti/test/test_has_member_fail.cpp 2013-01-13 18:56:05 EST (Sun, 13 Jan 2013)
@@ -4,7 +4,7 @@
 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt).
 
-#include "test_has_member.hpp"
+#include "test_has_mem_fun.hpp"
 #include <boost/mpl/assert.hpp>
 
 int main()

Modified: trunk/libs/tti/test/test_has_member_fail2.cpp
==============================================================================
--- trunk/libs/tti/test/test_has_member_fail2.cpp (original)
+++ trunk/libs/tti/test/test_has_member_fail2.cpp 2013-01-13 18:56:05 EST (Sun, 13 Jan 2013)
@@ -4,7 +4,7 @@
 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt).
 
-#include "test_has_member.hpp"
+#include "test_has_mem_fun.hpp"
 
 int main()
   {

Added: trunk/libs/tti/test/test_has_member_fail3.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/tti/test/test_has_member_fail3.cpp 2013-01-13 18:56:05 EST (Sun, 13 Jan 2013)
@@ -0,0 +1,19 @@
+
+// (C) Copyright Edward Diener 2012
+// Use, modification and distribution are subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt).
+
+#include "test_has_mem_fun.hpp"
+#include <boost/mpl/assert.hpp>
+
+int main()
+ {
+
+ // Mmeber function is not const
+
+ BOOST_MPL_ASSERT((BOOST_TTI_HAS_MEMBER_FUNCTION_GEN(aFunction)<AType (AnotherType::*)(int) const>));
+
+ return 0;
+
+ }

Added: trunk/libs/tti/test/test_has_member_fail4.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/tti/test/test_has_member_fail4.cpp 2013-01-13 18:56:05 EST (Sun, 13 Jan 2013)
@@ -0,0 +1,19 @@
+
+// (C) Copyright Edward Diener 2012
+// Use, modification and distribution are subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt).
+
+#include "test_has_mem_fun.hpp"
+#include <boost/mpl/assert.hpp>
+
+int main()
+ {
+
+ // Mmeber function is const
+
+ BOOST_MPL_ASSERT((AskIfConst<void (AType::*)(float,double)>));
+
+ return 0;
+
+ }

Modified: trunk/libs/tti/test/test_structs.hpp
==============================================================================
--- trunk/libs/tti/test/test_structs.hpp (original)
+++ trunk/libs/tti/test/test_structs.hpp 2013-01-13 18:56:05 EST (Sun, 13 Jan 2013)
@@ -48,6 +48,11 @@
   void VoidFunction() { }
   int IntFunction() { return 0; }
   
+ // Const function
+
+ double AConstFunction(long, char) const { return 2.57; }
+ void WFunction(float, double) const { }
+
   // Function Templates
   
   template<class X,int Y> int AFuncTemplate(const X &) { return Y; }
@@ -86,6 +91,7 @@
   bool cMem;
   long AnInt;
   AType OtherAT;
+ const AType COtherAT;
   AType::AStructType ONestStr;
   
   // Function
@@ -95,6 +101,11 @@
   AType::AnIntType sFunction(int,long,double) { return 0; }
   double IntFunction(int) { return 0; }
   
+ // Const function
+
+ int AnotherConstFunction(const AType *, short) const { return 0; }
+ const AType * StillSame(int) const { return &COtherAT; }
+
   // Function Templates
   
   template<class X> long MyFuncTemplate(X &) { return 0; }
@@ -112,8 +123,6 @@
   
   template<class X,class Y> static void YetAnotherFuncTemplate(const X &,Y &) { }
   
- double PublicIntFunction(int) { return 0; }
-
   static const int CIntValue = 10;
   
   };


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk