Format:
Recent snippets matching tags of bool
// Copyright Krzysztof Czainski 2011 // 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) /** * @file cz/boost/utility/safe_bool.hpp * Introduction by Vladimir Batov: * An implicit conversion to bool (operator bool() const) is very much * idiomatic and is often deployed in constructs like "if (foo)" and "if (!foo)"
212 Views
no comments
static void Main(string[] args) { int a = 1; int b = 2; SwapT(ref a, ref b); } /// <summary> /// Swapping with generics
173 Views
no comments
static void Main(string[] args) { int a = 1; int b = 2; Swap(ref a, ref b); } /// <summary> /// Swapping values with XOR
170 Views
no comments
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search
