Sha256: bd44ca6d9c59da686feed7a8f9c444289cf2413969657825c183771fb9ef4c67

Contents?: true

Size: 1.29 KB

Versions: 14

Compression:

Stored size: 1.29 KB

Contents

/*
 *
 * Copyright (c) 2020
 * John Maddock
 *
 * Use, modification and distribution are subject to the 
 * Boost Software License, Version 1.0. (See accompanying file 
 * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 *
 */

 /*
  *   LOCATION:    see http://www.boost.org for most recent version.
  *   FILE         basic_regex_parser.cpp
  *   VERSION      see <boost/version.hpp>
  *   DESCRIPTION: Declares template class basic_regex_parser.
  */

#include <boost/regex/config.hpp>
#include <set>

#ifndef BOOST_REGEX_V4_INDEXED_BIT_FLAG_HPP
#define BOOST_REGEX_V4_INDEXED_BIT_FLAG_HPP

namespace boost{
namespace BOOST_REGEX_DETAIL_NS{

class indexed_bit_flag
{
   boost::uint64_t low_mask;
   std::set<std::size_t> mask_set;
public:
   indexed_bit_flag() : low_mask(0) {}
   void set(std::size_t i)
   {
      if (i < std::numeric_limits<boost::uint64_t>::digits - 1)
         low_mask |= static_cast<boost::uint64_t>(1u) << i;
      else
         mask_set.insert(i);
   }
   bool test(std::size_t i)
   {
      if (i < std::numeric_limits<boost::uint64_t>::digits - 1)
         return low_mask & static_cast<boost::uint64_t>(1u) << i ? true : false;
      else
         return mask_set.find(i) != mask_set.end();
   }
};

} // namespace BOOST_REGEX_DETAIL_NS
} // namespace boost


#endif

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
passenger-6.0.23 src/cxx_supportlib/vendor-modified/boost/regex/v4/indexed_bit_flag.hpp
passenger-6.0.20 src/cxx_supportlib/vendor-modified/boost/regex/v4/indexed_bit_flag.hpp
passenger-6.0.19 src/cxx_supportlib/vendor-modified/boost/regex/v4/indexed_bit_flag.hpp
passenger-6.0.18 src/cxx_supportlib/vendor-modified/boost/regex/v4/indexed_bit_flag.hpp
passenger-6.0.17 src/cxx_supportlib/vendor-modified/boost/regex/v4/indexed_bit_flag.hpp
passenger-6.0.16 src/cxx_supportlib/vendor-modified/boost/regex/v4/indexed_bit_flag.hpp
passenger-6.0.15 src/cxx_supportlib/vendor-modified/boost/regex/v4/indexed_bit_flag.hpp
passenger-6.0.14 src/cxx_supportlib/vendor-modified/boost/regex/v4/indexed_bit_flag.hpp
passenger-6.0.13 src/cxx_supportlib/vendor-modified/boost/regex/v4/indexed_bit_flag.hpp
passenger-6.0.12 src/cxx_supportlib/vendor-modified/boost/regex/v4/indexed_bit_flag.hpp
passenger-6.0.11 src/cxx_supportlib/vendor-modified/boost/regex/v4/indexed_bit_flag.hpp
passenger-6.0.10 src/cxx_supportlib/vendor-modified/boost/regex/v4/indexed_bit_flag.hpp
passenger-6.0.9 src/cxx_supportlib/vendor-modified/boost/regex/v4/indexed_bit_flag.hpp
passenger-6.0.8 src/cxx_supportlib/vendor-modified/boost/regex/v4/indexed_bit_flag.hpp