Comment

Comment by nitrogen

Response to a comment on the blog post:

    pubby8    May 3, 2014 at 10:07 PM

    Good article, but I'm guessing that using more than one
    ThrowOnError per statement will lead to std::terminate. 
    e.g. in seemingly reasonable code such as:

        std::cout << libfoo_create_widgets(1, &c1, ThrowOnError()) << libfoo_create_widgets(2, &c2, ThrowOnError());
Does C++ not specify an evaluation order for chained stream insertion operands? It seems to me as a C programmer that the first ThrowOnError should be destroyed before the second one gets created.
parent nitrogen 12 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton