#pragma once namespace fc { template T numeric_cast( const R& v ) { // TODO: do something smarter here, check ranges, etc return static_cast(v); } }