{"id":573,"date":"2019-02-05T17:47:21","date_gmt":"2019-02-05T21:47:21","guid":{"rendered":"http:\/\/deadpelican.com\/wordpress\/?p=573"},"modified":"2019-02-05T17:47:21","modified_gmt":"2019-02-05T21:47:21","slug":"sfinaeibp","status":"publish","type":"post","link":"https:\/\/deadpelican.com\/wordpress\/?p=573","title":{"rendered":"SFINAEIBP"},"content":{"rendered":"<p><span class=\"ILfuVd\">Substitution failure is not an error<\/span> is bad programming, in my opinion.<\/p>\n<p>It seems to me that if you are making special cases for different classes in a template, then you&#8217;ve clearly missed the point of templates and are using them incorrectly. Templates are supposed to apply a concept or algorithm uniformly to a class. A vector, or a hash, work on objects of any type, uniformly.<\/p>\n<p>If you&#8217;re SFINAEing, then what you really want to be doing is make a base class and derive other classes from it, each having traits specific to that class. That&#8217;s the very definition of what object oriented programming is for.<\/p>\n<p>By taking advantage of a hack to cover a language flaw that serves no purpose but to supply entries for &#8216;the most heinous error message to come out of a c++ compiler&#8217; contest, you&#8217;re being cool, but you&#8217;re not being a good programmer.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Substitution failure is not an error is bad programming, in my opinion. It seems to me that if you are making special cases for different classes in a template, then you&#8217;ve clearly missed the point of templates and are using them incorrectly. Templates are supposed to apply a concept or algorithm uniformly to a class. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-573","post","type-post","status-publish","format-standard","hentry","category-notes"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/deadpelican.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/573","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/deadpelican.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/deadpelican.com\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/deadpelican.com\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/deadpelican.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=573"}],"version-history":[{"count":1,"href":"https:\/\/deadpelican.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/573\/revisions"}],"predecessor-version":[{"id":574,"href":"https:\/\/deadpelican.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/573\/revisions\/574"}],"wp:attachment":[{"href":"https:\/\/deadpelican.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=573"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/deadpelican.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=573"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/deadpelican.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=573"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}