A
Alexander Stippler
Hi,
what do I have to do to get this (incorrect) piece of code to work. The
specialization is wrong, but how can I do it?
template <typename T, typename V>
class Mask
{
public:
Mask(int i) {}
};
enum DefaultValues
{
ZeroDefault,
NaNDefault,
WhateverDefault
};
template <typename T, typename I, DefaultValues D>
struct DefaultElement
{
static const T value;
};
template <typename T, typename I, DefaultValues D>
const T
DefaultElement<T, I, D>::value = T();
// how to write the following correctly????
template <typename T, typename V>
const T DefaultElement<Mask<T, V>, T, ZeroDefault>::value = Mask<T, V>(1);
Best regards,
alex
what do I have to do to get this (incorrect) piece of code to work. The
specialization is wrong, but how can I do it?
template <typename T, typename V>
class Mask
{
public:
Mask(int i) {}
};
enum DefaultValues
{
ZeroDefault,
NaNDefault,
WhateverDefault
};
template <typename T, typename I, DefaultValues D>
struct DefaultElement
{
static const T value;
};
template <typename T, typename I, DefaultValues D>
const T
DefaultElement<T, I, D>::value = T();
// how to write the following correctly????
template <typename T, typename V>
const T DefaultElement<Mask<T, V>, T, ZeroDefault>::value = Mask<T, V>(1);
Best regards,
alex