Prevent compilation of generators that use bool in dangerous manner

Closes #1692
This commit is contained in:
Martin Hořeňovský
2019-07-18 11:51:47 +02:00
parent 03ffc1014c
commit 53281b471f
2 changed files with 6 additions and 0 deletions

View File

@@ -70,6 +70,9 @@ namespace Generators {
template<typename T>
class FixedValuesGenerator final : public IGenerator<T> {
static_assert(!std::is_same<T, bool>::value,
"ValuesGenerator does not support bools because of std::vector<bool>"
"specialization, use SingleValue Generator instead.");
std::vector<T> m_values;
size_t m_idx = 0;
public: