$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Jason Hise (chaos_at_[hidden])
Date: 2005-03-13 12:56:11
I use the following as an implementation detail, and it was mentioned by
Pavel that a similar facility called state_saver is used in the
implementation of the serialization library. Does it make sense for
this to be refactored into boost/detail?
template < typename T >
struct auto_set
{
T & var; T val;
auto_set ( T & var, T val ) :
var ( var ), val ( val ) { }
~ auto_set ( ) { var = val; }
};
-Jason