This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Tuples: draft 1





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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]