Tuples: draft 1

chris caj@cs.york.ac.uk
Thu Oct 21 14:50:00 GMT 2004


>  
>
>>2) I declare "extern shallow_assign ignore". This needs to be actually 
>>created somewhere..
>>    
>>
>
>Do you mean you need to link against it? What is shallow_assign ignore, exactly?
>  
>
Probably quickest to give the whole definition :)

Given in the specification is the following;

struct swallow_assign
{
  template <class T>
  swallow_assign&
  operator=(const T&)
    {return *this;}
};
extern swallow_assign ignore;

The idea is that when using "tie" to join together a number of variables 
then this "ignore" can be used in places where we don't care about the 
variable. The standard states that a variable of type "swallow_assign" 
called ignore will be provided. However this will of course have to be 
actually defined somewhere once :)

Chris



More information about the Libstdc++ mailing list