stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Lemings" <Eric.Lemi...@roguewave.com>
Subject An internal add_const_reference type trait
Date Tue, 10 Jun 2008 16:12:45 GMT
Travis,

According to our plans for type traits, is this how you would define an
internal class template that combines the add_const<T> and
add_reference<T> type modifiers?

	#include <rw/_type_traits.h>

	_RWSTD_NAMESPACE (__rw) {

	template <class _TypeT>
	class __rw_add_const_ref
	{
	    typedef _TYPENAME __rw_add_const<_TypeT>::type      _ConstT;

	public:

	    typedef _TYPENAME __rw_add_reference<_ConstT>::type type;
	};

	}   // namespace __rw

Also, it'd be nice if you jot down some of these plans for type traits
on the C++0x Wiki <http://wiki.apache.org/stdcxx/Cpp0x>; e.g., header
names, internal utilities, TODO work, etc.  ;)

Thanks,
Brad.

Mime
View raw message