I disclaim thee, o’ liability
The Reliable Engineer
Read more ⟶
Const References to Temporary Objects
Consider the following code snippet:
1#include <iostream>
2
3int GetInt() {
4 int x = 1;
5 return x;
6}
7
8int main() {
9 const int& x = GetInt();
10 std::cout << x << std::endl;
11 return 0;
12}
In particular, pay attention to line #9. Is it guaranteed to be safe?
…Pelican Setup
Install Pelican:
1sudo -H pip install pelican Markdown typogrify
Install Pelican themes
1git clone --recursive https://github.com/getpelican/pelican-themes
2sudo /usr/local/bin/pelican-themes --install pelican-themes/Flex
3sudo chmod 755 /usr/local/lib/python2.7/dist-packages/pelican/themes/Flex
Install Pelican plugins
1git clone --recursive https://github.com/getpelican/pelican-plugins
Fetch blog sources
1git clone git@github.com:j4nu5/j4nu5.github.io.git
2cd j4nu5.github.io.git
3git fetch
4git checkout source
Setup for development
…