[complement-svn] SF.net SVN: complement:[1955] trunk/complement/explore/include/mt/ system_error
Status: Pre-Alpha
Brought to you by:
complement
From: <com...@us...> - 2008-08-04 12:53:05
|
Revision: 1955 http://complement.svn.sourceforge.net/complement/?rev=1955&view=rev Author: complement Date: 2008-08-04 12:53:02 +0000 (Mon, 04 Aug 2008) Log Message: ----------- compile with libstdc++ Modified Paths: -------------- trunk/complement/explore/include/mt/system_error Modified: trunk/complement/explore/include/mt/system_error =================================================================== --- trunk/complement/explore/include/mt/system_error 2008-08-04 12:52:35 UTC (rev 1954) +++ trunk/complement/explore/include/mt/system_error 2008-08-04 12:53:02 UTC (rev 1955) @@ -1,4 +1,4 @@ -// -*- C++ -*- Time-stamp: <08/07/25 08:47:37 ptr> +// -*- C++ -*- Time-stamp: <08/08/04 16:09:09 yeti> /* * Copyright (c) 2007-2008 @@ -21,7 +21,77 @@ #ifdef STLPORT #include <type_traits> #else -... +#include <tr1/type_traits> + +namespace std { + +namespace tr1 { + +namespace detail { + +template <bool,class _U> +struct _decay_aux2 +{ + typedef typename remove_cv<_U>::type type; +}; + +template <class _U> +struct _decay_aux2<true,_U> +{ + typedef typename add_pointer<_U>::type type; +}; + +template <bool, class _U> +struct _decay_aux1 +{ + typedef typename _decay_aux2<is_function<_U>::value,_U>::type type; +}; + +template <class _U> +struct _decay_aux1<true,_U> +{ + typedef typename remove_extent<_U>::type* type; +}; + +} // namespace detail + +template <class _Tp> +class decay +{ + private: + typedef typename remove_reference<_Tp>::type _U; + + public: + typedef typename detail::_decay_aux1<is_array<_U>::value,_U>::type type; +}; + +template <bool, class _Tp = void> +struct enable_if +{ +}; + +template <class _Tp> +struct enable_if<true,_Tp> +{ + typedef _Tp type; +}; + +template <bool, class _Tp1, class _Tp2> +struct conditional +{ + typedef _Tp2 type; +}; + +template <class _Tp1, class _Tp2> +struct conditional<true,_Tp1,_Tp2> +{ + typedef _Tp1 type; +}; + +} // namespace tr1 + +} // namesapce std + #endif #include <cerrno> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |