MeshLib Documentation
Loading...
Searching...
No Matches
MRScopedValue.h
Go to the documentation of this file.
1#pragma once
2
3#include "MRFinally.h"
4
6#define MR_SCOPED_VALUE( var, ... ) \
7auto MR_CONCAT( _prev_value_, __LINE__ ) = std::move( var ); ( var ) = ( __VA_ARGS__ ); MR_FINALLY { ( var ) = std::move( MR_CONCAT( _prev_value_, __LINE__ ) ); }