class member before the var was assigned

What does it mean that class member ptr before variable mda_sm?
ptr is equal to mda_sm?

Is there any term/noun to called this assigning behavior?

1
2
3
4
5
6
7
8
9
10

  class space_map : public sp {
        public:
                typedef boost::shared_ptr<persistent_space_map> ptr;
                blablabla...
        };
  ...

  space_map::ptr mda_sm = open_metadata_sm(a, b);
Last edited on
ptr is a type. The typedef keyword is used to alias a type under a new name.

1
2
3
4
5
typedef int integer; // define the type integer to be the same thing as an int.

// both of these are the same type. (int)
integer x; 
int y;
Last edited on
Topic archived. No new replies allowed.