« What Is a Software Architect?Are You Mocking Me?! »

5 comments

  1. § Paul Watt®   said on :

    … well I got coliru back up and running.

    There are some things that I would like to do to allow the code to be compilable, without having to include so much text.

    I need to tackle the sites conversion of < to &lt;

  2. § Paul Watt®   said on :

    @Andrea

    Thanks for taking the time to comment.

    I do need to come up to speed on the C++11 features, especially for templates. I’m not fortunate enough to be able to use a C++11+ compiler because of the hardware we use.

    I will be updating my Alchemy project with some of the modern syntax improvements where they make sense. I will be sure to edit the examples to show the newer and cleaner syntax when I am more familiar with them.

    As far as the appearance, I apologize. I am aware of what is happening to the formatting. Late December my site had an “incident". A bad database entry or something. In trying to fix it, I updated the version of this blog suite, and it overwrote some of the customizations that I have added.

    I have them backed up. However, I have not made the time to get its appearance as clean as it was.

    One other thing I lost that I am currently working on restoring, is integration with the Coliru online compiler.

    Originally this article was planned to be able to compile the examples inline. I will update that as well, when I get the interactive compiler working again.

  3. § Paul Watt®   said on :

    @Loghron

    Thanks for scrutinizing the code and keeping me honest. More importantly taking the time to let me know so that this entry will be accurate.

    No, I didn’t run the code at first. I have since compiled them and corrected most of the errors.

    My intention was to create a demonstration that is more useful that what you find with most descriptions of this technique. Taking it a step further with the find wrapper.

    Yes, the has_find definition still has the issue that you describe. I will be correcting soon. Unfortunately my day job has gotten in the way.

  4. § Andrea   said on :
    3 stars

    Hey, nice article, but be aware that your “<” characters get html-ized in “&lt” and that’s not a good thing for a post based on templates…

    That said, can I suggest you get rid of “static T* this_t();” in your selector template and simplify things a bit taking advantage of std::declval which I presume has been introduced in C++11 exactly for such cases where a type might not be default constructible)?

    Thanks for your good posts!

  5. § Loghron said on :
    2 stars

    A good explanation of SFINAE, but did you ever tried to run the code you wrote?

    Let’s forget about the bunch of syntax errors and all the missing typenames, your code could never work for containers that doesn’t have find, because even if has_find evaluates to false, the compiler has still to fully compile the if clause.


Form is loading...

Contact / Help. ©2017 by Paul Watt; Charon adapted from work by daroz. blog software / web hosting / monetize.
Design & icons by N.Design Studio. Skin by Tender Feelings / EvoFactory.