POD is Plain Old Data. In C++, it refers to objects that can be treated as “data only,” where programmers do not need to worry about the complexity of class layout, as well as user-defined constructors, copy, and move semantics.

Read more »

激进的ADL(Argument-dependent lookup)

ADL is the abbreviation for Argument-dependent lookup, which in Chinese translates to 参数依赖查找. ADL is useful for avoiding verbose code, but it can also cause some ambiguity.

Read more »

TC++PL4E中英版勘误

最近在读The C++ Programming Language Fourth Edition(简称TC++PL4E),由于我入的实体书是中译本(原版好贵),所以我是对照着英文版PDF看的,发现了一些原版和中译本中的勘误,还有一些我觉得书中歧义的地方,查阅标准(ISO/IEC 14882:2014(E))之后的定义也一并贴出,汇总在这里列出来。

Read more »

C/C++标准的一些摘录

There are countless resources on C/C++ available online, but I often find that, after reading some articles, it seems the authors themselves don’t fully understand what they wrote (looking back at my own earlier articles, my perspective was too one-sided and superficial at that time). Therefore, for C/C++ materials, I believe it’s essential to refer directly to the standard documentation, as standards do not introduce ambiguities. One should not blindly search the internet and trust second-hand digested materials.

I think consulting these four documents is enough for understanding the features of the C/C++ languages (click to preview online or download):

The reason the C language standard does not follow the latest C11 standard is that the current C++ standard (C++14) references ISO/IEC 9899:1999 in its Normative references, which means TCPL and TC++PL can serve as applicable descriptions for the C/C++ standards and can corroborate each other.

For more about C++ Normative references, refer to ISO/IEC 14882:2014(E) §1.2 Normative references.

I will gradually extract some commonly ambiguous language features from the standard norms here to ensure that what I write is backed by the standard documentation.

Read more »

CppQuiz一些有趣的题和分析

CppQuiz is a simple online quiz that you can use to test your knowledge of the C++ programming language.
It’s quite interesting; I wrote down a few questions I encountered today. I’ll add more here whenever I have time. In fact, many questions in CppQuiz can be explained by “Deep Exploration of C++ Object Model”… If you find yourself struggling with many questions, I recommend buying a copy of “Deep Exploration of C++ Object Model” and reading it thoroughly!
In addition, I will try to find relevant descriptions in the C++ standard (ISO/IEC 14882:2014) while answering questions.

Read more »

使用Travis CI自动部署Github/Coding Pages博客

This blog has switched to Github Action for automated deployment.

Using Hexo to generate a static blog and then deploying it to Github/Coding Pages is currently how my blog is hosted. It’s quite enjoyable to use, but there are several issues:

  1. The environment configuration for Hexo is too cumbersome; it’s almost impossible to update the blog when changing to a new computer.
  2. Each time I modify an article, I have to regenerate everything.
  3. Additionally, the number of command executions for submitting the blog source files is too high (mainly the first step).

I wasted a lot of time submitting articles, so I optimized the process to almost achieve fully automated submissions.

Read more »

Boost源码分析笔记

Recently, I’ve been reading the Boost code and writing some analyses on the usage and implementation of useful modules in the Boost libraries, with updates to come periodically.

Read more »

配置SublimeText为Boost开发环境

Recently, I would like to study the Boost library. Most tutorials available online are based on using IDEs (such as VS/Code::Blocks), but I find it frustrating to have to open a bloated IDE just to write some test code. Today, I fiddled around and managed to compile/link code that uses the Boost library in SublimeText. I also organized the process/tools I worked with, so if others have similar needs and happen to see this article, they can save some time.

2016.11.01 Update
I used the latest version of MinGW64-GCC6.2 (x86_64-6.2.0-posix-seh-rt_v5-rev1) to compile LLVM/Clang 3.9, and then I used the compiled Clang to compile Boost1.62. The error messages that occurred when linking the Boost library in Clang are gone now.
Note: When compiling Boost with Clang, it is best to ensure that the current version of clang is compiled from the version of gcc in the current system; otherwise, when linking the static libraries produced by clang, strange issues might arise.

You can download my compiled versions here: MinGW62-GCC6.2(x86_64-6.2.0-posix-seh-rt_v5-rev1), LLVM/Clang3.9 compiled with GCC6.2 (above MinGW version), and Boost(MinGW64-GCC6.2/LLVM3.9/VC14-ALL). You can choose the version of the linked library (debug/release/static, etc.) as needed.
You can download the full compilation toolchain here.

Read more »

使用Docker部署shadowsocks服务

Arukas is a Japanese Docker service provider that is currently in the testing phase and can be used for free. We can easily use Docker to do some interesting (useful) things, such as deploying our own blog or shadowsocks server.

Read more »

在UE中使用Git进行版本控制

The Source Control provided in Unreal Editor allows you to implement basic functions such as version submission/version comparison/reverting changes through Git for blueprint projects, which is far less powerful than Git Bash, but the Diff between BluePrints is still very useful.

Read more »