stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <se...@roguewave.com>
Subject Re: Another potential hole in the tuple specs
Date Tue, 08 Jul 2008 20:59:51 GMT
Travis Vitek wrote:
>  
[...]
>> I tried making std::ignore const and adding const to the internal
>> assignment operator.  I also tried adding overloads for const and
>> non-const assignment.  Still got errors in all cases.
> 
> The following testcase works just fine (on acc-6.16, gcc-4.3.1 &
> msvc-8.0)
> 
>   namespace std {
> 
> 
>   struct _Ignore
>   {
>       template <class _TypeT>
>       void operator=(const _TypeT&) const
>       {
>       }

FWIW, unless the latest working paper specifies this assignment
operator I would expect there to be other viable techniques to
accomplish the same effect, such as defining our own template,
say, __rw_assign_tuple_elem(), to do the assignment, and
providing a no-op const __rw_ignore& overload.

I'm not suggesting we make use of this technique, just pointing
out that there likely are a number of other solutions that don't
require making std::ignore non-const.

Martin

Mime
View raw message