ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> boost
boost
Re: [boost] 'function' idea
by Douglas Gregor other posts by this author
Nov 11 2002 2:02PM messages near this date
RE: [boost] 'function' idea | [boost] Sandbox I/O docs
On Monday 11 November 2002 04:56 am, Aleksey Gurtovoy wrote:
[snip my limited example]
>  Hmm, interesting, so if this actually worked, we would be happy:
> 
[snip nifty-looking is_callable implementation]
> 
>  ?

Well, you need to do some trickery to make it work when R=void, but otherwise 
I think we would be _very_ happy if this worked. Is there a tweak to the core 
language that would guarantee such a thing?

>  > The reason I mention is_instantiable instead of __is_well_formed
>  > is that is_instantiable can keep a class template interface, whereas
>  > __is_well_formed would require a new grammar production.
> 
>  From http://aspn.activestate.com/ASPN/Mail/Message/1412095 I've got an
>  impression that implementors are not too concerned about it.
> 
>  After all, '__is_well_formed' might be as easy to implement as this:
> 
>      void process_is_well_formed( args )
>      {
>          try
>          {
>              process_sizeof( args );
>              args.expression_result = true;
>          }
>          catch (compiler_error const& )
>          {
>              args.expression_result = false;
>          }
>      }
> 
>  :)

At one time in GCC, checking for compilability was as easy as:

  cp_silent++;
  // instantiate the thing you want to check
  cp_silent--;
  
	Doug
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Thread:
Aleksey Gurtovoy
Douglas Gregor

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved