The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Types | List of all members
utils::tconst_clone< D, S, E > Struct Template Reference

Helper struct to clone the constness of one type to another. More...

#include <const_clone.hpp>

Public Types

typedef D type
 The destination type, possibly const qualified. More...
 
typedef D & reference
 A reference to the destination type, possibly const qualified. More...
 
typedef D * pointer
 A pointer to the destination type, possibly const qualified. More...
 

Detailed Description

template<class D, class S, typename E = void>
struct utils::tconst_clone< D, S, E >

Helper struct to clone the constness of one type to another.

It's function is similar to the tconst_duplicator, but a bit more flexible.

Warning
It seems *this in a const member function is not a const object, use this, which is a pointer to a const object.
Template Parameters
DThe destination type, it should have no cv-qualifier and not be a pointer or reference.
SThe source type, this type may be a pointer or reference and obviously is allowed to have a cv-qualifier, although volatile has no effect.
EThe enable parameter for boost::enable_if.

Definition at line 47 of file const_clone.hpp.

Member Typedef Documentation

template<class D, class S, typename E = void>
typedef D* utils::tconst_clone< D, S, E >::pointer

A pointer to the destination type, possibly const qualified.

Definition at line 56 of file const_clone.hpp.

template<class D, class S, typename E = void>
typedef D& utils::tconst_clone< D, S, E >::reference

A reference to the destination type, possibly const qualified.

Definition at line 53 of file const_clone.hpp.

template<class D, class S, typename E = void>
typedef D utils::tconst_clone< D, S, E >::type

The destination type, possibly const qualified.

Definition at line 50 of file const_clone.hpp.


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