-
-
Notifications
You must be signed in to change notification settings - Fork 230
/
Copy pathmod_version.h
52 lines (39 loc) · 1.05 KB
/
mod_version.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/*
Copyright 2019-2022 René Ferdinand Rivera Morell
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
*/
#ifndef B2_MOD_VERSION_H
#define B2_MOD_VERSION_H
#include "bind.h"
#include "config.h"
#include <vector>
namespace b2 {
/* tag::reference[]
[[b2.reference.modules.version]]
= `version` module.
end::reference[] */
/* tag::reference[]
== `b2::version_less`
====
[horizontal]
Jam:: `rule version-less ( lhs + : rhs + )`
{CPP}:: `bool version_less(const std::vector<int> & lhs, const std::vector<int>
& rhs);`
====
Returns `true` if the first version, `lhs`, is semantically less than the
second version, `rhs`.
end::reference[] */
bool version_less(const std::vector<int> & lhs, const std::vector<int> & rhs);
struct version_module : b2::bind::module_<version_module>
{
const char * module_name = "version";
template <class Binder>
void def(Binder & binder)
{
binder.def(
&b2::version_less, "version-less", "lhs" * _1n | "rhs" * _1n);
}
};
} // namespace b2
#endif