1169691Skan// TR1 functional -*- C++ -*- 2169691Skan 3169691Skan// Copyright (C) 2005 Free Software Foundation, Inc. 4169691Skan// Written by Douglas Gregor <doug.gregor -at- gmail.com> 5169691Skan// 6169691Skan// This file is part of the GNU ISO C++ Library. This library is free 7169691Skan// software; you can redistribute it and/or modify it under the 8169691Skan// terms of the GNU General Public License as published by the 9169691Skan// Free Software Foundation; either version 2, or (at your option) 10169691Skan// any later version. 11169691Skan 12169691Skan// This library is distributed in the hope that it will be useful, 13169691Skan// but WITHOUT ANY WARRANTY; without even the implied warranty of 14169691Skan// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15169691Skan// GNU General Public License for more details. 16169691Skan 17169691Skan// You should have received a copy of the GNU General Public License along 18169691Skan// with this library; see the file COPYING. If not, write to the Free 19169691Skan// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 20169691Skan// USA. 21169691Skan 22169691Skan// As a special exception, you may use this file as part of a free software 23169691Skan// library without restriction. Specifically, if other files instantiate 24169691Skan// templates or use macros or inline functions from this file, or you compile 25169691Skan// this file and link it with other files to produce an executable, this 26169691Skan// file does not by itself cause the resulting executable to be covered by 27169691Skan// the GNU General Public License. This exception does not however 28169691Skan// invalidate any other reasons why the executable file might be covered by 29169691Skan// the GNU General Public License. 30169691Skan 31169691Skan/** @file tr1/bind_iterate.h 32169691Skan * This is an internal header file, included by other library headers. 33169691Skan * You should not attempt to use it directly. 34169691Skan */ 35169691Skan 36169691Skan#if _GLIBCXX_BIND_NUM_ARGS > 0 37169691Skantemplate<_GLIBCXX_BIND_TEMPLATE_PARAMS> 38169691Skan#endif 39169691Skan#ifdef _GLIBCXX_BIND_HAS_RESULT_TYPE 40169691Skanresult_type 41169691Skan#else 42169691Skantypename result_of<_Functor(_GLIBCXX_BIND_V_TEMPLATE_ARGS())>::type 43169691Skan#endif 44169691Skanoperator()(_GLIBCXX_BIND_PARAMS) 45169691Skan{ return _M_f(_GLIBCXX_BIND_V_ARGS); } 46169691Skan 47169691Skan#if _GLIBCXX_BIND_NUM_ARGS > 0 48169691Skantemplate<_GLIBCXX_BIND_TEMPLATE_PARAMS> 49169691Skan#endif 50169691Skan#ifdef _GLIBCXX_BIND_HAS_RESULT_TYPE 51169691Skanresult_type 52169691Skan#else 53169691Skantypename result_of<const _Functor(_GLIBCXX_BIND_V_TEMPLATE_ARGS(const))>::type 54169691Skan#endif 55169691Skanoperator()(_GLIBCXX_BIND_PARAMS) const 56169691Skan{ return _M_f(_GLIBCXX_BIND_V_ARGS); } 57169691Skan 58169691Skan#if _GLIBCXX_BIND_NUM_ARGS > 0 59169691Skantemplate<_GLIBCXX_BIND_TEMPLATE_PARAMS> 60169691Skan#endif 61169691Skan#ifdef _GLIBCXX_BIND_HAS_RESULT_TYPE 62169691Skanresult_type 63169691Skan#else 64169691Skantypename result_of<volatile _Functor(_GLIBCXX_BIND_V_TEMPLATE_ARGS(volatile))>::type 65169691Skan#endif 66169691Skanoperator()(_GLIBCXX_BIND_PARAMS) volatile 67169691Skan{ return _M_f(_GLIBCXX_BIND_V_ARGS); } 68169691Skan 69169691Skan#if _GLIBCXX_BIND_NUM_ARGS > 0 70169691Skantemplate<_GLIBCXX_BIND_TEMPLATE_PARAMS> 71169691Skan#endif 72169691Skan#ifdef _GLIBCXX_BIND_HAS_RESULT_TYPE 73169691Skanresult_type 74169691Skan#else 75169691Skantypename result_of<const volatile _Functor(_GLIBCXX_BIND_V_TEMPLATE_ARGS(const volatile))>::type 76169691Skan#endif 77169691Skanoperator()(_GLIBCXX_BIND_PARAMS) const volatile 78169691Skan{ return _M_f(_GLIBCXX_BIND_V_ARGS); } 79