{"action":"created","issue":{"url":"https://api.github.com/repos/HaxeFoundation/hxcpp/issues/261","labels_url":"https://api.github.com/repos/HaxeFoundation/hxcpp/issues/261/labels{/name}","comments_url":"https://api.github.com/repos/HaxeFoundation/hxcpp/issues/261/comments","events_url":"https://api.github.com/repos/HaxeFoundation/hxcpp/issues/261/events","html_url":"https://github.com/HaxeFoundation/hxcpp/issues/261","id":98521999,"number":261,"title":"no type named 'Ptr' in 'cpp::Pointer<double>'","user":{"login":"martinfinke","id":2064018,"avatar_url":"https://avatars.githubusercontent.com/u/2064018?v=3","gravatar_id":"","url":"https://api.github.com/users/martinfinke","html_url":"https://github.com/martinfinke","followers_url":"https://api.github.com/users/martinfinke/followers","following_url":"https://api.github.com/users/martinfinke/following{/other_user}","gists_url":"https://api.github.com/users/martinfinke/gists{/gist_id}","starred_url":"https://api.github.com/users/martinfinke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinfinke/subscriptions","organizations_url":"https://api.github.com/users/martinfinke/orgs","repos_url":"https://api.github.com/users/martinfinke/repos","events_url":"https://api.github.com/users/martinfinke/events{/privacy}","received_events_url":"https://api.github.com/users/martinfinke/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-01T08:45:54Z","updated_at":"2015-11-12T22:27:59Z","closed_at":null,"body":"I have posted the same problem [here](https://groups.google.com/forum/#!topic/haxelang/bCJpwXFSHUA), but I thought it would help to give a minimal test case:\r\n\r\n```haxe\r\npackage;\r\n\r\nabstract Buffer(cpp.Pointer<cpp.Float64>) {\r\n    public inline function new(ptr:cpp.Pointer<cpp.Float64>) { this = ptr; }\r\n    // There'll be other functions here\r\n}\r\n\r\nclass Main {\r\n    public static function main() {\r\n        var x:cpp.Float64 = 3;\r\n        var array = [new Buffer(cpp.Pointer.addressOf(x))];\r\n        test(array);\r\n    }\r\n    public static function test(array:Array<Buffer>) {\r\n        var buf = array[0];\r\n    }\r\n}\r\n```\r\n\r\nDo you know how to solve this problem?\r\n\r\nThe error is:\r\n\r\n```\r\nError: In file included from ./src/Main.cpp:1:\r\nIn file included from /usr/local/lib/haxe/lib/hxcpp/3,2,102/include/hxcpp.h:268:\r\n/usr/local/lib/haxe/lib/hxcpp/3,2,102/include/hx/Operators.h:271:29: error: no type named 'Ptr' in 'cpp::Pointer<double>'\r\n   typedef typename RESULT::Ptr type;\r\n           ~~~~~~~~~~~~~~~~~^~~\r\n./src/Main.cpp:55:63: note: in instantiation of function template specialization 'Dynamic::StaticCast<cpp::Pointer<double> >' requested here\r\n                ::cpp::Pointer< ::cpp::Float64 > tmp = array->__get((int)0).StaticCast< ::cpp::Pointer< ::cpp::Float64 > >();           HX_STACK_VAR(tmp,\"tmp\");\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/HaxeFoundation/hxcpp/issues/comments/156257281","html_url":"https://github.com/HaxeFoundation/hxcpp/issues/261#issuecomment-156257281","issue_url":"https://api.github.com/repos/HaxeFoundation/hxcpp/issues/261","id":156257281,"user":{"login":"matulkum","id":7568611,"avatar_url":"https://avatars.githubusercontent.com/u/7568611?v=3","gravatar_id":"","url":"https://api.github.com/users/matulkum","html_url":"https://github.com/matulkum","followers_url":"https://api.github.com/users/matulkum/followers","following_url":"https://api.github.com/users/matulkum/following{/other_user}","gists_url":"https://api.github.com/users/matulkum/gists{/gist_id}","starred_url":"https://api.github.com/users/matulkum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matulkum/subscriptions","organizations_url":"https://api.github.com/users/matulkum/orgs","repos_url":"https://api.github.com/users/matulkum/repos","events_url":"https://api.github.com/users/matulkum/events{/privacy}","received_events_url":"https://api.github.com/users/matulkum/received_events","type":"User","site_admin":false},"created_at":"2015-11-12T22:27:59Z","updated_at":"2015-11-12T22:27:59Z","body":"I just ran into the same issue. See my post at Haxe group for further details:\r\nhttps://groups.google.com/forum/#!topic/haxelang/PDX9WI8qRz8\r\n\r\nArray<Dynamic> indeed works around this issue for now. "}}