Inheriting from a template class set of operators using CRTP
问题 This is a follow-up from this Q/A. I'm in the process of taking user Jarod42's advice by using template <template<typename> class C, typename T> instead of the example that I have shown as my answer to the question. My code currently looks like this: template<template<typename> class C, typename T> struct single_member_ops { friend auto operator+(const C<T>& lhs, const C<T>& rhs) { return lhs.value + rhs.value; } friend auto operator+(const C<T>& lhs, const T& rhs) { return lhs.value + rhs;}