Re: [Cppcms-users] How to set default response().out() stream precision?
Brought to you by:
artyom-beilis
From: Artyom B. <art...@ya...> - 2012-06-21 11:06:33
|
----- Original Message ----- > From: "ele...@ex..." <ele...@ex...> > To: Artyom Beilis <art...@ya...>; cpp...@li... > Cc: > Sent: Thursday, June 21, 2012 1:54 PM > Subject: Re: [Cppcms-users] How to set default response().out() stream precision? > >> void on_before_stream_output(booster::function<(cppcms::http::context >> &)> const &); >> void on_after_stream_output(booster::function<(cppcms::http::context > &)> >> const &); >> >> Such a patch I can accept as it makes much more sense and may be actually >> useful >> for other things as well like altering a session or HTTP headers globally. > > I like this solution. > > I'll set the precision in the "master" view for now and then in > the next > few days when I(hopefully) get some spare time I'll look into it. > Ok > One more thing... are you keen on using the same const order? > > I've always been doing "const cppcms::http::context&" instead > of > "cppcms::http::context const &" > > Petr > Small note the const refers to booster::function not to http::context And yes because it is more consitent In C and C++ you read definitions from right to left and from inside out int const *p[10] array of size 10 of pointers to constant int. Now lets see three different definitions 1. const int **p; 2. int const **p; 3. int * const *p; 4. int ** const p 5. int const * const * const p; 6. const int * const * const p; Note that 1==2 and 5==6 But when you read for example 2, 3 and 4 4 - constant pointer to pointer to (mutable) int 3 - pointer to constant pointer to (mutable) int 2 - pointer to pointer to constant it. This makes the position of const much more consistent and easy to read especially for stuff like const int * const &p; Is harder to understand visually then int const * const &p; Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |