1e76eebc6SAndrew Rist/************************************************************** 2cdf0e10cSrcweir * 3e76eebc6SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4e76eebc6SAndrew Rist * or more contributor license agreements. See the NOTICE file 5e76eebc6SAndrew Rist * distributed with this work for additional information 6e76eebc6SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7e76eebc6SAndrew Rist * to you under the Apache License, Version 2.0 (the 8e76eebc6SAndrew Rist * "License"); you may not use this file except in compliance 9e76eebc6SAndrew Rist * with the License. You may obtain a copy of the License at 10e76eebc6SAndrew Rist * 11e76eebc6SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12e76eebc6SAndrew Rist * 13e76eebc6SAndrew Rist * Unless required by applicable law or agreed to in writing, 14e76eebc6SAndrew Rist * software distributed under the License is distributed on an 15e76eebc6SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16e76eebc6SAndrew Rist * KIND, either express or implied. See the License for the 17e76eebc6SAndrew Rist * specific language governing permissions and limitations 18e76eebc6SAndrew Rist * under the License. 19e76eebc6SAndrew Rist * 20e76eebc6SAndrew Rist *************************************************************/ 21cdf0e10cSrcweir 22cdf0e10cSrcweir#ifndef SYSTEM_STL_VECTOR 23cdf0e10cSrcweir#define SYSTEM_STL_VECTOR 24cdf0e10cSrcweir 25*dee715a7SHerbert Dürr#ifdef HAVE_STL_INCLUDE_PATH 26*dee715a7SHerbert Dürr // TODO: use computed include file name 27*dee715a7SHerbert Dürr #include_next <vector> 28*dee715a7SHerbert Dürr#elif defined(_MSC_VER) 29*dee715a7SHerbert Dürr #include <../../VC/include/vector> 30*dee715a7SHerbert Dürr#else // fall back to boost/tr1 31*dee715a7SHerbert Dürr #include <boost/tr1/tr1/vector> 32cdf0e10cSrcweir#endif 33cdf0e10cSrcweir 34*dee715a7SHerbert Dürr 35*dee715a7SHerbert Dürr#ifndef NO_STLPORT4_EMULATION 36*dee715a7SHerbert Dürr 37cdf0e10cSrcweirnamespace std 38cdf0e10cSrcweir{ 39*dee715a7SHerbert Dürr typedef vector<bool> bit_vector; 40cdf0e10cSrcweir} 41cdf0e10cSrcweir 42*dee715a7SHerbert Dürr// workaround some STL implementations having problems with their vector<bool>::count() specialization 43*dee715a7SHerbert Dürrinline int std_bitset_count( std::bit_vector::const_iterator it, std::bit_vector::const_iterator itEnd, bool bValue) 44*dee715a7SHerbert Dürr{ 45*dee715a7SHerbert Dürr#if 0 && defined(_LIBCPP___BIT_REFERENCE) // TODO: reenable for libc++ >= r156543/r156546/etc. 46*dee715a7SHerbert Dürr int nCount = std::count( it, itEnd, bValue); 47cdf0e10cSrcweir#else 48*dee715a7SHerbert Dürr int nCount = 0; 49*dee715a7SHerbert Dürr for(; it != itEnd; ++it) 50*dee715a7SHerbert Dürr if( *it == bValue) 51*dee715a7SHerbert Dürr ++nCount; 52cdf0e10cSrcweir#endif 53*dee715a7SHerbert Dürr return nCount; 54*dee715a7SHerbert Dürr} 55*dee715a7SHerbert Dürr 56*dee715a7SHerbert Dürr#endif // NO_STLPORT4_EMULATION 57*dee715a7SHerbert Dürr 58cdf0e10cSrcweir#endif 59*dee715a7SHerbert Dürr 60