Skip to content

LukasKerk/CppMakeTupleTests

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Comparisons for C++s std::make_tuple

std::make_tuple is sometimes a bit funky. For example I imagined that the lines

return {Example{0,0}, Example{1,1}};
return {{0,0}, {1,1}};

would do the same as long as the return value is std::tuple<Example,Example>. However, that is not the case. One calls the move and the other one the copy constructor. So I started to dig a bit deeper and test a bit more.

This repository contains different ways to create tuples and tracks how often which constructor (/destructor) is called. As long as you are on a typical linux machine with python3 and the python package pyplotlib, you can create a visualisation of the results by simply running CMake followed by make visualize.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published