diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-11-29 14:18:52 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-11-29 14:18:52 -0800 |
commit | db1f56c8449d2ea3d158753fe37bac5a750a2566 (patch) | |
tree | 508a24c522c040498dbe7d60036035f3c4ae440a /html/001help.cc.html | |
parent | 3670fb87f6d38c9ba4fcbb1eaa6439b4007a194e (diff) | |
download | mu-db1f56c8449d2ea3d158753fe37bac5a750a2566.tar.gz |
2611
Diffstat (limited to 'html/001help.cc.html')
-rw-r--r-- | html/001help.cc.html | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/html/001help.cc.html b/html/001help.cc.html index a6a34cdd..eaa49b8b 100644 --- a/html/001help.cc.html +++ b/html/001help.cc.html @@ -49,6 +49,9 @@ if <span class="Delimiter">(</span>argc <= <span class="Constant">1</span> || << <span class="Constant">"You can test directories just like files.</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <span class="Constant">"To pass ingredients to a mu program, provide them after '--':</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <span class="Constant">" mu file_or_dir1 file_or_dir2 ... -- ingredient1 ingredient2 ...</span><span class="cSpecial">\n</span><span class="Constant">"</span> + << <span class="Constant">"</span><span class="cSpecial">\n</span><span class="Constant">"</span> + << <span class="Constant">"To browse a trace generated by a previous run:</span><span class="cSpecial">\n</span><span class="Constant">"</span> + << <span class="Constant">" mu browse-trace file</span><span class="cSpecial">\n</span><span class="Constant">"</span> <span class="Delimiter">;</span> <span class="Identifier">return</span> <span class="Constant">0</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> @@ -146,6 +149,13 @@ template<typename T> typename T::mapped_type& get_or_insert<span class <span class="Delimiter">}</span> <span class="Comment">//: The contract: any container that relies on get_or_insert should never call</span> <span class="Comment">//: contains_key.</span> +<span class="Comment">//:</span> +<span class="Comment">//: 7. istreams are a royal pain in the arse. You have to be careful about</span> +<span class="Comment">//: what subclass you try to putback into. You have to watch out for the pesky</span> +<span class="Comment">//: failbit and badbit. Just avoid eof() and use this helper instead.</span> +bool has_data<span class="Delimiter">(</span>istream& in<span class="Delimiter">)</span> <span class="Delimiter">{</span> + <span class="Identifier">return</span> in && !in<span class="Delimiter">.</span>eof<span class="Delimiter">();</span> +<span class="Delimiter">}</span> <span class="Delimiter">:(before "End Includes")</span> <span class="PreProc">#include</span><span class="Constant"><assert.h></span> |