Closure type

  • Thread starter Hurkyl
  • Start date
  • #1
Hurkyl
Staff Emeritus
Science Advisor
Gold Member
14,967
19
What is a "closure type"?

I first encountered it by looking at the source of the uBLAS package from boost.org -- it's essentially an implementation of the BLAS using expression templates.

I noticed that a lot of the classes have a nested typedef called "closure_type" (and a "const_closure_type"), and I've never heard of such a thing.

Also, a couple of the classes define a "same_closure" member function which simply tests for identity. For example, from the "scalar_value" class:
Code:
        bool same_closure (const scalar_value &sv) const {
            return this == &sv;    // self closing on instances value
        }

And I haven't yet managed to discover the purpose of such a thing by looking through the source code, nor by googling for "closure type". (I get hits on closure type, but not enough info to infer what such a thing is, and the point of it)

Does anyone here know?
 

Answers and Replies

  • #2
pallidin
2,209
2
Because it's a non-standard coding to establish parameters to terminate an argument.
 
  • #3
Hurkyl
Staff Emeritus
Science Advisor
Gold Member
14,967
19
Could you say that again?
 

Suggested for: Closure type

Replies
11
Views
539
  • Last Post
Replies
2
Views
673
  • Last Post
Replies
2
Views
621
Replies
1
Views
892
Replies
6
Views
2K
Replies
13
Views
28K
  • Last Post
Replies
18
Views
2K
  • Last Post
Replies
8
Views
10K
Replies
3
Views
1K
Replies
9
Views
5K
Top