Update README.md
This commit is contained in:
parent
93576965d9
commit
c8be3247da
1 changed files with 28 additions and 6 deletions
34
README.md
34
README.md
|
@ -1,12 +1,34 @@
|
||||||
# uTempl - Modern C++ Template Library
|
# uTempl - Modern C++ Template Library
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
- TypeList: List of types and functions for working with them
|
### Ranges Like Interface For TupleLike
|
||||||
- GoInterface: Go-like interfaces for C++
|
```cpp
|
||||||
- ConstexprString: A template for working with compile-time strings using constexpr.
|
#include <utempl/utils.hpp>
|
||||||
- Tuple Realization: Implementation of tuples in a modern C++ way.
|
|
||||||
- 🔥Blazing🔥 Fast Menu Builder🚀🚀🚀: Quickly build interactive menus in your terminal applications.
|
auto main() -> int {
|
||||||
- Overloaded
|
using namespace utempl;
|
||||||
|
TupleLike auto tuple = Tuple{1, 2, 3, 4, 5, 6}
|
||||||
|
| Take<5>()
|
||||||
|
| Map([](int arg){return arg + 1;})
|
||||||
|
| Map([](int arg) -> float {return arg;})
|
||||||
|
| Reverse()
|
||||||
|
| Take<3>(); // Lazy evaluate
|
||||||
|
static_assert(tuple == Tuple{6.0f, 5.0f, 4.0f});
|
||||||
|
};
|
||||||
|
```
|
||||||
|
### Storage types in array
|
||||||
|
```cpp
|
||||||
|
#include <utempl/meta_info.hpp>
|
||||||
|
#include <array>
|
||||||
|
#include <type_traits>
|
||||||
|
|
||||||
|
auto main() -> int {
|
||||||
|
using namespace utempl;
|
||||||
|
constexpr std::array types{kTypeId<int>, kTypeId<void>};
|
||||||
|
static_assert(std::is_same_v<GetMetaInfo<types[0]>::Type, int>);
|
||||||
|
static_assert(std::is_same_v<GetMetaInfo<types[1]>::Type, void>);
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
## License
|
## License
|
||||||
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
||||||
|
|
Loading…
Reference in a new issue