Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Notes on Idris (2017). Parent comment
#include <iostream> template<bool B, typename T> std::string doSomething(T t); template<> std::string doSomething<true>(std::string s) { return "true!"; } template<> std::string doSomething<false>(int i) { return "false!"; } int main() { std::string foo {"foo"}; auto s1 = doSomething<true>(foo); auto s2 = doSomething<false>(42); std::cout << s1 << ", " << s2 << std::endl; return 0; }
There are no comments on this comment yet.