Thank you both!
On 01/19/2017 05:21 PM, Nestor wrote:
On Wednesday, 18 January 2017 at 12:52:56 UTC, drug wrote:
I've "solved" the same problem by using AliasSeq to generate bitfields
so that for iterating over bitfields I can iterate over alias sequence
and mixin code. Not very good but it works.
20.01.2017 15:04, Nestor пишет:
Where does one define the size for a field using AliasSeq, and in this
example, why does it take 1 bit if the size is not declared anywhere?
Something like that https://goo.gl/zV8T23
20.01.2017 15:04, Nestor пишет:
On Friday, 20 January 2017 at 08:13:08 UTC, drug wrote:
Something like that https://goo.gl/C4nOqw
Because you generate code iterating over AliasSeq you can do almost
everything you need - for example generate setters/getters.
Interesting site, I wouldn't
On Friday, 20 January 2017 at 08:13:08 UTC, drug wrote:
Something like that https://goo.gl/C4nOqw
Because you generate code iterating over AliasSeq you can do
almost everything you need - for example generate
setters/getters.
Interesting site, I wouldn't implemente something like this in a
20.01.2017 04:21, Nestor пишет:
On Wednesday, 18 January 2017 at 12:52:56 UTC, drug wrote:
I've "solved" the same problem by using AliasSeq to generate bitfields
so that for iterating over bitfields I can iterate over alias sequence
and mixin code. Not very good but it works.
Interesting,
On Wednesday, 18 January 2017 at 12:52:56 UTC, drug wrote:
I've "solved" the same problem by using AliasSeq to generate
bitfields so that for iterating over bitfields I can iterate
over alias sequence and mixin code. Not very good but it works.
Interesting, could you provide a working
I've "solved" the same problem by using AliasSeq to generate bitfields
so that for iterating over bitfields I can iterate over alias sequence
and mixin code. Not very good but it works.
On Wednesday, 18 January 2017 at 01:15:05 UTC, Ali Çehreli wrote:
Not available but it should be possible to parse the produced
code:
import std.bitmanip;
string makeBitFieldPrinter(string fieldImpl) {
return q{
void printBitFields() const {
import std.stdio: writeln;
On 01/17/2017 04:37 PM, Nestor wrote:
Hi,
I was just looking at an interesting function from
http://codepad.org/lSDTFd7E :
void printFields(T)(T args) {
auto values = args.tupleof;
size_t max;
size_t temp;
foreach (index, value; values) {
temp = T.tupleof[index].stringof.length;
Hi,
I was just looking at an interesting function from
http://codepad.org/lSDTFd7E :
void printFields(T)(T args) {
auto values = args.tupleof;
size_t max;
size_t temp;
foreach (index, value; values) {
temp = T.tupleof[index].stringof.length;
if (max < temp) max = temp;
}
11 matches
Mail list logo