c++.chat - How can I simulate java's final variable in C++?
- asman (5/5) Apr 16 2014 How can I simulate java's final variable[1] in C++? But without
- asman (3/9) Apr 16 2014 After see the date of last posts I hope someone still access this
- Max Barraclough (5/15) May 22 2014 Familiar with C++'s 'const' system? That's pretty much Java's
How can I simulate java's final variable[1] in C++? But without an extra bool in the struct itself because it must have a fixed-size length which I use with #pragma pack(1) to prevent compiler to add padding. Is it possible? [1]: http://en.wikipedia.org/wiki/Final_%28Java%29#Final_variables
Apr 16 2014
On Wednesday, 16 April 2014 at 20:38:40 UTC, asman wrote:How can I simulate java's final variable[1] in C++? But without an extra bool in the struct itself because it must have a fixed-size length which I use with #pragma pack(1) to prevent compiler to add padding. Is it possible? [1]: http://en.wikipedia.org/wiki/Final_%28Java%29#Final_variablesAfter see the date of last posts I hope someone still access this thread and see my message. :(
Apr 16 2014
On Wednesday, 16 April 2014 at 20:42:54 UTC, asman wrote:On Wednesday, 16 April 2014 at 20:38:40 UTC, asman wrote:Familiar with C++'s 'const' system? That's pretty much Java's final, only taken much further. I don't know what you're talking about with 'extra bool in the struct' though.How can I simulate java's final variable[1] in C++? But without an extra bool in the struct itself because it must have a fixed-size length which I use with #pragma pack(1) to prevent compiler to add padding. Is it possible? [1]: http://en.wikipedia.org/wiki/Final_%28Java%29#Final_variablesAfter see the date of last posts I hope someone still access this thread and see my message. :(
May 22 2014