#include <boost/program_options.hpp>

namespace po = boost::program_options;

template <typename C, typename E>
inline bool contains(const C& container, const E& element) {
    return container.find(element) != container.end();
}

template <typename K, typename V>
V& updateFromConfig(V& updatee, const K& key, const po::variables_map& vm) {
    if (contains(vm, key)) {
        // option 1
        //updatee = vm[key];
        // option 2
        //updatee = vm[key].variable_value();
        // option 3
        updatee = vm[key].template as<V>();
        // option 4
        // updatee = vm[key].as();
    }
    return updatee;
}

template size_t& updateFromConfig<char*,size_t>(size_t& updatee, char* const& key, const po::variables_map& vm);

int main() {
    return 0;
}
