On 28 Aug 2015 at 7:56, Jeremy Maitin-Shepard wrote:
c) There are older versions in there. There is 1.3 and 1.4 at least (are there more?). Please choose one. Go for it.
AFIO provides strong ABI and API evolution guarantees. It guarantees that if you compile and link to v2 of the ABI, your code will continue to compile and link no matter what changes next in AFIO.
It seems what you are trying to do is provide a demonstration of the way backwards compatibility will work for future versions of AFIO, when it would actually be useful, and also perhaps to provide an example of a good design for supporting backwards compatibility in C++ libraries. While this is interesting, perhaps it would be better to do this as an example separate from AFIO, so that AFIO can remain as small and simple as possible.
The documentation and tutorials explain - fairly tersely it is true - how to pin your code to specific ABI versions or to always choose the latest. The examples you ask for are littered throughout the documentation. There is even a FAQ item with extra detail for the curious. It may well be because it's so lacking in obvious impact to end user code you don't realise it all already works and you get it for free.
One comment on this design: it seems that different version of AFIO will function as completely independent libraries, that can each be used independently. While this is certainly much better than what most C++ libraries provide, there is still the potential for AFIO version incompatibilities: one piece of code (A) may rely on version X of AFIO but also needs to interoperate (via AFIO types) with another piece of code (B) that formerly relied on AFIO version X, but upgraded to AFIO version X+1. Ideally the backwards/forwards compatibility would be finer-grained, so that this interoperability might be possible, but of course that tends to severely constrain the types of changes you can make.
You may not be aware you can also build AFIO using any choice of dependencies, so v1.40 has eight different potential configurations, all of which are incompatible and will not work together. This is unavoidable, because the dependencies do not work together e.g. std::future does not work with boost::future. All eight configurations will however coexist in the same translation unit. The exact same thing goes for previous versions of AFIO, so v1 in its eight configurations will coexist with v2 in its eight configurations. I haven't tested 16 copies of differently configured AFIO in the same translation unit, but I do regularly test two copies built with incompatible dependencies and that works very well. Niall -- ned Productions Limited Consulting http://www.nedproductions.biz/ http://ie.linkedin.com/in/nialldouglas/