From f88d46a03a1fac3674c319d136237952af4aacf6 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Mon, 21 May 2012 21:58:18 +0000 Subject: [PATCH] Add warning to deprecated header `boost/functional/detail/container_fwd.hpp`. Should have done this years ago, removing this header should make modularization a tad bit cleaner. [SVN r78533] --- hash/test/Jamfile.v2 | 1 + hash/test/deprecated_container_fwd.cpp | 14 ++++++++++++++ include/boost/functional/detail/container_fwd.hpp | 14 +++++++++++--- 3 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 hash/test/deprecated_container_fwd.cpp diff --git a/hash/test/Jamfile.v2 b/hash/test/Jamfile.v2 index 0d85829..47f0a95 100644 --- a/hash/test/Jamfile.v2 +++ b/hash/test/Jamfile.v2 @@ -50,6 +50,7 @@ test-suite functional/hash [ run implicit_test.cpp ] [ run hash_no_ext_macro_1.cpp ] [ run hash_no_ext_macro_2.cpp ] + [ compile deprecated_container_fwd.cpp ] ; test-suite functional/hash_no_ext diff --git a/hash/test/deprecated_container_fwd.cpp b/hash/test/deprecated_container_fwd.cpp new file mode 100644 index 0000000..1c6e12b --- /dev/null +++ b/hash/test/deprecated_container_fwd.cpp @@ -0,0 +1,14 @@ + +// Copyright 2012 Daniel James. +// Distributed under 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 + +typedef std::vector > int_vector; + +#include + +int main() { + int_vector x; +} diff --git a/include/boost/functional/detail/container_fwd.hpp b/include/boost/functional/detail/container_fwd.hpp index 9a69d15..dd55571 100644 --- a/include/boost/functional/detail/container_fwd.hpp +++ b/include/boost/functional/detail/container_fwd.hpp @@ -1,11 +1,11 @@ -// Copyright 2005-2008 Daniel James. +// Copyright 2005-2012 Daniel James. // Distributed under 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) // Forwarding header for container_fwd.hpp's new location. -// This header is deprecated, I'll be adding a warning in a future release, -// then converting it to an error and finally removing this header completely. +// This header is deprecated, I'll change the warning to an error in a future +// release, and then later remove the header completely. #if !defined(BOOST_FUNCTIONAL_DETAIL_CONTAINER_FWD_HPP) #define BOOST_FUNCTIONAL_DETAIL_CONTAINER_FWD_HPP @@ -14,6 +14,14 @@ # pragma once #endif +#if defined(__EDG__) +#elif defined(_MSC_VER) || defined(__BORLANDC__) || defined(__DMC__) +#pragma message("Warning: boost/functional/detail/container_fwd.hpp is deprecated, use boost/detail/container_fwd.hpp instead."); +#elif defined(__GNUC__) || defined(__HP_aCC) || \ + defined(__SUNPRO_CC) || defined(__IBMCPP__) +#warning "boost/functional/detail/container_fwd.hpp is deprecated, use boost/detail/container_fwd.hpp instead." +#endif + #include #endif