DMD didn't support extern(C++) struct function in windows dmd2.061 with -m64

2012-12-26 Thread raojm

module Test;

import std.stdio;

extern(C++)
{
struct A
{
int i = 0;

public:

void TestExtern()
{

}
}

struct B
{
int i = 0;

void TestExtern()
{

}
}
}

void main()
{
writeln("hello");
}


dmd -v -m32 test.d result:
C:\dmd2\windows\bin\link.exe Test,,nul,user32+kernel32/noi;
OPTLINK (R) for Win32  Release 8.00.12
Copyright (C) Digital Mars 1989-2010  All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
Test.obj(Test)  Offset 00532H Record Type 00C3
 Error 1: Previous Definition Different : ?TestExtern@@YEXXZ 
(void syscall TestExtern(void ))

--- errorlevel 1

dmd -v -m64 test.d result:
C:\Program Files (x86)\Microsoft Visual Studio 
11.0\VC\bin\amd64\link.exe /NOLOGO Test   
/MERGE:.minfobg=.minfodt /MERGE:.minfoen=
.minfodt /MERGE:._deh_bg=._deh_eh /MERGE:._deh_en=._deh_eh 
"/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio 
11.0\VC\lib\am
d64" "/LIBPATH:C:\Program Files (x86)\Microsoft 
SDKs\Windows\v7.1A\lib\x64"

Microsoft (R) Incremental Linker Version 11.00.50727.1
Copyright (C) Microsoft Corporation.  All rights reserved.

Test.obj : fatal error LNK1179: 无效或损坏的文件: 重复的 
COMDAT“?TestExtern@@YAXXZ”

--- errorlevel 1179


It's OK in dmd 2.060, TestExtern demangle same with in c++;


Is D associative array thread safe, and will it relocate memory when add or delete a value?

2011-12-07 Thread raojm
Is D associative array  thread safe, and  will it relocate memory when
add or delete a value?

Where I can find the implemention.