std::to_string: add replacement for android build chain.

This commit is contained in:
Kim Kulling
2016-05-25 00:26:41 +02:00
parent 38ce71d5a0
commit 037fec275c
2 changed files with 9 additions and 0 deletions

View File

@@ -43,6 +43,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <cstdarg>
#include <string.h>
#include <stdio.h>
#include <sstream>
/// @fn ai_snprintf
/// @brief The portable version of the function snprintf ( C99 standard ), which works on visual studio compilers 2013 and earlier.
@@ -80,5 +81,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# define ai_snprintf snprintf
#endif
template <typename T>
std::string to_string( T value ) {
std::ostringstream os;
os << value;
return os.str();
}
#endif // INCLUDED_AI_STRINGUTILS_H