bind_placeholders.h

Go to the documentation of this file.
00001 /**
00002  *  Copyright (C) 2004-2005 Alo Sarv <madcat_@users.sourceforge.net>
00003  *
00004  *  This program is free software; you can redistribute it and/or modify
00005  *  it under the terms of the GNU General Public License as published by
00006  *  the Free Software Foundation; either version 2 of the License, or
00007  *  (at your option) any later version.
00008  *
00009  *  This program is distributed in the hope that it will be useful,
00010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  *  GNU General Public License for more details.
00013  *
00014  *  You should have received a copy of the GNU General Public License
00015  *  along with this program; if not, write to the Free Software
00016  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00017  */
00018 
00019 /** \file bind_placeholders.h Defines Boost.Bind placeholder variables */
00020 
00021 #ifndef __BIND_PLACEHOLDERS_H__
00022 #define __BIND_PLACEHOLDERS_H__
00023 
00024 /**
00025  * Somehow, boost/bind/placeholders.hpp causes multiply-defined symbols on
00026  * darwin. Replace that header with our own in-place symbols here on OSX.
00027  */
00028 //#if !defined(BOOST_BIND_PLACEHOLDERS_HPP_INCLUDED)
00029 //        #define BOOST_BIND_PLACEHOLDERS_HPP_INCLUDED
00030         #include <boost/bind/arg.hpp>
00031         #include <boost/config.hpp>
00032         namespace {
00033                 static boost::arg<1> _b1;
00034                 static boost::arg<2> _b2;
00035                 static boost::arg<3> _b3;
00036                 static boost::arg<4> _b4;
00037                 static boost::arg<5> _b5;
00038                 static boost::arg<6> _b6;
00039                 static boost::arg<7> _b7;
00040                 static boost::arg<8> _b8;
00041                 static boost::arg<9> _b9;
00042 
00043                 // This machinery is needed to suppress unused variable
00044                 // warnings resulting from the above static variables.
00045                 struct __use_boost_placeholder_symbols {
00046                         void __use_vars_func() {
00047                                 (void)_b1;
00048                                 (void)_b2;
00049                                 (void)_b3;
00050                                 (void)_b4;
00051                                 (void)_b5;
00052                                 (void)_b6;
00053                                 (void)_b7;
00054                                 (void)_b8;
00055                                 (void)_b9;
00056                         }
00057                 };
00058         }
00059 
00060 //      #include <boost/bind/placeholders.hpp>
00061 //#endif
00062 
00063 #endif