00001 // ======================================================================================== 00002 // ApproxMVBB 00003 // Copyright (C) 2014 by Gabriel Nützi <nuetzig (at) imes (d0t) mavt (d0t) ethz (døt) ch> 00004 // 00005 // This Source Code Form is subject to the terms of the Mozilla Public 00006 // License, v. 2.0. If a copy of the MPL was not distributed with this 00007 // file, You can obtain one at http://mozilla.org/MPL/2.0/. 00008 // ======================================================================================== 00009 #ifndef CYGWINPATCH_H_ 00010 #define CYGWINPATCH_H_ 00011 #include <string> 00012 #include <sstream> 00013 00014 // This is a patch file for Cygwin-based compilers to overcome a bug present in 00015 // the compilers. Code adapted from: 00016 // http://stackoverflow.com/questions/12975341/to-string-is-not-a-member-of-std-says-so-g 00017 00018 namespace std { 00019 00020 template < typename T > std::string to_string( const T& n ) 00021 { 00022 std::ostringstream stm ; 00023 stm << n ; 00024 return stm.str() ; 00025 } 00026 } 00027 00028 #endif