summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--slicer/slicer/modelParts.h1
-rw-r--r--slicer/test/compilation.cpp3
2 files changed, 4 insertions, 0 deletions
diff --git a/slicer/slicer/modelParts.h b/slicer/slicer/modelParts.h
index 664ef6c..58aa3c8 100644
--- a/slicer/slicer/modelParts.h
+++ b/slicer/slicer/modelParts.h
@@ -183,6 +183,7 @@ namespace Slicer {
static const std::string & ToModelTypeName(const std::string &);
};
+ template<typename T> inline ModelPartPtr ModelPartFor(T & t) __attribute__ ((deprecated));
template<typename T> inline ModelPartPtr ModelPartFor(T & t) { return ModelPart::CreateFor(t); }
template<typename T>
diff --git a/slicer/test/compilation.cpp b/slicer/test/compilation.cpp
index a985d7e..bdfcca2 100644
--- a/slicer/test/compilation.cpp
+++ b/slicer/test/compilation.cpp
@@ -27,6 +27,8 @@ BOOST_TEST_DONT_PRINT_LOG_VALUE(std::type_info);
#define StackTypeTest(Var, Explicit, Expected) \
TypeTest(Var, Var(), Explicit, Expected)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
BOOST_AUTO_TEST_CASE( compile_auto_modelpart_type_class )
{
TypeTest(TestModule::BuiltInsPtr, new TestModule::BuiltIns(), ModelPartForClass, mpt_Complex);
@@ -101,4 +103,5 @@ BOOST_AUTO_TEST_CASE( compile_auto_modelpart_type_enum )
{
StackTypeTest(TestModule::SomeNumbers, ModelPartForEnum, mpt_Simple);
}
+#pragma GCC diagnostic pop