You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/custom.md
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,12 +52,13 @@ int main()
52
52
}
53
53
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
54
54
55
-
## Extending RABERU Keywords
55
+
## Custom RABERU Keywords
56
56
57
57
THe keywords provided by **RABERU** can also be extended to propose a better user experience.
58
58
This includes using user-defined type instead of **RABERU** long symbol to improve diagnostic
59
59
, complex checks or provide custom display when using stream insertion of settings.
60
60
61
+
### Extending RABERU Keywords
61
62
Let's start again with our unrolling option. This time we want to be able to be sure nobody
62
63
will use it with a non integral constant value and to display the value in a more informative way.
63
64
To do so, we can inherits from `rbr::any_keyword`:
@@ -92,8 +93,8 @@ example.cpp:5:8: note: candidate function (the implicit copy assignment operator
92
93
example.cpp:5:8: note: candidate function (the implicit move assignment operator) not viable: no known conversion from 'float' to 'unrolling' for 1st argument struct unrolling : rbr::any_keyword<unrolling>
93
94
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
94
95
95
-
Let's now improve the output of the option.
96
-
Currently, the output is like:
96
+
### Custom Keywords Display
97
+
Let's now improve the output of the option. Currently, the output is like:
0 commit comments