-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft: More STL container types #7
Comments
The types of atomic sorting need to be completely revised. |
By the way, during the tests I saw ( |
I don't think the String impl is right, did it pass the tests ?!?! If you look at how Try to remove the implementations of |
Yeah! However, as I mentioned, the update would be from Zig to Zig. I can't receive C++ strings just like cpp_vector doesn't receive values. As for smart pointers, I'll need to do implementation tests. Although it compiles without error. |
I agree! I'll try use the |
I did some work implement |
I've seen and tested it and also it's not available for msvc yet. A question: Did you try viewing |
|
Two aspects here. First, we already know that msvc is microsoft's standard abi. To date zig toolchain ( Second, about e.g. (zig c++ w/ Reference: https://github.com/ziglang/zig/wiki/Troubleshooting-Build-Issues#dual-abi-linking Most game devlopers look for msvc compatibility, being the case of the zig-gamedev project and unreal (TODO: testing...)! |
I don't understand what you mean with the first part |
What exactly? MSVC target doesn't use --- edit Missing - About libc++ and libstdc++ know
+ Second, about libc++ and libstdc++ know |
MSVC string works completly different from the clang implementation :( it requires a second implementation For some reasong I can't build with:
|
Could you show the error that occurred in the msvc build? My case (Linux user), I use xwin to download libraries + includes sdk and crt (VS 2019/ 16 version). The last CI commit returns the |
Ok I manage to build, but the tests exit with error code 5, have no clue how to fix it. |
I finnaly figure out, it was a small mistake on my end, I had to make MSVC work in debug builds and it does sort of does ... By the way xWin isn't needed at all |
Great!
Yes! needed for non-windows or another arch-msvc only. Because zig toolchain statically configures msvc target (it does not switch to x86 or aarch64). |
@lassade, have you tested a |
no, but theres no reason why it can't work |
Transpiling test - bool enumerate(std::vector<uint8_t>& out_buf, size_t count);
+ bool enumerate(std::vector<std::vector<uint8_t>>& out_buf, size_t count); info: using host `x86_64-linux-gnu` as target
info: zig cc -x c++ -lc++ -Xclang -ast-dump=json -fsyntax-only -target x86_64-linux-gnu
info: binding `test_cases/include/c013_cpp_vector.h`
thread 51809 panic: integer overflow
/home/kassane/Documentos/c2z/src/Transpiler.zig:2436:34: 0x2845be in transpileType (c2z)
const ch = ttname[ttname.len - 1];
^
/home/kassane/Documentos/c2z/src/Transpiler.zig:2553:48: 0x287a4a in transpileArgs (c2z)
const name = try self.transpileType(arg);
^
/home/kassane/Documentos/c2z/src/Transpiler.zig:2548:35: 0x2878d4 in transpileArgs (c2z)
try self.transpileArgs(args, buffer, index);
^
/home/kassane/Documentos/c2z/src/Transpiler.zig:2501:31: 0x285cee in transpileType (c2z)
try self.transpileArgs(ttname[less_than..], &args, &index);
^
/home/kassane/Documentos/c2z/src/Transpiler.zig:2464:43: 0x284d78 in transpileType (c2z)
var inner = try self.transpileType(raw_name);
^
/home/kassane/Documentos/c2z/src/Transpiler.zig:1060:52: 0x29252a in visitCXXMethodDecl (c2z)
var z_type = try self.transpileType(c_type);
^
/home/kassane/Documentos/c2z/src/Transpiler.zig:1548:35: 0x259a9a in visit (c2z)
return self.visitCXXMethodDecl(value, null);
^
/home/kassane/Documentos/c2z/src/Transpiler.zig:425:27: 0x282158 in visitTranslationUnitDecl (c2z)
try self.visit(item);
^
/home/kassane/Documentos/c2z/src/Transpiler.zig:312:42: 0x259773 in visit (c2z)
try self.visitTranslationUnitDecl(value);
^
/home/kassane/Documentos/c2z/src/Transpiler.zig:191:19: 0x24816c in run (c2z)
try self.visit(value);
^
/home/kassane/Documentos/c2z/src/main.zig:130:27: 0x244d84 in main (c2z)
try transpiler.run(&tree.value);
^
/home/kassane/zig/0.11.0-dev.3937+78eb3c561/files/lib/std/start.zig:608:37: 0x23eea4 in posixCallMainAndExit (c2z)
const result = root.main() catch |err| {
^
/home/kassane/zig/0.11.0-dev.3937+78eb3c561/files/lib/std/start.zig:367:5: 0x23e991 in _start (c2z)
@call(.never_inline, posixCallMainAndExit, .{});
^
[1] 51809 IOT instruction (core dumped) ./zig-out/bin/c2z -no-glue test_cases/include/c013_cpp_vector.h
`` |
zig version:
0.11.0-dev.3905+309aacfc8
std::string
Test
Update: Wrong!! No C++ receiver in
DoSomething()
.source:
Impl - WiP
The text was updated successfully, but these errors were encountered: