Comments (2)
更加糟糕的是,在类中的字符字面量是一个右值:
class Parent{
const char* s = &"hello"; // 此时 "hello" 为右值,无法取地址,无法通过编译
}
int main(){
&“hello”; // 此时"hello"为左值,可以去地址,可以通过编译
}
from modern-cpp-tutorial.
PR welcome
from modern-cpp-tutorial.
Related Issues (20)
- typo of memory order HOT 1
- 漏字 HOT 1
- Book: Incorrect tables header spacing on Regex chapter
- runtime indexing example question HOT 2
- 中文版pdf第一页license的英文名不对
- 2.2 变量及其初始化 中,if初始化的设计并不是来源于Go或者其他语言,而是Bjarne Stroustrup自己的设计 HOT 2
- 中文版第三章部分加粗显示问题
- C - Wikipedia HOT 1
- Possible text error in Chapter 7
- Question about Chapter 3 Generic Lambda HOT 1
- about std::bind HOT 1
- 语句有些繁琐,可否简化表达 HOT 1
- 第6章的习题设置不合理 HOT 1
- 网页端渲染存在问题 HOT 1
- 关于普通重载和override的一个区别 HOT 1
- 第二章 尾返回类型推导 “我们已经提过 auto 不能用于函数形参进行类型推导” HOT 2
- Chapter 2 exercise answer bug HOT 2
- 第八章内容 HOT 1
- 网页加载速度 HOT 1
- P43 || 43页 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 modern-cpp-tutorial.