2. Added a default value for char traits template parameter.
3. Added missing headers and removed unused ones.
4. Added inline specifiers to operators.
5. Fixed operator<< behaving incorrectly when particular width is requested (std::setw, etc.).
6. Replaced all throw statements with BOOST_THROW_EXCEPTION.
[SVN r84511]
Fixed a bug in scope_exit.hpp: An extra trailing \ in a macro definition (compiled only when BOOST_NO_VARIADIC_MACROS is defined).
Renamed LocalFunction and ScopeExit tests and examples from _err to _error.
Updated LocalFunction docs.
[SVN r77042]
2012-02-16 18:24:34 +00:00
3 changed files with 15 additions and 26 deletions
<spanclass="keyword">if</span><spanclass="special">(</span><spanclass="identifier">extract_part</span><spanclass="special">(</span><spanclass="string">"ABCDEFG"</span><spanclass="special">).</span><spanclass="identifier">front</span><spanclass="special">()</span><spanclass="special">==</span><spanclass="char">'C'</span><spanclass="special">)</span><spanclass="special">{</span><spanclass="comment">/* do something */</span><spanclass="special">}</span>
<spanclass="keyword">if</span><spanclass="special">(</span><spanclass="identifier">extract_part</span><spanclass="special">(</span><spanclass="string">"ABCDEFG"</span><spanclass="special">).</span><spanclass="identifier">front</span><spanclass="special">()</span><spanclass="special">==</span><spanclass="string">"C"</span><spanclass="special">)</span><spanclass="special">{</span><spanclass="comment">/* do something */</span><spanclass="special">}</span>
</pre>
</pre>
<p>
<p>
Let's figure out what happens in this (contrived) example.
Let's figure out what happens in this (contrived) example.
The header file "string_ref.hpp" defines a template <codeclass="computeroutput"><spanclass="identifier">boost</span><spanclass="special">::</span><spanclass="identifier">basic_string_ref</span></code>,
The header file "string_ref.hpp" defines a template <codeclass="computeroutput"><spanclass="identifier">boost</span><spanclass="special">::</span><spanclass="identifier">basic_string_ref</span></code>,
and four specializations - for <codeclass="computeroutput"><spanclass="keyword">char</span></code>
and four specializations - for <codeclass="computeroutput"><spanclass="keyword">char</span></code>
//Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc.
//Distributed under the Boost Software License, Version 1.0. (See accompanying
//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef UUID_1D94A7C6054E11DB9804B622A1EF5492
#define UUID_1D94A7C6054E11DB9804B622A1EF5492
#error The header <boost/exception.hpp> has been deprecated. Please #include <boost/exception/all.hpp> instead.
#endif
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.