annotate DEPENDENCIES/generic/include/boost/regex/v4/protected_call.hpp @ 133:4acb5d8d80b6 tip

Don't fail environmental check if README.md exists (but .txt and no-suffix don't)
author Chris Cannam
date Tue, 30 Jul 2019 12:25:44 +0100
parents 2665513ce2d3
children
rev   line source
Chris@16 1 /*
Chris@16 2 *
Chris@16 3 * Copyright (c) 2004
Chris@16 4 * John Maddock
Chris@16 5 *
Chris@16 6 * Use, modification and distribution are subject to the
Chris@16 7 * Boost Software License, Version 1.0. (See accompanying file
Chris@16 8 * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
Chris@16 9 *
Chris@16 10 */
Chris@16 11
Chris@16 12 /*
Chris@16 13 * LOCATION: see http://www.boost.org for most recent version.
Chris@16 14 * FILE basic_regex_creator.cpp
Chris@16 15 * VERSION see <boost/version.hpp>
Chris@16 16 * DESCRIPTION: Declares template class basic_regex_creator which fills in
Chris@16 17 * the data members of a regex_data object.
Chris@16 18 */
Chris@16 19
Chris@16 20 #ifndef BOOST_REGEX_V4_PROTECTED_CALL_HPP
Chris@16 21 #define BOOST_REGEX_V4_PROTECTED_CALL_HPP
Chris@16 22
Chris@16 23 #ifdef BOOST_MSVC
Chris@16 24 #pragma warning(push)
Chris@16 25 #pragma warning(disable: 4103)
Chris@16 26 #endif
Chris@16 27 #ifdef BOOST_HAS_ABI_HEADERS
Chris@16 28 # include BOOST_ABI_PREFIX
Chris@16 29 #endif
Chris@16 30 #ifdef BOOST_MSVC
Chris@16 31 #pragma warning(pop)
Chris@16 32 #endif
Chris@16 33
Chris@16 34 namespace boost{
Chris@16 35 namespace re_detail{
Chris@16 36
Chris@16 37 class BOOST_REGEX_DECL abstract_protected_call
Chris@16 38 {
Chris@16 39 public:
Chris@16 40 bool BOOST_REGEX_CALL execute()const;
Chris@16 41 // this stops gcc-4 from complaining:
Chris@16 42 virtual ~abstract_protected_call(){}
Chris@16 43 private:
Chris@16 44 virtual bool call()const = 0;
Chris@16 45 };
Chris@16 46
Chris@16 47 template <class T>
Chris@16 48 class concrete_protected_call
Chris@16 49 : public abstract_protected_call
Chris@16 50 {
Chris@16 51 public:
Chris@16 52 typedef bool (T::*proc_type)();
Chris@16 53 concrete_protected_call(T* o, proc_type p)
Chris@16 54 : obj(o), proc(p) {}
Chris@16 55 private:
Chris@16 56 virtual bool call()const;
Chris@16 57 T* obj;
Chris@16 58 proc_type proc;
Chris@16 59 };
Chris@16 60
Chris@16 61 template <class T>
Chris@16 62 bool concrete_protected_call<T>::call()const
Chris@16 63 {
Chris@16 64 return (obj->*proc)();
Chris@16 65 }
Chris@16 66
Chris@16 67 }
Chris@16 68 } // namespace boost
Chris@16 69
Chris@16 70 #ifdef BOOST_MSVC
Chris@16 71 #pragma warning(push)
Chris@16 72 #pragma warning(disable: 4103)
Chris@16 73 #endif
Chris@16 74 #ifdef BOOST_HAS_ABI_HEADERS
Chris@16 75 # include BOOST_ABI_SUFFIX
Chris@16 76 #endif
Chris@16 77 #ifdef BOOST_MSVC
Chris@16 78 #pragma warning(pop)
Chris@16 79 #endif
Chris@16 80
Chris@16 81 #endif