#include <iostream>
#include <deque>
#include <functional>

struct way_point
{
    double time_stamp_s;
    unsigned int gps_nb;
    // Rest of members
};

double Get_time_stamp_s(way_point& wp) { return wp.time_stamp_s; }
double Get_gps_nb      (way_point& wp) { return wp.gps_nb;       }
// Rest of get-functions

template<typename T>
std::deque<double> getVector(std::deque<way_point>& dwp, std::function<T(way_point&)> f)
{
    std::deque<double> vd;
    for (auto& it : dwp)
    {
        vd.emplace_back(f(it));
    }
    return vd;
}

int main()
{
    std::deque<way_point> dwp { {1.0,1}, {2.0,2}, {3.0,3} };

    std::deque<double> vd = getVector<double>(dwp, Get_time_stamp_s);

    for (auto& it : vd)
    {
        std::cout << "Double: " << it << std::endl;
    }
}