maths: add identity function

This commit is contained in:
Danny Robson 2015-10-19 17:06:52 +11:00
parent 60f16cdc4a
commit 36b4043faf

View File

@ -139,6 +139,15 @@ constexpr float sign (float);
constexpr double sign (double);
//-----------------------------------------------------------------------------
template <typename T>
const T&
identity (const T& t)
{
return t;
}
//-----------------------------------------------------------------------------
// Comparisons
template <typename T>