summaryrefslogtreecommitdiffstats
path: root/indexlib
diff options
context:
space:
mode:
Diffstat (limited to 'indexlib')
-rw-r--r--indexlib/bitio.h2
-rw-r--r--indexlib/bitio.tcc4
-rw-r--r--indexlib/boost-compat/checked_delete.h (renamed from indexlib/boost-compat/checked_delete.hpp)6
-rw-r--r--indexlib/boost-compat/config.h (renamed from indexlib/boost-compat/config.hpp)10
-rw-r--r--indexlib/boost-compat/config/abi/borland_prefix.h (renamed from indexlib/boost-compat/config/abi/borland_prefix.hpp)0
-rw-r--r--indexlib/boost-compat/config/abi/borland_suffix.h (renamed from indexlib/boost-compat/config/abi/borland_suffix.hpp)0
-rw-r--r--indexlib/boost-compat/config/abi/msvc_prefix.h (renamed from indexlib/boost-compat/config/abi/msvc_prefix.hpp)0
-rw-r--r--indexlib/boost-compat/config/abi/msvc_suffix.h (renamed from indexlib/boost-compat/config/abi/msvc_suffix.hpp)0
-rw-r--r--indexlib/boost-compat/config/abi_prefix.h (renamed from indexlib/boost-compat/config/abi_prefix.hpp)4
-rw-r--r--indexlib/boost-compat/config/abi_suffix.h (renamed from indexlib/boost-compat/config/abi_suffix.hpp)4
-rw-r--r--indexlib/boost-compat/config/auto_link.h (renamed from indexlib/boost-compat/config/auto_link.hpp)6
-rw-r--r--indexlib/boost-compat/config/compiler/borland.h (renamed from indexlib/boost-compat/config/compiler/borland.hpp)0
-rw-r--r--indexlib/boost-compat/config/compiler/comeau.h (renamed from indexlib/boost-compat/config/compiler/comeau.hpp)0
-rw-r--r--indexlib/boost-compat/config/compiler/common_edg.h (renamed from indexlib/boost-compat/config/compiler/common_edg.hpp)2
-rw-r--r--indexlib/boost-compat/config/compiler/compaq_cxx.h (renamed from indexlib/boost-compat/config/compiler/compaq_cxx.hpp)0
-rw-r--r--indexlib/boost-compat/config/compiler/digitalmars.h (renamed from indexlib/boost-compat/config/compiler/digitalmars.hpp)0
-rw-r--r--indexlib/boost-compat/config/compiler/gcc.h (renamed from indexlib/boost-compat/config/compiler/gcc.hpp)4
-rw-r--r--indexlib/boost-compat/config/compiler/greenhills.h (renamed from indexlib/boost-compat/config/compiler/greenhills.hpp)0
-rw-r--r--indexlib/boost-compat/config/compiler/hp_acc.h (renamed from indexlib/boost-compat/config/compiler/hp_acc.hpp)0
-rw-r--r--indexlib/boost-compat/config/compiler/intel.h (renamed from indexlib/boost-compat/config/compiler/intel.hpp)0
-rw-r--r--indexlib/boost-compat/config/compiler/kai.h (renamed from indexlib/boost-compat/config/compiler/kai.hpp)2
-rw-r--r--indexlib/boost-compat/config/compiler/metrowerks.h (renamed from indexlib/boost-compat/config/compiler/metrowerks.hpp)0
-rw-r--r--indexlib/boost-compat/config/compiler/mpw.h (renamed from indexlib/boost-compat/config/compiler/mpw.hpp)0
-rw-r--r--indexlib/boost-compat/config/compiler/sgi_mipspro.h (renamed from indexlib/boost-compat/config/compiler/sgi_mipspro.hpp)0
-rw-r--r--indexlib/boost-compat/config/compiler/sunpro_cc.h (renamed from indexlib/boost-compat/config/compiler/sunpro_cc.hpp)2
-rw-r--r--indexlib/boost-compat/config/compiler/vacpp.h (renamed from indexlib/boost-compat/config/compiler/vacpp.hpp)0
-rw-r--r--indexlib/boost-compat/config/compiler/visualc.h (renamed from indexlib/boost-compat/config/compiler/visualc.hpp)0
-rw-r--r--indexlib/boost-compat/config/platform/aix.h (renamed from indexlib/boost-compat/config/platform/aix.hpp)0
-rw-r--r--indexlib/boost-compat/config/platform/amigaos.h (renamed from indexlib/boost-compat/config/platform/amigaos.hpp)0
-rw-r--r--indexlib/boost-compat/config/platform/beos.h (renamed from indexlib/boost-compat/config/platform/beos.hpp)0
-rw-r--r--indexlib/boost-compat/config/platform/bsd.h (renamed from indexlib/boost-compat/config/platform/bsd.hpp)0
-rw-r--r--indexlib/boost-compat/config/platform/cygwin.h (renamed from indexlib/boost-compat/config/platform/cygwin.hpp)0
-rw-r--r--indexlib/boost-compat/config/platform/hpux.h (renamed from indexlib/boost-compat/config/platform/hpux.hpp)0
-rw-r--r--indexlib/boost-compat/config/platform/irix.h (renamed from indexlib/boost-compat/config/platform/irix.hpp)0
-rw-r--r--indexlib/boost-compat/config/platform/linux.h (renamed from indexlib/boost-compat/config/platform/linux.hpp)0
-rw-r--r--indexlib/boost-compat/config/platform/macos.h (renamed from indexlib/boost-compat/config/platform/macos.hpp)0
-rw-r--r--indexlib/boost-compat/config/platform/solaris.h (renamed from indexlib/boost-compat/config/platform/solaris.hpp)0
-rw-r--r--indexlib/boost-compat/config/platform/win32.h (renamed from indexlib/boost-compat/config/platform/win32.hpp)0
-rw-r--r--indexlib/boost-compat/config/posix_features.h (renamed from indexlib/boost-compat/config/posix_features.hpp)0
-rw-r--r--indexlib/boost-compat/config/requires_threads.h (renamed from indexlib/boost-compat/config/requires_threads.hpp)8
-rw-r--r--indexlib/boost-compat/config/select_compiler_config.h (renamed from indexlib/boost-compat/config/select_compiler_config.hpp)0
-rw-r--r--indexlib/boost-compat/config/select_platform_config.h (renamed from indexlib/boost-compat/config/select_platform_config.hpp)0
-rw-r--r--indexlib/boost-compat/config/select_stdlib_config.h (renamed from indexlib/boost-compat/config/select_stdlib_config.hpp)0
-rw-r--r--indexlib/boost-compat/config/stdlib/dinkumware.h (renamed from indexlib/boost-compat/config/stdlib/dinkumware.hpp)0
-rw-r--r--indexlib/boost-compat/config/stdlib/libcomo.h (renamed from indexlib/boost-compat/config/stdlib/libcomo.hpp)0
-rw-r--r--indexlib/boost-compat/config/stdlib/libstdcpp3.h (renamed from indexlib/boost-compat/config/stdlib/libstdcpp3.hpp)2
-rw-r--r--indexlib/boost-compat/config/stdlib/modena.h (renamed from indexlib/boost-compat/config/stdlib/modena.hpp)0
-rw-r--r--indexlib/boost-compat/config/stdlib/msl.h (renamed from indexlib/boost-compat/config/stdlib/msl.hpp)0
-rw-r--r--indexlib/boost-compat/config/stdlib/roguewave.h (renamed from indexlib/boost-compat/config/stdlib/roguewave.hpp)1
-rw-r--r--indexlib/boost-compat/config/stdlib/sgi.h (renamed from indexlib/boost-compat/config/stdlib/sgi.hpp)0
-rw-r--r--indexlib/boost-compat/config/stdlib/stlport.h (renamed from indexlib/boost-compat/config/stdlib/stlport.hpp)0
-rw-r--r--indexlib/boost-compat/config/stdlib/vacpp.h (renamed from indexlib/boost-compat/config/stdlib/vacpp.hpp)0
-rw-r--r--indexlib/boost-compat/config/suffix.h (renamed from indexlib/boost-compat/config/suffix.hpp)8
-rw-r--r--indexlib/boost-compat/config/user.h (renamed from indexlib/boost-compat/config/user.hpp)2
-rw-r--r--indexlib/boost-compat/intrusive_ptr.h (renamed from indexlib/boost-compat/intrusive_ptr.hpp)8
-rw-r--r--indexlib/boost-compat/next_prior.h (renamed from indexlib/boost-compat/next_prior.hpp)8
-rw-r--r--indexlib/boost-compat/noncopyable.h (renamed from indexlib/boost-compat/noncopyable.hpp)8
-rw-r--r--indexlib/boost-compat/remove_cv.h (renamed from indexlib/boost-compat/remove_cv.hpp)8
-rw-r--r--indexlib/boost-compat/scoped_ptr.h (renamed from indexlib/boost-compat/scoped_ptr.hpp)17
-rw-r--r--indexlib/boost-compat/shared_ptr.h (renamed from indexlib/boost-compat/shared_ptr.hpp)41
-rw-r--r--indexlib/boost-compat/smart_ptr.h (renamed from indexlib/boost-compat/smart_ptr.hpp)8
-rw-r--r--indexlib/boost-compat/static_assert.h11
-rw-r--r--indexlib/boost-compat/static_assert.hpp11
-rw-r--r--indexlib/boost-compat/weak_ptr.h (renamed from indexlib/boost-compat/weak_ptr.hpp)8
-rw-r--r--indexlib/compressed.cpp2
-rw-r--r--indexlib/configure.in.in2
-rw-r--r--indexlib/create.cpp22
-rw-r--r--indexlib/create.h4
-rw-r--r--indexlib/ifile.cpp14
-rw-r--r--indexlib/ifile.h8
-rw-r--r--indexlib/index.h4
-rw-r--r--indexlib/index_slow.h2
-rw-r--r--indexlib/leafdata.cpp2
-rw-r--r--indexlib/leafdatavector.cpp2
-rw-r--r--indexlib/main.cpp6
-rw-r--r--indexlib/mempool.h6
-rw-r--r--indexlib/mempool.tcc4
-rw-r--r--indexlib/memvector.h4
-rw-r--r--indexlib/pointer.h2
-rw-r--r--indexlib/quotes.cpp6
-rw-r--r--indexlib/quotes.h2
-rw-r--r--indexlib/result.h4
-rw-r--r--indexlib/stringarray.h2
-rw-r--r--indexlib/tests/create-test.cpp4
-rw-r--r--indexlib/tests/mempool-test.cpp4
-rw-r--r--indexlib/tests/tokenizer-test.cpp12
-rw-r--r--indexlib/tokenizer.cpp6
-rw-r--r--indexlib/tokenizer.h2
88 files changed, 146 insertions, 175 deletions
diff --git a/indexlib/bitio.h b/indexlib/bitio.h
index 913f44ea..1ecc0cb2 100644
--- a/indexlib/bitio.h
+++ b/indexlib/bitio.h
@@ -32,7 +32,7 @@
*/
#include <inttypes.h>
-#include "boost-compat/remove_cv.hpp"
+#include "boost-compat/remove_cv.h"
/**
* \namespace byte_io
diff --git a/indexlib/bitio.tcc b/indexlib/bitio.tcc
index f6dbdfc0..f1c14c77 100644
--- a/indexlib/bitio.tcc
+++ b/indexlib/bitio.tcc
@@ -1,5 +1,5 @@
-#include "boost-compat/static_assert.hpp"
-#include "boost-compat/remove_cv.hpp"
+#include "boost-compat/static_assert.h"
+#include "boost-compat/remove_cv.h"
#ifdef HAVE_BOOST
#include <boost/type_traits/is_same.hpp>
#endif
diff --git a/indexlib/boost-compat/checked_delete.hpp b/indexlib/boost-compat/checked_delete.h
index 9bb84e8e..db740fcb 100644
--- a/indexlib/boost-compat/checked_delete.hpp
+++ b/indexlib/boost-compat/checked_delete.h
@@ -1,5 +1,5 @@
-#ifndef BOOST_CHECKED_DELETE_HPP_INCLUDED
-#define BOOST_CHECKED_DELETE_HPP_INCLUDED
+#ifndef BOOST_CHECKED_DELETE_H_INCLUDED
+#define BOOST_CHECKED_DELETE_H_INCLUDED
// MS compatible compilers support #pragma once
@@ -66,4 +66,4 @@ template<class T> struct checked_array_deleter
} // namespace boost
-#endif // #ifndef BOOST_CHECKED_DELETE_HPP_INCLUDED
+#endif // #ifndef BOOST_CHECKED_DELETE_H_INCLUDED
diff --git a/indexlib/boost-compat/config.hpp b/indexlib/boost-compat/config.h
index 055a2785..86f12b81 100644
--- a/indexlib/boost-compat/config.hpp
+++ b/indexlib/boost-compat/config.h
@@ -1,4 +1,4 @@
-// Boost config.hpp configuration header file ------------------------------//
+// Boost config.h configuration header file ------------------------------//
// (C) Copyright John Maddock 2002.
// Use, modification and distribution are subject to the
@@ -7,15 +7,15 @@
// See http://www.boost.org/libs/config for most recent version.
-// Boost config.hpp policy and rationale documentation has been moved to
+// Boost config.h policy and rationale documentation has been moved to
// http://www.boost.org/libs/config
//
// CAUTION: This file is intended to be completely stable -
// DO NOT MODIFY THIS FILE!
//
-#ifndef BOOST_CONFIG_HPP
-#define BOOST_CONFIG_HPP
+#ifndef BOOST_CONFIG_H
+#define BOOST_CONFIG_H
// if we don't have a user config, then use the default location:
#if !defined(BOOST_USER_CONFIG) && !defined(BOOST_NO_USER_CONFIG)
@@ -56,7 +56,7 @@
// get config suffix code:
#include <boost/config/suffix.hpp>
-#endif // BOOST_CONFIG_HPP
+#endif // BOOST_CONFIG_H
diff --git a/indexlib/boost-compat/config/abi/borland_prefix.hpp b/indexlib/boost-compat/config/abi/borland_prefix.h
index 49f42494..49f42494 100644
--- a/indexlib/boost-compat/config/abi/borland_prefix.hpp
+++ b/indexlib/boost-compat/config/abi/borland_prefix.h
diff --git a/indexlib/boost-compat/config/abi/borland_suffix.hpp b/indexlib/boost-compat/config/abi/borland_suffix.h
index 940535f3..940535f3 100644
--- a/indexlib/boost-compat/config/abi/borland_suffix.hpp
+++ b/indexlib/boost-compat/config/abi/borland_suffix.h
diff --git a/indexlib/boost-compat/config/abi/msvc_prefix.hpp b/indexlib/boost-compat/config/abi/msvc_prefix.h
index 3d3905c2..3d3905c2 100644
--- a/indexlib/boost-compat/config/abi/msvc_prefix.hpp
+++ b/indexlib/boost-compat/config/abi/msvc_prefix.h
diff --git a/indexlib/boost-compat/config/abi/msvc_suffix.hpp b/indexlib/boost-compat/config/abi/msvc_suffix.h
index a64d783e..a64d783e 100644
--- a/indexlib/boost-compat/config/abi/msvc_suffix.hpp
+++ b/indexlib/boost-compat/config/abi/msvc_suffix.h
diff --git a/indexlib/boost-compat/config/abi_prefix.hpp b/indexlib/boost-compat/config/abi_prefix.h
index 1733dc03..d4ddd29b 100644
--- a/indexlib/boost-compat/config/abi_prefix.hpp
+++ b/indexlib/boost-compat/config/abi_prefix.h
@@ -6,8 +6,8 @@
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt).
-#ifndef BOOST_CONFIG_ABI_PREFIX_HPP
-# define BOOST_CONFIG_ABI_PREFIX_HPP
+#ifndef BOOST_CONFIG_ABI_PREFIX_H
+# define BOOST_CONFIG_ABI_PREFIX_H
#else
# error double inclusion of header boost/config/abi_prefix.hpp is an error
#endif
diff --git a/indexlib/boost-compat/config/abi_suffix.hpp b/indexlib/boost-compat/config/abi_suffix.h
index 6339da63..4876507e 100644
--- a/indexlib/boost-compat/config/abi_suffix.hpp
+++ b/indexlib/boost-compat/config/abi_suffix.h
@@ -9,10 +9,10 @@
// This header should be #included AFTER code that was preceded by a #include
// <boost/config/abi_prefix.hpp>.
-#ifndef BOOST_CONFIG_ABI_PREFIX_HPP
+#ifndef BOOST_CONFIG_ABI_PREFIX_H
# error Header boost/config/abi_prefix.hpp must only be used after boost/config/abi_prefix.hpp
#else
-# undef BOOST_CONFIG_ABI_PREFIX_HPP
+# undef BOOST_CONFIG_ABI_PREFIX_H
#endif
// the suffix header occurs after all of our code:
diff --git a/indexlib/boost-compat/config/auto_link.hpp b/indexlib/boost-compat/config/auto_link.h
index b4e580ff..c6d9bc90 100644
--- a/indexlib/boost-compat/config/auto_link.hpp
+++ b/indexlib/boost-compat/config/auto_link.h
@@ -5,7 +5,7 @@
/*
* LOCATION: see http://www.boost.org for most recent version.
- * FILE auto_link.hpp
+ * FILE auto_link.h
* VERSION see <boost/version.hpp>
* DESCRIPTION: Automatic library inclusion for Borland/Microsoft compilers.
*/
@@ -67,7 +67,7 @@ BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y.
***************************************************************************/
#ifdef __cplusplus
-# ifndef BOOST_CONFIG_HPP
+# ifndef BOOST_CONFIG_H
# include <boost/config.hpp>
# endif
#elif defined(_MSC_VER) && !defined(__MWERKS__) && !defined(__EDG_VERSION__)
@@ -86,7 +86,7 @@ BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y.
|| (defined(__MWERKS__) && defined(_WIN32) && (__MWERKS__ >= 0x3000)) \
|| (defined(__ICL) && defined(_MSC_EXTENSIONS) && (_MSC_VER >= 1200))
-#ifndef BOOST_VERSION_HPP
+#ifndef BOOST_VERSION_H
# include <boost/version.hpp>
#endif
diff --git a/indexlib/boost-compat/config/compiler/borland.hpp b/indexlib/boost-compat/config/compiler/borland.h
index 531691ef..531691ef 100644
--- a/indexlib/boost-compat/config/compiler/borland.hpp
+++ b/indexlib/boost-compat/config/compiler/borland.h
diff --git a/indexlib/boost-compat/config/compiler/comeau.hpp b/indexlib/boost-compat/config/compiler/comeau.h
index 16a1b93c..16a1b93c 100644
--- a/indexlib/boost-compat/config/compiler/comeau.hpp
+++ b/indexlib/boost-compat/config/compiler/comeau.h
diff --git a/indexlib/boost-compat/config/compiler/common_edg.hpp b/indexlib/boost-compat/config/compiler/common_edg.h
index c7c0b56e..28b164a8 100644
--- a/indexlib/boost-compat/config/compiler/common_edg.hpp
+++ b/indexlib/boost-compat/config/compiler/common_edg.h
@@ -34,7 +34,7 @@
# define BOOST_NO_TEMPLATE_TEMPLATES
#endif
-// See also kai.hpp which checks a Kai-specific symbol for EH
+// See also kai.h which checks a Kai-specific symbol for EH
# if !defined(__KCC) && !defined(__EXCEPTIONS)
# define BOOST_NO_EXCEPTIONS
# endif
diff --git a/indexlib/boost-compat/config/compiler/compaq_cxx.hpp b/indexlib/boost-compat/config/compiler/compaq_cxx.h
index 3c0c6b7f..3c0c6b7f 100644
--- a/indexlib/boost-compat/config/compiler/compaq_cxx.hpp
+++ b/indexlib/boost-compat/config/compiler/compaq_cxx.h
diff --git a/indexlib/boost-compat/config/compiler/digitalmars.hpp b/indexlib/boost-compat/config/compiler/digitalmars.h
index 32fc71fa..32fc71fa 100644
--- a/indexlib/boost-compat/config/compiler/digitalmars.hpp
+++ b/indexlib/boost-compat/config/compiler/digitalmars.h
diff --git a/indexlib/boost-compat/config/compiler/gcc.hpp b/indexlib/boost-compat/config/compiler/gcc.h
index 4dc3f608..4be7f408 100644
--- a/indexlib/boost-compat/config/compiler/gcc.hpp
+++ b/indexlib/boost-compat/config/compiler/gcc.h
@@ -13,10 +13,6 @@
// GNU C++ compiler setup:
-# if __GNUC__ == 2 && __GNUC_MINOR__ == 91
- // egcs 1.1 won't parse shared_ptr.hpp without this:
-# define BOOST_NO_AUTO_PTR
-# endif
# if __GNUC__ == 2 && __GNUC_MINOR__ < 95
//
// Prior to gcc 2.95 member templates only partly
diff --git a/indexlib/boost-compat/config/compiler/greenhills.hpp b/indexlib/boost-compat/config/compiler/greenhills.h
index 038b6b2b..038b6b2b 100644
--- a/indexlib/boost-compat/config/compiler/greenhills.hpp
+++ b/indexlib/boost-compat/config/compiler/greenhills.h
diff --git a/indexlib/boost-compat/config/compiler/hp_acc.hpp b/indexlib/boost-compat/config/compiler/hp_acc.h
index b5c587ab..b5c587ab 100644
--- a/indexlib/boost-compat/config/compiler/hp_acc.hpp
+++ b/indexlib/boost-compat/config/compiler/hp_acc.h
diff --git a/indexlib/boost-compat/config/compiler/intel.hpp b/indexlib/boost-compat/config/compiler/intel.h
index 060338bc..060338bc 100644
--- a/indexlib/boost-compat/config/compiler/intel.hpp
+++ b/indexlib/boost-compat/config/compiler/intel.h
diff --git a/indexlib/boost-compat/config/compiler/kai.hpp b/indexlib/boost-compat/config/compiler/kai.h
index de16f1a6..fefda9ce 100644
--- a/indexlib/boost-compat/config/compiler/kai.hpp
+++ b/indexlib/boost-compat/config/compiler/kai.h
@@ -16,7 +16,7 @@
# define BOOST_NO_STDC_NAMESPACE
# endif
-// see also common_edg.hpp which needs a special check for __KCC
+// see also common_edg.h which needs a special check for __KCC
# if !defined(_EXCEPTIONS)
# define BOOST_NO_EXCEPTIONS
# endif
diff --git a/indexlib/boost-compat/config/compiler/metrowerks.hpp b/indexlib/boost-compat/config/compiler/metrowerks.h
index a74cadef..a74cadef 100644
--- a/indexlib/boost-compat/config/compiler/metrowerks.hpp
+++ b/indexlib/boost-compat/config/compiler/metrowerks.h
diff --git a/indexlib/boost-compat/config/compiler/mpw.hpp b/indexlib/boost-compat/config/compiler/mpw.h
index 8ab2aacb..8ab2aacb 100644
--- a/indexlib/boost-compat/config/compiler/mpw.hpp
+++ b/indexlib/boost-compat/config/compiler/mpw.h
diff --git a/indexlib/boost-compat/config/compiler/sgi_mipspro.hpp b/indexlib/boost-compat/config/compiler/sgi_mipspro.h
index 689b67ee..689b67ee 100644
--- a/indexlib/boost-compat/config/compiler/sgi_mipspro.hpp
+++ b/indexlib/boost-compat/config/compiler/sgi_mipspro.h
diff --git a/indexlib/boost-compat/config/compiler/sunpro_cc.hpp b/indexlib/boost-compat/config/compiler/sunpro_cc.h
index 8a61199f..80dc3913 100644
--- a/indexlib/boost-compat/config/compiler/sunpro_cc.hpp
+++ b/indexlib/boost-compat/config/compiler/sunpro_cc.h
@@ -38,7 +38,7 @@
// Requesting debug info (-g) with Boost.Python results
// in an internal compiler error for "static const"
// initialized in-class.
- // >> Assertion: (../links/dbg_cstabs.cc, line 611)
+ // >> Assertion: (../links/dbg_cstabs.cpp, line 611)
// while processing ../test.cpp at line 0.
// (Jens Maurer according to Gottfried Ganßauge 04 Mar 2002)
# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION
diff --git a/indexlib/boost-compat/config/compiler/vacpp.hpp b/indexlib/boost-compat/config/compiler/vacpp.h
index 4cf0de7c..4cf0de7c 100644
--- a/indexlib/boost-compat/config/compiler/vacpp.hpp
+++ b/indexlib/boost-compat/config/compiler/vacpp.h
diff --git a/indexlib/boost-compat/config/compiler/visualc.hpp b/indexlib/boost-compat/config/compiler/visualc.h
index 32353260..32353260 100644
--- a/indexlib/boost-compat/config/compiler/visualc.hpp
+++ b/indexlib/boost-compat/config/compiler/visualc.h
diff --git a/indexlib/boost-compat/config/platform/aix.hpp b/indexlib/boost-compat/config/platform/aix.h
index 894ef42c..894ef42c 100644
--- a/indexlib/boost-compat/config/platform/aix.hpp
+++ b/indexlib/boost-compat/config/platform/aix.h
diff --git a/indexlib/boost-compat/config/platform/amigaos.hpp b/indexlib/boost-compat/config/platform/amigaos.h
index 34bcf412..34bcf412 100644
--- a/indexlib/boost-compat/config/platform/amigaos.hpp
+++ b/indexlib/boost-compat/config/platform/amigaos.h
diff --git a/indexlib/boost-compat/config/platform/beos.hpp b/indexlib/boost-compat/config/platform/beos.h
index 48c3d8dc..48c3d8dc 100644
--- a/indexlib/boost-compat/config/platform/beos.hpp
+++ b/indexlib/boost-compat/config/platform/beos.h
diff --git a/indexlib/boost-compat/config/platform/bsd.hpp b/indexlib/boost-compat/config/platform/bsd.h
index 4f04ed2a..4f04ed2a 100644
--- a/indexlib/boost-compat/config/platform/bsd.hpp
+++ b/indexlib/boost-compat/config/platform/bsd.h
diff --git a/indexlib/boost-compat/config/platform/cygwin.hpp b/indexlib/boost-compat/config/platform/cygwin.h
index 0fd2ebe2..0fd2ebe2 100644
--- a/indexlib/boost-compat/config/platform/cygwin.hpp
+++ b/indexlib/boost-compat/config/platform/cygwin.h
diff --git a/indexlib/boost-compat/config/platform/hpux.hpp b/indexlib/boost-compat/config/platform/hpux.h
index 21049059..21049059 100644
--- a/indexlib/boost-compat/config/platform/hpux.hpp
+++ b/indexlib/boost-compat/config/platform/hpux.h
diff --git a/indexlib/boost-compat/config/platform/irix.hpp b/indexlib/boost-compat/config/platform/irix.h
index aeae49c8..aeae49c8 100644
--- a/indexlib/boost-compat/config/platform/irix.hpp
+++ b/indexlib/boost-compat/config/platform/irix.h
diff --git a/indexlib/boost-compat/config/platform/linux.hpp b/indexlib/boost-compat/config/platform/linux.h
index 51ae1334..51ae1334 100644
--- a/indexlib/boost-compat/config/platform/linux.hpp
+++ b/indexlib/boost-compat/config/platform/linux.h
diff --git a/indexlib/boost-compat/config/platform/macos.hpp b/indexlib/boost-compat/config/platform/macos.h
index 3a5f4130..3a5f4130 100644
--- a/indexlib/boost-compat/config/platform/macos.hpp
+++ b/indexlib/boost-compat/config/platform/macos.h
diff --git a/indexlib/boost-compat/config/platform/solaris.hpp b/indexlib/boost-compat/config/platform/solaris.h
index 700dc3ce..700dc3ce 100644
--- a/indexlib/boost-compat/config/platform/solaris.hpp
+++ b/indexlib/boost-compat/config/platform/solaris.h
diff --git a/indexlib/boost-compat/config/platform/win32.hpp b/indexlib/boost-compat/config/platform/win32.h
index 548bff28..548bff28 100644
--- a/indexlib/boost-compat/config/platform/win32.hpp
+++ b/indexlib/boost-compat/config/platform/win32.h
diff --git a/indexlib/boost-compat/config/posix_features.hpp b/indexlib/boost-compat/config/posix_features.h
index 4afb476b..4afb476b 100644
--- a/indexlib/boost-compat/config/posix_features.hpp
+++ b/indexlib/boost-compat/config/posix_features.h
diff --git a/indexlib/boost-compat/config/requires_threads.hpp b/indexlib/boost-compat/config/requires_threads.h
index cfaff230..03259ae9 100644
--- a/indexlib/boost-compat/config/requires_threads.hpp
+++ b/indexlib/boost-compat/config/requires_threads.h
@@ -4,10 +4,10 @@
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-#ifndef BOOST_CONFIG_REQUIRES_THREADS_HPP
-#define BOOST_CONFIG_REQUIRES_THREADS_HPP
+#ifndef BOOST_CONFIG_REQUIRES_THREADS_H
+#define BOOST_CONFIG_REQUIRES_THREADS_H
-#ifndef BOOST_CONFIG_HPP
+#ifndef BOOST_CONFIG_H
# include <boost/config.hpp>
#endif
@@ -89,4 +89,4 @@
#endif // BOOST_HAS_THREADS
-#endif // BOOST_CONFIG_REQUIRES_THREADS_HPP
+#endif // BOOST_CONFIG_REQUIRES_THREADS_H
diff --git a/indexlib/boost-compat/config/select_compiler_config.hpp b/indexlib/boost-compat/config/select_compiler_config.h
index 3453f1a3..3453f1a3 100644
--- a/indexlib/boost-compat/config/select_compiler_config.hpp
+++ b/indexlib/boost-compat/config/select_compiler_config.h
diff --git a/indexlib/boost-compat/config/select_platform_config.hpp b/indexlib/boost-compat/config/select_platform_config.h
index 5699b2a2..5699b2a2 100644
--- a/indexlib/boost-compat/config/select_platform_config.hpp
+++ b/indexlib/boost-compat/config/select_platform_config.h
diff --git a/indexlib/boost-compat/config/select_stdlib_config.hpp b/indexlib/boost-compat/config/select_stdlib_config.h
index b7bf5914..b7bf5914 100644
--- a/indexlib/boost-compat/config/select_stdlib_config.hpp
+++ b/indexlib/boost-compat/config/select_stdlib_config.h
diff --git a/indexlib/boost-compat/config/stdlib/dinkumware.hpp b/indexlib/boost-compat/config/stdlib/dinkumware.h
index aa214fc1..aa214fc1 100644
--- a/indexlib/boost-compat/config/stdlib/dinkumware.hpp
+++ b/indexlib/boost-compat/config/stdlib/dinkumware.h
diff --git a/indexlib/boost-compat/config/stdlib/libcomo.hpp b/indexlib/boost-compat/config/stdlib/libcomo.h
index b2c8e440..b2c8e440 100644
--- a/indexlib/boost-compat/config/stdlib/libcomo.hpp
+++ b/indexlib/boost-compat/config/stdlib/libcomo.h
diff --git a/indexlib/boost-compat/config/stdlib/libstdcpp3.hpp b/indexlib/boost-compat/config/stdlib/libstdcpp3.h
index 9774e876..99e711ce 100644
--- a/indexlib/boost-compat/config/stdlib/libstdcpp3.hpp
+++ b/indexlib/boost-compat/config/stdlib/libstdcpp3.h
@@ -45,7 +45,7 @@
#if !defined(_GLIBCPP_USE_LONG_LONG) \
&& !defined(_GLIBCXX_USE_LONG_LONG)\
&& defined(BOOST_HAS_LONG_LONG)
-// May have been set by compiler/*.hpp, but "long long" without library
+// May have been set by compiler/*.h, but "long long" without library
// support is useless.
# undef BOOST_HAS_LONG_LONG
#endif
diff --git a/indexlib/boost-compat/config/stdlib/modena.hpp b/indexlib/boost-compat/config/stdlib/modena.h
index 61e31b7d..61e31b7d 100644
--- a/indexlib/boost-compat/config/stdlib/modena.hpp
+++ b/indexlib/boost-compat/config/stdlib/modena.h
diff --git a/indexlib/boost-compat/config/stdlib/msl.hpp b/indexlib/boost-compat/config/stdlib/msl.h
index f8ad3d9a..f8ad3d9a 100644
--- a/indexlib/boost-compat/config/stdlib/msl.hpp
+++ b/indexlib/boost-compat/config/stdlib/msl.h
diff --git a/indexlib/boost-compat/config/stdlib/roguewave.hpp b/indexlib/boost-compat/config/stdlib/roguewave.h
index ec3d881b..452b8421 100644
--- a/indexlib/boost-compat/config/stdlib/roguewave.hpp
+++ b/indexlib/boost-compat/config/stdlib/roguewave.h
@@ -73,7 +73,6 @@
// new-style iostreams, and no conformant std::allocator:
//
#if (BOOST_RWSTD_VER < 0x020000)
-# define BOOST_NO_AUTO_PTR
# define BOOST_NO_STRINGSTREAM
# define BOOST_NO_STD_ALLOCATOR
# define BOOST_NO_STD_LOCALE
diff --git a/indexlib/boost-compat/config/stdlib/sgi.hpp b/indexlib/boost-compat/config/stdlib/sgi.h
index 67f7a0a4..67f7a0a4 100644
--- a/indexlib/boost-compat/config/stdlib/sgi.hpp
+++ b/indexlib/boost-compat/config/stdlib/sgi.h
diff --git a/indexlib/boost-compat/config/stdlib/stlport.hpp b/indexlib/boost-compat/config/stdlib/stlport.h
index 4843ea59..4843ea59 100644
--- a/indexlib/boost-compat/config/stdlib/stlport.hpp
+++ b/indexlib/boost-compat/config/stdlib/stlport.h
diff --git a/indexlib/boost-compat/config/stdlib/vacpp.hpp b/indexlib/boost-compat/config/stdlib/vacpp.h
index 8321ee0c..8321ee0c 100644
--- a/indexlib/boost-compat/config/stdlib/vacpp.hpp
+++ b/indexlib/boost-compat/config/stdlib/vacpp.h
diff --git a/indexlib/boost-compat/config/suffix.hpp b/indexlib/boost-compat/config/suffix.h
index 77d9deca..313faea9 100644
--- a/indexlib/boost-compat/config/suffix.hpp
+++ b/indexlib/boost-compat/config/suffix.h
@@ -1,4 +1,4 @@
-// Boost config.hpp configuration header file ------------------------------//
+// Boost config.h configuration header file ------------------------------//
// (C) Copyright John Maddock 2001 - 2003.
// (C) Copyright Darin Adler 2001.
@@ -14,15 +14,15 @@
// See http://www.boost.org for most recent version.
-// Boost config.hpp policy and rationale documentation has been moved to
+// Boost config.h policy and rationale documentation has been moved to
// http://www.boost.org/libs/config
//
// This file is intended to be stable, and relatively unchanging.
// It should contain boilerplate code only - no compiler specific
// code unless it is unavoidable - no changes unless unavoidable.
-#ifndef BOOST_CONFIG_SUFFIX_HPP
-#define BOOST_CONFIG_SUFFIX_HPP
+#ifndef BOOST_CONFIG_SUFFIX_H
+#define BOOST_CONFIG_SUFFIX_H
//
// look for long long by looking for the appropriate macros in <limits.h>.
diff --git a/indexlib/boost-compat/config/user.hpp b/indexlib/boost-compat/config/user.h
index 5a4a9d47..14b02c67 100644
--- a/indexlib/boost-compat/config/user.hpp
+++ b/indexlib/boost-compat/config/user.h
@@ -1,4 +1,4 @@
-// boost/config/user.hpp ---------------------------------------------------//
+// boost/config/user.h ---------------------------------------------------//
// (C) Copyright John Maddock 2001.
// Use, modification and distribution are subject to the
diff --git a/indexlib/boost-compat/intrusive_ptr.hpp b/indexlib/boost-compat/intrusive_ptr.h
index 7efbadee..39b4b7b2 100644
--- a/indexlib/boost-compat/intrusive_ptr.hpp
+++ b/indexlib/boost-compat/intrusive_ptr.h
@@ -1,8 +1,8 @@
-#ifndef BOOST_INTRUSIVE_PTR_HPP_INCLUDED
-#define BOOST_INTRUSIVE_PTR_HPP_INCLUDED
+#ifndef BOOST_INTRUSIVE_PTR_H_INCLUDED
+#define BOOST_INTRUSIVE_PTR_H_INCLUDED
//
-// intrusive_ptr.hpp
+// intrusive_ptr.h
//
// Copyright (c) 2001, 2002 Peter Dimov
//
@@ -269,4 +269,4 @@ template<class E, class T, class Y> std::basic_ostream<E, T> & operator<< (std::
# pragma warning(pop)
#endif
-#endif // #ifndef BOOST_INTRUSIVE_PTR_HPP_INCLUDED
+#endif // #ifndef BOOST_INTRUSIVE_PTR_H_INCLUDED
diff --git a/indexlib/boost-compat/next_prior.hpp b/indexlib/boost-compat/next_prior.h
index e1d2e428..cdacf29c 100644
--- a/indexlib/boost-compat/next_prior.hpp
+++ b/indexlib/boost-compat/next_prior.h
@@ -1,4 +1,4 @@
-// Boost next_prior.hpp header file ---------------------------------------//
+// Boost next_prior.h header file ---------------------------------------//
// (C) Copyright Dave Abrahams and Daniel Walker 1999-2003. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
@@ -9,8 +9,8 @@
// Revision History
// 13 Dec 2003 Added next(x, n) and prior(x, n) (Daniel Walker)
-#ifndef BOOST_NEXT_PRIOR_HPP_INCLUDED
-#define BOOST_NEXT_PRIOR_HPP_INCLUDED
+#ifndef BOOST_NEXT_PRIOR_H_INCLUDED
+#define BOOST_NEXT_PRIOR_H_INCLUDED
#include <iterator>
@@ -48,4 +48,4 @@ inline T prior(T x, Distance n)
} // namespace boost
-#endif // BOOST_NEXT_PRIOR_HPP_INCLUDED
+#endif // BOOST_NEXT_PRIOR_H_INCLUDED
diff --git a/indexlib/boost-compat/noncopyable.hpp b/indexlib/boost-compat/noncopyable.h
index 7770bdbd..0d94ea6a 100644
--- a/indexlib/boost-compat/noncopyable.hpp
+++ b/indexlib/boost-compat/noncopyable.h
@@ -1,4 +1,4 @@
-// Boost noncopyable.hpp header file --------------------------------------//
+// Boost noncopyable.h header file --------------------------------------//
// (C) Copyright Beman Dawes 1999-2003. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
@@ -6,8 +6,8 @@
// See http://www.boost.org/libs/utility for documentation.
-#ifndef BOOST_NONCOPYABLE_HPP_INCLUDED
-#define BOOST_NONCOPYABLE_HPP_INCLUDED
+#ifndef BOOST_NONCOPYABLE_H_INCLUDED
+#define BOOST_NONCOPYABLE_H_INCLUDED
namespace boost {
@@ -33,4 +33,4 @@ typedef noncopyable_::noncopyable noncopyable;
} // namespace boost
-#endif // BOOST_NONCOPYABLE_HPP_INCLUDED
+#endif // BOOST_NONCOPYABLE_H_INCLUDED
diff --git a/indexlib/boost-compat/remove_cv.hpp b/indexlib/boost-compat/remove_cv.h
index ec7c1a95..c59970a8 100644
--- a/indexlib/boost-compat/remove_cv.hpp
+++ b/indexlib/boost-compat/remove_cv.h
@@ -1,7 +1,7 @@
-#ifndef BOOST_TT_REMOVE_CV_HPP_INCLUDED
-#define BOOST_TT_REMOVE_CV_HPP_INCLUDED
-#ifndef BOOST_TT_DETAIL_CV_TRAITS_IMPL_HPP_INCLUDED
-#define BOOST_TT_DETAIL_CV_TRAITS_IMPL_HPP_INCLUDED
+#ifndef BOOST_TT_REMOVE_CV_H_INCLUDED
+#define BOOST_TT_REMOVE_CV_H_INCLUDED
+#ifndef BOOST_TT_DETAIL_CV_TRAITS_IMPL_H_INCLUDED
+#define BOOST_TT_DETAIL_CV_TRAITS_IMPL_H_INCLUDED
// ADAPTED (TAKEN) FROM BOOST
//
// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard
diff --git a/indexlib/boost-compat/scoped_ptr.hpp b/indexlib/boost-compat/scoped_ptr.h
index 1260066a..41d4f9b8 100644
--- a/indexlib/boost-compat/scoped_ptr.hpp
+++ b/indexlib/boost-compat/scoped_ptr.h
@@ -1,5 +1,5 @@
-#ifndef BOOST_SCOPED_PTR_HPP_INCLUDED
-#define BOOST_SCOPED_PTR_HPP_INCLUDED
+#ifndef BOOST_SCOPED_PTR_H_INCLUDED
+#define BOOST_SCOPED_PTR_H_INCLUDED
// ADAPTED FOR indexlib
@@ -13,9 +13,9 @@
// http://www.boost.org/libs/smart_ptr/scoped_ptr.htm
//
-#include "checked_delete.hpp"
+#include "checked_delete.h"
-#include <memory> // for std::auto_ptr
+#include <memory>
#include <assert.h>
namespace boost
@@ -25,7 +25,7 @@ namespace boost
// scoped_ptr mimics a built-in pointer except that it guarantees deletion
// of the object pointed to, either on destruction of the scoped_ptr or via
// an explicit reset(). scoped_ptr is a simple solution for simple needs;
-// use shared_ptr or std::auto_ptr if your needs are more complex.
+// use shared_ptr or std::unique_ptr if your needs are more complex.
template<class T> class scoped_ptr // noncopyable
{
@@ -46,11 +46,6 @@ public:
{
}
-
- explicit scoped_ptr(std::auto_ptr<T> p): ptr(p.release()) // never throws
- {
- }
-
~scoped_ptr() // never throws
{
boost::checked_delete(ptr);
@@ -115,4 +110,4 @@ template<class T> inline T * get_pointer(scoped_ptr<T> const & p)
} // namespace boost
-#endif // #ifndef BOOST_SCOPED_PTR_HPP_INCLUDED
+#endif // #ifndef BOOST_SCOPED_PTR_H_INCLUDED
diff --git a/indexlib/boost-compat/shared_ptr.hpp b/indexlib/boost-compat/shared_ptr.h
index 0a3bf6d8..a242c829 100644
--- a/indexlib/boost-compat/shared_ptr.hpp
+++ b/indexlib/boost-compat/shared_ptr.h
@@ -1,8 +1,8 @@
-#ifndef BOOST_SHARED_PTR_HPP_INCLUDED
-#define BOOST_SHARED_PTR_HPP_INCLUDED
+#ifndef BOOST_SHARED_PTR_H_INCLUDED
+#define BOOST_SHARED_PTR_H_INCLUDED
//
-// shared_ptr.hpp
+// shared_ptr.h
//
// (C) Copyright Greg Colvin and Beman Dawes 1998, 1999.
// Copyright (c) 2001, 2002, 2003 Peter Dimov
@@ -26,11 +26,11 @@
#include <boost/detail/shared_count.hpp>
#include <boost/detail/workaround.hpp>
-#include <memory> // for std::auto_ptr
-#include <algorithm> // for std::swap
-#include <functional> // for std::less
-#include <typeinfo> // for std::bad_cast
-#include <iosfwd> // for std::basic_ostream
+#include <memory>
+#include <algorithm>
+#include <functional>
+#include <typeinfo>
+#include <iosfwd>
#ifdef BOOST_MSVC // moved here to work around VC++ compiler crash
# pragma warning(push)
@@ -191,18 +191,6 @@ public:
}
}
-#ifndef BOOST_NO_AUTO_PTR
-
- template<class Y>
- explicit shared_ptr(std::auto_ptr<Y> & r): px(r.get()), pn()
- {
- Y * tmp = r.get();
- pn = detail::shared_count(r);
- detail::sp_enable_shared_from_this( pn, tmp, tmp );
- }
-
-#endif
-
#if !defined(BOOST_MSVC) || (BOOST_MSVC > 1200)
template<class Y>
@@ -215,17 +203,6 @@ public:
#endif
-#ifndef BOOST_NO_AUTO_PTR
-
- template<class Y>
- shared_ptr & operator=(std::auto_ptr<Y> & r)
- {
- this_type(r).swap(*this);
- return *this;
- }
-
-#endif
-
void reset() // never throws in 1.30+
{
this_type().swap(*this);
@@ -470,4 +447,4 @@ template<class D, class T> D * get_deleter(shared_ptr<T> const & p)
#endif // #if defined(BOOST_NO_MEMBER_TEMPLATES) && !defined(BOOST_MSVC6_MEMBER_TEMPLATES)
-#endif // #ifndef BOOST_SHARED_PTR_HPP_INCLUDED
+#endif // #ifndef BOOST_SHARED_PTR_H_INCLUDED
diff --git a/indexlib/boost-compat/smart_ptr.hpp b/indexlib/boost-compat/smart_ptr.h
index c10de457..578a48e4 100644
--- a/indexlib/boost-compat/smart_ptr.hpp
+++ b/indexlib/boost-compat/smart_ptr.h
@@ -1,8 +1,8 @@
-#ifndef LPC_SMART_PTR_HPP1119293317_INCLUDE_GUARD_
-#define LPC_SMART_PTR_HPP1119293317_INCLUDE_GUARD_
+#ifndef LPC_SMART_PTR_H1119293317_INCLUDE_GUARD_
+#define LPC_SMART_PTR_H1119293317_INCLUDE_GUARD_
//
-// smart_ptr.hpp
+// smart_ptr.h
//
// For convenience, this header includes the rest of the smart
// pointer library headers.
@@ -28,4 +28,4 @@
#endif
-#endif /* LPC_SMART_PTR_HPP1119293317_INCLUDE_GUARD_ */
+#endif /* LPC_SMART_PTR_H1119293317_INCLUDE_GUARD_ */
diff --git a/indexlib/boost-compat/static_assert.h b/indexlib/boost-compat/static_assert.h
new file mode 100644
index 00000000..1d020c9f
--- /dev/null
+++ b/indexlib/boost-compat/static_assert.h
@@ -0,0 +1,11 @@
+#ifndef LPC_STATIC_ASSERT_H1119293317_INCLUDE_GUARD_
+#define LPC_STATIC_ASSERT_H1119293317_INCLUDE_GUARD_
+
+#ifdef HAVE_BOOST
+#include <boost/static_assert.hpp>
+#elif !defined( BOOST_STATIC_ASSERT )
+#define BOOST_STATIC_ASSERT( x )
+#endif
+
+
+#endif /* LPC_STATIC_ASSERT_H1119293317_INCLUDE_GUARD_ */
diff --git a/indexlib/boost-compat/static_assert.hpp b/indexlib/boost-compat/static_assert.hpp
deleted file mode 100644
index 76de9c49..00000000
--- a/indexlib/boost-compat/static_assert.hpp
+++ /dev/null
@@ -1,11 +0,0 @@
-#ifndef LPC_STATIC_ASSERT_HPP1119293317_INCLUDE_GUARD_
-#define LPC_STATIC_ASSERT_HPP1119293317_INCLUDE_GUARD_
-
-#ifdef HAVE_BOOST
-#include <boost/static_assert.hpp>
-#elif !defined( BOOST_STATIC_ASSERT )
-#define BOOST_STATIC_ASSERT( x )
-#endif
-
-
-#endif /* LPC_STATIC_ASSERT_HPP1119293317_INCLUDE_GUARD_ */
diff --git a/indexlib/boost-compat/weak_ptr.hpp b/indexlib/boost-compat/weak_ptr.h
index c2385007..338e5221 100644
--- a/indexlib/boost-compat/weak_ptr.hpp
+++ b/indexlib/boost-compat/weak_ptr.h
@@ -1,8 +1,8 @@
-#ifndef BOOST_WEAK_PTR_HPP_INCLUDED
-#define BOOST_WEAK_PTR_HPP_INCLUDED
+#ifndef BOOST_WEAK_PTR_H_INCLUDED
+#define BOOST_WEAK_PTR_H_INCLUDED
//
-// weak_ptr.hpp
+// weak_ptr.h
//
// Copyright (c) 2001, 2002, 2003 Peter Dimov
//
@@ -189,4 +189,4 @@ template<class T> shared_ptr<T> make_shared(weak_ptr<T> const & r)
# pragma warning(pop)
#endif
-#endif // #ifndef BOOST_WEAK_PTR_HPP_INCLUDED
+#endif // #ifndef BOOST_WEAK_PTR_H_INCLUDED
diff --git a/indexlib/compressed.cpp b/indexlib/compressed.cpp
index a60c3f06..9c73c304 100644
--- a/indexlib/compressed.cpp
+++ b/indexlib/compressed.cpp
@@ -53,7 +53,7 @@ memory_manager* get_comp_p() {
compressed_file::compressed_file( std::string base ):
auxdata_( path_concat( base, "table" ) ),
- data_( std::auto_ptr<memory_manager>( new mmap_manager( path_concat( base, "data" ) ) ) )
+ data_( std::unique_ptr<memory_manager>( new mmap_manager( path_concat( base, "data" ) ) ) )
{
if ( auxdata_.empty() ) auxdata_.push_back( 0 );
}
diff --git a/indexlib/configure.in.in b/indexlib/configure.in.in
index 1f1a806a..b66b049c 100644
--- a/indexlib/configure.in.in
+++ b/indexlib/configure.in.in
@@ -19,4 +19,4 @@ if test "x$have_boost" = "xyes"; then
CXXFLAGS="-DHAVE_BOOST $CXXFLAGS"
fi
- \ No newline at end of file
+
diff --git a/indexlib/create.cpp b/indexlib/create.cpp
index e47d116a..c64e2158 100644
--- a/indexlib/create.cpp
+++ b/indexlib/create.cpp
@@ -56,41 +56,41 @@ indexlib::index_type::type type_of( const char* basename ) {
}
}
-std::auto_ptr<indexlib::index> indexlib::create( const char* basename, indexlib::index_type::type flags ) {
+std::unique_ptr<indexlib::index> indexlib::create( const char* basename, indexlib::index_type::type flags ) {
using namespace indexlib::version;
- if ( type_of( basename ) != indexlib::index_type::none ) return std::auto_ptr<indexlib::index>( 0 );
+ if ( type_of( basename ) != indexlib::index_type::none ) return std::unique_ptr<indexlib::index>();
try {
if ( basename[ strlen( basename ) - 1 ] == '/' && !isdir( basename ) ) {
- if ( !indexlib::detail::mkdir_trailing( basename ) ) return std::auto_ptr<indexlib::index>( 0 );
+ if ( !indexlib::detail::mkdir_trailing( basename ) ) return std::unique_ptr<indexlib::index>();
}
std::ofstream info( path_concat( basename, "info" ).c_str() );
info << marker << std::endl;
info << "version " << major << '.' << minor << "\n";
if ( flags == index_type::quotes ) {
info << "quotes" << std::endl;
- return std::auto_ptr<indexlib::index>( new quotes( basename ) );
+ return std::unique_ptr<indexlib::index>( new quotes( basename ) );
}
if ( flags == index_type::ifile ) {
info << "ifile" << std::endl;
- return std::auto_ptr<indexlib::index>( new ifile( basename ) );
+ return std::unique_ptr<indexlib::index>( new ifile( basename ) );
}
} catch ( const std::exception& e ) {
std::cerr << "index creation failed: " << e.what() << std::endl;
}
- return std::auto_ptr<indexlib::index>( 0 );
+ return std::unique_ptr<indexlib::index>();
}
-std::auto_ptr<indexlib::index> indexlib::open( const char* basename, unsigned flags ) {
+std::unique_ptr<indexlib::index> indexlib::open( const char* basename, unsigned flags ) {
using namespace indexlib;
switch ( type_of( basename ) ) {
- case index_type::ifile: return std::auto_ptr<indexlib::index>( new ifile( basename ) );
- case index_type::quotes: return std::auto_ptr<indexlib::index>( new quotes( basename ) );
+ case index_type::ifile: return std::unique_ptr<indexlib::index>( new ifile( basename ) );
+ case index_type::quotes: return std::unique_ptr<indexlib::index>( new quotes( basename ) );
case index_type::none:
- if ( flags == open_flags::fail_if_nonexistant ) return std::auto_ptr<indexlib::index>();
+ if ( flags == open_flags::fail_if_nonexistant ) return std::unique_ptr<indexlib::index>();
return create( basename, index_type::type( flags ) );
}
logfile() << format( "%s:%s: Unexpected code reached!\n" ) % __FILE__ % __LINE__;
- return std::auto_ptr<indexlib::index>( 0 );
+ return std::unique_ptr<indexlib::index>();
}
bool indexlib::exists( const char* basename ) {
diff --git a/indexlib/create.h b/indexlib/create.h
index e865728e..18e9929b 100644
--- a/indexlib/create.h
+++ b/indexlib/create.h
@@ -57,14 +57,14 @@ namespace indexlib {
* This will return something like "new quotes(basename)" but by using this, you do not need to include quotes.h
* which needs boost headers also.
*/
- std::auto_ptr<index> create( const char* basename, index_type::type flags = index_type::quotes );
+ std::unique_ptr<index> create( const char* basename, index_type::type flags = index_type::quotes );
namespace open_flags {
enum type { none = 0,
create_ifile = index_type::ifile,
create_quotes = index_type::quotes,
fail_if_nonexistant };
}
- std::auto_ptr<index> open( const char* basename, unsigned flags = open_flags::fail_if_nonexistant );
+ std::unique_ptr<index> open( const char* basename, unsigned flags = open_flags::fail_if_nonexistant );
/**
* Removes the index.
diff --git a/indexlib/ifile.cpp b/indexlib/ifile.cpp
index b71297a0..43057433 100644
--- a/indexlib/ifile.cpp
+++ b/indexlib/ifile.cpp
@@ -39,7 +39,7 @@
#include <functional>
#include <string.h>
#include "format.h"
-#include "boost-compat/next_prior.hpp"
+#include "boost-compat/next_prior.h"
ifile::ifile( std::string name ):
@@ -83,10 +83,10 @@ void ifile::remove_doc( const char* doc ) {
// TODO: remove from words_ too if that's the case
}
-std::auto_ptr<indexlib::result> ifile::everything() const {
+std::unique_ptr<indexlib::result> ifile::everything() const {
std::vector<unsigned> res( ndocs() );
for ( unsigned i = 0; i != ndocs(); ++i ) res[ i ] = i;
- return std::auto_ptr<indexlib::result>( new indexlib::detail::simple_result( res ) );
+ return std::unique_ptr<indexlib::result>( new indexlib::detail::simple_result( res ) );
}
namespace {
@@ -94,13 +94,13 @@ inline
bool word_too_small( std::string str ) { return str.size() < 3; }
}
-std::auto_ptr<indexlib::result> ifile::search( const char* str ) const {
+std::unique_ptr<indexlib::result> ifile::search( const char* str ) const {
using namespace indexlib::detail;
using indexlib::result;
assert( str );
if ( !*str ) return everything();
std::vector<std::string> words = break_clean( str );
- if ( words.empty() ) return std::auto_ptr<result>( new empty_result );
+ if ( words.empty() ) return std::unique_ptr<result>( new empty_result );
words.erase( std::remove_if( words.begin(), words.end(), &word_too_small ), words.end() );
if ( words.empty() ) return everything();
std::set<unsigned> values = find_word( words[ 0 ] );
@@ -113,7 +113,7 @@ std::auto_ptr<indexlib::result> ifile::search( const char* str ) const {
std::set_intersection( now.begin(), now.end(), values.begin(), values.end(), std::inserter( next, next.begin() ) );
next.swap( values );
}
- std::auto_ptr<result> r(new simple_result( std::vector<unsigned>( values.begin(), values.end() ) ) );
+ std::unique_ptr<result> r(new simple_result( std::vector<unsigned>( values.begin(), values.end() ) ) );
return r;
}
@@ -169,7 +169,7 @@ std::vector<std::string> ifile::break_clean( const char* complete ) const {
std::sort( words.begin(), words.end() );
words.erase( std::unique( words.begin(), words.end() ), words.end() );
words.erase( std::remove_if( words.begin(), words.end(), &ifile::invalid_word ), words.end() );
- words.erase( std::remove_if( words.begin(), words.end(), std::bind1st( std::mem_fun( &ifile::is_stop_word ), this ) ), words.end() );
+ words.erase( std::remove_if( words.begin(), words.end(), std::bind( std::mem_fn( &ifile::is_stop_word ), this, std::placeholders::_1 ) ), words.end() );
return words;
}
diff --git a/indexlib/ifile.h b/indexlib/ifile.h
index 4cfcf585..3fcf772e 100644
--- a/indexlib/ifile.h
+++ b/indexlib/ifile.h
@@ -43,8 +43,10 @@
struct ifile : public indexlib::index {
public:
ifile( std::string );
+ ifile(ifile const &) = delete;
+ ifile& operator=(ifile const &) = delete;
virtual void add( const char* str, const char* doc );
- virtual std::auto_ptr<indexlib::result> search( const char* ) const;
+ virtual std::unique_ptr<indexlib::result> search( const char* ) const;
virtual unsigned ndocs() const { return docnames_.size(); }
virtual std::string lookup_docname( unsigned idx ) const { return docnames_.get( idx ); }
@@ -56,7 +58,7 @@ struct ifile : public indexlib::index {
private:
std::set<unsigned> find_word( std::string ) const;
std::vector<std::string> break_clean( const char* ) const;
- virtual std::auto_ptr<indexlib::result> everything() const;
+ virtual std::unique_ptr<indexlib::result> everything() const;
static bool invalid_word( std::string );
bool is_stop_word( std::string ) const;
@@ -67,7 +69,7 @@ struct ifile : public indexlib::index {
stringset words_;
stringset stopwords_;
leafdatavector files_;
- std::auto_ptr<indexlib::detail::tokenizer> tokenizer_;
+ std::unique_ptr<indexlib::detail::tokenizer> tokenizer_;
};
#endif /* _IFILE_INCLUDE_GUARD_LPC_56465465798732 */
diff --git a/indexlib/index.h b/indexlib/index.h
index b7c68375..5ffab2d4 100644
--- a/indexlib/index.h
+++ b/indexlib/index.h
@@ -61,7 +61,7 @@ struct result {
* @return null if the type does not support this or the particular search string makes it impossible to
* fulfill the search request.
*/
- virtual std::auto_ptr<result> search( const char* ) = 0;
+ virtual std::unique_ptr<result> search( const char* ) = 0;
};
struct index {
@@ -96,7 +96,7 @@ struct index {
/**
* Returns all documents matching \param pattern.
*/
- virtual std::auto_ptr<result> search( const char* pattern ) const = 0;
+ virtual std::unique_ptr<result> search( const char* pattern ) const = 0;
/**
* Returns the number of docs indexed.
diff --git a/indexlib/index_slow.h b/indexlib/index_slow.h
index bbb4f7b7..6f1dcced 100644
--- a/indexlib/index_slow.h
+++ b/indexlib/index_slow.h
@@ -34,7 +34,7 @@
#include "index.h"
#include "slow.h"
-#include "boost-compat/noncopyable.hpp"
+#include "boost-compat/noncopyable.h"
/**
* \see class slow which should be merged into this one.
diff --git a/indexlib/leafdata.cpp b/indexlib/leafdata.cpp
index db61119a..c8882156 100644
--- a/indexlib/leafdata.cpp
+++ b/indexlib/leafdata.cpp
@@ -33,7 +33,7 @@
#include "logfile.h"
#include <iostream>
#include <algorithm>
-#include "boost-compat/next_prior.hpp"
+#include "boost-compat/next_prior.h"
#include "format.h"
namespace {
diff --git a/indexlib/leafdatavector.cpp b/indexlib/leafdatavector.cpp
index 0dae6555..89b95ab9 100644
--- a/indexlib/leafdatavector.cpp
+++ b/indexlib/leafdatavector.cpp
@@ -45,7 +45,7 @@ typedef mmap_manager leafdatavector_manager;
#endif
leafdatavector::leafdatavector( std::string name ):
- leafs_( std::auto_ptr<memory_manager>( new leafdatavector_manager( path_concat( name, "leafs" ) ) ) ),
+ leafs_( std::unique_ptr<memory_manager>( new leafdatavector_manager( path_concat( name, "leafs" ) ) ) ),
table_( path_concat( name, "table" ) )
{
}
diff --git a/indexlib/main.cpp b/indexlib/main.cpp
index b8685153..dcedbe1c 100644
--- a/indexlib/main.cpp
+++ b/indexlib/main.cpp
@@ -46,7 +46,7 @@
#include <memory>
#include <string.h>
-typedef std::auto_ptr<indexlib::index> index_smart;
+typedef std::unique_ptr<indexlib::index> index_smart;
index_smart get_index( std::string name ) {
return indexlib::open( name.c_str(), indexlib::open_flags::create_quotes );
@@ -92,8 +92,8 @@ int debug( int argc, char* argv[] ) {
std::cout << "compressed_file:\n";
file.print( std::cout );
} else if ( type == "break_up" ) {
- std::auto_ptr<tokenizer> tok = get_tokenizer( "latin-1:european" );
- if ( !tok.get() ) {
+ std::unique_ptr<tokenizer> tok = get_tokenizer( "latin-1:european" );
+ if ( !tok ) {
std::cerr << "Could not get tokenizer\n";
return 1;
}
diff --git a/indexlib/mempool.h b/indexlib/mempool.h
index acf62494..08be8857 100644
--- a/indexlib/mempool.h
+++ b/indexlib/mempool.h
@@ -55,7 +55,9 @@ struct mempool /* : boost::noncopyable */ {
typedef Traits traits_type;
typedef typename traits_type::value_type data_type;
typedef typename traits_type::pointer data_typeptr;
- explicit mempool( std::auto_ptr<memory_manager> source );
+ explicit mempool( std::unique_ptr<memory_manager> &&source );
+ mempool(mempool const &) = delete;
+ mempool& operator=(mempool const &) = delete;
/**
* Returns a memory block of size \param s.
@@ -151,7 +153,7 @@ struct mempool /* : boost::noncopyable */ {
bool join( data_typeptr&, unsigned order );
void deallocate( data_typeptr, unsigned order );
- std::auto_ptr<memory_manager> manager_;
+ std::unique_ptr<memory_manager> manager_;
memory_reference<uint32_t> max_order_;
};
diff --git a/indexlib/mempool.tcc b/indexlib/mempool.tcc
index a130bffe..750209a2 100644
--- a/indexlib/mempool.tcc
+++ b/indexlib/mempool.tcc
@@ -33,8 +33,8 @@
*/
template <typename Traits>
-mempool<Traits>::mempool( std::auto_ptr<memory_manager> source ):
- manager_( source ),
+mempool<Traits>::mempool( std::unique_ptr<memory_manager> &&source ):
+ manager_( std::move(source) ),
max_order_( 0 )
{
if ( !manager_->size() ) init_memory();
diff --git a/indexlib/memvector.h b/indexlib/memvector.h
index 446fddf9..feb96268 100644
--- a/indexlib/memvector.h
+++ b/indexlib/memvector.h
@@ -35,8 +35,8 @@
#include "bitio.h"
#include "compat.h"
#include "manager.h"
-#include "boost-compat/static_assert.hpp"
-#include "boost-compat/scoped_ptr.hpp"
+#include "boost-compat/static_assert.h"
+#include "boost-compat/scoped_ptr.h"
#ifdef HAVE_BOOST
#include <boost/type_traits/is_convertible.hpp>
#endif
diff --git a/indexlib/pointer.h b/indexlib/pointer.h
index 70721918..336ede76 100644
--- a/indexlib/pointer.h
+++ b/indexlib/pointer.h
@@ -34,7 +34,7 @@
#include <inttypes.h>
#include <iostream>
-#include "boost-compat/static_assert.hpp"
+#include "boost-compat/static_assert.h"
#ifdef HAVE_BOOST
#include <boost/type_traits.hpp>
#endif
diff --git a/indexlib/quotes.cpp b/indexlib/quotes.cpp
index e4c35db4..abf8915c 100644
--- a/indexlib/quotes.cpp
+++ b/indexlib/quotes.cpp
@@ -68,12 +68,12 @@ void quotes::remove_doc( const char* doc ) {
impl_.remove_doc( doc );
}
-std::auto_ptr<indexlib::result> quotes::search( const char* cstr ) const {
+std::unique_ptr<indexlib::result> quotes::search( const char* cstr ) const {
std::string str = cstr;
if ( str[ 0 ] != '\"' ) return impl_.search( cstr );
str = cstr + 1; // cut "
if ( str.size() && str[ str.size() - 1 ] == '\"' ) str.erase( str.size() - 1 );
- std::auto_ptr<indexlib::result> prev = impl_.search( str.c_str() );
+ std::unique_ptr<indexlib::result> prev = impl_.search( str.c_str() );
if ( str.find( ' ' ) != std::string::npos ) {
indexlib::Match m( str );
std::vector<unsigned> candidates = prev->list();
@@ -86,7 +86,7 @@ std::auto_ptr<indexlib::result> quotes::search( const char* cstr ) const {
res.push_back( *first );
}
}
- return std::auto_ptr<indexlib::result>( new indexlib::detail::simple_result( res ) );
+ return std::unique_ptr<indexlib::result>( new indexlib::detail::simple_result( res ) );
} else { return prev; }
}
diff --git a/indexlib/quotes.h b/indexlib/quotes.h
index 7852d0dd..6604e9a9 100644
--- a/indexlib/quotes.h
+++ b/indexlib/quotes.h
@@ -42,7 +42,7 @@ struct quotes : public indexlib::index {
quotes( std::string );
virtual void add( const char* str, const char* doc );
virtual void remove_doc( const char* doc );
- virtual std::auto_ptr<indexlib::result> search( const char* ) const;
+ virtual std::unique_ptr<indexlib::result> search( const char* ) const;
virtual unsigned ndocs() const { return impl_.ndocs(); }
virtual std::string lookup_docname( unsigned d ) const { return impl_.lookup_docname( d ); }
diff --git a/indexlib/result.h b/indexlib/result.h
index 4cad40d7..dd23f25d 100644
--- a/indexlib/result.h
+++ b/indexlib/result.h
@@ -42,7 +42,7 @@ struct simple_result : indexlib::result {
simple_result( std::vector<unsigned> r ):res( r ) { }
std::vector<unsigned> list() const { return res; }
- std::auto_ptr<result> search( const char* ) { return std::auto_ptr<result>( 0 ); }
+ std::unique_ptr<result> search( const char* ) { return std::unique_ptr<result>(); }
private:
std::vector<unsigned> res;
};
@@ -50,7 +50,7 @@ struct simple_result : indexlib::result {
struct empty_result : indexlib::result {
public:
std::vector<unsigned> list() const { return std::vector<unsigned>(); }
- std::auto_ptr<result> search( const char* ) { return std::auto_ptr<result>(); }
+ std::unique_ptr<result> search( const char* ) { return std::unique_ptr<result>(); }
};
} //namespace detail
} //namespace indexlib
diff --git a/indexlib/stringarray.h b/indexlib/stringarray.h
index a928db31..6202036c 100644
--- a/indexlib/stringarray.h
+++ b/indexlib/stringarray.h
@@ -34,7 +34,7 @@
#include <iostream>
#include <string>
-#include "boost-compat/scoped_ptr.hpp"
+#include "boost-compat/scoped_ptr.h"
#include "manager.h"
#include "memvector.h"
diff --git a/indexlib/tests/create-test.cpp b/indexlib/tests/create-test.cpp
index beeb7d5f..da3c91ca 100644
--- a/indexlib/tests/create-test.cpp
+++ b/indexlib/tests/create-test.cpp
@@ -14,8 +14,8 @@ void cleanup() {
void simple() {
cleanup();
- std::auto_ptr<indexlib::index> ptr = indexlib::create( fname );
- BOOST_CHECK( ptr.get() );
+ std::unique_ptr<indexlib::index> ptr = indexlib::create( fname );
+ BOOST_CHECK( ptr );
}
test_suite* get_suite() {
diff --git a/indexlib/tests/mempool-test.cpp b/indexlib/tests/mempool-test.cpp
index a0895243..1c9a4eb6 100644
--- a/indexlib/tests/mempool-test.cpp
+++ b/indexlib/tests/mempool-test.cpp
@@ -11,7 +11,7 @@ void cleanup() {
void deallocate() {
cleanup();
- mempool<leaf_data_pool_traits> pool( std::auto_ptr<memory_manager>( new mmap_manager( fname ) ) );
+ mempool<leaf_data_pool_traits> pool( std::unique_ptr<memory_manager>( new mmap_manager( fname ) ) );
std::vector<leafdataptr> pointers;
for ( int i = 0; i != 32; ++i ) {
@@ -33,7 +33,7 @@ void deallocate() {
void large() {
cleanup();
- mempool<leaf_data_pool_traits> pool( std::auto_ptr<memory_manager>( new mmap_manager( fname ) ) );
+ mempool<leaf_data_pool_traits> pool( std::unique_ptr<memory_manager>( new mmap_manager( fname ) ) );
pool.allocate( 4095 );
pool.allocate( 4097 );
diff --git a/indexlib/tests/tokenizer-test.cpp b/indexlib/tests/tokenizer-test.cpp
index 372859d9..1354ddcd 100644
--- a/indexlib/tests/tokenizer-test.cpp
+++ b/indexlib/tests/tokenizer-test.cpp
@@ -9,8 +9,8 @@ using indexlib::detail::tokenizer;
using indexlib::detail::get_tokenizer;
void simple() {
- std::auto_ptr<tokenizer> tokenizer = get_tokenizer( "latin-1:european" );
- assert(tokenizer.get());
+ std::unique_ptr<tokenizer> tokenizer = get_tokenizer( "latin-1:european" );
+ assert(tokenizer);
std::vector<std::string> tokens = tokenizer->string_to_words( "one ,as, ''#`:ThReE, ááàçé" );
std::vector<std::string> expected;
expected.push_back( "ONE" );
@@ -26,8 +26,8 @@ void simple() {
}
void with_newlines() {
- std::auto_ptr<tokenizer> tokenizer = get_tokenizer( "latin-1:european" );
- assert(tokenizer.get());
+ std::unique_ptr<tokenizer> tokenizer = get_tokenizer( "latin-1:european" );
+ assert(tokenizer);
std::vector<std::string> tokens = tokenizer->string_to_words( "one\ntwo\nthree" );
std::vector<std::string> expected;
expected.push_back( "ONE" );
@@ -42,8 +42,8 @@ void with_newlines() {
}
void with_numbers() {
- std::auto_ptr<tokenizer> tokenizer = get_tokenizer( "latin-1:european" );
- assert(tokenizer.get());
+ std::unique_ptr<tokenizer> tokenizer = get_tokenizer( "latin-1:european" );
+ assert(tokenizer);
std::vector<std::string> tokens = tokenizer->string_to_words( "one 012 123 four" );
std::vector<std::string> expected;
expected.push_back( "ONE" );
diff --git a/indexlib/tokenizer.cpp b/indexlib/tokenizer.cpp
index b069c748..1c1243a7 100644
--- a/indexlib/tokenizer.cpp
+++ b/indexlib/tokenizer.cpp
@@ -294,7 +294,7 @@ class latin1_tokenizer : public indexlib::detail::tokenizer {
}
-std::auto_ptr<indexlib::detail::tokenizer> indexlib::detail::get_tokenizer( std::string name ) {
- if ( name == "latin-1:european" ) return std::auto_ptr<indexlib::detail::tokenizer>( new latin1_tokenizer );
- return std::auto_ptr<indexlib::detail::tokenizer>( 0 );
+std::unique_ptr<indexlib::detail::tokenizer> indexlib::detail::get_tokenizer( std::string name ) {
+ if ( name == "latin-1:european" ) return std::unique_ptr<indexlib::detail::tokenizer>( new latin1_tokenizer );
+ return std::unique_ptr<indexlib::detail::tokenizer>();
}
diff --git a/indexlib/tokenizer.h b/indexlib/tokenizer.h
index 2494f297..9916df66 100644
--- a/indexlib/tokenizer.h
+++ b/indexlib/tokenizer.h
@@ -20,7 +20,7 @@ class tokenizer {
virtual std::vector<std::string> do_string_to_words( const char* ) = 0;
};
-std::auto_ptr<tokenizer> get_tokenizer( std::string );
+std::unique_ptr<tokenizer> get_tokenizer( std::string );
}}