Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r78533 - in trunk: boost/functional/detail libs/detail/test/container_fwd libs/functional/hash/test
From: dnljms_at_[hidden]
Date: 2012-05-21 17:58:19


Author: danieljames
Date: 2012-05-21 17:58:18 EDT (Mon, 21 May 2012)
New Revision: 78533
URL: http://svn.boost.org/trac/boost/changeset/78533

Log:
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.

Added:
   trunk/libs/functional/hash/test/deprecated_container_fwd.cpp (contents, props changed)
Text files modified:
   trunk/boost/functional/detail/container_fwd.hpp | 14 +++++++++++---
   trunk/libs/detail/test/container_fwd/container_fwd_test.cpp | 2 +-
   trunk/libs/functional/hash/test/Jamfile.v2 | 1 +
   3 files changed, 13 insertions(+), 4 deletions(-)

Modified: trunk/boost/functional/detail/container_fwd.hpp
==============================================================================
--- trunk/boost/functional/detail/container_fwd.hpp (original)
+++ trunk/boost/functional/detail/container_fwd.hpp 2012-05-21 17:58:18 EDT (Mon, 21 May 2012)
@@ -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 <boost/detail/container_fwd.hpp>
 
 #endif

Modified: trunk/libs/detail/test/container_fwd/container_fwd_test.cpp
==============================================================================
--- trunk/libs/detail/test/container_fwd/container_fwd_test.cpp (original)
+++ trunk/libs/detail/test/container_fwd/container_fwd_test.cpp 2012-05-21 17:58:18 EDT (Mon, 21 May 2012)
@@ -3,7 +3,7 @@
 // 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 <boost/functional/detail/container_fwd.hpp>
+#include <boost/detail/container_fwd.hpp>
 
 #if BOOST_WORKAROUND(__GNUC__, < 3) && \
     !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)

Modified: trunk/libs/functional/hash/test/Jamfile.v2
==============================================================================
--- trunk/libs/functional/hash/test/Jamfile.v2 (original)
+++ trunk/libs/functional/hash/test/Jamfile.v2 2012-05-21 17:58:18 EDT (Mon, 21 May 2012)
@@ -50,6 +50,7 @@
         [ 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

Added: trunk/libs/functional/hash/test/deprecated_container_fwd.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/functional/hash/test/deprecated_container_fwd.cpp 2012-05-21 17:58:18 EDT (Mon, 21 May 2012)
@@ -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 <boost/functional/detail/container_fwd.hpp>
+
+typedef std::vector<int, std::allocator<int> > int_vector;
+
+#include <vector>
+
+int main() {
+ int_vector x;
+}


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk