Skip to content

Commit 20bd56c

Browse files
committed
updated readme
1 parent 8d05b45 commit 20bd56c

File tree

1 file changed

+55
-6
lines changed

1 file changed

+55
-6
lines changed

README.md

Lines changed: 55 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
1-
# Flags for C++ 11 enum classes
1+
# enum-flags
22

3-
C++ 11 gives a new type of enums — *enum classes*.
3+
[![Download](https://api.bintray.com/packages/grisumbras/conan/enum-flags:grisumbras/images/download.svg?version=0.1.0:testing) ](https://bintray.com/grisumbras/conan/enum-flags:grisumbras/0.1.0:testing/link)
4+
[![Actions Status](https://wdp9fww0r9.execute-api.us-west-2.amazonaws.com/production/badge/grisumbras/enum-flags)](https://wdp9fww0r9.execute-api.us-west-2.amazonaws.com/production/results/grisumbras/enum-flags)
5+
![License](https://img.shields.io/github/license/grisumbras/enum-flags.svg)
6+
7+
> Bit flags for C++ scoped enums
8+
9+
C++ 11 added a new type of enums — *enum classes*.
410
These are strongly typed enumerations, they do not cast implicitly to or from
511
the underlying integer type. They also do not leak enumeration values to
612
enclosing scope (thus the names of this values do not clash and you no longer
@@ -13,11 +19,41 @@ and there are no bitwise operators overloads defined for them.
1319
This library brings a `flags` class template which provides bit flags for
1420
scoped enums.
1521

16-
----------
1722

18-
Simple usage:
23+
## Install
24+
25+
### Using Conan
26+
27+
Add required remote:
28+
29+
```shell
30+
$ conan remote add grisumbras https://api.bintray.com/conan/grisumbras/conan
31+
32+
```
33+
34+
Use inside `conanfile.txt`:
35+
36+
```ini
37+
[requires]
38+
enum-flags/[>0.1]@grisumbras/testing
39+
40+
```
41+
42+
43+
### Installing from source
44+
45+
Download source code and run from inside the project root:
46+
47+
```shell
48+
$ b2 install --prefix=/path/to/installation/prefix
49+
```
50+
51+
52+
## Usage
1953

2054
``` c++
55+
#include <flags/flags.hpp>
56+
2157
enum class MyEnum { Value1 = 1 << 0, Value2 = 1 << 1 };
2258
ALLOW_FLAGS_FOR_ENUM(MyEnum)
2359

@@ -29,6 +65,19 @@ int main() {
2965
}
3066
```
3167
32-
More info can be found in the [docs][DOC].
68+
More info can be found in the [docs](http://grisumbras.github.io/enum-flags/).
69+
70+
71+
## Maintainer
72+
73+
Dmitry Arkhipov <grisumbras@gmail.com>
74+
75+
76+
## Contributing
77+
78+
Patches welcome!
79+
80+
81+
## License
3382
34-
[DOC]: http://grisumbras.github.io/enum-flags/
83+
[MIT (C) Dmitry Arkhipov.](LICENSE)

0 commit comments

Comments
 (0)