The typedef name operation_t
denotes a non-constant pointer to a constant object of the type cu::Op
.
typedef cu::Op const * operation_t;
The typedef name const_operation_ptr_t
denotes a non-constant pointer to a constant pointer of the type cu::Op const *
.
typedef operation_t const * const_operation_ptr_t;
To make the both introduced pointer types as types of constant pointers you need to write
typedef cu::Op const * const operation_t;
and
typedef operation_t const * const const_operation_ptr_t;
A more simple example. These two declarations
const int *p;
and
int const *p;
are equivalent and declare a non-constant pointer to an object of the type const int
.
This declaration
int * const p = &x;
declares a constant pointer to a non-constant object of the type int.
These declarations
const int * const p = &x;
and
int const * const p = &x;
are equivalent and declare a constant pointer to a constant object of the type const int.