Say, is there a trick in C++ to make to_string() work for any type?
If I have
using namespace std;
and then just write
to_string(foo)
it will prefer my local namespace's to_string() and error when given an int, instead of picking std::to_string() for those.
Do I really have to add all variants of
inline string to_string(int n) { return std::to_string(n); }
to my namespace to be able to just say to_string(foo) for any type and make it work?
GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.
All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.