An open API service indexing awesome lists of open source software.

https://github.com/reputeless/yesno


https://github.com/reputeless/yesno

Last synced: 2 months ago
JSON representation

Awesome Lists containing this project

README

        

# siv::YesNo

## Usage
```cpp
# include
# include "YesNo.hpp"

using siv::YesNo;
using FormatDisk = YesNo;
using WriteLog = YesNo;

void DoTask(FormatDisk formaDisk, WriteLog writeLog)
{
if (formaDisk)
std::cout << "Formatting a disk...\n";
if (writeLog)
std::cout << "Writing a log...\n";
}

int main()
{
DoTask(FormatDisk::No, WriteLog::Yes);
DoTask(FormatDisk{ false }, WriteLog{ true });

DoTask(WriteLog::Yes, FormatDisk::No); // error
DoTask(false, true); // error
}
```

## License
siv::YesNo is distributed under the **Boost Software License 1.0**.