Comments (2)
应该是typeid的问题,它取的名字不够准,用type_traits库吧。
assert(std::is_lvalue_reference<decltype(x1)>::value);
assert(std::is_pointer<decltype(x2)>::value);
assert(std::is_lvalue_reference<decltype(x3)>::value);
from cpp_study.
学习了,验证确实是这样。
from cpp_study.
Related Issues (9)
- atomic_flag有的项目里使用ATOMIC_FLAG_INIT初始化,两种方式区别是什么? HOT 1
- for section5, cmake and make failed for luajit.h: No such file or directory HOT 3
- section0中select_sort中是否存在问题 HOT 1
- 什么情况下使用deprecated属性? HOT 1
- Some examples not support c++11, but need at least c++14 HOT 2
- macos 运行 section0/test.cpp 最后一行代码未识别 HOT 4
- g++ test.cpp -std=c++14 -I../common -o a.out;./a.out HOT 2
- section5-->cpplang.hpp static_assert 问题 HOT 1
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 cpp_study.