1// (C) Copyright John Maddock 2001. 2// Use, modification and distribution are subject to the 3// Boost Software License, Version 1.0. (See accompanying file 4// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 6// See http://www.boost.org/libs/config for most recent version. 7 8// MACRO: BOOST_HAS_SLIST 9// TITLE: <slist> 10// DESCRIPTION: The C++ implementation provides the (SGI) slist class. 11 12#if defined(__GLIBCXX__) || (defined(__GLIBCPP__) && __GLIBCPP__>=20020514) // GCC >= 3.1.0 13# define BOOST_STD_EXTENSION_NAMESPACE __gnu_cxx 14#include <ext/slist> 15#else 16#include <slist> 17#endif 18 19#ifndef BOOST_STD_EXTENSION_NAMESPACE 20#define BOOST_STD_EXTENSION_NAMESPACE std 21#endif 22 23namespace boost_has_slist{ 24 25template <class T, class Alloc> 26void foo(const BOOST_STD_EXTENSION_NAMESPACE::slist<T,Alloc>& ) 27{ 28} 29 30 31int test() 32{ 33 BOOST_STD_EXTENSION_NAMESPACE::slist<int> l; 34 foo(l); 35 return 0; 36} 37 38} 39 40 41 42 43 44 45