[complement-svn] SF.net SVN: complement: [1819] trunk/complement/explore/include/misc/ type_traits.
Status: Pre-Alpha
Brought to you by:
complement
From: <com...@us...> - 2008-02-27 14:18:34
|
Revision: 1819 http://complement.svn.sourceforge.net/complement/?rev=1819&view=rev Author: complement Date: 2008-02-27 06:18:00 -0800 (Wed, 27 Feb 2008) Log Message: ----------- is_[rl]value_reference added; is_object changed Modified Paths: -------------- trunk/complement/explore/include/misc/type_traits.h Modified: trunk/complement/explore/include/misc/type_traits.h =================================================================== --- trunk/complement/explore/include/misc/type_traits.h 2008-02-27 14:13:55 UTC (rev 1818) +++ trunk/complement/explore/include/misc/type_traits.h 2008-02-27 14:18:00 UTC (rev 1819) @@ -1,4 +1,4 @@ -// -*- C++ -*- Time-stamp: <07/11/24 00:28:34 ptr> +// -*- C++ -*- Time-stamp: <07/12/02 19:55:42 ptr> /* * Copyright (c) 2007 @@ -256,6 +256,26 @@ __CV_SPEC_1(is_pointer,_Tp *,true); template <class _Tp> +struct is_lvalue_reference : + public false_type +{ }; + +template <class _Tp> +struct is_lvalue_reference<_Tp&> : + public true_type +{ }; + +template <class _Tp> +struct is_rvalue_reference : + public false_type +{ }; + +// template <class _Tp> +// struct is_rvalue_reference<_Tp&&> : +// public true_type +// { }; + +template <class _Tp> struct is_reference : public false_type { }; @@ -374,8 +394,11 @@ template <class _Tp> struct is_object : - public integral_constant<bool, !(is_function<_Tp>::value || is_reference<_Tp>::value - || is_void<_Tp>::value)> + public integral_constant<bool, (is_arithmetic<_Tp>::value || + is_array<_Tp>::value || + is_pointer<_Tp>::value || + is_member_pointer<_Tp>::value || + detail::__is_union_or_class<_Tp>::value)> { }; template <class _Tp> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |