diff options
author | Stephen Kelly <steveire@gmail.com> | 2014-04-04 12:52:48 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2014-04-08 09:05:56 (GMT) |
commit | e74b216c90d33548e7b248276346a5d00eff5ee3 (patch) | |
tree | 767aea3539e89e92f178375de785a04dbd7419e3 /Tests/CompileFeatures/cxx_generalized_initializers.cpp | |
parent | ff80c3b4201918c2f30241972d3553a99571eed8 (diff) | |
download | CMake-e74b216c90d33548e7b248276346a5d00eff5ee3.zip CMake-e74b216c90d33548e7b248276346a5d00eff5ee3.tar.gz CMake-e74b216c90d33548e7b248276346a5d00eff5ee3.tar.bz2 |
Features: Add cxx_generalized_initializers.
Diffstat (limited to 'Tests/CompileFeatures/cxx_generalized_initializers.cpp')
-rw-r--r-- | Tests/CompileFeatures/cxx_generalized_initializers.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Tests/CompileFeatures/cxx_generalized_initializers.cpp b/Tests/CompileFeatures/cxx_generalized_initializers.cpp new file mode 100644 index 0000000..8013ef5 --- /dev/null +++ b/Tests/CompileFeatures/cxx_generalized_initializers.cpp @@ -0,0 +1,23 @@ + +// Dummy implementation. Test only the compiler feature. +namespace std { + typedef decltype(sizeof(int)) size_t; + template <class _E> + class initializer_list + { + const _E* __begin_; + size_t __size_; + + }; +} + +template <typename T> +struct A +{ + A(std::initializer_list<T>) {} +}; + +void someFunc() +{ + A<int> as = { 1, 2, 3, 4 }; +} |