default_data_for_key< KeyType > Struct Template Reference

A traits class that specifies the default data type for a key. By default, no key type has a default data type. More...

#include <default_data_for_key.hpp>


Detailed Description

template<typename KeyType>
struct viennadata::config::default_data_for_key< KeyType >

A traits class that specifies the default data type for a key. By default, no key type has a default data type.

Setting a default data type allows to omit the data type template argument. For example, if the default data type for a key type MyKey is set to double, the following two lines of code are equivalent: viennadata::access<MyKey, double>(key)(obj) = 3.1415; viennadata::access<MyKey>(key)(obj) = 3.1415;

The required specialization of 'default_data_for_key' is:

template <> struct default_data_for_key<MyKey> { typedef double type; };

Mind that this overload has to be placed in namespace viennadata::config.

Template Parameters:
KeyType The type of the key used for access

The documentation for this struct was generated from the following file: