Skip to content

Commit

Permalink
use perfect forwarding instead of move
Browse files Browse the repository at this point in the history
  • Loading branch information
DennisOSRM committed Feb 12, 2014
1 parent c06ebf1 commit cd81aed
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include <vector>
#include <thread>
#include <string>
#include <utility>
#include <boost/variant.hpp>
#include <boost/timer/timer.hpp>
#include "variant.hpp"
Expand All @@ -19,7 +20,7 @@ struct Holder
template <typename T>
void append_move( T && obj)
{
data.emplace_back(std::move(obj));
data.emplace_back(std::forward<T>(obj));
}

template <typename T>
Expand Down Expand Up @@ -115,7 +116,10 @@ int main (int argc, char** argv)
std::cerr << "Usage:" << argv[0] << " <num-runs>" << std::endl;
return 1;
}
#ifndef SINGLE_THREADED
const std::size_t THREADS = 10;
#endif

const std::size_t NUM_RUNS = static_cast<std::size_t>(std::stol(argv[1]));

#ifdef SINGLE_THREADED
Expand Down

0 comments on commit cd81aed

Please sign in to comment.