#include <algorithm>
#include <vector>

namespace model {
    
struct GasStation
{
    double getprice(int kindOfGas) const
    {
        return kindOfGas;
    }
};

struct StationVector
{
    std::vector<GasStation> localStations;

    struct SortByGrade
    {
        int kindOfGas_;
        SortByGrade(int kindOfGas)
            :kindOfGas_(kindOfGas)
        {
        }

        bool operator() (GasStation const &L, GasStation const & R) const
        { 
            // You'll need other comparisons here, but this is a good start...
            return L.getprice(kindOfGas_) < R.getprice(kindOfGas_); 
        }
    };

    void sortByGrade(int kindOfGas) 
    {
        std::sort(localStations.begin(), localStations.end(), SortByGrade(kindOfGas));
    }
};

}

int main()
{
    model::StationVector sv;
    sv.sortByGrade(0);
}
