1 2 // Copyright (C) 2009-2012 Lorenzo Caminiti 3 // Distributed under the Boost Software License, Version 1.0 4 // (see accompanying file LICENSE_1_0.txt or a copy at 5 // http://www.boost.org/LICENSE_1_0.txt) 6 // Home at http://www.boost.org/libs/local_function 7 8 #ifndef BOOST_LOCAL_FUNCTION_AUX_NOBIND_HPP_ 9 #define BOOST_LOCAL_FUNCTION_AUX_NOBIND_HPP_ 10 11 #include <boost/local_function/config.hpp> 12 13 // NOTE: The current implementation needs no-bind placeholders only when 14 // local types cannot be passed as template parameters. 15 #if !BOOST_LOCAL_FUNCTION_CONFIG_LOCALS_AS_TPARAMS 16 17 namespace boost { namespace local_function { namespace aux { 18 19 typedef int nobind_t; // Tag no-bind type. 20 21 static nobind_t nobind; // Global variable so all no-binds can reference it. 22 23 // NOTE: Used only to get rid of unused static variable `nobind` (this function 24 // is never actually called so it does not need to be defined). 25 void no_unused_nobind_warning_(nobind_t* ptr = &nobind); 26 27 } } } // namespace 28 29 #endif // locals as tparams 30 31 #endif // #include guard 32 33