~ubuntu-branches/ubuntu/trusty/c++-annotations/trusty

« back to all changes in this revision

Viewing changes to yo/functiontemplates/polymorphouswrappers.yo

  • Committer: Package Import Robot
  • Author(s): tony mancill, Frank B. Brokken, tony mancill
  • Date: 2012-02-28 00:50:21 UTC
  • mfrom: (1.1.19)
  • Revision ID: package-import@ubuntu.com-20120228005021-sz7nnodntkvgh7qf
Tags: 9.2.1-1
[ Frank B. Brokken ]
* New upstream release (using flexc++, reauthored polymorphic semantic
  values and unrestricted unions). Upstream release 9.2.0 is implied by
  this release.

[ tony mancill ]
* Set Standards-Version to 3.9.3.

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
        )
36
36
 
37
37
    If tt(ptr2fun) does not yet point to a function (e.g., it is merely
38
 
defined) and an attempt is made to call a function through it a 
39
 
        hi(bad_function_call)`tt(std::bad_function_call)' 
 
38
defined) and an attempt is made to call a function through it a
 
39
        hi(bad_function_call)`tt(std::bad_function_call)'
40
40
    exception is thrown. Also, a polymorphic function wrapper that hasn't been
41
41
assigned to a function's address represents the value tt(false) in logical
42
42
expressions (as if it had been a pointer having value zero):
56
56
    void demo()
57
57
    {
58
58
        std::function<int(int)> ptr2int;
59
 
    
 
59
 
60
60
        ptr2int = predicate;    // OK, convertible param. and return type
61
61
 
62
62
        struct Local