Closure type

  • Thread starter Hurkyl
  • Start date
  • #1
Hurkyl
Staff Emeritus
Science Advisor
Gold Member
14,916
17

Main Question or Discussion Point

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
2,193
2
Because it's a non-standard coding to establish parameters to terminate an argument.
 
  • #3
Hurkyl
Staff Emeritus
Science Advisor
Gold Member
14,916
17
Could you say that again?
 

Related Threads for: Closure type

  • Last Post
Replies
3
Views
1K
  • Last Post
Replies
1
Views
5K
  • Last Post
Replies
5
Views
2K
  • Last Post
Replies
6
Views
2K
  • Last Post
Replies
3
Views
1K
  • Last Post
Replies
4
Views
5K
Replies
6
Views
3K
  • Last Post
Replies
3
Views
2K
Top