stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <se...@roguewave.com>
Subject Re: svn commit: r670099 - in /stdcxx/branches/4.3.x/include: rw/_ref_wrap.h tuple
Date Sun, 22 Jun 2008 23:48:01 GMT
Travis Vitek wrote:
> 
> Brad,
> 
> I just noticed that you aren't applying SVN properties to all of the files that you are
adding. New headers and source should get the svn:eol-style and svn:keywords properties set.
Ideally this would be done before you submit the file for the first time, but you can add
the properties later.
> 
> I believe that the command sequence on non-windows systems is
> 
>   $ svn propset svn:eol-style native <file>
>   $ svn propset svn:keywords Id <file> 

Or enable auto-props in your $HOME/.subversion/config file and set
these there (via: svn:eol-style=native;svn:keywords=Id). Here are
some more details:
http://svnbook.red-bean.com/en/1.4/svn.advanced.confarea.html#svn.advanced.confarea.opts.config

> 
> Travis
> 
> -----Original Message-----
> From: elemings@apache.org [mailto:elemings@apache.org]
> Sent: Fri 6/20/2008 5:25 PM
> To: commits@stdcxx.apache.org
> Subject: svn commit: r670099 - in /stdcxx/branches/4.3.x/include: rw/_ref_wrap.h tuple
>  
> Author: elemings
> Date: Fri Jun 20 17:25:39 2008
> New Revision: 670099
> 
> URL: http://svn.apache.org/viewvc?rev=670099&view=rev
> Log:
> 2008-06-21  Eric Lemings <eric.lemings@roguewave.com>
> 
> 	STDCXX-958
> 	* include/rw/_ref_wrap.h: Add internal header for reference
> 	wrappers.  (Currently just an empty class template.)
> 	* include/tuple: Add helpers for deducing return type of
> 	make_tuple() function.
> 	(make_tuple): Implemented and documented.
> 
> 
> Added:
>     stdcxx/branches/4.3.x/include/rw/_ref_wrap.h
> Modified:
>     stdcxx/branches/4.3.x/include/tuple
> 
> Added: stdcxx/branches/4.3.x/include/rw/_ref_wrap.h
> URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/rw/_ref_wrap.h?rev=670099&view=auto
> ==============================================================================
> --- stdcxx/branches/4.3.x/include/rw/_ref_wrap.h (added)
> +++ stdcxx/branches/4.3.x/include/rw/_ref_wrap.h Fri Jun 20 17:25:39 2008
> @@ -0,0 +1,63 @@
> +// -*- C++ -*-
> +/***************************************************************************
> + *
> + * This is an internal header file used to implement the C++ Standard
> + * Library. It should never be #included directly by a program.
> + *
> + * $Id$
> + *
> + ***************************************************************************
> + *
> + * Licensed to the Apache Software  Foundation (ASF) under one or more
> + * contributor  license agreements.  See  the NOTICE  file distributed
> + * with  this  work  for  additional information  regarding  copyright
> + * ownership.   The ASF  licenses this  file to  you under  the Apache
> + * License, Version  2.0 (the  "License"); you may  not use  this file
> + * except in  compliance with the License.   You may obtain  a copy of
> + * the License at
> + *
> + * http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing, software
> + * distributed under the  License is distributed on an  "AS IS" BASIS,
> + * WITHOUT  WARRANTIES OR CONDITIONS  OF ANY  KIND, either  express or
> + * implied.   See  the License  for  the  specific language  governing
> + * permissions and limitations under the License.
> + *
> + * Copyright 2008 Rogue Wave Software.
> + * 
> + **************************************************************************/
> +
> +#ifndef _RWSTD_RW_REF_WRAP_INCLUDED
> +#  define _RWSTD_RW_REF_WRAP_INCLUDED
> +
> +#  include <rw/_defs.h>
> +
> +#  if !defined _RWSTD_NO_EXT_CXX_0X
> +
> +
> +_RWSTD_NAMESPACE (__rw) {
> +
> +
> +/**
> + * @class std::reference_wrapper
> + *
> + * Encapsulates a reference as an object.  This class template allows
> + * references to be manipulated and behave as an ordinary object.
> + *
> + * @tparam Type A non-reference type.
> + */
> +
> +template <class _Type>
> +class __rw_ref_wrap
> +{
> +
> +};
> +
> +
> +}   // namespace __rw
> +
> +
> +#  endif   // !defined _RWSTD_NO_EXT_CXX_0X
> +
> +#endif   // _RWSTD_RW_REF_WRAP_INCLUDED
> 
> Modified: stdcxx/branches/4.3.x/include/tuple
> URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/tuple?rev=670099&r1=670098&r2=670099&view=diff
> ==============================================================================
> --- stdcxx/branches/4.3.x/include/tuple (original)
> +++ stdcxx/branches/4.3.x/include/tuple Fri Jun 20 17:25:39 2008
> @@ -36,9 +36,9 @@
>  #    error _RWSTD_NO_EXT_CXX_0X defined and C++0x header included
>  #  endif   // defined _RWSTD_NO_EXT_CXX_0X
>  
> -#  include <rw/_meta_cv.h>          // for __rw_add_const
> -#  include <rw/_meta_help.h>        // for __rw_integral_constant
> -#  include <rw/_meta_ref.h>         // for __rw_add_lvalue_reference
> +#  include <type_traits>
> +
> +#  include <rw/_ref_wrap.h>
>  
>  #  include <rw/_tuple.h>
>  #  include <rw/_tuple_traits.h>
> @@ -48,13 +48,37 @@
>  
>  struct __rw_ignore { /* empty */ };
>  
> -/// Transforms _Type into a suitable make_tuple() return type.
>  template <class _Type>
> -struct __rw_make_tuple {
> -    /// @todo Deduce correct return type.
> +struct __rw_deduce_reference
> +{
>      typedef _Type type;
>  };
>  
> +template <class _Type>
> +struct __rw_deduce_reference< __rw_ref_wrap<_Type> >
> +{
> +    typedef _Type& type;
> +};
> +
> +template <class _Type>
> +struct __rw_deduce_reference< const __rw_ref_wrap<_Type> >
> +{
> +    typedef _Type& type;
> +};
> +
> +/**
> + * @internal
> + * Transform a tuple element type into a suitable make_tuple() return
> + * type.
> + * @tparam _Type A tuple element type.
> + */
> +template <class _Type>
> +class __rw_make_tuple
> +{
> +    typedef _TYPENAME _RWSTD_DECAY(_Type) _Decay;
> +    typedef _TYPENAME __rw_deduce_reference<_Decay>::type type;
> +};
> +
>  }   // namespace __rw
>  
>  
> @@ -69,9 +93,24 @@
>  
>  #    if !defined _RWSTD_NO_RVALUE_REFERENCES
>  
> +/**
> + * @function make_tuple
> + *
> + * Create a new tuple from a list of element values.  This function
> + * constructs a new tuple from the corresponding element values by
> + * utilizing move semantics.
> + *
> + * @tparam _Types The list of elements types in the tuple.
> + * @param __values A corresponding list of element values.
> + * @return A tuple object containing the given element values.
> + */
>  template <class... _Types>
>  tuple<_TYPENAME _RW::__rw_make_tuple<_Types>::type...>
> -make_tuple (_Types&&... __values);
> +make_tuple (_Types&&... __values)
> +{
> +    typedef tuple<_TYPENAME _RW::__rw_make_tuple<_Types>::type...> _Tuple;
> +    return _Tuple (std::forward<_Types> (__values)...);
> +}
>  
>  template <class... _TypesT, class... _TypesU>
>  tuple<_TypesT..., _TypesU...>
> 
> 
> 


Mime
View raw message