I use boost::variant a lot and am quite familiar with it. boost::variant does not restrict the bounded types in any way, in particular, they may be references:
The C++ standard says the following about 'xvalues' (N4762 § 18.104.22.168): An expression is an xvalue if it is: - . . . - a class member access expression designating a non-static data member of non-reference type in which the object expression is an xvalue
How can I wrap an OutputIterator such as back_inserter_iterator with a transformation? ConsiderI would like to apply a free function f(double) or g(std::vector<double>::iterator) before pushing back to the diff vector:
We use BOOST1.63 boost::filesystem::remove_all(dir_to_remove) to remove a folder that has millions of files (each file has size of 1MB). The folder "dir_to_remove" has sub-folders, and each sub-folder has no more than 1000 files. It takes more than 10-min to delete all files. We use CentOS6.5.
Here we are:Do we really need to lock mutex in the get function? We are only providing read only access. What if we do not?
There is a rather silly problem with the number pi in C and C++. As far as I know M_PI defined in math.h is not required by any standard.