-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
25f474d
commit 8a298e7
Showing
5 changed files
with
82 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import asciidoctor ; | ||
import path ; | ||
|
||
|
||
project enum-flags-doc ; | ||
|
||
path-constant HERE : . ; | ||
|
||
|
||
local rule templates-dir ( path ) { | ||
path = [ path.root $(path) $(HERE) ] ; | ||
local files = [ glob $(path)/* ] ; | ||
return <flags>"-T $(path)" <dependency>$(files) ; | ||
} | ||
|
||
|
||
alias common-attributes | ||
: usage-requirements | ||
<asciidoctor-attribute>nofooter | ||
<asciidoctor-attribute>source-highlighter=pygments | ||
<asciidoctor-attribute>pygments-linenums-mode=inline | ||
# <asciidoctor-attribute>pygments-css | ||
|
||
# <asciidoctor-attribute>pygments-style=monokai | ||
<asciidoctor-attribute>pygments-style=paraiso-dark | ||
|
||
# <asciidoctor-attribute>pygments-style=friendly | ||
|
||
<asciidoctor-attribute>icons=font | ||
# <asciidoctor-attribute>stylesdir=styles | ||
|
||
[ templates-dir templates ] | ||
; | ||
|
||
|
||
html index : index.adoc common-attributes ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#include <flags/flags.hpp> | ||
|
||
enum class MyEnum { Value1 = 1 , Value2 = 2 }; | ||
ALLOW_FLAGS_FOR_ENUM(MyEnum) | ||
|
||
int main() { | ||
auto mask = MyEnum::Value1 | MyEnum::Value2; | ||
if (mask & MyEnum::Value2) { | ||
// do something | ||
} | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
= enum-flags | ||
|
||
*enum-flags* is a C++ library that allows you to convert scoped enums into bit | ||
flags. + | ||
You can use it as simple as this: | ||
|
||
[source, c++] | ||
---- | ||
include::examples/example0.cpp[] | ||
---- | ||
|
||
== Documentation | ||
|
||
* *link:overview/index.html[Overview]* + | ||
An overview of the features and the design. | ||
|
||
* *link:tutorial/index.html[Tutorial]* + | ||
A tutorial that shows how to use the library. | ||
|
||
* *link:reference/index.html[Reference]* + | ||
API reference. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters