Comments (2)
UDRefl_test_21_string
测试用例里的是个 bug,目前已修复
UDRefl 隐式转换的条件可查看 ReflMngr::IsCompatible
,总结就是,当满足引用条件、指针/数组条件或可构造条件时发生类型转换。另外当形参类型为 ObjectView
时,可接受一切类型的实参。
"hello world"
类型是 &{const{[12]{int8}}}
,而我在 ReflMngr
的构造函数中,默认注册了 std::string
及其构造函数 std::string(const char*)
,所以 MakeShared
时可以发生数组到指针的转换。
发生隐式类型转换时,目前没有警告。暂时也不会引入警告机制。因为“我们认为这是合理的”,一切都跟使用静态 C++ 一样自然即可。
另外,一切函数调用都可能会失败,失败可通过返回值中的 Type
是否有效来判断。(返回值为 void
时,Type
也是有效的)
from udrefl.
谢谢。受教了,等下我再提个静态库的新issue。
from udrefl.
Related Issues (12)
- Structure member types with reference HOT 4
- 项目构建失败 HOT 3
- 生成静态库与自举Bootstrap编译选项冲突 HOT 8
- 关于UDRefl 无法处理CRTP类型问题 HOT 3
- 继承类的转换 HOT 2
- 未知来源头文件doctest.hpp导致编译失败 HOT 2
- 编译错误 HOT 3
- What are the advantages of UDRefl compared with RTTR and META? HOT 4
- 字段的类型为特定类型时,AddField函数无法通过编译 HOT 1
- Ubuntu无法运行 HOT 17
- Stream overload functions conflict with <sstream> header file HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from udrefl.