#include <iostream>

template <class coefs>
double linear(double x) {
    return coefs::a * x  +  coefs::b;
}

struct my_coefs
{
    static const double a;
    static const double b;
};

const double my_coefs::a = 2.0;
const double my_coefs::b = 3.0;

int main()
{
    std::cout << linear<my_coefs>(5.0) << std::endl;
}