std::tie

April 15th, 2015 No comments
struct S { A a; B b; C c; };

auto const S_fields = [](S const& obj) -> auto { return std::tie(obj.a, obj.b, obj.c); };

bool operator == (S const& lhs, S const& rhs) { return S_fields(lhs) == S_fields(rhs); }

bool operator < (S const& lhs, S const& rhs) { return S_fields(lhs) < S_fields(rhs); }

Hyperpolyglot

March 30th, 2015 No comments

Programming Languages – commonly used features in a side-by-side format.

run Visual Studio manage and unmanage unit tests from command line

January 28th, 2015 No comments

MSTest is used for Managed C#, C++ Tests and Test Execution Command Line Tool (vstest.console.exe) for unmanaged C++ tests.

MSTest example:

>"C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\MSTest.exe" /testcontainer:managed_unitTest.dll /testsettings:mysettings.testsettings

Test Execution Command Line Tool example:

>"C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" unmanaged_unitTest.dll /Settings:mysettings.testsettings /platform:x86

 

Additional links:

How to remove HomeGroup network icon from the Windows 8 desktop

November 29th, 2014 No comments
  1. From the Windows 8 Start Screen, search for ‘Show or hide common icons on the desktop’

or

  1. Alternatively, right-click on the desktop in the bottom-left corner to show the small menu which includes Control Panel. From there, click Appearance and Personalisation, then Personalisation. Finally, click Change desktop icons on the left.
  2. Even if the box next to Network is unticked, click it to enable it, then disable it again. (If it’s ticked to start with, untick it).

more

 

Windows App Store doesn’t load

November 25th, 2014 No comments

Open a Command Prompt as an Administrator and execute following command:

powershell -ExecutionPolicy Unrestricted Add-AppxPackage -DisableDevelopmentMode -Register $Env:SystemRoot\WinStore\AppxManifest.xml

source

Disable Windows Hibernate

August 28th, 2014 No comments

1.Open a command prompt with administrative privileges and execute following command:

powercfg.exe -h off

more info:

Winginx – handy tool for web development

June 29th, 2014 No comments

The rules for auto-generated constructors and operators

May 28th, 2014 No comments
  • The default constructor is auto-generated if there is no user-declared constructor (§12.1/5).
  • The copy constructor is auto-generated if there is no user-declared move constructor or move assignment operator (because there are no move constructors or move assignment operators in C++03, this simplifies to “always” in C++03) (§12.8/8).
  • The copy assignment operator is auto-generated if there is no user-declared move constructor or move assignment operator (§12.8/19).
  • The destructor is auto-generated if there is no user-declared destructor (§12.4/4).

C++0x only:

  • The move constructor is auto-generated if there is no user-declared copy constructor, copy assignment operator or destructor, and if the generated move constructor is valid (e.g. if it wouldn’t need to assign constant members) (§12.8/10).
  • The move assignment operator is auto-generated if there is no user-declared copy constructor, copy assignment operator or destructor, and if the generated move assignment operator is valid (e.g. if it wouldn’t need to assign constant members) (§12.8/21).

from StackOverflow

Tags: ,

Tails OS

May 3rd, 2014 No comments

Pocket C++

April 24th, 2014 No comments

Portable and easy to use editor to write and test C++11 snippets. It integrates Notepad++ and Stephan T. Lavavej’s MinGW Distro (GCC 4.8.1). You can use F9 key to compile C++ files, and Ctrl+F9 to execute the compiled program.

homepage