_wrap: llgo_check (to be continued)
This commit is contained in:
7
cpp/std/_wrap/llgo_check.cpp
Normal file
7
cpp/std/_wrap/llgo_check.cpp
Normal file
@@ -0,0 +1,7 @@
|
||||
#include <stdio.h>
|
||||
#include <string>
|
||||
|
||||
int main() {
|
||||
printf("sizeof(std::string) = %lu\n", sizeof(std::string));
|
||||
return 0;
|
||||
}
|
||||
12
cpp/std/_wrap/llgo_check.go
Normal file
12
cpp/std/_wrap/llgo_check.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"unsafe"
|
||||
|
||||
"github.com/goplus/llgo/c"
|
||||
"github.com/goplus/llgo/cpp/std"
|
||||
)
|
||||
|
||||
func main() {
|
||||
c.Printf(c.Str("sizeof(std::string) = %lu\n"), unsafe.Sizeof(std.String{}))
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
#include <string>
|
||||
#include <new>
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user