Skip to content
Snippets Groups Projects
Commit 368d3284 authored by Alexander Peyser's avatar Alexander Peyser Committed by Sam Yates
Browse files

Add initializer_list version for is_in in modccutil.hpp (#122)

Fix `is_in` compilation error with initializer lists and clang 3.7.1.

Addresses part of issue #121: `template <typename T, int N> bool is_in(T thing, const T (&list)[N])` fails to match against an initializer list second argument with clang-3.7.1 in `modcc/cprinter.cpp`.

* Add overload `template <typename T> bool is_in(T thing, const std::initializer_list<T> list) ` for `is_in` in `modccutil.hpp`. Fixes clang issue and verified to work with a version of gcc as well.
parent d73f2240
No related branches found
No related tags found
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment