Format:
Recent snippets matching tags of Boost
/*============================================================================= Copyright (c) 2011 Matt Calabrese 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) ==============================================================================*/ #include <boost/config.hpp> // ToDo: Add check for relaxed typename rule
172 Views
no comments
#include <boost/noncopyable.hpp> #include <boost/asio.hpp> #include <boost/date_time/posix_time/posix_time.hpp> #include <boost/shared_ptr.hpp> #include <boost/thread.hpp> #include <boost/thread/mutex.hpp> #include <boost/thread/locks.hpp> #include <boost/bind.hpp> #include <string>
180 Views
no comments
class session { public: session(asio::io_service& io_service, asio::ssl::context& context) : socket_(io_service, context) { } ssl_socket::lowest_layer_type& socket() { return socket_.lowest_layer();
204 Views
no comments
#include <boost/type_traits/is_arithmetic.hpp> #include <boost/type_traits/is_pointer.hpp> #include <boost/utility/enable_if.hpp> namespace boost { // Never defined extern void* enabler; }
1607 Views
no comments
#include <boost/auto_function/auto_function.hpp> #include <boost/generic/std_concept/iterator.hpp> #include <boost/generic/type_traits/concept_is_modeled_by.hpp> #include <cassert> #include <forward_list> #include <iterator> #include <list> #include <vector> // Just for simplicity of the example, pull in the full namespace
266 Views
no comments
// Standard reference 24.2.2 // The following code defines the concept "Iterator" // The concept is uaary with a single type parameter called "X" // The "using" argument here specifies that "Iterator" is a refinement of the // previously defined concepts "CopyAssignable", "CopyConstructible", // "Destructible", and "Swappable". // The "for typedef" argument is a convenience argument that lets the programmer // create a simple alias for a more complicated type name. This alias is only for // use when calling the macro to simplify the specification of further // requirements.
284 Views
no comments
/*============================================================================== Copyright (c) 2010 Matthew Calabrese Use, modification and distribution is subject to 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) ==============================================================================*/ // Note: Currently only tested on GCC 4.5.1
291 Views
no comments
// Note: The compiler does not need "requires" or concepts for this to work // Also notice that here the predicate is a type template< class L, class R > BOOST_AUTO_FUNCTION( add( L left, R right ) ) ( requires boost::is_pointer< L > ) ( return left + right // no semicolon, must be an expression ) // Note these are parentheses // Same as above only the predicate is a value
306 Views
no comments
#include <new> #include <utility> // This macro is variadic in order to directly support operator, #define BOOST_AUTO_FUNCTION( ... ) auto __VA_ARGS__ -> BOOST_AUTO_FUNCTION_IMPL #define BOOST_AUTO_VOID_FUNCTION( ... ) \ auto __VA_ARGS__ -> BOOST_AUTO_VOID_FUNCTION_IMPL // Variadic to support expressions with commas not between parentheses
291 Views
no comments
#include <nds.h> #include <boost/cstdint.hpp> #include <boost/gil/algorithm.hpp> #include <boost/gil/image_view.hpp> #include <boost/gil/packed_pixel.hpp> #include <boost/gil/rgba.hpp> #include <boost/gil/virtual_locator.hpp> #include <boost/mpl/vector.hpp> #include <boost/utility/binary.hpp>
738 Views
no comments
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search
