« first day (1132 days earlier)      last day (1720 days later) » 

10:06 AM
How to read this member declaration: static T point2<T>::* const mem_array[num_dimensions]; In particular I wonder what about the part T point2<T>::* const.
 
10:30 AM
I'd like to discuss this answer and the lifetime of the parameter to broadcaster::start_to_listen() parameter: stackoverflow.com/a/34400239/2069269
My question is: after the auto t = wrap_target(std::move(f)); instruction, where will f be allocated to be permanently reached? The only reasonable answer is on heap, but then how is std::move() able to do this (to move its allocation on heap, if it already wasn't there)?
After all target f, i.e. the parameter of that function, should only be a local variable. std::make_shared() intervenes but then again, I'm clueless on how f be reached after the function exit
By experimentation it appears it does, but I have no understanding about the theory ;-)
 
 
1 hour later…
11:43 AM
@user5534993 I found the answer to @user5357546 question: It is using the syntax to declare a pointer to data member. The result is that mem_array is an array containing pointers to members of point2<T> which are in turn of type T.
This array is later initialized to point to the x and y members of point2<T>. This can later be used to access the members either through their name (x or y) or though the index operator [ ]. Have learned something new today. :D
 
 
4 hours later…
3:24 PM
Eh eh I'm still waiting
 
 
4 hours later…
7:50 PM
At last, I solved it myself. I was missing the fact that std::make_shared() stores data on heap
 
8:24 PM
i need help and may be this is very silly , when my input to the code is 0 15 , both are as string and i am want to truncate all zero at start of string . my comparison with string size , is not working , i tried unsigned int ,still it is not working ,how it is working in for loop , i do not get it. i am running code with -Wall flag on
please help
 

« first day (1132 days earlier)      last day (1720 days later) »