Re: Encode/Decode new framework

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 9 Sep 2016, Sage Weil wrote:

template<typename T, typename traits=denc_traits<T>>
struct denc_traits<std::list<T>> {
 enum { supported = traits::supported };

...not sure if this is quite you're after, but you might be able to accomplish something like that with template-using:

struct my_traits
{
 enum class supported { feature0, feature1 };
};

template <typename T, typename Traits>
struct denc_traits;

template <typename T, typename Traits>
struct denc_traits
{
 using supported = typename Traits::supported;
};

template <typename T>
using my_denc_traits = denc_traits<T, my_traits>;

int main()
{
 my_denc_traits<int> bletch;
}

Hope that helps,

-Jesse

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux