what’s the difference between -source and -target compatibility?

From the javac docs: -source Specifies the version of source code accepted. -target Generate class files that target a specified version of the VM. Class files will run on the specified target and on later versions, but not on earlier versions of the VM. In your example: -source 1.5 and -target 1.6 This would be … Read more

Why does aggregate initialization not work anymore since C++20 if a constructor is explicitly defaulted or deleted?

The abstract from P1008, the proposal that led to the change: C++ currently allows some types with user-declared constructors to be initialized via aggregate initialization, bypassing those constructors. The result is code that is surprising, confusing, and buggy. This paper proposes a fix that makes initialization semantics in C++ safer, more uniform,and easier to teach. … Read more

What is the difference between MACOSX_DEPLOYMENT_TARGET and -mmacosx-version-min?

The man pages of gcc on Mac OS X say that they’re synonymous: -mmacosx-version-min=version The earliest version of MacOS X that this executable will run on is version. Typical values of version include 10.1, 10.2, and 10.3.9. This value can also be set with the MACOSX_DEPLOYMENT_TARGET environment variable. If both the command-line option is specified … Read more

Is Visual Studio 2012 csproj backward compatible with 2010?

VS2012 projects are mostly* backwards compatible with VS2010 SP1. The projects will undergo a conversion/migration process like in all previous VS versions, but this one is friendly towards VS2010. You should be able to make changes to your projects/references/code files and open them again in VS2010 without issues. I say mostly because there are some … Read more

Can program developed with Java 8 be run on Java 7?

In general, no. The backwards compatibility means that you can run Java 7 program on Java 8 runtime, not the other way around. There are several reasons for that: Bytecode is versioned and JVM checks if it supports the version it finds in .class files. Some language constructs cannot be expressed in previous versions of … Read more

What does it really mean to target a framework, and how do I maximize compatibility?

The frameworks are designed to be backwards-compatible; if you have a program written in .NET 2.0, you can run it in the 4.0 runtime, because none of the frameworks ever remove functionality that a prior version had (which is why we still have the non-generic collections like ArrayList, even though they’re deprecated in favor of … Read more

std::vector, default construction, C++11 and breaking changes

Does the C++03 standard mandate that std::vector must have a constructor defined as above, i.e. with a default argument? In particular is there a guarantee that the entries of the vector object get copied instead of default constructed? Yes, the specified behavior is that x is copied n times so that the container is initialized … Read more

How should I write my C++ to be prepared for C++ modules?

There are already two compilers that support C++ modules clang: http://clang.llvm.org/docs/Modules.html MS VS 2015: http://blogs.msdn.com/b/vcblog/archive/2015/12/03/c-modules-in-vs-2015-update-1.aspx The Microsoft approach appears to be the one gaining the most traction, mainly because Microsoft are throwing a lot more resources at their implementation than any of the clang folk currently. See https://llvm.org/bugs/buglist.cgi?list_id=100798&query_format=advanced&component=Modules&product=clang for what I mean, there are some … Read more

Material Design backward compatibility

Updating this answer as Lollipop OS is officially released with support libraries, which you can use inside your project to provide compatibility to older versions. Support library: v7 appcompat library This library adds support for the Action Bar user interface design pattern. This library includes support for material design user interface implementations. If you are … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)