This is the mail archive of the gsl-discuss@sources.redhat.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gsl_vector_const_view: pointer to constant or constant pointer


Fleur Kelpin writes:
 > Am I missing something or can/could/should this be fixed?
 > (I think this can be done by moving the const inside the struct:
 > 
 > typedef struct
 > {
 >   const gsl_vector vector;
 > } _gsl_vector_const_view;

It's not possible to initialise the struct element with this form in
ANSI C (although it is possible in gcc).  This is why the const'ing is
done at a higher level in a wrapper.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]