summaryrefslogtreecommitdiffstats
path: root/src/boost/libs/tti/test/test_has_template.cpp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 18:24:20 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 18:24:20 +0000
commit483eb2f56657e8e7f419ab1a4fab8dce9ade8609 (patch)
treee5d88d25d870d5dedacb6bbdbe2a966086a0a5cf /src/boost/libs/tti/test/test_has_template.cpp
parentInitial commit. (diff)
downloadceph-upstream.tar.xz
ceph-upstream.zip
Adding upstream version 14.2.21.upstream/14.2.21upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/boost/libs/tti/test/test_has_template.cpp')
-rw-r--r--src/boost/libs/tti/test/test_has_template.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/boost/libs/tti/test/test_has_template.cpp b/src/boost/libs/tti/test/test_has_template.cpp
new file mode 100644
index 00000000..d6ca303f
--- /dev/null
+++ b/src/boost/libs/tti/test/test_has_template.cpp
@@ -0,0 +1,28 @@
+
+// (C) Copyright Edward Diener 2011
+// Use, modification and distribution are subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt).
+
+#include "test_has_template.hpp"
+#include <boost/detail/lightweight_test.hpp>
+
+int main()
+ {
+
+ BOOST_TEST(BOOST_TTI_HAS_TEMPLATE_GEN(ATPMemberTemplate)<AType>::value);
+ BOOST_TEST(HaveCL<AType>::value);
+ BOOST_TEST(!BOOST_TTI_HAS_TEMPLATE_GEN(AMemberTemplate)<AType>::value);
+ BOOST_TEST(!HaveAnotherMT<AType>::value);
+ BOOST_TEST(!BOOST_TTI_HAS_TEMPLATE_GEN(SomeMemberTemplate)<AnotherType>::value);
+ BOOST_TEST(!ATemplateWithParms<AnotherType>::value);
+ BOOST_TEST(BOOST_TTI_HAS_TEMPLATE_GEN(SimpleTMP)<AnotherType>::value);
+
+ // Passing non-class enclosing type will return false
+
+ BOOST_TEST(!HaveCL<AType **>::value);
+ BOOST_TEST(!BOOST_TTI_HAS_TEMPLATE_GEN(SimpleTMP)<char>::value);
+
+ return boost::report_errors();
+
+ }