[complement-svn] SF.net SVN: complement: [1791] trunk/complement/explore/inquiry
Status: Pre-Alpha
Brought to you by:
complement
From: <com...@us...> - 2007-11-21 11:56:09
|
Revision: 1791 http://complement.svn.sourceforge.net/complement/?rev=1791&view=rev Author: complement Date: 2007-11-21 03:56:06 -0800 (Wed, 21 Nov 2007) Log Message: ----------- what printed as address of member function? Added Paths: ----------- trunk/complement/explore/inquiry/memfun/ trunk/complement/explore/inquiry/memfun/Makefile trunk/complement/explore/inquiry/memfun/Makefile.inc trunk/complement/explore/inquiry/memfun/test.cc Property changes on: trunk/complement/explore/inquiry/memfun ___________________________________________________________________ Name: svn:ignore + obj Added: trunk/complement/explore/inquiry/memfun/Makefile =================================================================== --- trunk/complement/explore/inquiry/memfun/Makefile (rev 0) +++ trunk/complement/explore/inquiry/memfun/Makefile 2007-11-21 11:56:06 UTC (rev 1791) @@ -0,0 +1,12 @@ +# -*- Makefile -*- Time-stamp: <03/07/09 18:08:47 ptr> +# $Id: Makefile 1599 2007-07-04 10:47:43Z complement $ + +SRCROOT := ../.. +COMPILER_NAME := gcc + +STLPORT_DIR := /export/home/ptr/STLport.lab/cvs.stlport.com/STLport +include Makefile.inc +include ${SRCROOT}/Makefiles/gmake/top.mak + +#CXXFLAGS += -fuse-cxa-atexit +LDFLAGS += -Wl,-rpath=${STLPORT_LIB_DIR} Added: trunk/complement/explore/inquiry/memfun/Makefile.inc =================================================================== --- trunk/complement/explore/inquiry/memfun/Makefile.inc (rev 0) +++ trunk/complement/explore/inquiry/memfun/Makefile.inc 2007-11-21 11:56:06 UTC (rev 1791) @@ -0,0 +1,4 @@ +# -*- makefile -*- Time-stamp: <02/07/14 14:03:13 ptr> + +PRGNAME = test +SRC_CC = test.cc Added: trunk/complement/explore/inquiry/memfun/test.cc =================================================================== --- trunk/complement/explore/inquiry/memfun/test.cc (rev 0) +++ trunk/complement/explore/inquiry/memfun/test.cc 2007-11-21 11:56:06 UTC (rev 1791) @@ -0,0 +1,44 @@ +#include <string> +#include <iostream> + +using namespace std; + +class A +{ + public: + bool a(); + bool b(); + bool c(); +}; + +bool A::a() +{ + cerr << "A::a" << endl; + return true; +} + +bool A::b() +{ + cerr << "A::b" << endl; + return true; +} + +bool A::c() +{ + cerr << "A::c" << endl; + return true; +} + +int main() +{ + cerr << &A::a << " " << &A::b << " " << &A::c << endl; + + A x; + + bool (A::*mem)() = &A::b; + + (x.*mem)(); + // cerr << &x.a << " " << &x.b << " " << &x.c << endl; + + return 0; +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |