On 31/12/13 15:49, Peter A. Bigot wrote:
On 12/31/2013 08:10 AM, Mathias Gaunard wrote:
On 30/12/13 18:32, Peter A. Bigot wrote:
*) If a module has a module-specific version number, should it be expected to provide that version number in a standard location and name so that preprocessor directives interrogate and adapt user code based on it? What mechanism should be used for this?
git describe --tags could be the right mechanism for this. If you're on a tag, it gives you tagname. Otherwise it gives lasttagname-numberofcommitssincethen-sha1.
That's fine at the command line or scripts that produce an archive. The need here is to be able to tell within code whether a feature is available based on the version of the module.
That output can easily be parsed to do whatever you want. It's important to keep in mind what this generates though, and how it could be mapped to a macro.
Seems like something that Boost would normally leave up to the module maintainer, including whether the scheme selected is a two-value, three-value, or date-based versioning. I can imagine cases where a Boost library provides a wrapper around an external library that has its own versioning, and the two should be correlated.
Wouldn't that be confusing for users?