From 7d5b6db1e22fc5767af31748822eefa346c2c4db Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 7 Feb 2016 15:35:59 +0000 Subject: Add deprecated attrib to compat wrapper --- slicer/slicer/modelParts.h | 1 + slicer/test/compilation.cpp | 3 +++ 2 files changed, 4 insertions(+) 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 inline ModelPartPtr ModelPartFor(T & t) __attribute__ ((deprecated)); template inline ModelPartPtr ModelPartFor(T & t) { return ModelPart::CreateFor(t); } template 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 -- cgit v1.2.3