digitalmars.D.learn - Specify bitwidth in D
- Matthias Pleh (6/6) Apr 10 2011 in C++ we can specify the bitwidth in the declaration.
- David Nadlinger (3/8) Apr 10 2011 You can't – if you need packed bit fields, have a look at std.bitmanip...
- Matthias Pleh (3/13) Apr 10 2011 Ah, thanks. That fits!
in C++ we can specify the bitwidth in the declaration. So we can optimaze memory usage. unsigned int x : 30; unsigned int type : 2; How can we do that in D? °Matthias
Apr 10 2011
On 4/10/11 6:41 PM, Matthias Pleh wrote:in C++ we can specify the bitwidth in the declaration. So we can optimaze memory usage. unsigned int x : 30; unsigned int type : 2; How can we do that in D?You can't – if you need packed bit fields, have a look at std.bitmanip. David
Apr 10 2011
Am 10.04.2011 18:54, schrieb David Nadlinger:On 4/10/11 6:41 PM, Matthias Pleh wrote:Ah, thanks. That fits! °Matthiasin C++ we can specify the bitwidth in the declaration. So we can optimaze memory usage. unsigned int x : 30; unsigned int type : 2; How can we do that in D?You can't – if you need packed bit fields, have a look at std.bitmanip. David
Apr 10 2011