$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-users] Runtime identity
From: Robert Jones (robertgbjones_at_[hidden])
Date: 2010-11-30 10:06:43
I'm not sure if this is a stupid question, but is there a runtime equivalent
of boost.mpl's identity
metafunction?
Something that just returns it's single argument, eg.,
template <typename T> T identity( T t ) { return t; }
I think it's trivially simple to write, but I wonder if it already exists in
Boost or
indeed the STL?
(I need this because I need to pass a function object which simply returns
an
object I already have - maybe I've missed a more obvious method?)
Thx,
Rob.