Skip to content

Instantly share code, notes, and snippets.

@oktal3700
oktal3700 / git-superfixup.pl
Last active December 28, 2023 10:07
Perl script for automating the process of creating fixup! commits for use with git rebase -i --autosquash
#!/usr/bin/perl
# Scan unstaged changes in git tracked files, identify which commits they could
# be applied to as fixups, and automatically produce the appropriate "fixup!"
# commits for use with "git rebase -i --autosquash".
#
# Copyright (C) 2016, 2017 by Mat Sutcliffe
# This program is free software; you can redistribute it and/or modify it under
# the GNU General Public License as published by the Free Software Foundation;
# either version 2 of the License, or (at your option) any later version.

Guaranteed copy elision for named return values

This proposal aims to provide guaranteed copy elision for common cases of local variables being returned from a function.

Motivation

The accepted P0135 proposal already provides guaranteed copy elision for when a prvalue is returned from a function by stating that the result object of that prvalue (and not a temporary) is directly copy-initialized. It de-facto mandates what was known as Return Value Optimization (RVO) and allows non-movable objects to be returned in such a way.

Meanwhile, other cases of copy elision are still optional. For example, sometimes we want to create an object, set it up and return it.

:: https://github.com/swift-project/pilotclient
:: Generate VS solution file for swift pilot client.
:: Easily choose compiler version, Qt version, and 32/64-bit.
:: Last updated 2019-09-29
@echo off
setlocal
echo:
echo - - - - - - - - - - - - - - - - - - - - - - - - - - -
@oktal3700
oktal3700 / cla.txt
Created December 28, 2022 21:12
swift Pilot Client Project CLA (Contributor License Agreement)
swift CLA
Individual Contributor License Agreement ("Agreement") V2.0 based on Apache Software Foundation CLA.
Thank you for your interest in the swift Pilot Client Project ("swift"). In order to clarify the intellectual
property license granted with Contributions from any person or entity, "swift" must have a Contributor License
Agreement ("CLA") on file that has been signed by each Contributor, indicating agreement to the license terms below.
This license is for your protection as a Contributor as well as the protection of "swift" and its users; it does not
change your rights to use your own Contributions for any other purpose.