xxxxxxxxxx
import std.traits;
struct FiberS {
static auto getThis(){
return Fiber.getId();
}
}
struct Proxy(T){
T* ptr;
alias getPayload this;
ref auto getPayload() inout return {
return * ptr ;
}
static auto getId(){
return 1;
}
}
alias Fiber = Proxy!(FiberS);
extern(C) void main(){
auto id = Fiber.getThis(); // work here
}
struct TcpStream {
void read(ubyte[] data){
auto id = Fiber.getThis(); // not work here in my case
}
}