Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C++ Moderated > Re: How to conv...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 12 of 13 Topic 9564 of 9831
Post > Topic >>

Re: How to convert a pointer to member function type to a const member one

by "Roman.Perepelitsa@[EMAIL PROTECTED] " <Roman.Perepelitsa@[EMAIL PROTECTED] > May 7, 2008 at 11:04 AM

On 6 May, 20:47, mcostalba <mcosta...@[EMAIL PROTECTED]
> wrote:
> Anyhow here is my much simpler solution...so simple that is probably
> broken in some way, but I cannot find where:
> [cut]
> BTW it seems to work.

Seems like it does not work for functions (always returns false for
them)
and it's not that smart with regard to const objects and const
methods.

Here is how original is_call_possible works:

struct foo {
   void operator()();
};
struct bar {
   void operator()() const;
};

assert(is_call_possible<foo, void()>::value);
assert(!is_call_possible<const foo, void()>::value);
assert(is_call_possible<bar, void()>::value);
assert(is_call_possible<const bar, void()>::value);

But maybe you don't need this functionality...

Roman Perepelitsa.

-- 
      [ See http://www.gotw.ca/resources/clcm.htm
for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]
 




 13 Posts in Topic:
How to convert a pointer to member function type to a const memb
mcostalba <mcostalba@[  2008-04-30 10:38:30 
Re: How to convert a pointer to member function type to a const
nickf3 <nickf3@[EMAIL   2008-04-30 17:04:17 
Re: How to convert a pointer to member function type to a const
smolensky@[EMAIL PROTECTE  2008-04-30 21:54:58 
Re: How to convert a pointer to member function type to a const
"Devdatt Lad" &  2008-04-30 21:54:37 
Re: How to convert a pointer to member function type to a const
Greg Herlihy <greghe@[  2008-04-30 22:17:24 
Re: How to convert a pointer to member function type to a const
mcostalba <mcostalba@[  2008-05-01 13:43:23 
Re: How to convert a pointer to member function type to a const
"Roman.Perepelitsa@[  2008-05-05 07:09:51 
Re: How to convert a pointer to member function type to a const
mcostalba <mcostalba@[  2008-05-06 00:57:14 
Re: How to convert a pointer to member function type to a const
"Roman.Perepelitsa@[  2008-05-06 08:21:31 
Re: How to convert a pointer to member function type to a const
mcostalba <mcostalba@[  2008-05-06 12:47:31 
Re: How to convert a pointer to member function type to a const
dizzy <dizzy@[EMAIL PR  2008-05-07 11:04:35 
Re: How to convert a pointer to member function type to a const
"Roman.Perepelitsa@[  2008-05-07 11:04:05 
Re: How to convert a pointer to member function type to a const
mcostalba <mcostalba@[  2008-05-07 18:33:58 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 25 22:00:47 CDT 2008.