当前位置:网站首页>D interface and domain problems
D interface and domain problems
2022-07-02 08:35:00 【fqbqrr】
struct S {
int x;
}
@safe
interface I {
int func(ref scope S s) @nogc;
}
@safe
class C : I {
int func(ref S s) {
return 2*s.x;
}
}
compiler
not checked Domain properties
?
Compiling , But the problem is , The interface function
There is one (refscopeS)
Parameters , The class implementation is (refS)
. use dip25 and dip1000
Should compile . The problem is Sometimes
It can lead to Segment error
. Compilers seem to treat them differently . Be careful ,C.func
There seems to be @nogc
, The adaptive
?
边栏推荐
猜你喜欢
On November 24, we celebrate the "full moon"
路由基础—动态路由
HCIA—應用層
Carsim 学习心得-粗略翻译1
Development of digital collection trading website development of metauniverse digital collection
链表经典面试题(反转链表,中间节点,倒数第k个节点,合并分割链表,删除重复节点)
Carla-ue4editor import Roadrunner map file (nanny level tutorial)
C language implements XML generation and parsing library (XML extension)
c语言将字符串中的空格替换成%20
什么是SQL注入
随机推荐
Wang extracurricular words
Constant pointer and pointer constant
链表经典面试题(反转链表,中间节点,倒数第k个节点,合并分割链表,删除重复节点)
ICMP Protocol
Realization of basic function of sequence table
Matlab-其它
Network security - summary and thinking of easy-to-use fuzzy tester
实现双向链表(带傀儡节点)
程序猿学英语-指令式编程
Development of digital collection trading website development of metauniverse digital collection
Force deduction method summary: find classes
Pointer initialization
Matlab - autres
When a custom exception encounters reflection
cve_ 2019_ 0708_ bluekeep_ Rce vulnerability recurrence
Vs code configuration problem
Programming ape learning English - imperative programming
【无标题】
Sparse matrix storage
Getting started with k8s: building MySQL with Helm