osrm-backend/include/util/container.hpp

23 lines
442 B
C++
Raw Normal View History

#ifndef CONTAINER_HPP
#define CONTAINER_HPP
2015-01-27 11:44:46 -05:00
2016-12-06 10:14:25 -05:00
#include <utility>
2015-01-27 11:44:46 -05:00
namespace osrm
{
2016-01-05 10:51:13 -05:00
namespace util
{
2015-09-04 12:23:57 -04:00
template <class Container> void append_to_container(Container &&) {}
template <class Container, typename T, typename... Args>
void append_to_container(Container &&container, T value, Args &&... args)
{
container.emplace_back(value);
append_to_container(std::forward<Container>(container), std::forward<Args>(args)...);
2015-01-27 11:44:46 -05:00
}
}
2016-01-05 10:51:13 -05:00
}
#endif