diff options
author | louiz’ <louiz@louiz.org> | 2017-12-16 16:32:32 +0100 |
---|---|---|
committer | louiz’ <louiz@louiz.org> | 2017-12-16 16:32:32 +0100 |
commit | 2c4016a4898a050c7f6ebd1843b265e209da1704 (patch) | |
tree | b6c57d4fa446fe588cac6999c498dc1d7587dd9e /src/utils/is_one_of.hpp | |
parent | aaa9de8fe2c67b67310b7ba78c607bddbf4b25bf (diff) | |
parent | b1f850b6395610c738a8e58abcdf2abfca3edd4e (diff) | |
download | biboumi-2c4016a4898a050c7f6ebd1843b265e209da1704.tar.gz biboumi-2c4016a4898a050c7f6ebd1843b265e209da1704.tar.bz2 biboumi-2c4016a4898a050c7f6ebd1843b265e209da1704.tar.xz biboumi-2c4016a4898a050c7f6ebd1843b265e209da1704.zip |
Merge branch 'postgresql' into 'master'
Add postgresql support
Closes #3237
See merge request louiz/biboumi!18
Diffstat (limited to 'src/utils/is_one_of.hpp')
-rw-r--r-- | src/utils/is_one_of.hpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/utils/is_one_of.hpp b/src/utils/is_one_of.hpp new file mode 100644 index 0000000..4d6770e --- /dev/null +++ b/src/utils/is_one_of.hpp @@ -0,0 +1,17 @@ +#pragma once + +#include <type_traits> + +template <typename...> +struct is_one_of_implem { + static constexpr bool value = false; +}; + +template <typename F, typename S, typename... T> +struct is_one_of_implem<F, S, T...> { + static constexpr bool value = + std::is_same<F, S>::value || is_one_of_implem<F, T...>::value; +}; + +template<typename... T> +constexpr bool is_one_of = is_one_of_implem<T...>::value; |